summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'chart2')
-rw-r--r--chart2/CppunitTest_chart2_dump.mk4
-rw-r--r--chart2/CppunitTest_chart2_export3.mk14
-rw-r--r--chart2/CppunitTest_chart2_geometry.mk8
-rw-r--r--chart2/CppunitTest_chart2_pivot_chart_test.mk4
-rw-r--r--chart2/CppunitTest_chart2_trendcalculators.mk4
-rw-r--r--chart2/CppunitTest_chart2_uichart.mk58
-rw-r--r--chart2/CppunitTest_chart2_xshape.mk4
-rw-r--r--chart2/IwyuFilter_chart2.yaml251
-rw-r--r--chart2/Library_chartcontroller.mk8
-rw-r--r--chart2/Library_chartcore.mk8
-rw-r--r--chart2/Module_chart2.mk4
-rw-r--r--chart2/UIConfig_chart2.mk4
-rw-r--r--chart2/export_setup.mk62
-rw-r--r--chart2/import_setup.mk5
-rw-r--r--chart2/inc/ChartModel.hxx27
-rw-r--r--chart2/inc/ChartTypeManager.hxx8
-rw-r--r--chart2/inc/ChartView.hxx41
-rw-r--r--chart2/inc/bitmaps.hlst240
-rw-r--r--chart2/inc/chart.hrc2
-rw-r--r--chart2/inc/pch/precompiled_chartcontroller.hxx101
-rw-r--r--chart2/inc/pch/precompiled_chartcore.hxx117
-rw-r--r--chart2/inc/strings.hrc5
-rw-r--r--chart2/inc/unonames.hxx46
-rw-r--r--chart2/qa/TestCaseOldAPI.java18
-rw-r--r--chart2/qa/extras/PivotChartTest.cxx36
-rw-r--r--chart2/qa/extras/chart2_trendcalculators.cxx26
-rw-r--r--chart2/qa/extras/chart2dump/chart2dump.cxx65
-rw-r--r--chart2/qa/extras/chart2dump/reference/chartdatatest/simple_chart.txt2
-rw-r--r--chart2/qa/extras/chart2dump/reference/piecharttest/donut_chart.txt10
-rw-r--r--chart2/qa/extras/chart2export.cxx1394
-rw-r--r--chart2/qa/extras/chart2export2.cxx1242
-rw-r--r--chart2/qa/extras/chart2export3.cxx945
-rw-r--r--chart2/qa/extras/chart2geometry.cxx180
-rw-r--r--chart2/qa/extras/chart2import.cxx935
-rw-r--r--chart2/qa/extras/chart2import2.cxx360
-rw-r--r--chart2/qa/extras/charttest.hxx228
-rw-r--r--chart2/qa/extras/data/docx/TableOnPage3.docxbin0 -> 35511 bytes
-rw-r--r--chart2/qa/extras/data/odp/BarChartVeryLongLabel.odpbin0 -> 16390 bytes
-rw-r--r--chart2/qa/extras/data/ods/chartWithDotInSheetName.odsbin0 -> 15057 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf101894.odsbin0 -> 18221 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf107097.odsbin0 -> 17945 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf120348.odsbin0 -> 43612 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf136011.odsbin0 -> 23559 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf146066.odsbin0 -> 15079 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf146463.odsbin0 -> 21780 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf148142.odsbin0 -> 15349 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf151091.odsbin0 -> 14140 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf153706_XY_scatter_chart.odsbin0 -> 16152 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf158223.odsbin0 -> 27391 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf39052.odsbin0 -> 15941 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf50934_barOfPie.odsbin0 -> 14588 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf50934_pieOfPie.odsbin0 -> 15834 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf62057.odsbin0 -> 16852 bytes
-rw-r--r--chart2/qa/extras/data/ods/tdf99969.odsbin0 -> 14472 bytes
-rw-r--r--chart2/qa/extras/data/pptx/PieChartWithAutomaticLayout_SizeAndPosition.pptxbin0 -> 165804 bytes
-rw-r--r--chart2/qa/extras/data/pptx/tdf127720.pptxbin0 -> 38935 bytes
-rw-r--r--chart2/qa/extras/data/pptx/tdf137691_dataTable.pptxbin0 -> 49901 bytes
-rw-r--r--chart2/qa/extras/data/pptx/tdf146487.pptxbin0 -> 33891 bytes
-rw-r--r--chart2/qa/extras/data/pptx/tdf146756_bestFit.pptxbin0 -> 67936 bytes
-rw-r--r--chart2/qa/extras/data/pptx/tdf150176.pptxbin0 -> 52342 bytes
-rw-r--r--chart2/qa/extras/data/xlsx/ChartDataTable.xlsxbin0 -> 8142 bytes
-rw-r--r--chart2/qa/extras/data/xlsx/DataTable-MultipleLegendEntriesForOneDataSeries.xlsxbin0 -> 15745 bytes
-rw-r--r--chart2/qa/extras/data/xlsx/barOfPieChart.xlsxbin0 -> 7741 bytes
-rw-r--r--chart2/qa/extras/data/xlsx/barchart_totalsrow.xlsxbin0 -> 20117 bytes
-rw-r--r--chart2/qa/extras/data/xlsx/chart_pie2007.xlsxbin11299 -> 9091 bytes
-rw-r--r--chart2/qa/extras/data/xlsx/pieOfPieChart.xlsxbin0 -> 7656 bytes
-rw-r--r--chart2/qa/extras/data/xlsx/tdf150434.xlsxbin0 -> 14918 bytes
-rw-r--r--chart2/qa/extras/data/xlsx/tdf39052.xlsxbin0 -> 9210 bytes
-rw-r--r--chart2/qa/extras/data/xlsx/tdf98690.xlsxbin0 -> 17975 bytes
-rw-r--r--chart2/qa/extras/uichart.cxx569
-rw-r--r--chart2/qa/extras/xshape/chart2xshape.cxx200
-rw-r--r--chart2/qa/extras/xshape/data/ods/tdf151424.odsbin0 -> 17727 bytes
-rw-r--r--chart2/qa/extras/xshape/data/ods/tdf90839-4.odsbin19789 -> 19765 bytes
-rw-r--r--chart2/qa/extras/xshape/data/ods/testChart.ods (renamed from chart2/qa/unit/data/ods/testChart.ods)bin11156 -> 11156 bytes
-rw-r--r--chart2/qa/extras/xshape/data/pptx/tdf149204.pptxbin0 -> 33324 bytes
-rw-r--r--chart2/qa/extras/xshape/data/reference/fdo75075.xml1184
-rw-r--r--chart2/qa/extras/xshape/data/reference/property-mapping-bar.xml814
-rw-r--r--chart2/qa/extras/xshape/data/reference/tdf149204.xml397
-rw-r--r--chart2/qa/extras/xshape/data/reference/tdf150832.xml974
-rw-r--r--chart2/qa/extras/xshape/data/reference/tdf151424.xml1160
-rw-r--r--chart2/qa/extras/xshape/data/reference/tdf90839-1.xml142
-rw-r--r--chart2/qa/extras/xshape/data/reference/tdf90839-2.xml150
-rw-r--r--chart2/qa/extras/xshape/data/reference/tdf90839-3.xml150
-rw-r--r--chart2/qa/extras/xshape/data/reference/tdf90839-4.xml98
-rw-r--r--chart2/qa/extras/xshape/data/reference/testChart.xml1218
-rw-r--r--chart2/qa/extras/xshape/data/xls/tdf150832.xlsbin0 -> 7168 bytes
-rw-r--r--chart2/qa/extras/xshape/data/xlsx/tdf90839-1.xlsxbin13209 -> 13080 bytes
-rw-r--r--chart2/qa/extras/xshape/data/xlsx/tdf90839-2.xlsxbin12601 -> 12498 bytes
-rw-r--r--chart2/qa/extras/xshape/data/xlsx/tdf90839-3.xlsxbin13312 -> 13200 bytes
-rw-r--r--chart2/qa/unit/common_functor_test.cxx4
-rw-r--r--chart2/qa/unit/data/reference/testChart.xml1216
-rw-r--r--chart2/source/chartcore.component7
-rw-r--r--chart2/source/controller/accessibility/AccessibleBase.cxx99
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartElement.cxx38
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartElement.hxx7
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartShape.cxx6
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartShape.hxx4
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartView.cxx217
-rw-r--r--chart2/source/controller/accessibility/AccessibleTextHelper.cxx41
-rw-r--r--chart2/source/controller/accessibility/AccessibleViewForwarder.cxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/AreaWrapper.cxx64
-rw-r--r--chart2/source/controller/chartapiwrapper/AreaWrapper.hxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/AxisWrapper.cxx71
-rw-r--r--chart2/source/controller/chartapiwrapper/AxisWrapper.hxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx47
-rw-r--r--chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx68
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx24
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx153
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx99
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx15
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx308
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/GridWrapper.cxx65
-rw-r--r--chart2/source/controller/chartapiwrapper/GridWrapper.hxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/LegendWrapper.cxx66
-rw-r--r--chart2/source/controller/chartapiwrapper/LegendWrapper.hxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx168
-rw-r--r--chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx11
-rw-r--r--chart2/source/controller/chartapiwrapper/TitleWrapper.cxx166
-rw-r--r--chart2/source/controller/chartapiwrapper/TitleWrapper.hxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx145
-rw-r--r--chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx11
-rw-r--r--chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx65
-rw-r--r--chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx31
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx65
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx10
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx8
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx11
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx10
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx10
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx54
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx40
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx19
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx77
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx7
-rw-r--r--chart2/source/controller/chartcontroller.component5
-rw-r--r--chart2/source/controller/dialogs/ChartResourceGroups.cxx90
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.cxx27
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx71
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.hxx3
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.cxx371
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.hxx25
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx311
-rw-r--r--chart2/source/controller/dialogs/DialogModel.hxx43
-rw-r--r--chart2/source/controller/dialogs/ObjectNameProvider.cxx241
-rw-r--r--chart2/source/controller/dialogs/RangeSelectionHelper.cxx8
-rw-r--r--chart2/source/controller/dialogs/RangeSelectionListener.cxx7
-rw-r--r--chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx6
-rw-r--r--chart2/source/controller/dialogs/TitleDialogData.cxx26
-rw-r--r--chart2/source/controller/dialogs/dlg_ChartType.cxx9
-rw-r--r--chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx1
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard.cxx9
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx19
-rw-r--r--chart2/source/controller/dialogs/dlg_DataEditor.cxx16
-rw-r--r--chart2/source/controller/dialogs/dlg_DataSource.cxx24
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx4
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertDataTable.cxx61
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx22
-rw-r--r--chart2/source/controller/dialogs/dlg_NumberFormat.cxx3
-rw-r--r--chart2/source/controller/dialogs/dlg_NumberFormat.hxx3
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx62
-rw-r--r--chart2/source/controller/dialogs/dlg_ShapeFont.cxx2
-rw-r--r--chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx2
-rw-r--r--chart2/source/controller/dialogs/dlg_View3D.cxx8
-rw-r--r--chart2/source/controller/dialogs/res_BarGeometry.cxx5
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx109
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.hxx12
-rw-r--r--chart2/source/controller/dialogs/res_DataTableProperties.cxx111
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx21
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition.cxx39
-rw-r--r--chart2/source/controller/dialogs/res_Trendline.cxx51
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx25
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx30
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx6
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx65
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx25
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.cxx29
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.cxx46
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx35
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_DataPointOption.cxx8
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx125
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.hxx10
-rw-r--r--chart2/source/controller/dialogs/tp_DataTable.cxx43
-rw-r--r--chart2/source/controller/dialogs/tp_DataTable.hxx37
-rw-r--r--chart2/source/controller/dialogs/tp_LegendPosition.cxx16
-rw-r--r--chart2/source/controller/dialogs/tp_LegendPosition.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_PointGeometry.cxx6
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.cxx16
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.cxx1
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.cxx90
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.cxx44
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.cxx10
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx12
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx2
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx52
-rw-r--r--chart2/source/controller/drawinglayer/ViewElementListProvider.cxx18
-rw-r--r--chart2/source/controller/inc/AccessibleBase.hxx39
-rw-r--r--chart2/source/controller/inc/AccessibleChartView.hxx22
-rw-r--r--chart2/source/controller/inc/AccessibleTextHelper.hxx26
-rw-r--r--chart2/source/controller/inc/AxisItemConverter.hxx9
-rw-r--r--chart2/source/controller/inc/CharacterPropertyItemConverter.hxx4
-rw-r--r--chart2/source/controller/inc/ChartController.hxx83
-rw-r--r--chart2/source/controller/inc/ChartDocumentWrapper.hxx4
-rw-r--r--chart2/source/controller/inc/ChartWindow.hxx9
-rw-r--r--chart2/source/controller/inc/ConfigurationAccess.hxx38
-rw-r--r--chart2/source/controller/inc/DataPointItemConverter.hxx11
-rw-r--r--chart2/source/controller/inc/DataTableItemConverter.hxx56
-rw-r--r--chart2/source/controller/inc/ErrorBarItemConverter.hxx2
-rw-r--r--chart2/source/controller/inc/GraphicPropertyItemConverter.hxx2
-rw-r--r--chart2/source/controller/inc/ItemConverter.hxx2
-rw-r--r--chart2/source/controller/inc/LegendItemConverter.hxx6
-rw-r--r--chart2/source/controller/inc/MultipleChartConverters.hxx5
-rw-r--r--chart2/source/controller/inc/ObjectHierarchy.hxx39
-rw-r--r--chart2/source/controller/inc/ObjectNameProvider.hxx14
-rw-r--r--chart2/source/controller/inc/PositionAndSizeHelper.hxx2
-rw-r--r--chart2/source/controller/inc/RangeSelectionHelper.hxx2
-rw-r--r--chart2/source/controller/inc/RangeSelectionListener.hxx2
-rw-r--r--chart2/source/controller/inc/RegressionCurveItemConverter.hxx7
-rw-r--r--chart2/source/controller/inc/RegressionEquationItemConverter.hxx6
-rw-r--r--chart2/source/controller/inc/SelectionHelper.hxx3
-rw-r--r--chart2/source/controller/inc/SeriesOptionsItemConverter.hxx8
-rw-r--r--chart2/source/controller/inc/ShapeController.h38
-rw-r--r--chart2/source/controller/inc/StatisticsItemConverter.hxx2
-rw-r--r--chart2/source/controller/inc/TabPageNotifiable.hxx4
-rw-r--r--chart2/source/controller/inc/TextLabelItemConverter.hxx10
-rw-r--r--chart2/source/controller/inc/TimerTriggeredControllerLock.hxx3
-rw-r--r--chart2/source/controller/inc/TitleDialogData.hxx7
-rw-r--r--chart2/source/controller/inc/TitleItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_ChartType.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard.hxx3
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_DataEditor.hxx4
-rw-r--r--chart2/source/controller/inc/dlg_DataSource.hxx7
-rw-r--r--chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx1
-rw-r--r--chart2/source/controller/inc/dlg_InsertDataTable.hxx52
-rw-r--r--chart2/source/controller/inc/dlg_InsertErrorBars.hxx10
-rw-r--r--chart2/source/controller/inc/dlg_ObjectProperties.hxx10
-rw-r--r--chart2/source/controller/inc/dlg_ShapeFont.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_ShapeParagraph.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_View3D.hxx2
-rw-r--r--chart2/source/controller/inc/helpids.h10
-rw-r--r--chart2/source/controller/inc/res_DataTableProperties.hxx48
-rw-r--r--chart2/source/controller/inc/res_LegendPosition.hxx5
-rw-r--r--chart2/source/controller/inc/uiobject.hxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx72
-rw-r--r--chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx9
-rw-r--r--chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx67
-rw-r--r--chart2/source/controller/itemsetwrapper/DataTableItemConverter.cxx92
-rw-r--r--chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx15
-rw-r--r--chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx11
-rw-r--r--chart2/source/controller/itemsetwrapper/ItemConverter.cxx16
-rw-r--r--chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx19
-rw-r--r--chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx50
-rw-r--r--chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx17
-rw-r--r--chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx7
-rw-r--r--chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx89
-rw-r--r--chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx45
-rw-r--r--chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx48
-rw-r--r--chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx8
-rw-r--r--chart2/source/controller/main/ChartController.cxx314
-rw-r--r--chart2/source/controller/main/ChartController_EditData.cxx4
-rw-r--r--chart2/source/controller/main/ChartController_Insert.cxx423
-rw-r--r--chart2/source/controller/main/ChartController_Position.cxx49
-rw-r--r--chart2/source/controller/main/ChartController_Properties.cxx222
-rw-r--r--chart2/source/controller/main/ChartController_TextEdit.cxx186
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx164
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx556
-rw-r--r--chart2/source/controller/main/ChartDropTargetHelper.cxx22
-rw-r--r--chart2/source/controller/main/ChartDropTargetHelper.hxx2
-rw-r--r--chart2/source/controller/main/ChartFrameloader.cxx42
-rw-r--r--chart2/source/controller/main/ChartModelClone.cxx13
-rw-r--r--chart2/source/controller/main/ChartTransferable.cxx27
-rw-r--r--chart2/source/controller/main/ChartTransferable.hxx4
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx42
-rw-r--r--chart2/source/controller/main/CommandDispatch.cxx53
-rw-r--r--chart2/source/controller/main/CommandDispatch.hxx16
-rw-r--r--chart2/source/controller/main/CommandDispatchContainer.cxx2
-rw-r--r--chart2/source/controller/main/ConfigurationAccess.cxx93
-rw-r--r--chart2/source/controller/main/ControllerCommandDispatch.cxx108
-rw-r--r--chart2/source/controller/main/ControllerCommandDispatch.hxx2
-rw-r--r--chart2/source/controller/main/DragMethod_Base.cxx8
-rw-r--r--chart2/source/controller/main/DragMethod_Base.hxx2
-rw-r--r--chart2/source/controller/main/DragMethod_PieSegment.cxx11
-rw-r--r--chart2/source/controller/main/DragMethod_PieSegment.hxx2
-rw-r--r--chart2/source/controller/main/DragMethod_RotateDiagram.cxx31
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx169
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.h42
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.hxx7
-rw-r--r--chart2/source/controller/main/ElementSelector.cxx11
-rw-r--r--chart2/source/controller/main/ElementSelector.hxx1
-rw-r--r--chart2/source/controller/main/FeatureCommandDispatchBase.cxx4
-rw-r--r--chart2/source/controller/main/FeatureCommandDispatchBase.hxx44
-rw-r--r--chart2/source/controller/main/ObjectHierarchy.cxx230
-rw-r--r--chart2/source/controller/main/PositionAndSizeHelper.cxx43
-rw-r--r--chart2/source/controller/main/SelectionHelper.cxx24
-rw-r--r--chart2/source/controller/main/ShapeController.cxx181
-rw-r--r--chart2/source/controller/main/ShapeController.hxx4
-rw-r--r--chart2/source/controller/main/StatusBarCommandDispatch.cxx11
-rw-r--r--chart2/source/controller/main/StatusBarCommandDispatch.hxx4
-rw-r--r--chart2/source/controller/main/UndoActions.cxx13
-rw-r--r--chart2/source/controller/main/UndoActions.hxx6
-rw-r--r--chart2/source/controller/main/UndoCommandDispatch.cxx11
-rw-r--r--chart2/source/controller/main/UndoCommandDispatch.hxx4
-rw-r--r--chart2/source/controller/main/UndoGuard.cxx8
-rw-r--r--chart2/source/controller/main/UndoGuard.hxx2
-rw-r--r--chart2/source/controller/sidebar/ChartAreaPanel.cxx9
-rw-r--r--chart2/source/controller/sidebar/ChartAreaPanel.hxx3
-rw-r--r--chart2/source/controller/sidebar/ChartAxisPanel.cxx46
-rw-r--r--chart2/source/controller/sidebar/ChartAxisPanel.hxx2
-rw-r--r--chart2/source/controller/sidebar/ChartColorWrapper.cxx26
-rw-r--r--chart2/source/controller/sidebar/ChartColorWrapper.hxx13
-rw-r--r--chart2/source/controller/sidebar/ChartElementsPanel.cxx52
-rw-r--r--chart2/source/controller/sidebar/ChartElementsPanel.hxx2
-rw-r--r--chart2/source/controller/sidebar/ChartErrorBarPanel.cxx21
-rw-r--r--chart2/source/controller/sidebar/ChartErrorBarPanel.hxx2
-rw-r--r--chart2/source/controller/sidebar/ChartLinePanel.cxx28
-rw-r--r--chart2/source/controller/sidebar/ChartLinePanel.hxx6
-rw-r--r--chart2/source/controller/sidebar/ChartSeriesPanel.cxx82
-rw-r--r--chart2/source/controller/sidebar/ChartSeriesPanel.hxx2
-rw-r--r--chart2/source/controller/sidebar/ChartTypePanel.cxx39
-rw-r--r--chart2/source/controller/sidebar/ChartTypePanel.hxx2
-rw-r--r--chart2/source/controller/uitest/uiobject.cxx24
-rw-r--r--chart2/source/inc/Axis.hxx (renamed from chart2/source/model/main/Axis.hxx)28
-rw-r--r--chart2/source/inc/AxisHelper.hxx134
-rw-r--r--chart2/source/inc/BaseCoordinateSystem.hxx21
-rw-r--r--chart2/source/inc/BaseGFXHelper.hxx23
-rw-r--r--chart2/source/inc/CachedDataSequence.hxx12
-rw-r--r--chart2/source/inc/CharacterProperties.hxx8
-rw-r--r--chart2/source/inc/ChartModelHelper.hxx46
-rw-r--r--chart2/source/inc/ChartResourceGroups.hxx9
-rw-r--r--chart2/source/inc/ChartType.hxx (renamed from chart2/source/model/template/ChartType.hxx)45
-rw-r--r--chart2/source/inc/ChartTypeDialogController.hxx4
-rw-r--r--chart2/source/inc/ChartTypeHelper.hxx75
-rw-r--r--chart2/source/inc/ChartTypeTemplate.hxx119
-rw-r--r--chart2/source/inc/ChartViewHelper.hxx23
-rw-r--r--chart2/source/inc/CloneHelper.hxx12
-rw-r--r--chart2/source/inc/ColorPerPointHelper.hxx9
-rw-r--r--chart2/source/inc/CommonConverters.hxx21
-rw-r--r--chart2/source/inc/CommonFunctors.hxx67
-rw-r--r--chart2/source/inc/ConfigColorScheme.hxx3
-rw-r--r--chart2/source/inc/ControllerLockGuard.hxx17
-rw-r--r--chart2/source/inc/DataInterpreter.hxx154
-rw-r--r--chart2/source/inc/DataSeries.hxx (renamed from chart2/source/model/inc/DataSeries.hxx)53
-rw-r--r--chart2/source/inc/DataSeriesHelper.hxx140
-rw-r--r--chart2/source/inc/DataSeriesProperties.hxx (renamed from chart2/source/model/main/DataSeriesProperties.hxx)4
-rw-r--r--chart2/source/inc/DataSource.hxx9
-rw-r--r--chart2/source/inc/DataSourceHelper.hxx39
-rw-r--r--chart2/source/inc/DataTable.hxx87
-rw-r--r--chart2/source/inc/Diagram.hxx244
-rw-r--r--chart2/source/inc/DiagramHelper.hxx227
-rw-r--r--chart2/source/inc/DisposeHelper.hxx2
-rw-r--r--chart2/source/inc/ErrorBar.hxx8
-rw-r--r--chart2/source/inc/EventListenerHelper.hxx10
-rw-r--r--chart2/source/inc/ExplicitCategoriesProvider.hxx23
-rw-r--r--chart2/source/inc/FillProperties.hxx4
-rw-r--r--chart2/source/inc/FormattedString.hxx (renamed from chart2/source/model/main/FormattedString.hxx)11
-rw-r--r--chart2/source/inc/FormattedStringHelper.hxx13
-rw-r--r--chart2/source/inc/GridProperties.hxx (renamed from chart2/source/model/main/GridProperties.hxx)14
-rw-r--r--chart2/source/inc/InternalDataProvider.hxx3
-rw-r--r--chart2/source/inc/LabeledDataSequence.hxx14
-rw-r--r--chart2/source/inc/Legend.hxx (renamed from chart2/source/model/main/Legend.hxx)16
-rw-r--r--chart2/source/inc/LegendHelper.hxx12
-rw-r--r--chart2/source/inc/LifeTime.hxx56
-rw-r--r--chart2/source/inc/LinePropertiesHelper.hxx4
-rw-r--r--chart2/source/inc/MediaDescriptorHelper.hxx3
-rw-r--r--chart2/source/inc/ModifyListenerCallBack.hxx3
-rw-r--r--chart2/source/inc/ModifyListenerHelper.hxx75
-rw-r--r--chart2/source/inc/NameContainer.hxx1
-rw-r--r--chart2/source/inc/NumberFormatterWrapper.hxx3
-rw-r--r--chart2/source/inc/OPropertySet.hxx49
-rw-r--r--chart2/source/inc/ObjectIdentifier.hxx109
-rw-r--r--chart2/source/inc/PopupRequest.hxx3
-rw-r--r--chart2/source/inc/PropertyHelper.hxx17
-rw-r--r--chart2/source/inc/RangeHighlighter.hxx8
-rw-r--r--chart2/source/inc/ReferenceSizeProvider.hxx10
-rw-r--r--chart2/source/inc/RegressionCurveCalculator.hxx44
-rw-r--r--chart2/source/inc/RegressionCurveHelper.hxx96
-rw-r--r--chart2/source/inc/RegressionCurveModel.hxx (renamed from chart2/source/tools/RegressionCurveModel.hxx)12
-rw-r--r--chart2/source/inc/RelativePositionHelper.hxx3
-rw-r--r--chart2/source/inc/RelativeSizeHelper.hxx3
-rw-r--r--chart2/source/inc/SceneProperties.hxx5
-rw-r--r--chart2/source/inc/StatisticsHelper.hxx38
-rw-r--r--chart2/source/inc/ThreeDHelper.hxx53
-rw-r--r--chart2/source/inc/Title.hxx (renamed from chart2/source/model/main/Title.hxx)11
-rw-r--r--chart2/source/inc/TitleHelper.hxx42
-rw-r--r--chart2/source/inc/TrueGuard.hxx36
-rw-r--r--chart2/source/inc/UncachedDataSequence.hxx22
-rw-r--r--chart2/source/inc/UserDefinedProperties.hxx3
-rw-r--r--chart2/source/inc/WeakListenerAdapter.hxx17
-rw-r--r--chart2/source/inc/WrappedDefaultProperty.hxx4
-rw-r--r--chart2/source/inc/WrappedDirectStateProperty.hxx2
-rw-r--r--chart2/source/inc/WrappedIgnoreProperty.hxx4
-rw-r--r--chart2/source/inc/WrappedProperty.hxx5
-rw-r--r--chart2/source/inc/WrappedPropertySet.hxx12
-rw-r--r--chart2/source/inc/chartview/ChartSfxItemIds.hxx11
-rw-r--r--chart2/source/inc/chartview/DataPointSymbolSupplier.hxx2
-rw-r--r--chart2/source/inc/chartview/DrawModelWrapper.hxx6
-rw-r--r--chart2/source/inc/chartview/ExplicitScaleValues.hxx5
-rw-r--r--chart2/source/inc/chartview/ExplicitValueProvider.hxx33
-rw-r--r--chart2/source/inc/defines.hxx2
-rw-r--r--chart2/source/inc/servicenames.hxx54
-rw-r--r--chart2/source/inc/servicenames_charttypes.hxx40
-rw-r--r--chart2/source/inc/servicenames_coosystems.hxx4
-rw-r--r--chart2/source/model/filter/XMLFilter.cxx32
-rw-r--r--chart2/source/model/inc/StockBar.hxx5
-rw-r--r--chart2/source/model/inc/XMLFilter.hxx5
-rw-r--r--chart2/source/model/main/Axis.cxx231
-rw-r--r--chart2/source/model/main/BaseCoordinateSystem.cxx173
-rw-r--r--chart2/source/model/main/CartesianCoordinateSystem.cxx2
-rw-r--r--chart2/source/model/main/ChartModel.cxx144
-rw-r--r--chart2/source/model/main/ChartModel_Persistence.cxx124
-rw-r--r--chart2/source/model/main/DataPoint.cxx59
-rw-r--r--chart2/source/model/main/DataPoint.hxx2
-rw-r--r--chart2/source/model/main/DataPointProperties.cxx48
-rw-r--r--chart2/source/model/main/DataPointProperties.hxx3
-rw-r--r--chart2/source/model/main/DataSeries.cxx320
-rw-r--r--chart2/source/model/main/DataSeriesProperties.cxx4
-rw-r--r--chart2/source/model/main/DataTable.cxx209
-rw-r--r--chart2/source/model/main/Diagram.cxx1704
-rw-r--r--chart2/source/model/main/FormattedString.cxx81
-rw-r--r--chart2/source/model/main/GridProperties.cxx95
-rw-r--r--chart2/source/model/main/Legend.cxx119
-rw-r--r--chart2/source/model/main/PageBackground.cxx118
-rw-r--r--chart2/source/model/main/PageBackground.hxx5
-rw-r--r--chart2/source/model/main/PolarCoordinateSystem.cxx4
-rw-r--r--chart2/source/model/main/StockBar.cxx100
-rw-r--r--chart2/source/model/main/Title.cxx137
-rw-r--r--chart2/source/model/main/UndoManager.cxx14
-rw-r--r--chart2/source/model/main/UndoManager.hxx3
-rw-r--r--chart2/source/model/main/Wall.cxx105
-rw-r--r--chart2/source/model/main/Wall.hxx5
-rw-r--r--chart2/source/model/template/AreaChartType.cxx5
-rw-r--r--chart2/source/model/template/AreaChartType.hxx4
-rw-r--r--chart2/source/model/template/AreaChartTypeTemplate.cxx133
-rw-r--r--chart2/source/model/template/AreaChartTypeTemplate.hxx20
-rw-r--r--chart2/source/model/template/BarChartType.cxx5
-rw-r--r--chart2/source/model/template/BarChartType.hxx4
-rw-r--r--chart2/source/model/template/BarChartTypeTemplate.cxx171
-rw-r--r--chart2/source/model/template/BarChartTypeTemplate.hxx30
-rw-r--r--chart2/source/model/template/BubbleChartType.cxx81
-rw-r--r--chart2/source/model/template/BubbleChartType.hxx9
-rw-r--r--chart2/source/model/template/BubbleChartTypeTemplate.cxx116
-rw-r--r--chart2/source/model/template/BubbleChartTypeTemplate.hxx17
-rw-r--r--chart2/source/model/template/BubbleDataInterpreter.cxx102
-rw-r--r--chart2/source/model/template/BubbleDataInterpreter.hxx16
-rw-r--r--chart2/source/model/template/CandleStickChartType.cxx96
-rw-r--r--chart2/source/model/template/CandleStickChartType.hxx8
-rw-r--r--chart2/source/model/template/ChartType.cxx94
-rw-r--r--chart2/source/model/template/ChartTypeManager.cxx39
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.cxx471
-rw-r--r--chart2/source/model/template/ColumnChartType.cxx93
-rw-r--r--chart2/source/model/template/ColumnChartType.hxx4
-rw-r--r--chart2/source/model/template/ColumnLineChartTypeTemplate.cxx241
-rw-r--r--chart2/source/model/template/ColumnLineChartTypeTemplate.hxx42
-rw-r--r--chart2/source/model/template/ColumnLineDataInterpreter.cxx27
-rw-r--r--chart2/source/model/template/ColumnLineDataInterpreter.hxx9
-rw-r--r--chart2/source/model/template/DataInterpreter.cxx116
-rw-r--r--chart2/source/model/template/DataInterpreter.hxx77
-rw-r--r--chart2/source/model/template/FilledNetChartType.cxx6
-rw-r--r--chart2/source/model/template/FilledNetChartType.hxx2
-rw-r--r--chart2/source/model/template/LineChartType.cxx120
-rw-r--r--chart2/source/model/template/LineChartType.hxx4
-rw-r--r--chart2/source/model/template/LineChartTypeTemplate.cxx222
-rw-r--r--chart2/source/model/template/LineChartTypeTemplate.hxx23
-rw-r--r--chart2/source/model/template/NetChartType.cxx50
-rw-r--r--chart2/source/model/template/NetChartType.hxx11
-rw-r--r--chart2/source/model/template/NetChartTypeTemplate.cxx79
-rw-r--r--chart2/source/model/template/NetChartTypeTemplate.hxx19
-rw-r--r--chart2/source/model/template/PieChartType.cxx128
-rw-r--r--chart2/source/model/template/PieChartType.hxx10
-rw-r--r--chart2/source/model/template/PieChartTypeTemplate.cxx335
-rw-r--r--chart2/source/model/template/PieChartTypeTemplate.hxx52
-rw-r--r--chart2/source/model/template/ScatterChartType.cxx127
-rw-r--r--chart2/source/model/template/ScatterChartType.hxx9
-rw-r--r--chart2/source/model/template/ScatterChartTypeTemplate.cxx229
-rw-r--r--chart2/source/model/template/ScatterChartTypeTemplate.hxx24
-rw-r--r--chart2/source/model/template/StockChartTypeTemplate.cxx233
-rw-r--r--chart2/source/model/template/StockChartTypeTemplate.hxx45
-rw-r--r--chart2/source/model/template/StockDataInterpreter.cxx120
-rw-r--r--chart2/source/model/template/StockDataInterpreter.hxx16
-rw-r--r--chart2/source/model/template/XYDataInterpreter.cxx96
-rw-r--r--chart2/source/model/template/XYDataInterpreter.hxx16
-rw-r--r--chart2/source/tools/AxisHelper.cxx492
-rw-r--r--chart2/source/tools/BaseGFXHelper.cxx6
-rw-r--r--chart2/source/tools/CachedDataSequence.cxx108
-rw-r--r--chart2/source/tools/CharacterProperties.cxx19
-rw-r--r--chart2/source/tools/ChartModelHelper.cxx149
-rw-r--r--chart2/source/tools/ChartTypeHelper.cxx87
-rw-r--r--chart2/source/tools/ChartViewHelper.cxx22
-rw-r--r--chart2/source/tools/ColorPerPointHelper.cxx27
-rw-r--r--chart2/source/tools/CommonConverters.cxx41
-rw-r--r--chart2/source/tools/ConfigColorScheme.cxx34
-rw-r--r--chart2/source/tools/ControllerLockGuard.cxx11
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx439
-rw-r--r--chart2/source/tools/DataSource.cxx7
-rw-r--r--chart2/source/tools/DataSourceHelper.cxx140
-rw-r--r--chart2/source/tools/DiagramHelper.cxx1227
-rw-r--r--chart2/source/tools/ErrorBar.cxx35
-rw-r--r--chart2/source/tools/ExplicitCategoriesProvider.cxx54
-rw-r--r--chart2/source/tools/FillProperties.cxx18
-rw-r--r--chart2/source/tools/FormattedStringHelper.cxx29
-rw-r--r--chart2/source/tools/InternalData.cxx56
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx256
-rw-r--r--chart2/source/tools/LabeledDataSequence.cxx36
-rw-r--r--chart2/source/tools/LegendHelper.cxx45
-rw-r--r--chart2/source/tools/LifeTime.cxx97
-rw-r--r--chart2/source/tools/LinePropertiesHelper.cxx9
-rw-r--r--chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx2
-rw-r--r--chart2/source/tools/MeanValueRegressionCurveCalculator.cxx18
-rw-r--r--chart2/source/tools/ModifyListenerHelper.cxx3
-rw-r--r--chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx18
-rw-r--r--chart2/source/tools/NameContainer.cxx2
-rw-r--r--chart2/source/tools/NumberFormatterWrapper.cxx25
-rw-r--r--chart2/source/tools/OPropertySet.cxx21
-rw-r--r--chart2/source/tools/ObjectIdentifier.cxx722
-rw-r--r--chart2/source/tools/PolynomialRegressionCurveCalculator.cxx2
-rw-r--r--chart2/source/tools/PotentialRegressionCurveCalculator.cxx4
-rw-r--r--chart2/source/tools/PropertyHelper.cxx117
-rw-r--r--chart2/source/tools/RangeHighlighter.cxx55
-rw-r--r--chart2/source/tools/ReferenceSizeProvider.cxx162
-rw-r--r--chart2/source/tools/RegressionCurveCalculator.cxx14
-rw-r--r--chart2/source/tools/RegressionCurveHelper.cxx341
-rw-r--r--chart2/source/tools/RegressionCurveModel.cxx19
-rw-r--r--chart2/source/tools/RegressionEquation.cxx12
-rw-r--r--chart2/source/tools/RegressionEquation.hxx2
-rw-r--r--chart2/source/tools/RelativeSizeHelper.cxx9
-rw-r--r--chart2/source/tools/Scaling.cxx8
-rw-r--r--chart2/source/tools/SceneProperties.cxx7
-rw-r--r--chart2/source/tools/StatisticsHelper.cxx57
-rw-r--r--chart2/source/tools/ThreeDHelper.cxx700
-rw-r--r--chart2/source/tools/TitleHelper.cxx340
-rw-r--r--chart2/source/tools/TrueGuard.cxx34
-rw-r--r--chart2/source/tools/UncachedDataSequence.cxx85
-rw-r--r--chart2/source/tools/WeakListenerAdapter.cxx15
-rw-r--r--chart2/source/tools/WrappedDefaultProperty.cxx7
-rw-r--r--chart2/source/tools/WrappedProperty.cxx9
-rw-r--r--chart2/source/tools/WrappedPropertySet.cxx2
-rw-r--r--chart2/source/tools/XMLRangeHelper.cxx7
-rw-r--r--chart2/source/view/axes/DateScaling.cxx6
-rw-r--r--chart2/source/view/axes/Tickmarks.cxx16
-rw-r--r--chart2/source/view/axes/Tickmarks.hxx17
-rw-r--r--chart2/source/view/axes/Tickmarks_Dates.cxx7
-rw-r--r--chart2/source/view/axes/Tickmarks_Dates.hxx4
-rw-r--r--chart2/source/view/axes/Tickmarks_Equidistant.cxx7
-rw-r--r--chart2/source/view/axes/Tickmarks_Equidistant.hxx4
-rw-r--r--chart2/source/view/axes/VAxisBase.cxx25
-rw-r--r--chart2/source/view/axes/VAxisBase.hxx16
-rw-r--r--chart2/source/view/axes/VAxisProperties.cxx94
-rw-r--r--chart2/source/view/axes/VAxisProperties.hxx34
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx270
-rw-r--r--chart2/source/view/axes/VCartesianAxis.hxx7
-rw-r--r--chart2/source/view/axes/VCartesianCoordinateSystem.cxx52
-rw-r--r--chart2/source/view/axes/VCartesianCoordinateSystem.hxx10
-rw-r--r--chart2/source/view/axes/VCartesianGrid.cxx29
-rw-r--r--chart2/source/view/axes/VCartesianGrid.hxx16
-rw-r--r--chart2/source/view/axes/VCoordinateSystem.cxx114
-rw-r--r--chart2/source/view/axes/VPolarAngleAxis.cxx23
-rw-r--r--chart2/source/view/axes/VPolarAxis.cxx4
-rw-r--r--chart2/source/view/axes/VPolarAxis.hxx5
-rw-r--r--chart2/source/view/axes/VPolarCoordinateSystem.cxx27
-rw-r--r--chart2/source/view/axes/VPolarCoordinateSystem.hxx10
-rw-r--r--chart2/source/view/axes/VPolarGrid.cxx12
-rw-r--r--chart2/source/view/axes/VPolarGrid.hxx14
-rw-r--r--chart2/source/view/axes/VPolarRadiusAxis.cxx1
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx67
-rw-r--r--chart2/source/view/charttypes/AreaChart.hxx6
-rw-r--r--chart2/source/view/charttypes/BarChart.cxx115
-rw-r--r--chart2/source/view/charttypes/BarChart.hxx22
-rw-r--r--chart2/source/view/charttypes/BarPositionHelper.cxx1
-rw-r--r--chart2/source/view/charttypes/BubbleChart.cxx7
-rw-r--r--chart2/source/view/charttypes/BubbleChart.hxx2
-rw-r--r--chart2/source/view/charttypes/CandleStickChart.cxx37
-rw-r--r--chart2/source/view/charttypes/CandleStickChart.hxx6
-rw-r--r--chart2/source/view/charttypes/ConfigAccess.cxx74
-rw-r--r--chart2/source/view/charttypes/NetChart.cxx26
-rw-r--r--chart2/source/view/charttypes/NetChart.hxx6
-rw-r--r--chart2/source/view/charttypes/PieChart.cxx1061
-rw-r--r--chart2/source/view/charttypes/PieChart.hxx150
-rw-r--r--chart2/source/view/charttypes/Splines.cxx89
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx383
-rw-r--r--chart2/source/view/diagram/VDiagram.cxx41
-rw-r--r--chart2/source/view/inc/ConfigAccess.hxx35
-rw-r--r--chart2/source/view/inc/DataTableView.hxx88
-rw-r--r--chart2/source/view/inc/LabelPositionHelper.hxx2
-rw-r--r--chart2/source/view/inc/LegendEntryProvider.hxx13
-rw-r--r--chart2/source/view/inc/PlottingPositionHelper.hxx6
-rw-r--r--chart2/source/view/inc/PropertyMapper.hxx5
-rw-r--r--chart2/source/view/inc/ShapeFactory.hxx15
-rw-r--r--chart2/source/view/inc/VCoordinateSystem.hxx35
-rw-r--r--chart2/source/view/inc/VDataSeries.hxx51
-rw-r--r--chart2/source/view/inc/VDiagram.hxx9
-rw-r--r--chart2/source/view/inc/VSeriesPlotter.hxx43
-rw-r--r--chart2/source/view/main/AxisUsage.hxx143
-rw-r--r--chart2/source/view/main/ChartItemPool.cxx363
-rw-r--r--chart2/source/view/main/ChartItemPool.hxx11
-rw-r--r--chart2/source/view/main/ChartView.cxx1402
-rw-r--r--chart2/source/view/main/Clipping.cxx3
-rw-r--r--chart2/source/view/main/DataTableView.cxx559
-rw-r--r--chart2/source/view/main/DrawModelWrapper.cxx56
-rw-r--r--chart2/source/view/main/ExplicitValueProvider.cxx203
-rw-r--r--chart2/source/view/main/LabelPositionHelper.cxx23
-rw-r--r--chart2/source/view/main/PlotterBase.cxx1
-rw-r--r--chart2/source/view/main/PlottingPositionHelper.cxx7
-rw-r--r--chart2/source/view/main/PolarLabelPositionHelper.cxx1
-rw-r--r--chart2/source/view/main/PropertyMapper.cxx134
-rw-r--r--chart2/source/view/main/SeriesPlotterContainer.cxx759
-rw-r--r--chart2/source/view/main/SeriesPlotterContainer.hxx160
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx561
-rw-r--r--chart2/source/view/main/VButton.cxx7
-rw-r--r--chart2/source/view/main/VDataSeries.cxx248
-rw-r--r--chart2/source/view/main/VLegend.cxx98
-rw-r--r--chart2/source/view/main/VLegend.hxx11
-rw-r--r--chart2/source/view/main/VLegendSymbolFactory.cxx2
-rw-r--r--chart2/source/view/main/VLineProperties.cxx2
-rw-r--r--chart2/source/view/main/VPolarTransformation.cxx1
-rw-r--r--chart2/source/view/main/VTitle.cxx14
-rw-r--r--chart2/source/view/main/VTitle.hxx5
-rw-r--r--chart2/uiconfig/menubar/menubar.xml5
-rw-r--r--chart2/uiconfig/toolbar/basicshapes.xml2
-rw-r--r--chart2/uiconfig/toolbar/toolbar.xml1
-rw-r--r--chart2/uiconfig/ui/charttypedialog.ui14
-rw-r--r--chart2/uiconfig/ui/dlg_InsertDataTable.ui215
-rw-r--r--chart2/uiconfig/ui/sidebaraxis.ui178
-rw-r--r--chart2/uiconfig/ui/sidebarelements.ui902
-rw-r--r--chart2/uiconfig/ui/sidebarerrorbar.ui357
-rw-r--r--chart2/uiconfig/ui/sidebarseries.ui473
-rw-r--r--chart2/uiconfig/ui/sidebartype.ui561
-rw-r--r--chart2/uiconfig/ui/tp_3D_SceneIllumination.ui8
-rw-r--r--chart2/uiconfig/ui/tp_AxisPositions.ui1
-rw-r--r--chart2/uiconfig/ui/tp_ChartType.ui288
-rw-r--r--chart2/uiconfig/ui/tp_DataTable.ui115
-rw-r--r--chart2/uiconfig/ui/tp_SeriesToAxis.ui208
-rw-r--r--chart2/uiconfig/ui/tp_Trendline.ui2
-rw-r--r--chart2/uiconfig/ui/tp_axisLabel.ui2
650 files changed, 28668 insertions, 23948 deletions
diff --git a/chart2/CppunitTest_chart2_dump.mk b/chart2/CppunitTest_chart2_dump.mk
index 90c12ff039a8..cc14424bc4c2 100644
--- a/chart2/CppunitTest_chart2_dump.mk
+++ b/chart2/CppunitTest_chart2_dump.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_CppunitTest_use_libraries,chart2_dump, \
sd \
sfx \
sot \
+ subsequenttest \
svl \
svt \
svx \
@@ -95,7 +96,6 @@ $(eval $(call gb_CppunitTest_use_components,chart2_dump,\
sw/util/swd \
sw/util/msword \
sd/util/sd \
- sd/util/sdfilt \
sd/util/sdd \
$(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
@@ -110,6 +110,7 @@ $(eval $(call gb_CppunitTest_use_components,chart2_dump,\
svtools/util/svt \
svx/util/svx \
svx/util/svxcore \
+ sw/util/sw_writerfilter \
toolkit/util/tk \
vcl/vcl.common \
ucb/source/core/ucb1 \
@@ -119,7 +120,6 @@ $(eval $(call gb_CppunitTest_use_components,chart2_dump,\
unotools/util/utl \
unoxml/source/rdf/unordf \
unoxml/source/service/unoxml \
- writerfilter/util/writerfilter \
xmloff/util/xo \
))
diff --git a/chart2/CppunitTest_chart2_export3.mk b/chart2/CppunitTest_chart2_export3.mk
new file mode 100644
index 000000000000..3b3e2ed0b597
--- /dev/null
+++ b/chart2/CppunitTest_chart2_export3.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# 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/.
+#
+#*************************************************************************
+
+$(eval $(call chart2_export_test,3))
+
+# vim: set noet sw=4 ts=4:
diff --git a/chart2/CppunitTest_chart2_geometry.mk b/chart2/CppunitTest_chart2_geometry.mk
index f2467594abc3..a594b25894e2 100644
--- a/chart2/CppunitTest_chart2_geometry.mk
+++ b/chart2/CppunitTest_chart2_geometry.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_CppunitTest_use_libraries,chart2_geometry, \
sd \
sfx \
sot \
+ subsequenttest \
svl \
svt \
svx \
@@ -99,7 +100,6 @@ $(eval $(call gb_CppunitTest_use_components,chart2_geometry,\
sw/util/swd \
sw/util/msword \
sd/util/sd \
- sd/util/sdfilt \
sd/util/sdd \
$(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
@@ -114,6 +114,7 @@ $(eval $(call gb_CppunitTest_use_components,chart2_geometry,\
svtools/util/svt \
svx/util/svx \
svx/util/svxcore \
+ sw/util/sw_writerfilter \
toolkit/util/tk \
vcl/vcl.common \
ucb/source/core/ucb1 \
@@ -123,7 +124,6 @@ $(eval $(call gb_CppunitTest_use_components,chart2_geometry,\
unoxml/source/rdf/unordf \
unoxml/source/service/unoxml \
uui/util/uui \
- writerfilter/util/writerfilter \
xmloff/util/xo \
xmlscript/util/xmlscript \
))
@@ -134,6 +134,10 @@ $(eval $(call gb_CppunitTest_use_uiconfigs,chart2_geometry, \
$(eval $(call gb_CppunitTest_use_configuration,chart2_geometry))
+$(eval $(call gb_CppunitTest_add_arguments,chart2_geometry, \
+ -env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"$$$${$(gb_Helper_LIBRARY_PATH_VAR)+=$$$$$(gb_Helper_LIBRARY_PATH_VAR)}" \
+))
+
$(call gb_CppunitTest_get_target,chart2_geometry): $(call gb_Package_get_target,postprocess_images)
# vim: set noet sw=4 ts=4:
diff --git a/chart2/CppunitTest_chart2_pivot_chart_test.mk b/chart2/CppunitTest_chart2_pivot_chart_test.mk
index 4dc7dca420cb..885b8eda6448 100644
--- a/chart2/CppunitTest_chart2_pivot_chart_test.mk
+++ b/chart2/CppunitTest_chart2_pivot_chart_test.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_CppunitTest_use_libraries,chart2_pivot_chart_test, \
sd \
sfx \
sot \
+ subsequenttest \
svl \
svt \
svx \
@@ -97,7 +98,6 @@ $(eval $(call gb_CppunitTest_use_components,chart2_pivot_chart_test,\
sw/util/swd \
sw/util/msword \
sd/util/sd \
- sd/util/sdfilt \
sd/util/sdd \
$(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
@@ -112,6 +112,7 @@ $(eval $(call gb_CppunitTest_use_components,chart2_pivot_chart_test,\
svtools/util/svt \
svx/util/svx \
svx/util/svxcore \
+ sw/util/sw_writerfilter \
toolkit/util/tk \
vcl/vcl.common \
ucb/source/core/ucb1 \
@@ -121,7 +122,6 @@ $(eval $(call gb_CppunitTest_use_components,chart2_pivot_chart_test,\
unoxml/source/rdf/unordf \
unoxml/source/service/unoxml \
uui/util/uui \
- writerfilter/util/writerfilter \
xmloff/util/xo \
xmlscript/util/xmlscript \
))
diff --git a/chart2/CppunitTest_chart2_trendcalculators.mk b/chart2/CppunitTest_chart2_trendcalculators.mk
index 2ef23fc9bf90..c6b3dc0a328a 100644
--- a/chart2/CppunitTest_chart2_trendcalculators.mk
+++ b/chart2/CppunitTest_chart2_trendcalculators.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_CppunitTest_use_libraries,chart2_trendcalculators, \
sd \
sfx \
sot \
+ subsequenttest \
svl \
svt \
svx \
@@ -97,7 +98,6 @@ $(eval $(call gb_CppunitTest_use_components,chart2_trendcalculators,\
sw/util/swd \
sw/util/msword \
sd/util/sd \
- sd/util/sdfilt \
sd/util/sdd \
$(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
@@ -112,6 +112,7 @@ $(eval $(call gb_CppunitTest_use_components,chart2_trendcalculators,\
svtools/util/svt \
svx/util/svx \
svx/util/svxcore \
+ sw/util/sw_writerfilter \
toolkit/util/tk \
vcl/vcl.common \
ucb/source/core/ucb1 \
@@ -121,7 +122,6 @@ $(eval $(call gb_CppunitTest_use_components,chart2_trendcalculators,\
unoxml/source/rdf/unordf \
unoxml/source/service/unoxml \
uui/util/uui \
- writerfilter/util/writerfilter \
xmloff/util/xo \
xmlscript/util/xmlscript \
))
diff --git a/chart2/CppunitTest_chart2_uichart.mk b/chart2/CppunitTest_chart2_uichart.mk
new file mode 100644
index 000000000000..9e464e0a7c6f
--- /dev/null
+++ b/chart2/CppunitTest_chart2_uichart.mk
@@ -0,0 +1,58 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# 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/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,chart2_uichart))
+
+$(eval $(call gb_CppunitTest_use_externals,chart2_uichart, \
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,chart2_uichart, \
+ chart2/qa/extras/uichart \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,chart2_uichart, \
+ comphelper \
+ cppu \
+ cppuhelper \
+ i18nlangtag \
+ sal \
+ sc \
+ sfx \
+ subsequenttest \
+ svl \
+ svl \
+ svx \
+ svxcore \
+ test \
+ tl \
+ unotest \
+ utl \
+ vcl \
+))
+
+$(eval $(call gb_CppunitTest_set_include,chart2_uichart,\
+ -I$(SRCDIR)/chart2/qa/extras \
+ -I$(SRCDIR)/chart2/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,chart2_uichart))
+
+$(eval $(call gb_CppunitTest_use_ure,chart2_uichart))
+$(eval $(call gb_CppunitTest_use_vcl,chart2_uichart))
+
+$(eval $(call gb_CppunitTest_use_rdb,chart2_uichart,services))
+
+$(eval $(call gb_CppunitTest_use_configuration,chart2_uichart))
+
+# vim: set noet sw=4 ts=4:
diff --git a/chart2/CppunitTest_chart2_xshape.mk b/chart2/CppunitTest_chart2_xshape.mk
index 4ea92462848e..eabc54b26ea2 100644
--- a/chart2/CppunitTest_chart2_xshape.mk
+++ b/chart2/CppunitTest_chart2_xshape.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_CppunitTest_use_libraries,chart2_xshape, \
sd \
sfx \
sot \
+ subsequenttest \
svl \
svt \
svx \
@@ -95,7 +96,6 @@ $(eval $(call gb_CppunitTest_use_components,chart2_xshape,\
sw/util/swd \
sw/util/msword \
sd/util/sd \
- sd/util/sdfilt \
sd/util/sdd \
$(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
@@ -110,6 +110,7 @@ $(eval $(call gb_CppunitTest_use_components,chart2_xshape,\
svtools/util/svt \
svx/util/svx \
svx/util/svxcore \
+ sw/util/sw_writerfilter \
toolkit/util/tk \
vcl/vcl.common \
ucb/source/core/ucb1 \
@@ -119,7 +120,6 @@ $(eval $(call gb_CppunitTest_use_components,chart2_xshape,\
unotools/util/utl \
unoxml/source/rdf/unordf \
unoxml/source/service/unoxml \
- writerfilter/util/writerfilter \
xmloff/util/xo \
))
diff --git a/chart2/IwyuFilter_chart2.yaml b/chart2/IwyuFilter_chart2.yaml
index da282c91d93b..98a78ef2ca4d 100644
--- a/chart2/IwyuFilter_chart2.yaml
+++ b/chart2/IwyuFilter_chart2.yaml
@@ -73,9 +73,6 @@ excludelist:
- com/sun/star/chart2/data/XDataSink.hpp
- com/sun/star/chart2/data/XDataSource.hpp
- com/sun/star/lang/XServiceInfo.hpp
- chart2/source/inc/DiagramHelper.hxx:
- # # typedef in base class needs a complete type
- - com/sun/star/chart2/XChartTypeTemplate.hpp
chart2/source/inc/ErrorBar.hxx:
# base class has to be a complete type
- com/sun/star/beans/XPropertySet.hpp
@@ -143,7 +140,6 @@ excludelist:
- com/sun/star/util/XModifiable.hpp
chart2/source/inc/WeakListenerAdapter.hxx:
# base class has to be a complete type
- - com/sun/star/util/XModifyListener.hpp
- com/sun/star/view/XSelectionChangeListener.hpp
chart2/source/inc/WrappedProperty.hxx:
# Needed for implicit dtor
@@ -154,39 +150,6 @@ excludelist:
- com/sun/star/beans/XMultiPropertyStates.hpp
- com/sun/star/beans/XPropertySet.hpp
- com/sun/star/beans/XPropertyState.hpp
- chart2/source/model/inc/BaseCoordinateSystem.hxx:
- # base class has to be a complete type
- - com/sun/star/chart2/XChartTypeContainer.hpp
- - com/sun/star/chart2/XCoordinateSystem.hpp
- - com/sun/star/lang/XServiceInfo.hpp
- - com/sun/star/util/XCloneable.hpp
- - com/sun/star/util/XModifyBroadcaster.hpp
- - com/sun/star/util/XModifyListener.hpp
- chart2/source/model/inc/ChartTypeManager.hxx:
- # base class has to be a complete type
- - com/sun/star/chart2/XChartTypeManager.hpp
- - com/sun/star/lang/XMultiServiceFactory.hpp
- - com/sun/star/lang/XServiceInfo.hpp
- chart2/source/model/inc/DataSeries.hxx:
- # base class has to be a complete type
- - com/sun/star/chart2/XDataSeries.hpp
- - com/sun/star/chart2/XRegressionCurveContainer.hpp
- - com/sun/star/chart2/data/XDataSink.hpp
- - com/sun/star/chart2/data/XDataSource.hpp
- - com/sun/star/lang/XServiceInfo.hpp
- - com/sun/star/util/XCloneable.hpp
- - com/sun/star/util/XModifyBroadcaster.hpp
- - com/sun/star/util/XModifyListener.hpp
- chart2/source/model/inc/Diagram.hxx:
- # base class has to be a complete type
- - com/sun/star/chart/X3DDefaultSetter.hpp
- - com/sun/star/chart2/XCoordinateSystemContainer.hpp
- - com/sun/star/chart2/XDiagram.hpp
- - com/sun/star/chart2/XTitled.hpp
- - com/sun/star/lang/XServiceInfo.hpp
- - com/sun/star/util/XCloneable.hpp
- - com/sun/star/util/XModifyBroadcaster.hpp
- - com/sun/star/util/XModifyListener.hpp
chart2/source/model/inc/StockBar.hxx:
# base class has to be a complete type
- com/sun/star/util/XCloneable.hpp
@@ -197,12 +160,14 @@ excludelist:
- com/sun/star/document/XExporter.hpp
- com/sun/star/document/XFilter.hpp
- com/sun/star/document/XImporter.hpp
- - com/sun/star/io/XActiveDataSource.hpp
- com/sun/star/lang/XMultiServiceFactory.hpp
- com/sun/star/lang/XServiceInfo.hpp
chart2/source/model/filter/XMLFilter.cxx:
# Actually used
- com/sun/star/lang/XMultiComponentFactory.hpp
+ chart2/source/model/main/ChartModel_Persistence.cxx:
+ # Needed for implicit dtor
+ - BaseCoordinateSystem.hxx
chart2/source/model/main/DataPoint.hxx:
# base class has to be a complete type
- com/sun/star/container/XChild.hpp
@@ -210,14 +175,6 @@ excludelist:
- com/sun/star/util/XCloneable.hpp
- com/sun/star/util/XModifyBroadcaster.hpp
- com/sun/star/util/XModifyListener.hpp
- chart2/source/model/main/Axis.hxx:
- # base class has to be a complete type
- - com/sun/star/chart2/XAxis.hpp
- - com/sun/star/chart2/XTitled.hpp
- - com/sun/star/lang/XServiceInfo.hpp
- - com/sun/star/util/XCloneable.hpp
- - com/sun/star/util/XModifyBroadcaster.hpp
- - com/sun/star/util/XModifyListener.hpp
chart2/source/model/main/Axis.cxx:
# Needed for template
- com/sun/star/awt/Size.hpp
@@ -230,26 +187,13 @@ excludelist:
- com/sun/star/chart2/RelativeSize.hpp
# Actually used
- com/sun/star/uno/XComponentContext.hpp
- chart2/source/model/main/FormattedString.hxx:
+ chart2/source/inc/FormattedString.hxx:
# base class has to be a complete type
- com/sun/star/chart2/XDataPointCustomLabelField.hpp
- com/sun/star/lang/XServiceInfo.hpp
- com/sun/star/util/XCloneable.hpp
- com/sun/star/util/XModifyBroadcaster.hpp
- com/sun/star/util/XModifyListener.hpp
- chart2/source/model/main/GridProperties.hxx:
- # base class has to be a complete type
- - com/sun/star/lang/XServiceInfo.hpp
- - com/sun/star/util/XCloneable.hpp
- - com/sun/star/util/XModifyBroadcaster.hpp
- - com/sun/star/util/XModifyListener.hpp
- chart2/source/model/main/Legend.hxx:
- # base class has to be a complete type
- - com/sun/star/chart2/XLegend.hpp
- - com/sun/star/lang/XServiceInfo.hpp
- - com/sun/star/util/XCloneable.hpp
- - com/sun/star/util/XModifyBroadcaster.hpp
- - com/sun/star/util/XModifyListener.hpp
chart2/source/model/main/Legend.cxx:
# Needed for template
- com/sun/star/awt/Size.hpp
@@ -261,13 +205,6 @@ excludelist:
- com/sun/star/util/XCloneable.hpp
- com/sun/star/util/XModifyBroadcaster.hpp
- com/sun/star/util/XModifyListener.hpp
- chart2/source/model/main/Title.hxx:
- # base class has to be a complete type
- - com/sun/star/chart2/XTitle.hpp
- - com/sun/star/lang/XServiceInfo.hpp
- - com/sun/star/util/XCloneable.hpp
- - com/sun/star/util/XModifyBroadcaster.hpp
- - com/sun/star/util/XModifyListener.hpp
chart2/source/model/main/Title.cxx:
# Needed for template
- com/sun/star/awt/Size.hpp
@@ -281,22 +218,6 @@ excludelist:
- com/sun/star/util/XCloneable.hpp
- com/sun/star/util/XModifyBroadcaster.hpp
- com/sun/star/util/XModifyListener.hpp
- chart2/source/model/template/ChartType.hxx:
- # base class has to be a complete type
- - com/sun/star/chart2/XChartType.hpp
- - com/sun/star/chart2/XDataSeriesContainer.hpp
- - com/sun/star/lang/XServiceInfo.hpp
- - com/sun/star/util/XCloneable.hpp
- - com/sun/star/util/XModifyBroadcaster.hpp
- - com/sun/star/util/XModifyListener.hpp
- chart2/source/model/template/ChartTypeTemplate.hxx:
- # base class has to be a complete type
- - com/sun/star/chart2/XChartTypeTemplate.hpp
- - com/sun/star/lang/XServiceName.hpp
- chart2/source/model/template/DataInterpreter.hxx:
- # base class has to be a complete type
- - com/sun/star/chart2/XDataInterpreter.hpp
- - com/sun/star/lang/XServiceInfo.hpp
chart2/source/model/template/AreaChartTypeTemplate.cxx:
# Actually used
- com/sun/star/uno/XComponentContext.hpp
@@ -350,20 +271,18 @@ excludelist:
- com/sun/star/drawing/LineStyle.hpp
- com/sun/star/util/Color.hpp
- com/sun/star/drawing/LineJoint.hpp
+ chart2/source/tools/ExplicitCategoriesProvider.cxx:
+ # Needed for implicit dtor
+ - ChartType.hxx
chart2/source/tools/CharacterProperties.cxx:
# Actually used
- com/sun/star/beans/XMultiPropertySet.hpp
chart2/source/tools/DataSourceHelper.cxx:
# Actually used
- com/sun/star/chart2/data/XLabeledDataSequence.hpp
- chart2/source/tools/RegressionCurveModel.hxx:
- # base class has to be a complete type
- - com/sun/star/chart2/XRegressionCurve.hpp
- - com/sun/star/lang/XServiceInfo.hpp
- - com/sun/star/lang/XServiceName.hpp
- - com/sun/star/util/XCloneable.hpp
- - com/sun/star/util/XModifyBroadcaster.hpp
- - com/sun/star/util/XModifyListener.hpp
+ chart2/source/tools/InternalDataProvider.cxx:
+ # Needed for implicit dtor
+ - BaseCoordinateSystem.hxx
chart2/source/tools/LegendHelper.cxx:
# Actually used
- com/sun/star/uno/XComponentContext.hpp
@@ -388,12 +307,11 @@ excludelist:
- com/sun/star/drawing/XShape.hpp
# Actually used
- com/sun/star/view/XSelectionSupplier.hpp
- chart2/source/tools/ReferenceSizeProvider.cxx:
- # Actually used
- - com/sun/star/chart2/XTitle.hpp
chart2/source/tools/RegressionCurveHelper.cxx:
# Actually used
- com/sun/star/chart2/XRegressionCurveCalculator.hpp
+ # Needed for implicit dtor
+ - ChartType.hxx
chart2/source/tools/RegressionEquation.hxx:
# base class has to be a complete type
- com/sun/star/chart2/XTitle.hpp
@@ -421,9 +339,6 @@ excludelist:
chart2/source/tools/StatisticsHelper.cxx:
# Actually used
- com/sun/star/chart2/data/XDataProvider.hpp
- chart2/source/tools/UncachedDataSequence.cxx:
- # Actually used
- - com/sun/star/chart2/XInternalDataProvider.hpp
chart2/source/tools/UserDefinedProperties.cxx:
# Needs a complete type
- com/sun/star/beans/Property.hpp
@@ -432,10 +347,6 @@ excludelist:
chart2/source/tools/WrappedProperty.cxx:
# Actually used
- com/sun/star/beans/XPropertyState.hpp
- chart2/source/view/inc/3DChartObjects.hxx:
- # base class has to be a complete type
- - boost/shared_array.hpp
- - map
chart2/source/view/inc/VLineProperties.hxx:
# base class has to be a complete type
- com/sun/star/uno/Reference.h
@@ -444,55 +355,29 @@ excludelist:
- com/sun/star/chart2/XScaling.hpp
- com/sun/star/lang/XServiceInfo.hpp
- com/sun/star/lang/XServiceName.hpp
- chart2/source/view/axes/VAxisBase.cxx:
- # Needed for direct member access
- - com/sun/star/drawing/XShapes.hpp
- # Needed for implicit dtor
- - com/sun/star/chart2/XAxis.hpp
chart2/source/view/axes/VAxisProperties.cxx:
- # Actually used
- - com/sun/star/chart2/XAxis.hpp
# Needed for rtl::math::round
- rtl/math.hxx
- chart2/source/view/axes/VCartesianCoordinateSystem.cxx:
- # Actually used
- - com/sun/star/chart2/XCoordinateSystem.hpp
chart2/source/view/axes/VPolarAngleAxis.cxx:
# Needed for implicit dtor
- - com/sun/star/chart2/XAxis.hpp
- chart2/source/view/axes/VPolarCoordinateSystem.cxx:
- # Actually used
- - com/sun/star/chart2/XCoordinateSystem.hpp
- chart2/source/view/axes/VCartesianAxis.cxx:
+ - Axis.hxx
+ chart2/source/view/axes/VPolarRadiusAxis.cxx:
# Needed for implicit dtor
- - com/sun/star/chart2/XAxis.hpp
+ - Axis.hxx
chart2/source/view/axes/VCartesianGrid.hxx:
# base class has to be a complete type
- com/sun/star/beans/XPropertySet.hpp
- chart2/source/view/charttypes/Splines.cxx:
- # Actually used
- - com/sun/star/drawing/PolyPolygonShape3D.hpp
- chart2/source/view/charttypes/AreaChart.cxx:
- # Actually used
- - com/sun/star/drawing/XShapes.hpp
- chart2/source/view/charttypes/NetChart.cxx:
- # Actually used
- - com/sun/star/drawing/XShapes.hpp
chart2/source/view/charttypes/BarChart.cxx:
# comphelper::ScopeGuard being used
- comphelper/scopeguard.hxx
+ chart2/source/view/diagram/VDiagram.cxx:
+ # Needed for implicit dtor
+ - ChartType.hxx
chart2/source/view/main/LabelPositionHelper.cxx:
# Actually used
- com/sun/star/beans/XPropertySet.hpp
- - com/sun/star/drawing/XShape.hpp
# Actually used
- rtl/math.hxx
- chart2/source/view/main/VButton.cxx:
- # Actually used
- - com/sun/star/lang/XMultiServiceFactory.hpp
- chart2/source/view/main/PlottingPositionHelper.cxx:
- # Actually used
- - com/sun/star/drawing/XShapes.hpp
chart2/source/view/main/PropertyMapper.cxx:
# Actually used
- com/sun/star/beans/XPropertySet.hpp
@@ -501,7 +386,6 @@ excludelist:
- com/sun/star/graphic/XGraphic.hpp
# Actually used
- com/sun/star/chart2/XFormattedString.hpp
- - com/sun/star/lang/XMultiServiceFactory.hpp
chart2/source/view/main/ChartView.cxx:
# comphelper::ScopeGuard being used
- comphelper/scopeguard.hxx
@@ -511,7 +395,6 @@ excludelist:
chart2/source/view/main/VTitle.cxx:
# Actually used
- com/sun/star/chart2/XTitle.hpp
- - com/sun/star/drawing/XShape.hpp
chart2/source/controller/inc/AccessibleTextHelper.hxx:
# base class has to be a complete type
- com/sun/star/accessibility/XAccessibleContext.hpp
@@ -578,9 +461,6 @@ excludelist:
chart2/source/controller/inc/RangeSelectionListener.hxx:
# base class has to be a complete type
- com/sun/star/sheet/XRangeSelectionListener.hpp
- chart2/source/controller/accessibility/AccessibleBase.cxx:
- # Needed for template
- - com/sun/star/chart2/XChartDocument.hpp
chart2/source/controller/accessibility/AccessibleChartShape.hxx:
# base class has to be a complete type
- AccessibleBase.hxx
@@ -592,9 +472,6 @@ excludelist:
chart2/source/controller/accessibility/AccessibleChartView.cxx:
# Actually used
- com/sun/star/view/XSelectionSupplier.hpp
- chart2/source/controller/chartapiwrapper/AxisWrapper.cxx:
- # Needed for implicit dtor
- - com/sun/star/frame/XModel.hpp
chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx:
# Needed for rtl::math::round
- rtl/math.hxx
@@ -609,48 +486,34 @@ excludelist:
- com/sun/star/beans/XPropertySet.hpp
- com/sun/star/beans/XPropertyState.hpp
chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx:
- # Actually used
- - vector
- chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx:
# Needed for implicit dtor
- - com/sun/star/chart2/XAxis.hpp
+ - BaseCoordinateSystem.hxx
chart2/source/controller/dialogs/ChartTypeDialogController.cxx:
- # Actually used
- - com/sun/star/chart2/XChartDocument.hpp
- chart2/source/controller/dialogs/DataBrowser.cxx:
- # Needed for complex variable type
- - com/sun/star/chart2/XChartDocument.hpp
+ # Needed for implicit dtor
+ - DataSeries.hxx
+ - BaseCoordinateSystem.hxx
chart2/source/controller/dialogs/DialogModel.cxx:
- # Actually used
- - com/sun/star/uno/XComponentContext.hpp
- - com/sun/star/chart2/XChartDocument.hpp
- chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx:
- # Needed for complex variable type
- - com/sun/star/frame/XModel.hpp
+ # Needed for implicit dtor
+ - LabeledDataSequence.hxx
+ chart2/source/controller/dialogs/dlg_CreationWizard.cxx:
+ # Needed for implicit dtor
+ - ChartTypeTemplate.hxx
chart2/source/controller/dialogs/dlg_DataEditor.cxx:
# Needed for direct member access
- com/sun/star/awt/XWindow.hpp
- chart2/source/controller/dialogs/dlg_View3D.cxx:
+ chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx:
# Needed for implicit dtor
- - com/sun/star/chart2/XDiagram.hpp
- chart2/source/controller/dialogs/RangeSelectionHelper.cxx:
- # Actually used
- - com/sun/star/chart2/XChartDocument.hpp
- chart2/source/controller/dialogs/res_ErrorBar.cxx:
- # Actually used
- - com/sun/star/chart2/XChartDocument.hpp
+ - ChartType.hxx
chart2/source/controller/dialogs/tp_AxisPositions.cxx:
# Actually used
- rtl/math.hxx
chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx:
# Actually used
- com/sun/star/beans/XPropertySet.hpp
- chart2/source/controller/dialogs/tp_ChartType.cxx:
- # Actually used
- - com/sun/star/chart2/XChartDocument.hpp
chart2/source/controller/dialogs/tp_DataSource.cxx:
# Needed for implicit dtor
- - com/sun/star/frame/XModel.hpp
+ - ChartTypeTemplate.hxx
+ - LabeledDataSequence.hxx
chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx:
# Needed for rtl::math::round
- rtl/math.hxx
@@ -663,6 +526,9 @@ excludelist:
chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx:
# Needed for rtl::math::round
- rtl/math.hxx
+ chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx:
+ # Needed for implicit dtor
+ - RegressionCurveModel.hxx
chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx:
# Actually used
- com/sun/star/beans/XPropertySet.hpp
@@ -681,6 +547,9 @@ excludelist:
chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx:
# Needed for rtl::math::round
- rtl/math.hxx
+ # Needed for implicit dtor
+ - ChartType.hxx
+ - Diagram.hxx
chart2/source/controller/main/ChartModelClone.hxx:
# Needed for implicit dtor
- com/sun/star/uno/Any.hxx
@@ -694,17 +563,11 @@ excludelist:
chart2/source/controller/main/ChartFrameloader.cxx:
# Actually used
- com/sun/star/uno/XComponentContext.hpp
- chart2/source/controller/main/ChartDropTargetHelper.cxx:
- # Actually used
- - com/sun/star/chart2/XChartDocument.hpp
chart2/source/controller/main/CommandDispatch.hxx:
# base class has to be a complete type
- com/sun/star/frame/XDispatch.hpp
- com/sun/star/util/XModifyListener.hpp
- comphelper/interfacecontainer2.hxx
- chart2/source/controller/main/CommandDispatchContainer.cxx:
- # Actually used
- - com/sun/star/frame/XModel.hpp
chart2/source/controller/main/ControllerCommandDispatch.hxx:
# base class has to be a complete type
- CommandDispatch.hxx
@@ -712,30 +575,39 @@ excludelist:
chart2/source/controller/main/ElementSelector.hxx:
# base class has to be a complete type
- com/sun/star/lang/XServiceInfo.hpp
- chart2/source/controller/main/ObjectHierarchy.cxx:
- # Actually used
- - com/sun/star/awt/KeyEvent.hpp
chart2/source/controller/main/StatusBarCommandDispatch.hxx:
# base class has to be a complete type
- CommandDispatch.hxx
- com/sun/star/view/XSelectionChangeListener.hpp
- chart2/source/controller/main/ChartController_EditData.cxx:
- # Needed for member access
- - ChartWindow.hxx
+ chart2/source/controller/main/ChartController_Insert.cxx:
+ # Needed for implicit dtor
+ - Legend.hxx
chart2/source/controller/main/ChartController_Position.cxx:
- # Needed for member access
- - ChartWindow.hxx
+ # Needed for implicit dtor
+ - ChartModel.hxx
chart2/source/controller/main/ChartController_Properties.cxx:
- # Needed for member access
- - ChartWindow.hxx
+ # Needed for implicit dtor
+ - RegressionCurveModel.hxx
+ chart2/source/controller/main/ChartController_TextEdit.cxx:
+ # Needed for implicit dtor
+ - ChartModel.hxx
chart2/source/controller/main/ChartController_Tools.cxx:
# Needed for template
- com/sun/star/graphic/XGraphic.hpp
+ chart2/source/controller/main/ControllerCommandDispatch.cxx:
+ # Needed for implicit dtor
+ - Axis.hxx
+ chart2/source/controller/main/DragMethod_RotateDiagram.cxx:
+ # Needed for implicit dtor
+ - ChartType.hxx
chart2/source/controller/main/PositionAndSizeHelper.cxx:
# Actually used
- com/sun/star/awt/Rectangle.hpp
# Needed for implicit dtor
- - com/sun/star/chart2/XDiagram.hpp
+ - Diagram.hxx
+ chart2/source/controller/main/SelectionHelper.cxx:
+ # Needed for implicit dtor
+ - Diagram.hxx
chart2/source/controller/main/StatusBarCommandDispatch.cxx:
# Actually used
- com/sun/star/view/XSelectionSupplier.hpp
@@ -749,6 +621,9 @@ excludelist:
# base class has to be a complete type
- com/sun/star/ui/XUIElementFactory.hpp
- com/sun/star/lang/XServiceInfo.hpp
+ chart2/source/controller/sidebar/ChartSeriesPanel.cxx:
+ # Needed for implicit dtor
+ - RegressionCurveModel.hxx
chart2/source/controller/sidebar/ChartSidebarModifyListener.hxx:
# base class has to be a complete type
- com/sun/star/util/XModifyListener.hpp
@@ -858,6 +733,6 @@ excludelist:
chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx:
# Needed for css namespace shortcut
- sal/types.h
- chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx:
- # Needed for compound type declaration
- - com/sun/star/chart2/XAxis.hpp
+ chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx:
+ # Needed for implicit dtor
+ - RegressionCurveModel.hxx
diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk
index b7c449cef582..ca50d52a1fd9 100644
--- a/chart2/Library_chartcontroller.mk
+++ b/chart2/Library_chartcontroller.mk
@@ -33,10 +33,11 @@ $(eval $(call gb_Library_use_libraries,chartcontroller,\
cppu \
cppuhelper \
drawinglayer \
+ docmodel \
editeng \
sal \
salhelper \
- i18nlangtag \
+ i18nlangtag \
sfx \
sot \
svl \
@@ -109,6 +110,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/dialogs/dlg_DataSource \
chart2/source/controller/dialogs/dlg_InsertAxis_Grid \
chart2/source/controller/dialogs/dlg_InsertDataLabel \
+ chart2/source/controller/dialogs/dlg_InsertDataTable \
chart2/source/controller/dialogs/dlg_InsertErrorBars \
chart2/source/controller/dialogs/dlg_InsertLegend \
chart2/source/controller/dialogs/dlg_InsertTitle \
@@ -122,6 +124,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/dialogs/RangeSelectionListener \
chart2/source/controller/dialogs/res_BarGeometry \
chart2/source/controller/dialogs/res_DataLabel \
+ chart2/source/controller/dialogs/res_DataTableProperties \
chart2/source/controller/dialogs/res_ErrorBar \
chart2/source/controller/dialogs/res_LegendPosition \
chart2/source/controller/dialogs/res_Titles \
@@ -138,6 +141,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/dialogs/tp_DataLabel \
chart2/source/controller/dialogs/tp_DataPointOption \
chart2/source/controller/dialogs/tp_DataSource \
+ chart2/source/controller/dialogs/tp_DataTable \
chart2/source/controller/dialogs/tp_ErrorBars \
chart2/source/controller/dialogs/tp_LegendPosition \
chart2/source/controller/dialogs/tp_PointGeometry \
@@ -153,6 +157,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/itemsetwrapper/AxisItemConverter \
chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter \
chart2/source/controller/itemsetwrapper/DataPointItemConverter \
+ chart2/source/controller/itemsetwrapper/DataTableItemConverter \
chart2/source/controller/itemsetwrapper/ErrorBarItemConverter \
chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter \
chart2/source/controller/itemsetwrapper/ItemConverter \
@@ -180,7 +185,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/main/ChartWindow \
chart2/source/controller/main/CommandDispatchContainer \
chart2/source/controller/main/CommandDispatch \
- chart2/source/controller/main/ConfigurationAccess \
chart2/source/controller/main/ControllerCommandDispatch \
chart2/source/controller/main/DragMethod_Base \
chart2/source/controller/main/DragMethod_PieSegment \
diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index a9a23159b436..b61390ec42ea 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -27,7 +27,6 @@ $(eval $(call gb_Library_set_precompiled_header,chartcore,chart2/inc/pch/precomp
$(eval $(call gb_Library_use_externals,chartcore,\
boost_headers \
- epoxy \
libxml2 \
))
@@ -56,6 +55,7 @@ $(eval $(call gb_Library_use_libraries,chartcore,\
ucbhelper \
utl \
vcl \
+ docmodel \
))
$(eval $(call gb_Library_set_componentfile,chartcore,chart2/source/chartcore,services))
@@ -87,7 +87,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/view/charttypes/BubbleChart \
chart2/source/view/charttypes/CandleStickChart \
chart2/source/view/charttypes/CategoryPositionHelper \
- chart2/source/view/charttypes/ConfigAccess \
chart2/source/view/charttypes/NetChart \
chart2/source/view/charttypes/PieChart \
chart2/source/view/charttypes/Splines \
@@ -97,13 +96,16 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/view/main/ChartView \
chart2/source/view/main/Clipping \
chart2/source/view/main/DataPointSymbolSupplier \
+ chart2/source/view/main/DataTableView \
chart2/source/view/main/DrawModelWrapper \
+ chart2/source/view/main/ExplicitValueProvider \
chart2/source/view/main/LabelPositionHelper \
chart2/source/view/main/Linear3DTransformation \
chart2/source/view/main/PlotterBase \
chart2/source/view/main/PlottingPositionHelper \
chart2/source/view/main/PolarLabelPositionHelper \
chart2/source/view/main/PropertyMapper \
+ chart2/source/view/main/SeriesPlotterContainer \
chart2/source/view/main/ShapeFactory \
chart2/source/view/main/Stripe \
chart2/source/view/main/VDataSeries \
@@ -127,6 +129,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/model/main/DataPointProperties \
chart2/source/model/main/DataSeries \
chart2/source/model/main/DataSeriesProperties \
+ chart2/source/model/main/DataTable \
chart2/source/model/main/Diagram \
chart2/source/model/main/FormattedString \
chart2/source/model/main/GridProperties \
@@ -223,7 +226,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/tools/StatisticsHelper \
chart2/source/tools/ThreeDHelper \
chart2/source/tools/TitleHelper \
- chart2/source/tools/TrueGuard \
chart2/source/tools/UncachedDataSequence \
chart2/source/tools/UserDefinedProperties \
chart2/source/tools/WeakListenerAdapter \
diff --git a/chart2/Module_chart2.mk b/chart2/Module_chart2.mk
index 94cba43344fa..5f7fd5aee961 100644
--- a/chart2/Module_chart2.mk
+++ b/chart2/Module_chart2.mk
@@ -30,21 +30,21 @@ $(eval $(call gb_Module_add_check_targets,chart2,\
$(eval $(call gb_Module_add_slowcheck_targets,chart2,\
CppunitTest_chart2_export \
CppunitTest_chart2_export2 \
+ CppunitTest_chart2_export3 \
CppunitTest_chart2_import \
CppunitTest_chart2_import2 \
CppunitTest_chart2_trendcalculators \
CppunitTest_chart2_dump \
CppunitTest_chart2_pivot_chart_test \
CppunitTest_chart2_geometry \
+ CppunitTest_chart2_uichart \
))
-ifeq ($(ENABLE_CHART_TESTS),TRUE)
ifeq ($(WITH_FONTS), TRUE)
$(eval $(call gb_Module_add_slowcheck_targets,chart2,\
CppunitTest_chart2_xshape \
))
endif
-endif
$(eval $(call gb_Module_add_subsequentcheck_targets,chart2,\
JunitTest_chart2_unoapi \
diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk
index 67d64b18b597..274efd02638f 100644
--- a/chart2/UIConfig_chart2.mk
+++ b/chart2/UIConfig_chart2.mk
@@ -44,7 +44,9 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
chart2/uiconfig/ui/combobox \
chart2/uiconfig/ui/datarangedialog \
chart2/uiconfig/ui/dlg_DataLabel \
+ chart2/uiconfig/ui/dlg_InsertDataTable \
chart2/uiconfig/ui/dlg_InsertErrorBars \
+ chart2/uiconfig/ui/dlg_InsertLegend \
chart2/uiconfig/ui/imagefragment \
chart2/uiconfig/ui/insertaxisdlg \
chart2/uiconfig/ui/insertgriddlg \
@@ -58,7 +60,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
chart2/uiconfig/ui/smoothlinesdlg \
chart2/uiconfig/ui/steppedlinesdlg \
chart2/uiconfig/ui/titlerotationtabpage \
- chart2/uiconfig/ui/dlg_InsertLegend \
chart2/uiconfig/ui/tp_3D_SceneAppearance \
chart2/uiconfig/ui/tp_3D_SceneGeometry \
chart2/uiconfig/ui/tp_3D_SceneIllumination \
@@ -68,6 +69,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
chart2/uiconfig/ui/tp_DataLabel \
chart2/uiconfig/ui/tp_DataPointOption \
chart2/uiconfig/ui/tp_DataSource \
+ chart2/uiconfig/ui/tp_DataTable \
chart2/uiconfig/ui/tp_ErrorBars \
chart2/uiconfig/ui/tp_LegendPosition \
chart2/uiconfig/ui/tp_PolarOptions \
diff --git a/chart2/export_setup.mk b/chart2/export_setup.mk
index 359973634dbd..723df9897c4a 100644
--- a/chart2/export_setup.mk
+++ b/chart2/export_setup.mk
@@ -45,6 +45,7 @@ $(eval $(call gb_CppunitTest_use_libraries,chart2_export$(1), \
sd \
sfx \
sot \
+ subsequenttest \
svl \
svt \
svx \
@@ -70,66 +71,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,chart2_export$(1)))
$(eval $(call gb_CppunitTest_use_ure,chart2_export$(1)))
$(eval $(call gb_CppunitTest_use_vcl,chart2_export$(1)))
-
-$(eval $(call gb_CppunitTest_use_components,chart2_export$(1),\
- basic/util/sb \
- animations/source/animcore/animcore \
- chart2/source/controller/chartcontroller \
- chart2/source/chartcore \
- comphelper/util/comphelp \
- configmgr/source/configmgr \
- dbaccess/util/dba \
- embeddedobj/util/embobj \
- emfio/emfio \
- eventattacher/source/evtatt \
- filter/source/config/cache/filterconfig1 \
- filter/source/odfflatxml/odfflatxml \
- filter/source/storagefilterdetect/storagefd \
- filter/source/xmlfilteradaptor/xmlfa \
- filter/source/xmlfilterdetect/xmlfd \
- forms/util/frm \
- framework/util/fwk \
- i18npool/util/i18npool \
- linguistic/source/lng \
- oox/util/oox \
- package/source/xstor/xstor \
- package/util/package2 \
- sax/source/expatwrap/expwrap \
- sc/util/sc \
- sc/util/scd \
- sc/util/scfilt \
- sw/util/sw \
- sw/util/swd \
- sw/util/msword \
- sd/util/sd \
- sd/util/sdfilt \
- sd/util/sdd \
- $(call gb_Helper_optional,SCRIPTING, \
- sc/util/vbaobj) \
- scaddins/source/analysis/analysis \
- scaddins/source/datefunc/date \
- scripting/source/basprov/basprov \
- scripting/util/scriptframe \
- sfx2/util/sfx \
- sot/util/sot \
- svl/source/fsstor/fsstorage \
- svl/util/svl \
- svtools/util/svt \
- svx/util/svx \
- svx/util/svxcore \
- toolkit/util/tk \
- vcl/vcl.common \
- ucb/source/core/ucb1 \
- ucb/source/ucp/file/ucpfile1 \
- ucb/source/ucp/tdoc/ucptdoc1 \
- unotools/util/utl \
- unoxml/source/rdf/unordf \
- unoxml/source/service/unoxml \
- uui/util/uui \
- writerfilter/util/writerfilter \
- xmloff/util/xo \
- xmlscript/util/xmlscript \
-))
+$(eval $(call gb_CppunitTest_use_rdb,chart2_export$(1),services))
$(eval $(call gb_CppunitTest_use_uiconfigs,chart2_export$(1), \
modules/swriter \
diff --git a/chart2/import_setup.mk b/chart2/import_setup.mk
index fb83a0462b7e..0fbbe131941f 100644
--- a/chart2/import_setup.mk
+++ b/chart2/import_setup.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_CppunitTest_use_libraries,chart2_import$(1), \
cppu \
cppuhelper \
drawinglayer \
+ docmodel \
editeng \
for \
forui \
@@ -45,6 +46,7 @@ $(eval $(call gb_CppunitTest_use_libraries,chart2_import$(1), \
sd \
sfx \
sot \
+ subsequenttest \
svl \
svt \
svx \
@@ -102,7 +104,6 @@ $(eval $(call gb_CppunitTest_use_components,chart2_import$(1),\
sw/util/swd \
sw/util/msword \
sd/util/sd \
- sd/util/sdfilt \
sd/util/sdd \
$(call gb_Helper_optional,SCRIPTING, \
sc/util/vbaobj) \
@@ -117,6 +118,7 @@ $(eval $(call gb_CppunitTest_use_components,chart2_import$(1),\
svtools/util/svt \
svx/util/svx \
svx/util/svxcore \
+ sw/util/sw_writerfilter \
toolkit/util/tk \
vcl/vcl.common \
ucb/source/core/ucb1 \
@@ -126,7 +128,6 @@ $(eval $(call gb_CppunitTest_use_components,chart2_import$(1),\
unoxml/source/rdf/unordf \
unoxml/source/service/unoxml \
uui/util/uui \
- writerfilter/util/writerfilter \
xmloff/util/xo \
xmlscript/util/xmlscript \
))
diff --git a/chart2/inc/ChartModel.hxx b/chart2/inc/ChartModel.hxx
index cad6f0422a72..b2e9a6d87cb8 100644
--- a/chart2/inc/ChartModel.hxx
+++ b/chart2/inc/ChartModel.hxx
@@ -52,12 +52,12 @@
#include <cppuhelper/implbase.hxx>
#include <comphelper/interfacecontainer2.hxx>
#include <vcl/GraphicObject.hxx>
-#include <sfx2/xmldump.hxx>
#include <memory>
+typedef struct _xmlTextWriter* xmlTextWriterPtr;
+
namespace com::sun::star::awt { class XRequestCallback; }
-namespace com::sun::star::chart2 { class XChartTypeTemplate; }
namespace com::sun::star::chart2::data { class XDataProvider; }
namespace com::sun::star::document { class XFilter; }
namespace com::sun::star::embed { class XStorage; }
@@ -72,9 +72,12 @@ namespace chart
{
class Diagram;
class ChartTypeManager;
+class ChartTypeTemplate;
class InternalDataProvider;
class NameContainer;
class PageBackground;
+class RangeHighlighter;
+class Title;
namespace impl
{
@@ -112,7 +115,8 @@ typedef cppu::WeakImplHelper<
class UndoManager;
class ChartView;
-class OOO_DLLPUBLIC_CHARTTOOLS ChartModel final : public impl::ChartModel_Base, public sfx2::XmlDump
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) SAL_LOPLUGIN_ANNOTATE("crosscast") ChartModel final :
+ public impl::ChartModel_Base
{
private:
@@ -144,7 +148,7 @@ private:
//the content of this should be always synchronized with the current m_xViewWindow size. The variable is necessary to hold the information as long as no view window exists.
css::awt::Size m_aVisualAreaSize;
css::uno::Reference< css::frame::XModel > m_xParent;
- css::uno::Reference< css::chart2::data::XRangeHighlighter > m_xRangeHighlighter;
+ rtl::Reference< ::chart::RangeHighlighter > m_xRangeHighlighter;
css::uno::Reference<css::awt::XRequestCallback> m_xPopupRequest;
std::vector< GraphicObject > m_aGraphicObjectVector;
@@ -165,8 +169,7 @@ private:
// Diagram Access
rtl::Reference< ::chart::Diagram > m_xDiagram;
- css::uno::Reference< css::chart2::XTitle >
- m_xTitle;
+ rtl::Reference< ::chart::Title > m_xTitle;
rtl::Reference< ::chart::PageBackground > m_xPageBackground;
@@ -205,7 +208,7 @@ private:
css::uno::Reference< css::document::XFilter >
impl_createFilter( const css::uno::Sequence< css::beans::PropertyValue > & rMediaDescriptor );
- css::uno::Reference< css::chart2::XChartTypeTemplate > impl_createDefaultChartTypeTemplate();
+ rtl::Reference< ::chart::ChartTypeTemplate > impl_createDefaultChartTypeTemplate();
css::uno::Reference< css::chart2::data::XDataSource > impl_createDefaultData();
void impl_adjustAdditionalShapesPositionAndSize(
@@ -215,7 +218,7 @@ private:
public:
ChartModel() = delete;
- ChartModel(css::uno::Reference< css::uno::XComponentContext > const & xContext);
+ ChartModel(css::uno::Reference< css::uno::XComponentContext > xContext);
explicit ChartModel( const ChartModel & rOther );
virtual ~ChartModel() override;
@@ -451,7 +454,7 @@ public:
virtual void SAL_CALL update() override;
// XDumper
- virtual OUString SAL_CALL dump() override;
+ virtual OUString SAL_CALL dump(OUString const & kind) override;
// normal methods
css::uno::Reference< css::util::XNumberFormatsSupplier > const &
@@ -473,10 +476,12 @@ public:
const rtl::Reference< ::chart::ChartTypeManager > & getTypeManager() const { return m_xChartTypeManager; }
- /// See sfx2::XmlDump::dumpAsXml().
- void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+ rtl::Reference< ::chart::Title > getTitleObject2() const;
+ void setTitleObject( const rtl::Reference< ::chart::Title >& Title );
private:
+ void dumpAsXml(xmlTextWriterPtr pWriter) const;
+
sal_Int32 mnStart;
sal_Int32 mnEnd;
};
diff --git a/chart2/inc/ChartTypeManager.hxx b/chart2/inc/ChartTypeManager.hxx
index 0ed5b3ef4812..ac2c56263432 100644
--- a/chart2/inc/ChartTypeManager.hxx
+++ b/chart2/inc/ChartTypeManager.hxx
@@ -18,20 +18,20 @@
*/
#pragma once
+#include <config_options.h>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/chart2/XChartTypeManager.hpp>
#include <charttoolsdllapi.hxx>
#include <rtl/ref.hxx>
+#include <ChartTypeTemplate.hxx>
namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
-class ChartTypeTemplate;
-
-class OOO_DLLPUBLIC_CHARTTOOLS ChartTypeManager final :
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ChartTypeManager final :
public ::cppu::WeakImplHelper<
css::lang::XServiceInfo,
css::lang::XMultiServiceFactory,
@@ -39,7 +39,7 @@ class OOO_DLLPUBLIC_CHARTTOOLS ChartTypeManager final :
{
public:
explicit ChartTypeManager(
- css::uno::Reference< css::uno::XComponentContext > const & xContext );
+ css::uno::Reference< css::uno::XComponentContext > xContext );
virtual ~ChartTypeManager() override;
virtual OUString SAL_CALL
diff --git a/chart2/inc/ChartView.hxx b/chart2/inc/ChartView.hxx
index 228d24bc19fe..e77fe760b67f 100644
--- a/chart2/inc/ChartView.hxx
+++ b/chart2/inc/ChartView.hxx
@@ -20,16 +20,16 @@
#include <chartview/ExplicitValueProvider.hxx>
#include <cppuhelper/implbase.hxx>
-#include <comphelper/multicontainer2.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include <svl/lstner.hxx>
#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/datatransfer/XTransferable.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/qa/XDumper.hpp>
#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
@@ -40,9 +40,9 @@
#include <vector>
#include <memory>
+#include <mutex>
#include <vcl/timer.hxx>
-#include <sfx2/xmldump.hxx>
namespace com::sun::star::drawing { class XDrawPage; }
namespace com::sun::star::drawing { class XShapes; }
@@ -82,11 +82,10 @@ struct TimeBasedInfo
* The View is not responsible to handle single user events (that is instead
* done by the ChartWindow).
*/
-class OOO_DLLPUBLIC_CHARTVIEW ChartView final : public ::cppu::WeakImplHelper<
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) ChartView final : public ::cppu::WeakImplHelper<
css::lang::XInitialization
,css::lang::XServiceInfo
,css::datatransfer::XTransferable
- ,css::lang::XUnoTunnel
,css::util::XModifyListener
,css::util::XModeChangeBroadcaster
,css::util::XUpdatable2
@@ -96,15 +95,13 @@ class OOO_DLLPUBLIC_CHARTVIEW ChartView final : public ::cppu::WeakImplHelper<
>
, public ExplicitValueProvider
, private SfxListener
- , public sfx2::XmlDump
{
private:
void init();
public:
ChartView() = delete;
- ChartView(css::uno::Reference< css::uno::XComponentContext > const & xContext,
- ChartModel& rModel);
+ ChartView(css::uno::Reference<css::uno::XComponentContext> xContext, ChartModel& rModel);
virtual ~ChartView() override;
@@ -118,10 +115,10 @@ public:
// ___ExplicitValueProvider___
virtual bool getExplicitValuesForAxis(
- css::uno::Reference< css::chart2::XAxis > xAxis
+ rtl::Reference< Axis > xAxis
, ExplicitScaleData& rExplicitScale
, ExplicitIncrementData& rExplicitIncrement ) override;
- virtual css::uno::Reference< css::drawing::XShape >
+ virtual rtl::Reference< SvxShape >
getShapeForCID( const OUString& rObjectCID ) override;
virtual css::awt::Rectangle getRectangleOfObject( const OUString& rObjectCID, bool bSnapRect=false ) override;
@@ -175,17 +172,14 @@ public:
const OUString& ServiceSpecifier, const css::uno::Sequence< css::uno::Any >& Arguments ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override;
- // for ExplicitValueProvider
- // ____ XUnoTunnel ___
- virtual ::sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< ::sal_Int8 >& aIdentifier ) override;
-
// XDumper
- virtual OUString SAL_CALL dump() override;
+ virtual OUString SAL_CALL dump(OUString const & kind) override;
void setViewDirty();
- /// See sfx2::XmlDump::dumpAsXml().
- void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+ css::uno::Reference<css::uno::XComponentContext> const& getComponentContext() { return m_xCC;}
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const;
private: //methods
void createShapes();
@@ -207,12 +201,11 @@ private: //methods
DECL_LINK( UpdateTimeBased, Timer*, void );
private: //member
- ::osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
- css::uno::Reference< css::uno::XComponentContext>
- m_xCC;
+ css::uno::Reference< css::uno::XComponentContext> m_xCC;
- chart::ChartModel& mrChartModel;
+ ChartModel& mrChartModel;
css::uno::Reference< css::lang::XMultiServiceFactory>
m_xShapeFactory;
@@ -232,8 +225,8 @@ private: //member
std::vector< std::unique_ptr<VCoordinateSystem> > m_aVCooSysList;
- comphelper::OMultiTypeInterfaceContainerHelper2
- m_aListenerContainer;
+ comphelper::OInterfaceContainerHelper4<css::util::XModeChangeListener>
+ m_aModeChangeListeners;
bool m_bViewDirty; //states whether the view needs to be rebuild
bool m_bInViewUpdate;
@@ -255,7 +248,7 @@ private: //member
css::awt::Rectangle m_aResultingDiagramRectangleExcludingAxes;
TimeBasedInfo maTimeBased;
- osl::Mutex maTimeMutex;
+ std::mutex maTimeMutex;
};
}
diff --git a/chart2/inc/bitmaps.hlst b/chart2/inc/bitmaps.hlst
index 0f4512e8bc2c..4c184dc09aeb 100644
--- a/chart2/inc/bitmaps.hlst
+++ b/chart2/inc/bitmaps.hlst
@@ -9,124 +9,126 @@
#pragma once
-inline constexpr OUStringLiteral BMP_TYPE_COLUMN = u"chart2/res/typecolumn_16.png";
-inline constexpr OUStringLiteral BMP_TYPE_BAR = u"chart2/res/typebar_16.png";
-inline constexpr OUStringLiteral BMP_TYPE_PIE = u"chart2/res/typepie_16.png";
-inline constexpr OUStringLiteral BMP_TYPE_LINE = u"chart2/res/typepointline_16.png";
-inline constexpr OUStringLiteral BMP_TYPE_XY = u"chart2/res/typexy_16.png";
-inline constexpr OUStringLiteral BMP_TYPE_AREA = u"chart2/res/typearea_16.png";
-inline constexpr OUStringLiteral BMP_TYPE_NET = u"chart2/res/typenet_16.png";
-inline constexpr OUStringLiteral BMP_TYPE_STOCK = u"chart2/res/typestock_16.png";
-inline constexpr OUStringLiteral BMP_TYPE_COLUMN_LINE = u"chart2/res/typecolumnline_16.png";
-inline constexpr OUStringLiteral BMP_TYPE_BUBBLE = u"chart2/res/typebubble_16.png";
-inline constexpr OUStringLiteral BMP_BUBBLE_1 = u"chart2/res/bubble_52x60.png";
-inline constexpr OUStringLiteral BMP_AREAS_2D = u"chart2/res/areas_52x60.png";
-inline constexpr OUStringLiteral BMP_AREAS_2D_1 = u"chart2/res/areaspiled_52x60.png";
-inline constexpr OUStringLiteral BMP_AREAS_2D_3 = u"chart2/res/areasfull_52x60.png";
-inline constexpr OUStringLiteral BMP_AREAS_3D = u"chart2/res/areaspiled3d_52x60.png";
-inline constexpr OUStringLiteral BMP_AREAS_3D_1 = u"chart2/res/areas3d_52x60.png";
-inline constexpr OUStringLiteral BMP_AREAS_3D_2 = u"chart2/res/areasfull3d_52x60.png";
-inline constexpr OUStringLiteral BMP_BARS_2D_1 = u"chart2/res/bar_52x60.png";
-inline constexpr OUStringLiteral BMP_BARS_2D_2 = u"chart2/res/barstack_52x60.png";
-inline constexpr OUStringLiteral BMP_BARS_2D_3 = u"chart2/res/barpercent_52x60.png";
-inline constexpr OUStringLiteral BMP_BARS_3D = u"chart2/res/bar3ddeep_52x60.png";
-inline constexpr OUStringLiteral BMP_BARS_3D_1 = u"chart2/res/bar3d_52x60.png";
-inline constexpr OUStringLiteral BMP_BARS_3D_2 = u"chart2/res/barstack3d_52x60.png";
-inline constexpr OUStringLiteral BMP_BARS_3D_3 = u"chart2/res/barpercent3d_52x60.png";
-inline constexpr OUStringLiteral BMP_CIRCLES_2D = u"chart2/res/pie_52x60.png";
-inline constexpr OUStringLiteral BMP_CIRCLES_2D_EXPLODED = u"chart2/res/pieexploded_52x60.png";
-inline constexpr OUStringLiteral BMP_CIRCLES_3D = u"chart2/res/pie3d_52x60.png";
-inline constexpr OUStringLiteral BMP_CIRCLES_3D_EXPLODED = u"chart2/res/pie3dexploded_52x60.png";
-inline constexpr OUStringLiteral BMP_DONUT_2D = u"chart2/res/donut_52x60.png";
-inline constexpr OUStringLiteral BMP_DONUT_2D_EXPLODED = u"chart2/res/donutexploded_52x60.png";
-inline constexpr OUStringLiteral BMP_DONUT_3D = u"chart2/res/donut3d_52x60.png";
-inline constexpr OUStringLiteral BMP_DONUT_3D_EXPLODED = u"chart2/res/donut3dexploded_52x60.png";
-inline constexpr OUStringLiteral BMP_COLUMNS_2D_1 = u"chart2/res/columns_52x60.png";
-inline constexpr OUStringLiteral BMP_COLUMNS_2D_2 = u"chart2/res/columnstack_52x60.png";
-inline constexpr OUStringLiteral BMP_COLUMNS_2D_3 = u"chart2/res/columnpercent_52x60.png";
-inline constexpr OUStringLiteral BMP_COLUMN_LINE = u"chart2/res/columnline_52x60.png";
-inline constexpr OUStringLiteral BMP_COLUMN_LINE_STACKED = u"chart2/res/columnstackline_52x60.png";
-inline constexpr OUStringLiteral BMP_COLUMNS_3D = u"chart2/res/columns3ddeep_52x60.png";
-inline constexpr OUStringLiteral BMP_COLUMNS_3D_1 = u"chart2/res/columns3d_52x60.png";
-inline constexpr OUStringLiteral BMP_COLUMNS_3D_2 = u"chart2/res/columnstack3d_52x60.png";
-inline constexpr OUStringLiteral BMP_COLUMNS_3D_3 = u"chart2/res/columnpercent3d_52x60.png";
-inline constexpr OUStringLiteral BMP_KEGELQ_3D_1 = u"chart2/res/conehori_52x60.png";
-inline constexpr OUStringLiteral BMP_KEGELQ_3D_2 = u"chart2/res/conehoristack_52x60.png";
-inline constexpr OUStringLiteral BMP_KEGELQ_3D_3 = u"chart2/res/conehoripercent_52x60.png";
-inline constexpr OUStringLiteral BMP_KEGELQ_3D_4 = u"chart2/res/conehorideep_52x60.png";
-inline constexpr OUStringLiteral BMP_KEGEL_3D_1 = u"chart2/res/cone_52x60.png";
-inline constexpr OUStringLiteral BMP_KEGEL_3D_2 = u"chart2/res/conestack_52x60.png";
-inline constexpr OUStringLiteral BMP_KEGEL_3D_3 = u"chart2/res/conepercent_52x60.png";
-inline constexpr OUStringLiteral BMP_KEGEL_3D_4 = u"chart2/res/conedeep_52x60.png";
-inline constexpr OUStringLiteral BMP_POINTS_XVALUES = u"chart2/res/valueaxisdirectpoints_52x60.png";
-inline constexpr OUStringLiteral BMP_POINTS_XCATEGORY = u"chart2/res/nostackdirectpoints_52x60.png";
-inline constexpr OUStringLiteral BMP_POINTS_STACKED = u"chart2/res/stackdirectpoints_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_P_XVALUES = u"chart2/res/valueaxisdirectboth_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_O_XVALUES = u"chart2/res/valueaxisdirectlines_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE3D_XVALUES = u"chart2/res/valueaxisdirect3d_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_P_XCATEGORY = u"chart2/res/nostackdirectboth_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_O_XCATEGORY = u"chart2/res/nostackdirectlines_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE3D_XCATEGORY = u"chart2/res/nostackdirect3d_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_P_STACKED = u"chart2/res/stackdirectboth_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_O_STACKED = u"chart2/res/stackdirectlines_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE3D_STACKED = u"chart2/res/stackdirect3d_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_P_XVALUES_SMOOTH = u"chart2/res/valueaxissmoothboth_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_O_XVALUES_SMOOTH = u"chart2/res/valueaxissmoothlines_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE3D_XVALUES_SMOOTH = u"chart2/res/valueaxissmooth3d_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_P_XCATEGORY_SMOOTH = u"chart2/res/nostacksmoothboth_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_O_XCATEGORY_SMOOTH = u"chart2/res/nostacksmoothlines_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE3D_XCATEGORY_SMOOTH = u"chart2/res/nostacksmooth3d_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_P_STACKED_SMOOTH = u"chart2/res/stacksmoothboth_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_O_STACKED_SMOOTH = u"chart2/res/stacksmoothlines_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE3D_STACKED_SMOOTH = u"chart2/res/stacksmooth3d_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_P_XVALUES_STEPPED = u"chart2/res/valueaxissteppedboth_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_O_XVALUES_STEPPED = u"chart2/res/valueaxissteppedlines_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE3D_XVALUES_STEPPED = u"chart2/res/valueaxisstepped3d_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_P_XCATEGORY_STEPPED = u"chart2/res/nostacksteppedboth_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_O_XCATEGORY_STEPPED = u"chart2/res/nostacksteppedlines_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE3D_XCATEGORY_STEPPED = u"chart2/res/nostackstepped3d_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_P_STACKED_STEPPED = u"chart2/res/stacksteppedboth_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE_O_STACKED_STEPPED = u"chart2/res/stacksteppedlines_52x60.png";
-inline constexpr OUStringLiteral BMP_LINE3D_STACKED_STEPPED = u"chart2/res/stackstepped3d_52x60.png";
-inline constexpr OUStringLiteral BMP_NET = u"chart2/res/net_52x60.png";
-inline constexpr OUStringLiteral BMP_NET_STACK = u"chart2/res/netstack_52x60.png";
-inline constexpr OUStringLiteral BMP_NET_SYMB = u"chart2/res/netpoint_52x60.png";
-inline constexpr OUStringLiteral BMP_NET_SYMB_STACK = u"chart2/res/netpointstack_52x60.png";
-inline constexpr OUStringLiteral BMP_NET_LINESYMB = u"chart2/res/netlinepoint_52x60.png";
-inline constexpr OUStringLiteral BMP_NET_LINESYMB_STACK = u"chart2/res/netlinepointstack_52x60.png";
-inline constexpr OUStringLiteral BMP_NET_FILL = u"chart2/res/netfill_52x60.png";
-inline constexpr OUStringLiteral BMP_NET_FILL_STACK = u"chart2/res/netstackfill_52x60.png";
-inline constexpr OUStringLiteral BMP_PYRAMIDQ_3D_1 = u"chart2/res/pyramindhori_52x60.png";
-inline constexpr OUStringLiteral BMP_PYRAMIDQ_3D_2 = u"chart2/res/pyramindhoristack_52x60.png";
-inline constexpr OUStringLiteral BMP_PYRAMIDQ_3D_3 = u"chart2/res/pyramindhoripercent_52x60.png";
-inline constexpr OUStringLiteral BMP_PYRAMIDQ_3D_4 = u"chart2/res/pyramindhorideep_52x60.png";
-inline constexpr OUStringLiteral BMP_PYRAMID_3D_1 = u"chart2/res/pyramind_52x60.png";
-inline constexpr OUStringLiteral BMP_PYRAMID_3D_2 = u"chart2/res/pyramindstack_52x60.png";
-inline constexpr OUStringLiteral BMP_PYRAMID_3D_3 = u"chart2/res/pyramindpercent_52x60.png";
-inline constexpr OUStringLiteral BMP_PYRAMID_3D_4 = u"chart2/res/pyraminddeep_52x60.png";
-inline constexpr OUStringLiteral BMP_ROEHRE_3D_1 = u"chart2/res/cylinderhori_52x60.png";
-inline constexpr OUStringLiteral BMP_ROEHRE_3D_2 = u"chart2/res/cylinderhoristack_52x60.png";
-inline constexpr OUStringLiteral BMP_ROEHRE_3D_3 = u"chart2/res/cylinderhoriprocent_52x60.png";
-inline constexpr OUStringLiteral BMP_ROEHRE_3D_4 = u"chart2/res/cylinderhorideep_52x60.png";
-inline constexpr OUStringLiteral BMP_SAEULE_3D_1 = u"chart2/res/cylinder_52x60.png";
-inline constexpr OUStringLiteral BMP_SAEULE_3D_2 = u"chart2/res/cylinderstack_52x60.png";
-inline constexpr OUStringLiteral BMP_SAEULE_3D_3 = u"chart2/res/cylinderpercent_52x60.png";
-inline constexpr OUStringLiteral BMP_SAEULE_3D_4 = u"chart2/res/cylinderdeep_52x60.png";
-inline constexpr OUStringLiteral BMP_STOCK_1 = u"chart2/res/stock_52x60.png";
-inline constexpr OUStringLiteral BMP_STOCK_2 = u"chart2/res/stockblock_52x60.png";
-inline constexpr OUStringLiteral BMP_STOCK_3 = u"chart2/res/stockcolumns_52x60.png";
-inline constexpr OUStringLiteral BMP_STOCK_4 = u"chart2/res/stockcolumnsattach_52x60.png";
-inline constexpr OUStringLiteral BMP_INDICATE_BOTH_VERTI = u"chart2/res/errorbothverti_30.png";
-inline constexpr OUStringLiteral BMP_INDICATE_DOWN = u"chart2/res/errordown_30.png";
-inline constexpr OUStringLiteral BMP_INDICATE_UP = u"chart2/res/errorup_30.png";
-inline constexpr OUStringLiteral BMP_INDICATE_BOTH_HORI = u"chart2/res/errorbothhori_30.png";
-inline constexpr OUStringLiteral BMP_INDICATE_RIGHT = u"chart2/res/errorright_30.png";
-inline constexpr OUStringLiteral BMP_INDICATE_LEFT = u"chart2/res/errorleft_30.png";
-inline constexpr OUStringLiteral BMP_REGRESSION_LINEAR = u"chart2/res/reglin.png";
-inline constexpr OUStringLiteral BMP_REGRESSION_LOG = u"chart2/res/reglog.png";
-inline constexpr OUStringLiteral BMP_REGRESSION_EXP = u"chart2/res/regexp.png";
-inline constexpr OUStringLiteral BMP_REGRESSION_POWER = u"chart2/res/regpow.png";
-inline constexpr OUStringLiteral BMP_REGRESSION_POLYNOMIAL = u"chart2/res/regpoly.png";
-inline constexpr OUStringLiteral BMP_REGRESSION_MOVING_AVERAGE = u"chart2/res/regavg.png";
+inline constexpr OUString BMP_TYPE_COLUMN = u"chart2/res/typecolumn_16.png"_ustr;
+inline constexpr OUString BMP_TYPE_BAR = u"chart2/res/typebar_16.png"_ustr;
+inline constexpr OUString BMP_TYPE_PIE = u"chart2/res/typepie_16.png"_ustr;
+inline constexpr OUString BMP_TYPE_LINE = u"chart2/res/typepointline_16.png"_ustr;
+inline constexpr OUString BMP_TYPE_XY = u"chart2/res/typexy_16.png"_ustr;
+inline constexpr OUString BMP_TYPE_AREA = u"chart2/res/typearea_16.png"_ustr;
+inline constexpr OUString BMP_TYPE_NET = u"chart2/res/typenet_16.png"_ustr;
+inline constexpr OUString BMP_TYPE_STOCK = u"chart2/res/typestock_16.png"_ustr;
+inline constexpr OUString BMP_TYPE_COLUMN_LINE = u"chart2/res/typecolumnline_16.png"_ustr;
+inline constexpr OUString BMP_TYPE_BUBBLE = u"chart2/res/typebubble_16.png"_ustr;
+inline constexpr OUString BMP_BUBBLE_1 = u"chart2/res/bubble_52x60.png"_ustr;
+inline constexpr OUString BMP_AREAS_2D = u"chart2/res/areas_52x60.png"_ustr;
+inline constexpr OUString BMP_AREAS_2D_1 = u"chart2/res/areaspiled_52x60.png"_ustr;
+inline constexpr OUString BMP_AREAS_2D_3 = u"chart2/res/areasfull_52x60.png"_ustr;
+inline constexpr OUString BMP_AREAS_3D = u"chart2/res/areaspiled3d_52x60.png"_ustr;
+inline constexpr OUString BMP_AREAS_3D_1 = u"chart2/res/areas3d_52x60.png"_ustr;
+inline constexpr OUString BMP_AREAS_3D_2 = u"chart2/res/areasfull3d_52x60.png"_ustr;
+inline constexpr OUString BMP_BAR_OF_PIE = u"chart2/res/barofpie_52x60.png"_ustr; // TODO
+inline constexpr OUString BMP_BARS_2D_1 = u"chart2/res/bar_52x60.png"_ustr;
+inline constexpr OUString BMP_BARS_2D_2 = u"chart2/res/barstack_52x60.png"_ustr;
+inline constexpr OUString BMP_BARS_2D_3 = u"chart2/res/barpercent_52x60.png"_ustr;
+inline constexpr OUString BMP_BARS_3D = u"chart2/res/bar3ddeep_52x60.png"_ustr;
+inline constexpr OUString BMP_BARS_3D_1 = u"chart2/res/bar3d_52x60.png"_ustr;
+inline constexpr OUString BMP_BARS_3D_2 = u"chart2/res/barstack3d_52x60.png"_ustr;
+inline constexpr OUString BMP_BARS_3D_3 = u"chart2/res/barpercent3d_52x60.png"_ustr;
+inline constexpr OUString BMP_CIRCLES_2D = u"chart2/res/pie_52x60.png"_ustr;
+inline constexpr OUString BMP_CIRCLES_2D_EXPLODED = u"chart2/res/pieexploded_52x60.png"_ustr;
+inline constexpr OUString BMP_CIRCLES_3D = u"chart2/res/pie3d_52x60.png"_ustr;
+inline constexpr OUString BMP_CIRCLES_3D_EXPLODED = u"chart2/res/pie3dexploded_52x60.png"_ustr;
+inline constexpr OUString BMP_DONUT_2D = u"chart2/res/donut_52x60.png"_ustr;
+inline constexpr OUString BMP_DONUT_2D_EXPLODED = u"chart2/res/donutexploded_52x60.png"_ustr;
+inline constexpr OUString BMP_DONUT_3D = u"chart2/res/donut3d_52x60.png"_ustr;
+inline constexpr OUString BMP_DONUT_3D_EXPLODED = u"chart2/res/donut3dexploded_52x60.png"_ustr;
+inline constexpr OUString BMP_COLUMNS_2D_1 = u"chart2/res/columns_52x60.png"_ustr;
+inline constexpr OUString BMP_COLUMNS_2D_2 = u"chart2/res/columnstack_52x60.png"_ustr;
+inline constexpr OUString BMP_COLUMNS_2D_3 = u"chart2/res/columnpercent_52x60.png"_ustr;
+inline constexpr OUString BMP_COLUMN_LINE = u"chart2/res/columnline_52x60.png"_ustr;
+inline constexpr OUString BMP_COLUMN_LINE_STACKED = u"chart2/res/columnstackline_52x60.png"_ustr;
+inline constexpr OUString BMP_COLUMNS_3D = u"chart2/res/columns3ddeep_52x60.png"_ustr;
+inline constexpr OUString BMP_COLUMNS_3D_1 = u"chart2/res/columns3d_52x60.png"_ustr;
+inline constexpr OUString BMP_COLUMNS_3D_2 = u"chart2/res/columnstack3d_52x60.png"_ustr;
+inline constexpr OUString BMP_COLUMNS_3D_3 = u"chart2/res/columnpercent3d_52x60.png"_ustr;
+inline constexpr OUString BMP_KEGELQ_3D_1 = u"chart2/res/conehori_52x60.png"_ustr;
+inline constexpr OUString BMP_KEGELQ_3D_2 = u"chart2/res/conehoristack_52x60.png"_ustr;
+inline constexpr OUString BMP_KEGELQ_3D_3 = u"chart2/res/conehoripercent_52x60.png"_ustr;
+inline constexpr OUString BMP_KEGELQ_3D_4 = u"chart2/res/conehorideep_52x60.png"_ustr;
+inline constexpr OUString BMP_KEGEL_3D_1 = u"chart2/res/cone_52x60.png"_ustr;
+inline constexpr OUString BMP_KEGEL_3D_2 = u"chart2/res/conestack_52x60.png"_ustr;
+inline constexpr OUString BMP_KEGEL_3D_3 = u"chart2/res/conepercent_52x60.png"_ustr;
+inline constexpr OUString BMP_KEGEL_3D_4 = u"chart2/res/conedeep_52x60.png"_ustr;
+inline constexpr OUString BMP_POINTS_XVALUES = u"chart2/res/valueaxisdirectpoints_52x60.png"_ustr;
+inline constexpr OUString BMP_POINTS_XCATEGORY = u"chart2/res/nostackdirectpoints_52x60.png"_ustr;
+inline constexpr OUString BMP_POINTS_STACKED = u"chart2/res/stackdirectpoints_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_P_XVALUES = u"chart2/res/valueaxisdirectboth_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_O_XVALUES = u"chart2/res/valueaxisdirectlines_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE3D_XVALUES = u"chart2/res/valueaxisdirect3d_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_P_XCATEGORY = u"chart2/res/nostackdirectboth_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_O_XCATEGORY = u"chart2/res/nostackdirectlines_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE3D_XCATEGORY = u"chart2/res/nostackdirect3d_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_P_STACKED = u"chart2/res/stackdirectboth_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_O_STACKED = u"chart2/res/stackdirectlines_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE3D_STACKED = u"chart2/res/stackdirect3d_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_P_XVALUES_SMOOTH = u"chart2/res/valueaxissmoothboth_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_O_XVALUES_SMOOTH = u"chart2/res/valueaxissmoothlines_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE3D_XVALUES_SMOOTH = u"chart2/res/valueaxissmooth3d_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_P_XCATEGORY_SMOOTH = u"chart2/res/nostacksmoothboth_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_O_XCATEGORY_SMOOTH = u"chart2/res/nostacksmoothlines_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE3D_XCATEGORY_SMOOTH = u"chart2/res/nostacksmooth3d_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_P_STACKED_SMOOTH = u"chart2/res/stacksmoothboth_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_O_STACKED_SMOOTH = u"chart2/res/stacksmoothlines_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE3D_STACKED_SMOOTH = u"chart2/res/stacksmooth3d_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_P_XVALUES_STEPPED = u"chart2/res/valueaxissteppedboth_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_O_XVALUES_STEPPED = u"chart2/res/valueaxissteppedlines_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE3D_XVALUES_STEPPED = u"chart2/res/valueaxisstepped3d_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_P_XCATEGORY_STEPPED = u"chart2/res/nostacksteppedboth_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_O_XCATEGORY_STEPPED = u"chart2/res/nostacksteppedlines_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE3D_XCATEGORY_STEPPED = u"chart2/res/nostackstepped3d_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_P_STACKED_STEPPED = u"chart2/res/stacksteppedboth_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE_O_STACKED_STEPPED = u"chart2/res/stacksteppedlines_52x60.png"_ustr;
+inline constexpr OUString BMP_LINE3D_STACKED_STEPPED = u"chart2/res/stackstepped3d_52x60.png"_ustr;
+inline constexpr OUString BMP_NET = u"chart2/res/net_52x60.png"_ustr;
+inline constexpr OUString BMP_NET_STACK = u"chart2/res/netstack_52x60.png"_ustr;
+inline constexpr OUString BMP_NET_SYMB = u"chart2/res/netpoint_52x60.png"_ustr;
+inline constexpr OUString BMP_NET_SYMB_STACK = u"chart2/res/netpointstack_52x60.png"_ustr;
+inline constexpr OUString BMP_NET_LINESYMB = u"chart2/res/netlinepoint_52x60.png"_ustr;
+inline constexpr OUString BMP_NET_LINESYMB_STACK = u"chart2/res/netlinepointstack_52x60.png"_ustr;
+inline constexpr OUString BMP_NET_FILL = u"chart2/res/netfill_52x60.png"_ustr;
+inline constexpr OUString BMP_NET_FILL_STACK = u"chart2/res/netstackfill_52x60.png"_ustr;
+inline constexpr OUString BMP_PIE_OF_PIE = u"chart2/res/pieofpie_52x60.png"_ustr; // TODO
+inline constexpr OUString BMP_PYRAMIDQ_3D_1 = u"chart2/res/pyramindhori_52x60.png"_ustr;
+inline constexpr OUString BMP_PYRAMIDQ_3D_2 = u"chart2/res/pyramindhoristack_52x60.png"_ustr;
+inline constexpr OUString BMP_PYRAMIDQ_3D_3 = u"chart2/res/pyramindhoripercent_52x60.png"_ustr;
+inline constexpr OUString BMP_PYRAMIDQ_3D_4 = u"chart2/res/pyramindhorideep_52x60.png"_ustr;
+inline constexpr OUString BMP_PYRAMID_3D_1 = u"chart2/res/pyramind_52x60.png"_ustr;
+inline constexpr OUString BMP_PYRAMID_3D_2 = u"chart2/res/pyramindstack_52x60.png"_ustr;
+inline constexpr OUString BMP_PYRAMID_3D_3 = u"chart2/res/pyramindpercent_52x60.png"_ustr;
+inline constexpr OUString BMP_PYRAMID_3D_4 = u"chart2/res/pyraminddeep_52x60.png"_ustr;
+inline constexpr OUString BMP_ROEHRE_3D_1 = u"chart2/res/cylinderhori_52x60.png"_ustr;
+inline constexpr OUString BMP_ROEHRE_3D_2 = u"chart2/res/cylinderhoristack_52x60.png"_ustr;
+inline constexpr OUString BMP_ROEHRE_3D_3 = u"chart2/res/cylinderhoriprocent_52x60.png"_ustr;
+inline constexpr OUString BMP_ROEHRE_3D_4 = u"chart2/res/cylinderhorideep_52x60.png"_ustr;
+inline constexpr OUString BMP_SAEULE_3D_1 = u"chart2/res/cylinder_52x60.png"_ustr;
+inline constexpr OUString BMP_SAEULE_3D_2 = u"chart2/res/cylinderstack_52x60.png"_ustr;
+inline constexpr OUString BMP_SAEULE_3D_3 = u"chart2/res/cylinderpercent_52x60.png"_ustr;
+inline constexpr OUString BMP_SAEULE_3D_4 = u"chart2/res/cylinderdeep_52x60.png"_ustr;
+inline constexpr OUString BMP_STOCK_1 = u"chart2/res/stock_52x60.png"_ustr;
+inline constexpr OUString BMP_STOCK_2 = u"chart2/res/stockblock_52x60.png"_ustr;
+inline constexpr OUString BMP_STOCK_3 = u"chart2/res/stockcolumns_52x60.png"_ustr;
+inline constexpr OUString BMP_STOCK_4 = u"chart2/res/stockcolumnsattach_52x60.png"_ustr;
+inline constexpr OUString BMP_INDICATE_BOTH_VERTI = u"chart2/res/errorbothverti_30.png"_ustr;
+inline constexpr OUString BMP_INDICATE_DOWN = u"chart2/res/errordown_30.png"_ustr;
+inline constexpr OUString BMP_INDICATE_UP = u"chart2/res/errorup_30.png"_ustr;
+inline constexpr OUString BMP_INDICATE_BOTH_HORI = u"chart2/res/errorbothhori_30.png"_ustr;
+inline constexpr OUString BMP_INDICATE_RIGHT = u"chart2/res/errorright_30.png"_ustr;
+inline constexpr OUString BMP_INDICATE_LEFT = u"chart2/res/errorleft_30.png"_ustr;
+inline constexpr OUString BMP_REGRESSION_LINEAR = u"chart2/res/reglin.png"_ustr;
+inline constexpr OUString BMP_REGRESSION_LOG = u"chart2/res/reglog.png"_ustr;
+inline constexpr OUString BMP_REGRESSION_EXP = u"chart2/res/regexp.png"_ustr;
+inline constexpr OUString BMP_REGRESSION_POWER = u"chart2/res/regpow.png"_ustr;
+inline constexpr OUString BMP_REGRESSION_POLYNOMIAL = u"chart2/res/regpoly.png"_ustr;
+inline constexpr OUString BMP_REGRESSION_MOVING_AVERAGE = u"chart2/res/regavg.png"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/chart2/inc/chart.hrc b/chart2/inc/chart.hrc
index b1e0024fb7cc..b8b6a7e8b245 100644
--- a/chart2/inc/chart.hrc
+++ b/chart2/inc/chart.hrc
@@ -11,7 +11,7 @@
#include <unotools/resmgr.hxx>
-#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+#define NC_(Context, String) TranslateId(Context, u8##String)
const TranslateId CHART_TYPE[] =
{
diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx
index 912cff0fdef3..77745b05373c 100644
--- a/chart2/inc/pch/precompiled_chartcontroller.hxx
+++ b/chart2/inc/pch/precompiled_chartcontroller.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2021-09-28 05:28:39 using:
+ Generated on 2023-07-19 09:20:36 using:
./bin/update_pch chart2 chartcontroller --cutoff=6 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -46,12 +46,14 @@
#include <optional>
#include <ostream>
#include <set>
+#include <span>
#include <stddef.h>
#include <stdexcept>
#include <string.h>
#include <string>
#include <string_view>
#include <type_traits>
+#include <typeinfo>
#include <unordered_map>
#include <unordered_set>
#include <utility>
@@ -69,11 +71,14 @@
#include <osl/mutex.h>
#include <osl/mutex.hxx>
#include <rtl/alloc.h>
+#include <rtl/character.hxx>
#include <rtl/instance.hxx>
#include <rtl/locale.h>
#include <rtl/math.h>
#include <rtl/math.hxx>
#include <rtl/ref.hxx>
+#include <rtl/strbuf.h>
+#include <rtl/strbuf.hxx>
#include <rtl/string.h>
#include <rtl/string.hxx>
#include <rtl/stringconcat.hxx>
@@ -97,9 +102,10 @@
#include <vcl/GraphicObject.hxx>
#include <vcl/IDialogRenderable.hxx>
#include <vcl/Scanline.hxx>
+#include <vcl/WindowPosSize.hxx>
#include <vcl/alpha.hxx>
#include <vcl/animate/Animation.hxx>
-#include <vcl/animate/AnimationBitmap.hxx>
+#include <vcl/animate/AnimationFrame.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/bitmap/BitmapTypes.hxx>
#include <vcl/bitmapex.hxx>
@@ -107,10 +113,8 @@
#include <vcl/cairo.hxx>
#include <vcl/checksum.hxx>
#include <vcl/customweld.hxx>
-#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
#include <vcl/dockwin.hxx>
-#include <vcl/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
@@ -120,6 +124,7 @@
#include <vcl/graph.hxx>
#include <vcl/idle.hxx>
#include <vcl/image.hxx>
+#include <vcl/kernarray.hxx>
#include <vcl/keycod.hxx>
#include <vcl/keycodes.hxx>
#include <vcl/mapmod.hxx>
@@ -140,13 +145,12 @@
#include <vcl/rendercontext/State.hxx>
#include <vcl/rendercontext/SystemTextColorFlags.hxx>
#include <vcl/salnativewidgets.hxx>
-#include <vcl/scopedbitmapaccess.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/syswin.hxx>
#include <vcl/task.hxx>
#include <vcl/timer.hxx>
-#include <vcl/toolbox.hxx>
+#include <vcl/toolboxid.hxx>
#include <vcl/uitest/factory.hxx>
#include <vcl/vclenum.hxx>
#include <vcl/vclptr.hxx>
@@ -156,39 +160,44 @@
#include <vcl/weld.hxx>
#include <vcl/window.hxx>
#include <vcl/windowstate.hxx>
+#include <vcl/wintypes.hxx>
#endif // PCH_LEVEL >= 2
#if PCH_LEVEL >= 3
#include <basegfx/basegfxdllapi.h>
#include <basegfx/color/bcolor.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/matrix/b3dhommatrix.hxx>
+#include <basegfx/matrix/hommatrixtemplate.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/point/b2ipoint.hxx>
#include <basegfx/point/b3dpoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/range/Range2D.hxx>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/range/b2drectangle.hxx>
#include <basegfx/range/b3drange.hxx>
#include <basegfx/range/basicrange.hxx>
+#include <basegfx/tuple/Size2D.hxx>
#include <basegfx/tuple/Tuple2D.hxx>
#include <basegfx/tuple/Tuple3D.hxx>
#include <basegfx/tuple/b2dtuple.hxx>
#include <basegfx/tuple/b2ituple.hxx>
#include <basegfx/tuple/b3dtuple.hxx>
+#include <basegfx/utils/bgradient.hxx>
#include <basegfx/utils/common.hxx>
#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <basegfx/vector/b2enums.hxx>
+#include <basegfx/vector/b2isize.hxx>
#include <basegfx/vector/b2ivector.hxx>
#include <basegfx/vector/b3dvector.hxx>
#include <chartview/ChartSfxItemIds.hxx>
#include <chartview/DrawModelWrapper.hxx>
#include <chartview/ExplicitValueProvider.hxx>
-#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <com/sun/star/awt/DeviceInfo.hpp>
-#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/awt/Gradient2.hpp>
#include <com/sun/star/awt/GradientStyle.hpp>
#include <com/sun/star/awt/Key.hpp>
#include <com/sun/star/awt/KeyGroup.hpp>
@@ -199,21 +208,17 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XMultiPropertyStates.hpp>
#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/beans/XPropertySetOption.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XVetoableChangeListener.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
-#include <com/sun/star/chart2/XAxis.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
-#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
-#include <com/sun/star/chart2/XTitle.hpp>
+#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/container/XIndexReplace.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/drawing/DashStyle.hpp>
@@ -224,33 +229,28 @@
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XModel3.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/frame/XToolbarController.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/graphic/XPrimitive2D.hpp>
-#include <com/sun/star/i18n/Calendar2.hpp>
#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
-#include <com/sun/star/i18n/DirectionProperty.hpp>
#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
-#include <com/sun/star/i18n/KCharacterType.hpp>
#include <com/sun/star/i18n/LanguageCountryInfo.hpp>
#include <com/sun/star/i18n/LocaleDataItem2.hpp>
#include <com/sun/star/i18n/LocaleItem.hpp>
-#include <com/sun/star/i18n/NativeNumberXmlAttributes.hpp>
-#include <com/sun/star/i18n/ParseResult.hpp>
-#include <com/sun/star/i18n/TransliterationModules.hpp>
-#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
-#include <com/sun/star/i18n/UnicodeScript.hpp>
#include <com/sun/star/i18n/WordType.hpp>
#include <com/sun/star/i18n/reservedWords.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <com/sun/star/io/XStream.hpp>
+#include <com/sun/star/io/XTruncate.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/EventObject.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
@@ -259,7 +259,6 @@
#include <com/sun/star/text/textfield/Type.hpp>
#include <com/sun/star/uno/Any.h>
#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/RuntimeException.hpp>
@@ -277,12 +276,19 @@
#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/Time.hpp>
+#include <com/sun/star/util/XAccounting.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <comphelper/broadcasthelper.hxx>
+#include <comphelper/compbase.hxx>
#include <comphelper/comphelperdllapi.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <comphelper/errcode.hxx>
#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer4.hxx>
+#include <comphelper/lok.hxx>
#include <comphelper/multicontainer2.hxx>
#include <comphelper/propagg.hxx>
#include <comphelper/proparrhlp.hxx>
@@ -292,12 +298,10 @@
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/uno3.hxx>
-#include <comphelper/weak.hxx>
+#include <comphelper/unoimplbase.hxx>
#include <cppu/cppudllapi.h>
#include <cppu/unotype.hxx>
#include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/compbase.hxx>
-#include <cppuhelper/compbase_ex.hxx>
#include <cppuhelper/cppuhelperdllapi.h>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implbase_ex.hxx>
@@ -305,14 +309,22 @@
#include <cppuhelper/implbase_ex_pre.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/weakagg.hxx>
#include <cppuhelper/weakref.hxx>
+#include <docmodel/color/ComplexColor.hxx>
+#include <docmodel/color/Transformation.hxx>
+#include <docmodel/dllapi.h>
+#include <docmodel/theme/ThemeColorType.hxx>
#include <drawinglayer/drawinglayerdllapi.h>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <drawinglayer/primitive2d/CommonTypes.hxx>
#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
#include <drawinglayer/primitive2d/Primitive2DVisitor.hxx>
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+#include <editeng/colritem.hxx>
#include <editeng/editdata.hxx>
#include <editeng/editengdllapi.h>
#include <editeng/editobj.hxx>
@@ -332,10 +344,10 @@
#include <i18nlangtag/i18nlangtagdllapi.h>
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
-#include <i18nutil/transliteration.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/deleter.hxx>
#include <o3tl/enumarray.hxx>
+#include <o3tl/hash_combine.hxx>
#include <o3tl/safeint.hxx>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/strong_int.hxx>
@@ -359,8 +371,6 @@
#include <svl/itemset.hxx>
#include <svl/languageoptions.hxx>
#include <svl/lstner.hxx>
-#include <svl/nfkeytab.hxx>
-#include <svl/ondemand.hxx>
#include <svl/poolitem.hxx>
#include <svl/setitem.hxx>
#include <svl/stritem.hxx>
@@ -373,7 +383,6 @@
#include <svtools/colorcfg.hxx>
#include <svtools/svtdllapi.h>
#include <svx/ActionDescriptionProvider.hxx>
-#include <svx/DiagramDataInterface.hxx>
#include <svx/XPropertyEntry.hxx>
#include <svx/chrtitem.hxx>
#include <svx/ipolypolygoneditorcontroller.hxx>
@@ -389,7 +398,6 @@
#include <svx/sdtaitm.hxx>
#include <svx/sdtakitm.hxx>
#include <svx/selectioncontroller.hxx>
-#include <svx/shapeproperty.hxx>
#include <svx/svddef.hxx>
#include <svx/svddrag.hxx>
#include <svx/svdedtv.hxx>
@@ -418,17 +426,14 @@
#include <svx/svxdllapi.h>
#include <svx/xdash.hxx>
#include <svx/xdef.hxx>
-#include <svx/xgrad.hxx>
#include <svx/xhatch.hxx>
#include <svx/xit.hxx>
#include <svx/xpoly.hxx>
#include <svx/xtable.hxx>
-#include <toolkit/helper/vclunohelper.hxx>
#include <tools/color.hxx>
#include <tools/date.hxx>
#include <tools/datetime.hxx>
#include <tools/degree.hxx>
-#include <tools/diagnose_ex.h>
#include <tools/fldunit.hxx>
#include <tools/fontenum.hxx>
#include <tools/fract.hxx>
@@ -441,41 +446,46 @@
#include <tools/poly.hxx>
#include <tools/ref.hxx>
#include <tools/solar.h>
+#include <tools/stream.hxx>
#include <tools/time.hxx>
#include <tools/toolsdllapi.h>
#include <tools/weakbase.h>
-#include <tools/weakbase.hxx>
-#include <tools/wintypes.hxx>
#include <typelib/typeclass.h>
#include <typelib/typedescription.h>
#include <typelib/uik.h>
#include <uno/any2.h>
#include <uno/data.h>
#include <uno/sequence2.h>
-#include <unotools/calendarwrapper.hxx>
-#include <unotools/charclass.hxx>
#include <unotools/eventlisteneradapter.hxx>
#include <unotools/fontdefs.hxx>
#include <unotools/localedatawrapper.hxx>
-#include <unotools/nativenumberwrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
-#include <unotools/transliterationwrapper.hxx>
+#include <unotools/tempfile.hxx>
#include <unotools/unotoolsdllapi.h>
+#include <unotools/weakref.hxx>
#endif // PCH_LEVEL >= 3
#if PCH_LEVEL >= 4
+#include <Axis.hxx>
#include <AxisHelper.hxx>
+#include <BaseCoordinateSystem.hxx>
#include <CharacterPropertyItemConverter.hxx>
#include <ChartController.hxx>
#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
+#include <ChartTypeManager.hxx>
+#include <ChartTypeTemplate.hxx>
+#include <ChartView.hxx>
#include <ChartWindow.hxx>
#include <CommonConverters.hxx>
#include <ControllerLockGuard.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <DataSourceHelper.hxx>
+#include <Diagram.hxx>
#include <DiagramHelper.hxx>
#include <DrawViewWrapper.hxx>
#include <FastPropertyIdRanges.hxx>
@@ -483,12 +493,13 @@
#include <GraphicPropertyItemConverter.hxx>
#include <ItemConverter.hxx>
#include <ItemPropertyMap.hxx>
+#include <Legend.hxx>
#include <LegendHelper.hxx>
#include <LinePropertiesHelper.hxx>
-#include <ObjectHierarchy.hxx>
#include <ObjectIdentifier.hxx>
#include <ObjectNameProvider.hxx>
#include <RegressionCurveHelper.hxx>
+#include <RegressionCurveModel.hxx>
#include <ResId.hxx>
#include <StatisticsHelper.hxx>
#include <ThreeDHelper.hxx>
diff --git a/chart2/inc/pch/precompiled_chartcore.hxx b/chart2/inc/pch/precompiled_chartcore.hxx
index dd06c9bc8a90..9e7d56b2f7eb 100644
--- a/chart2/inc/pch/precompiled_chartcore.hxx
+++ b/chart2/inc/pch/precompiled_chartcore.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2021-09-12 11:51:16 using:
+ Generated on 2023-07-19 09:21:03 using:
./bin/update_pch chart2 chartcore --cutoff=3 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -32,14 +32,15 @@
#include <limits>
#include <map>
#include <memory>
+#include <mutex>
#include <new>
#include <optional>
#include <ostream>
#include <set>
+#include <span>
#include <string_view>
#include <type_traits>
#include <unordered_map>
-#include <unordered_set>
#include <utility>
#include <vector>
#include <boost/property_tree/ptree_fwd.hpp>
@@ -47,9 +48,6 @@
#if PCH_LEVEL >= 2
#include <osl/conditn.hxx>
#include <osl/diagnose.h>
-#include <osl/doublecheckedlocking.h>
-#include <osl/getglobalmutex.hxx>
-#include <osl/mutex.h>
#include <osl/mutex.hxx>
#include <rtl/alloc.h>
#include <rtl/character.hxx>
@@ -58,6 +56,7 @@
#include <rtl/math.h>
#include <rtl/math.hxx>
#include <rtl/ref.hxx>
+#include <rtl/strbuf.hxx>
#include <rtl/string.hxx>
#include <rtl/stringconcat.hxx>
#include <rtl/stringutils.hxx>
@@ -69,51 +68,29 @@
#include <sal/log.hxx>
#include <sal/macros.h>
#include <sal/types.h>
-#include <vcl/bitmap.hxx>
-#include <vcl/cairo.hxx>
-#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
-#include <vcl/font.hxx>
-#include <vcl/mapmod.hxx>
-#include <vcl/metaactiontypes.hxx>
-#include <vcl/outdev.hxx>
-#include <vcl/region.hxx>
-#include <vcl/rendercontext/AddFontSubstituteFlags.hxx>
-#include <vcl/rendercontext/AntialiasingFlags.hxx>
-#include <vcl/rendercontext/DrawGridFlags.hxx>
-#include <vcl/rendercontext/DrawImageFlags.hxx>
-#include <vcl/rendercontext/DrawModeFlags.hxx>
-#include <vcl/rendercontext/DrawTextFlags.hxx>
-#include <vcl/rendercontext/GetDefaultFontFlags.hxx>
-#include <vcl/rendercontext/ImplMapRes.hxx>
-#include <vcl/rendercontext/InvertFlags.hxx>
-#include <vcl/rendercontext/RasterOp.hxx>
-#include <vcl/rendercontext/SalLayoutFlags.hxx>
-#include <vcl/rendercontext/State.hxx>
-#include <vcl/rendercontext/SystemTextColorFlags.hxx>
-#include <vcl/salnativewidgets.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/vclreferencebase.hxx>
-#include <vcl/wall.hxx>
#endif // PCH_LEVEL >= 2
#if PCH_LEVEL >= 3
#include <basegfx/basegfxdllapi.h>
#include <basegfx/numeric/ftools.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/point/b2ipoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/tuple/b2dtuple.hxx>
#include <basegfx/tuple/b2ituple.hxx>
+#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/vector/b2enums.hxx>
#include <basegfx/vector/b2ivector.hxx>
#include <chartview/DrawModelWrapper.hxx>
-#include <com/sun/star/awt/DeviceInfo.hpp>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/PropertyState.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertyStates.hpp>
@@ -138,54 +115,43 @@
#include <com/sun/star/chart2/StackingDirection.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart2/SymbolStyle.hpp>
-#include <com/sun/star/chart2/XAxis.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XCoordinateSystem.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
-#include <com/sun/star/chart2/XRegressionCurveCalculator.hpp>
-#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
+#include <com/sun/star/chart2/XFormattedString2.hpp>
#include <com/sun/star/chart2/data/XDataSequence.hpp>
-#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
#include <com/sun/star/chart2/data/XPivotTableDataProvider.hpp>
#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
#include <com/sun/star/container/NoSuchElementException.hpp>
-#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/drawing/BitmapMode.hpp>
-#include <com/sun/star/drawing/Direction3D.hpp>
#include <com/sun/star/drawing/DoubleSequence.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/drawing/HomogenMatrix.hpp>
#include <com/sun/star/drawing/LineCap.hpp>
+#include <com/sun/star/drawing/LineDash.hpp>
#include <com/sun/star/drawing/LineJoint.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
-#include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
#include <com/sun/star/drawing/Position3D.hpp>
#include <com/sun/star/drawing/RectanglePoint.hpp>
+#include <com/sun/star/drawing/ShadeMode.hpp>
#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
-#include <com/sun/star/drawing/XDrawPage.hpp>
-#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
-#include <com/sun/star/style/XStyleSupplier.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/uno/Any.h>
#include <com/sun/star/uno/Any.hxx>
@@ -199,24 +165,26 @@
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
-#include <com/sun/star/view/XSelectionChangeListener.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <comphelper/comphelperdllapi.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <comphelper/errcode.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
+#include <comphelper/scopeguard.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/uno3.hxx>
#include <cppu/cppudllapi.h>
-#include <cppuhelper/compbase.hxx>
-#include <cppuhelper/compbase_ex.hxx>
+#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/cppuhelperdllapi.h>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implbase_ex.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/weakref.hxx>
@@ -224,59 +192,52 @@
#include <editeng/unoprnms.hxx>
#include <i18nlangtag/i18nlangtagdllapi.h>
#include <i18nlangtag/lang.h>
+#include <i18nlangtag/languagetag.hxx>
#include <libxml/xmlwriter.h>
#include <o3tl/cow_wrapper.hxx>
+#include <o3tl/safeint.hxx>
+#include <o3tl/string_view.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <officecfg/Office/Compatibility.hxx>
#include <salhelper/simplereferenceobject.hxx>
-#include <svl/cenumitm.hxx>
#include <svl/cintitem.hxx>
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
-#include <svl/itemset.hxx>
-#include <svl/lstner.hxx>
#include <svl/numformat.hxx>
#include <svl/poolitem.hxx>
#include <svl/svldllapi.h>
#include <svl/typedwhich.hxx>
-#include <svl/zforlist.hxx>
-#include <svx/DiagramDataInterface.hxx>
-#include <svx/shapeproperty.hxx>
-#include <svx/svdobj.hxx>
-#include <svx/svdobjkind.hxx>
-#include <svx/svdtypes.hxx>
+#include <svx/svdpage.hxx>
#include <svx/svxdllapi.h>
#include <svx/unoshape.hxx>
#include <tools/UnitConversion.hxx>
#include <tools/color.hxx>
-#include <tools/date.hxx>
-#include <tools/degree.hxx>
-#include <tools/diagnose_ex.h>
#include <tools/gen.hxx>
#include <tools/helpers.hxx>
#include <tools/lineend.hxx>
#include <tools/link.hxx>
#include <tools/long.hxx>
-#include <tools/poly.hxx>
#include <tools/ref.hxx>
-#include <tools/solar.h>
+#include <tools/stream.hxx>
#include <tools/toolsdllapi.h>
-#include <tools/weakbase.h>
-#include <unotools/fontdefs.hxx>
#include <unotools/options.hxx>
-#include <unotools/resmgr.hxx>
-#include <unotools/saveopt.hxx>
#include <unotools/unotoolsdllapi.h>
#endif // PCH_LEVEL >= 3
#if PCH_LEVEL >= 4
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <AxisIndexDefines.hxx>
+#include <BaseCoordinateSystem.hxx>
#include <BaseGFXHelper.hxx>
#include <CartesianCoordinateSystem.hxx>
#include <CharacterProperties.hxx>
#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
+#include <ChartTypeManager.hxx>
+#include <ChartTypeTemplate.hxx>
+#include <ChartView.hxx>
#include <ChartViewHelper.hxx>
#include <Clipping.hxx>
#include <CloneHelper.hxx>
@@ -285,32 +246,37 @@
#include <ControllerLockGuard.hxx>
#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
+#include <DataSeriesProperties.hxx>
#include <DataSource.hxx>
#include <DataSourceHelper.hxx>
+#include <DataTable.hxx>
#include <DateHelper.hxx>
+#include <Diagram.hxx>
#include <DiagramHelper.hxx>
-#include <EventListenerHelper.hxx>
#include <ExplicitCategoriesProvider.hxx>
#include <FillProperties.hxx>
+#include <FormattedString.hxx>
+#include <GridProperties.hxx>
+#include <InternalDataProvider.hxx>
#include <LabelPositionHelper.hxx>
#include <LabeledDataSequence.hxx>
-#include <LegendEntryProvider.hxx>
+#include <Legend.hxx>
#include <LinePropertiesHelper.hxx>
#include <MediaDescriptorHelper.hxx>
-#include <MinimumAndMaximumSupplier.hxx>
#include <ModifyListenerHelper.hxx>
#include <NumberFormatterWrapper.hxx>
-#include <OPropertySet.hxx>
#include <ObjectIdentifier.hxx>
#include <PlottingPositionHelper.hxx>
#include <PolarCoordinateSystem.hxx>
#include <PolarLabelPositionHelper.hxx>
#include <PropertyHelper.hxx>
#include <PropertyMapper.hxx>
+#include <RangeHighlighter.hxx>
#include <ReferenceSizeProvider.hxx>
#include <RegressionCalculationHelper.hxx>
#include <RegressionCurveCalculator.hxx>
#include <RegressionCurveHelper.hxx>
+#include <RegressionCurveModel.hxx>
#include <RelativePositionHelper.hxx>
#include <RelativeSizeHelper.hxx>
#include <ResId.hxx>
@@ -319,11 +285,12 @@
#include <SpecialCharacters.hxx>
#include <Stripe.hxx>
#include <ThreeDHelper.hxx>
+#include <Title.hxx>
#include <TitleHelper.hxx>
#include <UserDefinedProperties.hxx>
#include <VLineProperties.hxx>
+#include <VSeriesPlotter.hxx>
#include <ViewDefines.hxx>
-#include <WeakListenerAdapter.hxx>
#include <WrappedProperty.hxx>
#include <charttoolsdllapi.hxx>
#include <defines.hxx>
diff --git a/chart2/inc/strings.hrc b/chart2/inc/strings.hrc
index ab6ca48c8376..8a6ec2fd2777 100644
--- a/chart2/inc/strings.hrc
+++ b/chart2/inc/strings.hrc
@@ -19,7 +19,7 @@
#ifndef CHART_STRINGS_HRC
#define CHART_STRINGS_HRC
-#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+#define NC_(Context, String) TranslateId(Context, u8##String)
#define STR_DLG_CHART_WIZARD NC_("STR_DLG_CHART_WIZARD", "Chart Wizard")
#define STR_DLG_SMOOTH_LINE_PROPERTIES NC_("STR_DLG_SMOOTH_LINE_PROPERTIES", "Smooth Lines")
@@ -145,6 +145,7 @@
#define STR_TEXT_DIRECTION_SUPER NC_("STR_TEXT_DIRECTION_SUPER", "Use superordinate object settings")
#define STR_PROPERTY_ROLE_FILLCOLOR NC_("STR_PROPERTY_ROLE_FILLCOLOR", "Fill Color")
#define STR_PROPERTY_ROLE_BORDERCOLOR NC_("STR_PROPERTY_ROLE_BORDERCOLOR", "Border Color")
+#define STR_DATA_TABLE NC_("STR_DATA_TABLE", "Data Table")
#define STR_CONTROLTEXT_ERROR_BARS_FROM_DATA NC_("STR_CONTROLTEXT_ERROR_BARS_FROM_DATA", "From Data Table")
#define STR_REGRESSION_LINEAR NC_("STR_REGRESSION_LINEAR", "Linear")
@@ -160,6 +161,8 @@
#define STR_TYPE_AREA NC_("STR_TYPE_AREA", "Area")
#define STR_TYPE_PIE NC_("STR_TYPE_PIE", "Pie")
#define STR_PIE_EXPLODED NC_("STR_PIE_EXPLODED", "Exploded Pie Chart")
+#define STR_BAR_OF_PIE NC_("STR_BAR_OF_PIE", "Bar-of-pie Chart")
+#define STR_PIE_OF_PIE NC_("STR_PIE_OF_PIE", "Pie-of-pie Chart")
#define STR_DONUT_EXPLODED NC_("STR_DONUT_EXPLODED", "Exploded Donut Chart")
#define STR_DONUT NC_("STR_DONUT", "Donut")
#define STR_TYPE_LINE NC_("STR_TYPE_LINE", "Line")
diff --git a/chart2/inc/unonames.hxx b/chart2/inc/unonames.hxx
index 12b35914a6f5..abe190844962 100644
--- a/chart2/inc/unonames.hxx
+++ b/chart2/inc/unonames.hxx
@@ -11,28 +11,28 @@
#include <rtl/ustring.hxx>
-inline constexpr OUStringLiteral CHART_UNONAME_SORT_BY_XVALUES = u"SortByXValues";
-inline constexpr OUStringLiteral CHART_UNONAME_SPLINE_TYPE = u"SplineType";
-inline constexpr OUStringLiteral CHART_UNONAME_SPLINE_ORDER = u"SplineOrder";
-inline constexpr OUStringLiteral CHART_UNONAME_SPLINE_RESOLUTION = u"SplineResolution";
-inline constexpr OUStringLiteral CHART_UNONAME_CURVE_STYLE = u"CurveStyle";
-inline constexpr OUStringLiteral CHART_UNONAME_CURVE_RESOLUTION = u"CurveResolution";
-inline constexpr OUStringLiteral CHART_UNONAME_NUMFMT = u"NumberFormat";
-inline constexpr OUStringLiteral CHART_UNONAME_LINK_TO_SRC_NUMFMT = u"LinkNumberFormatToSource";
-inline constexpr OUStringLiteral CHART_UNONAME_ERRORBAR_X = u"ErrorBarX";
-inline constexpr OUStringLiteral CHART_UNONAME_ERRORBAR_Y = u"ErrorBarY";
-inline constexpr OUStringLiteral CHART_UNONAME_LABEL = u"Label";
-inline constexpr OUStringLiteral CHART_UNONAME_LABEL_SEP = u"LabelSeparator";
-inline constexpr OUStringLiteral CHART_UNONAME_LABEL_BORDER_STYLE = u"LabelBorderStyle";
-inline constexpr OUStringLiteral CHART_UNONAME_LABEL_BORDER_WIDTH = u"LabelBorderWidth";
-inline constexpr OUStringLiteral CHART_UNONAME_LABEL_BORDER_COLOR = u"LabelBorderColor";
-inline constexpr OUStringLiteral CHART_UNONAME_LABEL_BORDER_DASH = u"LabelBorderDash";
-inline constexpr OUStringLiteral CHART_UNONAME_LABEL_BORDER_DASHNAME = u"LabelBorderDashName";
-inline constexpr OUStringLiteral CHART_UNONAME_LABEL_BORDER_TRANS = u"LabelBorderTransparency";
-inline constexpr OUStringLiteral CHART_UNONAME_LABEL_FILL_STYLE = u"LabelFillStyle";
-inline constexpr OUStringLiteral CHART_UNONAME_LABEL_FILL_BACKGROUND = u"LabelFillBackground";
-inline constexpr OUStringLiteral CHART_UNONAME_LABEL_FILL_HATCH_NAME = u"LabelFillHatchName";
-inline constexpr OUStringLiteral CHART_UNONAME_LABEL_FILL_COLOR = u"LabelFillColor";
-inline constexpr OUStringLiteral CHART_UNONAME_CUSTOM_LABEL_FIELDS = u"CustomLabelFields";
+inline constexpr OUString CHART_UNONAME_SORT_BY_XVALUES = u"SortByXValues"_ustr;
+inline constexpr OUString CHART_UNONAME_SPLINE_TYPE = u"SplineType"_ustr;
+inline constexpr OUString CHART_UNONAME_SPLINE_ORDER = u"SplineOrder"_ustr;
+inline constexpr OUString CHART_UNONAME_SPLINE_RESOLUTION = u"SplineResolution"_ustr;
+inline constexpr OUString CHART_UNONAME_CURVE_STYLE = u"CurveStyle"_ustr;
+inline constexpr OUString CHART_UNONAME_CURVE_RESOLUTION = u"CurveResolution"_ustr;
+inline constexpr OUString CHART_UNONAME_NUMFMT = u"NumberFormat"_ustr;
+inline constexpr OUString CHART_UNONAME_LINK_TO_SRC_NUMFMT = u"LinkNumberFormatToSource"_ustr;
+inline constexpr OUString CHART_UNONAME_ERRORBAR_X = u"ErrorBarX"_ustr;
+inline constexpr OUString CHART_UNONAME_ERRORBAR_Y = u"ErrorBarY"_ustr;
+inline constexpr OUString CHART_UNONAME_LABEL = u"Label"_ustr;
+inline constexpr OUString CHART_UNONAME_LABEL_SEP = u"LabelSeparator"_ustr;
+inline constexpr OUString CHART_UNONAME_LABEL_BORDER_STYLE = u"LabelBorderStyle"_ustr;
+inline constexpr OUString CHART_UNONAME_LABEL_BORDER_WIDTH = u"LabelBorderWidth"_ustr;
+inline constexpr OUString CHART_UNONAME_LABEL_BORDER_COLOR = u"LabelBorderColor"_ustr;
+inline constexpr OUString CHART_UNONAME_LABEL_BORDER_DASH = u"LabelBorderDash"_ustr;
+inline constexpr OUString CHART_UNONAME_LABEL_BORDER_DASHNAME = u"LabelBorderDashName"_ustr;
+inline constexpr OUString CHART_UNONAME_LABEL_BORDER_TRANS = u"LabelBorderTransparency"_ustr;
+inline constexpr OUString CHART_UNONAME_LABEL_FILL_STYLE = u"LabelFillStyle"_ustr;
+inline constexpr OUString CHART_UNONAME_LABEL_FILL_BACKGROUND = u"LabelFillBackground"_ustr;
+inline constexpr OUString CHART_UNONAME_LABEL_FILL_HATCH_NAME = u"LabelFillHatchName"_ustr;
+inline constexpr OUString CHART_UNONAME_LABEL_FILL_COLOR = u"LabelFillColor"_ustr;
+inline constexpr OUString CHART_UNONAME_CUSTOM_LABEL_FIELDS = u"CustomLabelFields"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/qa/TestCaseOldAPI.java b/chart2/qa/TestCaseOldAPI.java
index 613ba480e7be..f5bc4f571c4c 100644
--- a/chart2/qa/TestCaseOldAPI.java
+++ b/chart2/qa/TestCaseOldAPI.java
@@ -162,7 +162,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
float fHeight = (float)17.0;
xTitleProp.setPropertyValue( "String", aTitle );
- xTitleProp.setPropertyValue( "CharHeight", new Float( fHeight ) );
+ xTitleProp.setPropertyValue( "CharHeight", Float.valueOf( fHeight ) );
float fNewHeight = AnyConverter.toFloat( xTitleProp.getPropertyValue( "CharHeight" ) );
assure( "Changing CharHeight via old API failed", fNewHeight == fHeight );
@@ -213,8 +213,8 @@ public class TestCaseOldAPI extends ComplexTestCase {
float fHeight = (float)14.0;
xTitleProp.setPropertyValue( "CharColor", Integer.valueOf( nColor ) );
- xTitleProp.setPropertyValue( "CharWeight", new Float( fWeight ));
- xTitleProp.setPropertyValue( "CharHeight", new Float( fHeight ) );
+ xTitleProp.setPropertyValue( "CharWeight", Float.valueOf( fWeight ));
+ xTitleProp.setPropertyValue( "CharHeight", Float.valueOf( fHeight ) );
int nNewColor = AnyConverter.toInt( xTitleProp.getPropertyValue( "CharColor" ) );
assure( "Changing CharColor via old API failed", nNewColor == nColor );
@@ -356,7 +356,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
double nNewMax = 12.3;
double nNewOrigin = 2.7;
- xProp.setPropertyValue( "Max", new Double( nNewMax ));
+ xProp.setPropertyValue( "Max", Double.valueOf( nNewMax ));
assure( "AutoMax is on", ! AnyConverter.toBoolean( xProp.getPropertyValue( "AutoMax" )) );
assure( "Maximum value invalid",
@@ -367,7 +367,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
xProp.setPropertyValue( "AutoMin", Boolean.TRUE);
assure( "AutoMin is off", AnyConverter.toBoolean( xProp.getPropertyValue( "AutoMin" )) );
- xProp.setPropertyValue( "Origin", new Double( nNewOrigin ));
+ xProp.setPropertyValue( "Origin", Double.valueOf( nNewOrigin ));
assure( "Origin invalid",
utils.approxEqual(
AnyConverter.toDouble( xProp.getPropertyValue( "Origin" )),
@@ -390,7 +390,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
assure( "Property LineColor",
AnyConverter.toInt( xProp.getPropertyValue( "LineColor" )) == nNewColor );
float fNewCharHeight = (float)(16.0);
- xProp.setPropertyValue( "CharHeight", new Float( fNewCharHeight ));
+ xProp.setPropertyValue( "CharHeight", Float.valueOf( fNewCharHeight ));
assure( "Property CharHeight",
AnyConverter.toFloat( xProp.getPropertyValue( "CharHeight" )) == fNewCharHeight );
@@ -400,7 +400,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
AnyConverter.toInt( xProp.getPropertyValue( "TextRotation" )) == nNewTextRotation );
double fStepMain = 10.0;
- xProp.setPropertyValue( "StepMain", new Double( fStepMain ));
+ xProp.setPropertyValue( "StepMain", Double.valueOf( fStepMain ));
assure( "Property StepMain",
AnyConverter.toDouble( xProp.getPropertyValue( "StepMain" )) == fStepMain );
@@ -408,7 +408,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
// internally, the help-step is stored as an integer number of
// substeps
double fStepHelp = 5.0;
- xProp.setPropertyValue( "StepHelp", new Double( fStepHelp ));
+ xProp.setPropertyValue( "StepHelp", Double.valueOf( fStepHelp ));
assure( "Property StepHelp",
AnyConverter.toDouble( xProp.getPropertyValue( "StepHelp" )) == fStepHelp );
@@ -444,7 +444,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
xLegendProp.getPropertyValue( "Alignment" )) == eNewPos );
float fNewCharHeight = (float)(11.0);
- xLegendProp.setPropertyValue( "CharHeight", new Float( fNewCharHeight ));
+ xLegendProp.setPropertyValue( "CharHeight", Float.valueOf( fNewCharHeight ));
assure( "Property CharHeight",
AnyConverter.toFloat( xLegendProp.getPropertyValue( "CharHeight" )) == fNewCharHeight );
diff --git a/chart2/qa/extras/PivotChartTest.cxx b/chart2/qa/extras/PivotChartTest.cxx
index ee024531e88b..d6a87ec057a9 100644
--- a/chart2/qa/extras/PivotChartTest.cxx
+++ b/chart2/qa/extras/PivotChartTest.cxx
@@ -34,7 +34,8 @@ namespace com::sun::star::util { class XNumberFormats; }
class PivotChartTest : public ChartTest
{
public:
- PivotChartTest() : ChartTest()
+ PivotChartTest()
+ : ChartTest("/chart2/qa/extras/data/")
{}
void testRoundtrip();
@@ -71,7 +72,7 @@ void lclModifyOrientation(uno::Reference<sheet::XDataPilotDescriptor> const & xD
OUString aName = xNamed->getName();
uno::Reference<beans::XPropertySet> xPropSet(xNamed, UNO_QUERY_THROW);
if (aName == sFieldName)
- xPropSet->setPropertyValue("Orientation", uno::makeAny(eOrientation));
+ xPropSet->setPropertyValue("Orientation", uno::Any(eOrientation));
}
}
@@ -87,7 +88,7 @@ void lclModifyFunction(uno::Reference<sheet::XDataPilotDescriptor> const & xDesc
OUString aName = xNamed->getName();
uno::Reference<beans::XPropertySet> xPropSet(xNamed, UNO_QUERY_THROW);
if (aName == sFieldName)
- xPropSet->setPropertyValue("Function", uno::makeAny(eFunction));
+ xPropSet->setPropertyValue("Function", uno::Any(eFunction));
}
}
@@ -134,13 +135,13 @@ void lclModifySubtotals(uno::Reference<sheet::XDataPilotDescriptor> const & xDes
void lclModifyColumnGrandTotal(uno::Reference<sheet::XDataPilotDescriptor> const & xDataPilotDescriptor, bool bTotal)
{
uno::Reference<beans::XPropertySet> xProperties(xDataPilotDescriptor, uno::UNO_QUERY_THROW);
- xProperties->setPropertyValue("ColumnGrand", uno::makeAny(bTotal));
+ xProperties->setPropertyValue("ColumnGrand", uno::Any(bTotal));
}
void lclModifyRowGrandTotal(uno::Reference<sheet::XDataPilotDescriptor> const & xDataPilotDescriptor, bool bTotal)
{
uno::Reference<beans::XPropertySet> xProperties(xDataPilotDescriptor, uno::UNO_QUERY_THROW);
- xProperties->setPropertyValue("RowGrand", uno::makeAny(bTotal));
+ xProperties->setPropertyValue("RowGrand", uno::Any(bTotal));
}
void lclCheckSequence(std::vector<double> const & reference,
@@ -293,7 +294,7 @@ table::CellRangeAddress lclCreateTestData(uno::Reference<sheet::XSpreadsheetDocu
sal_Int32 nDateKey = xNumberFormatTypes->getStandardFormat(util::NumberFormat::DATE, aLocale);
uno::Reference<table::XCellRange> xCellRange = xSheet->getCellRangeByPosition(nEndCol, 1, nEndCol, nEndRow);
uno::Reference<beans::XPropertySet> xCellProp(xCellRange, UNO_QUERY_THROW);
- xCellProp->setPropertyValue("NumberFormat", uno::makeAny(nDateKey));
+ xCellProp->setPropertyValue("NumberFormat", uno::Any(nDateKey));
table::CellRangeAddress sCellRangeAddress;
sCellRangeAddress.Sheet = 0;
@@ -316,7 +317,7 @@ void PivotChartTest::testRoundtrip()
std::vector<double> aReference2 { 101879.458079, 178636.929704, 314626.484864 };
- load(u"/chart2/qa/extras/data/ods/", "PivotChartRoundTrip.ods");
+ loadFromFile(u"ods/PivotChartRoundTrip.ods");
xChartDoc = getPivotChartDocFromSheet(1, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -351,7 +352,7 @@ void PivotChartTest::testRoundtrip()
CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
}
- reload("calc8");
+ saveAndReload("calc8");
xChartDoc = getPivotChartDocFromSheet(1, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -371,7 +372,7 @@ void PivotChartTest::testChangePivotTable()
uno::Sequence<uno::Any> xSequence;
Reference<chart2::XChartDocument> xChartDoc;
- load(u"/chart2/qa/extras/data/ods/", "PivotTableExample.ods");
+ loadFromFile(u"ods/PivotTableExample.ods");
// Check we have the Pivot Table
OUString sPivotTableName("DataPilot1");
@@ -493,7 +494,7 @@ void PivotChartTest::testChangePivotTable()
// Enable column totals and check the data is still unchanged
{
uno::Reference<beans::XPropertySet> xProperties(xDataPilotTable, uno::UNO_QUERY_THROW);
- xProperties->setPropertyValue("ColumnGrand", uno::makeAny(true));
+ xProperties->setPropertyValue("ColumnGrand", uno::Any(true));
}
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getNumberOfDataSeries(xChartDoc));
@@ -528,8 +529,7 @@ void PivotChartTest::testPivotChartWithOneColumnField()
// SETUP DATA and PIVOT TABLE
- if (!mxComponent.is())
- mxComponent = loadFromDesktop("private:factory/scalc");
+ mxComponent = loadFromDesktop("private:factory/scalc");
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
@@ -610,8 +610,7 @@ void PivotChartTest::testPivotChartWithOneRowField()
// SETUP DATA and PIVOT TABLE
- if (!mxComponent.is())
- mxComponent = loadFromDesktop("private:factory/scalc");
+ mxComponent = loadFromDesktop("private:factory/scalc");
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
@@ -670,8 +669,7 @@ void PivotChartTest::testPivotTableDataProvider_PivotTableFields()
{
// SETUP DATA and PIVOT TABLE
- if (!mxComponent.is())
- mxComponent = loadFromDesktop("private:factory/scalc");
+ mxComponent = loadFromDesktop("private:factory/scalc");
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
@@ -778,8 +776,7 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode()
{
// SETUP DATA and PIVOT TABLE
- if (!mxComponent.is())
- mxComponent = loadFromDesktop("private:factory/scalc");
+ mxComponent = loadFromDesktop("private:factory/scalc");
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
@@ -908,8 +905,7 @@ void PivotChartTest::testPivotChartWithDateRowField()
{
// SETUP DATA and PIVOT TABLE
- if (!mxComponent.is())
- mxComponent = loadFromDesktop("private:factory/scalc");
+ mxComponent = loadFromDesktop("private:factory/scalc");
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
diff --git a/chart2/qa/extras/chart2_trendcalculators.cxx b/chart2/qa/extras/chart2_trendcalculators.cxx
index c13c1666725e..8639015d6299 100644
--- a/chart2/qa/extras/chart2_trendcalculators.cxx
+++ b/chart2/qa/extras/chart2_trendcalculators.cxx
@@ -14,22 +14,20 @@
// 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 )
+constexpr sal_Int32 SHEET_POTENTIAL1 = 0;
+constexpr sal_Int32 SHEET_POTENTIAL2 = 1;
+constexpr sal_Int32 SHEET_LINEAR1 = 2;
+constexpr sal_Int32 SHEET_POLYNOMIAL1 = 3;
+constexpr sal_Int32 SHEET_EXPONENTIAL1 = 4;
+constexpr sal_Int32 SHEET_EXPONENTIAL2 = 5;
class Chart2TrendCalculators : public ChartTest
{
public:
+ Chart2TrendCalculators()
+ : ChartTest("/chart2/qa/extras/data/")
+ {}
+
void setUp() override;
void tearDown() override;
@@ -50,7 +48,6 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
-
Reference<chart2::XRegressionCurve> m_xCurve;
Reference< chart2::XRegressionCurveCalculator > m_xRegressionCurveCalculator;
@@ -58,13 +55,12 @@ private:
void checkCalculator(
const Sequence< double >& xValues, const Sequence< double >& yValues,
const OUString& sExpectedFormula );
-
};
void Chart2TrendCalculators::setUp()
{
ChartTest::setUp();
- load(u"/chart2/qa/extras/data/ods/", "trend_calculators.ods");
+ loadFromFile(u"ods/trend_calculators.ods");
}
void Chart2TrendCalculators::tearDown()
diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx
index bae904d4faf3..f8cf7ad2d1bd 100644
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -32,7 +32,7 @@
#define DECLARE_DUMP_TEST(TestName, BaseClass, DumpMode) \
class TestName : public BaseClass { \
protected:\
- virtual OUString getTestName() override { return #TestName; } \
+ virtual OUString getTestName() override { return u"" #TestName ""_ustr; } \
public:\
TestName() : BaseClass(DumpMode) {}; \
CPPUNIT_TEST_SUITE(TestName); \
@@ -46,7 +46,7 @@
#define CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(aActual) \
if(isInDumpMode()) \
- writeActual(OUString::number(aActual), #aActual); \
+ writeActual(OUString::number(aActual), u"" #aActual ""_ustr); \
else \
{ \
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
@@ -55,7 +55,7 @@
#define CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aActual, EPS_) \
if(isInDumpMode()) \
- writeActual(OUString::number(aActual), #aActual); \
+ writeActual(OUString::number(aActual), u"" #aActual ""_ustr); \
else \
{ \
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
@@ -64,7 +64,7 @@
#define CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aActual) \
if(isInDumpMode()) \
- writeActual(aActual, #aActual); \
+ writeActual(aActual, u"" #aActual ""_ustr); \
else \
{ \
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
@@ -73,7 +73,7 @@
#define CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aActual, EPS_) \
if(isInDumpMode()) \
- writeActualTransformation(aActual, #aActual); \
+ writeActualTransformation(aActual, u"" #aActual ""_ustr); \
else \
{ \
OUString expectedTransform; \
@@ -88,6 +88,7 @@ class Chart2DumpTest : public ChartTest
{
protected:
Chart2DumpTest(bool bDumpMode)
+ : ChartTest("/chart2/qa/extras/chart2dump/data/")
{
m_bDumpMode = bDumpMode;
}
@@ -107,7 +108,6 @@ protected:
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() + "/";
@@ -124,7 +124,7 @@ protected:
{
if (m_aReferenceFile.is_open())
m_aReferenceFile.close();
- OString sReferenceFile = OUStringToOString(OUStringConcatenation(m_directories.getPathFromSrc(getReferenceDirName()) + sFileName), RTL_TEXTENCODING_UTF8);
+ OString sReferenceFile = OUStringToOString(Concat2View(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());
}
@@ -132,7 +132,7 @@ protected:
{
if (m_aDumpFile.is_open())
m_aDumpFile.close();
- OString sDumpFile = OUStringToOString(OUStringConcatenation(m_directories.getPathFromSrc(getReferenceDirName()) + sFileName), RTL_TEXTENCODING_UTF8);
+ OString sDumpFile = OUStringToOString(Concat2View(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());
}
@@ -157,12 +157,12 @@ protected:
return OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8);
}
- void writeActual(const OUString& sActualValue, const OUString& sCheck)
+ void writeActual(std::u16string_view 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
+ m_aDumpFile << OUString(sActualValue) << "\n"; // Write out the checked value, will be used as reference later
}
void readNote(std::u16string_view sNote)
@@ -202,15 +202,15 @@ protected:
// 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();
+ aExpectedTransform.Line1.Column1 = o3tl::toDouble(o3tl::getToken(rExpectedTransform, 0, ';', nIdx));
+ aExpectedTransform.Line1.Column2 = o3tl::toDouble(o3tl::getToken(rExpectedTransform, 0, ';', nIdx));
+ aExpectedTransform.Line1.Column3 = o3tl::toDouble(o3tl::getToken(rExpectedTransform, 0, ';', nIdx));
+ aExpectedTransform.Line2.Column1 = o3tl::toDouble(o3tl::getToken(rExpectedTransform, 0, ';', nIdx));
+ aExpectedTransform.Line2.Column2 = o3tl::toDouble(o3tl::getToken(rExpectedTransform, 0, ';', nIdx));
+ aExpectedTransform.Line2.Column3 = o3tl::toDouble(o3tl::getToken(rExpectedTransform, 0, ';', nIdx));
+ aExpectedTransform.Line3.Column1 = o3tl::toDouble(o3tl::getToken(rExpectedTransform, 0, ';', nIdx));
+ aExpectedTransform.Line3.Column2 = o3tl::toDouble(o3tl::getToken(rExpectedTransform, 0, ';', nIdx));
+ aExpectedTransform.Line3.Column3 = o3tl::toDouble(o3tl::getToken(rExpectedTransform, 0, ';', nIdx));
// Check the equality of the two transformation
return (std::abs(aExpectedTransform.Line1.Column1 - rTransform.Line1.Column1) < fEPS &&
@@ -269,7 +269,7 @@ DECLARE_DUMP_TEST(ChartDataTest, Chart2DumpTest, false)
for (const OUString& aTestFile : aTestFiles)
{
setTestFileName(aTestFile);
- load(getTestFileDirName(), getTestFileName());
+ loadFromFile(getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc (getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW);
// Check title
@@ -382,7 +382,7 @@ DECLARE_DUMP_TEST(LegendTest, Chart2DumpTest, false)
for (const OUString& aTestFile : aTestFiles)
{
setTestFileName(aTestFile);
- load(getTestFileDirName(), getTestFileName());
+ loadFromFile(getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -476,7 +476,7 @@ DECLARE_DUMP_TEST(GridTest, Chart2DumpTest, false)
for (const OUString& sTestFile : aTestFiles)
{
setTestFileName(sTestFile);
- load(getTestFileDirName(), getTestFileName());
+ loadFromFile(getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -548,7 +548,7 @@ DECLARE_DUMP_TEST(AxisGeometryTest, Chart2DumpTest, false)
for (const OUString& sTestFile : aTestFiles)
{
setTestFileName(sTestFile);
- load(getTestFileDirName(), getTestFileName());
+ loadFromFile(getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -621,7 +621,7 @@ DECLARE_DUMP_TEST(AxisLabelTest, Chart2DumpTest, false)
for (const OUString& sTestFile : aTestFiles)
{
setTestFileName(sTestFile);
- load(getTestFileDirName(), getTestFileName());
+ loadFromFile(getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -704,7 +704,7 @@ DECLARE_DUMP_TEST(ColumnBarChartTest, Chart2DumpTest, false)
for (const OUString& sTestFile : aTestFiles)
{
setTestFileName(sTestFile);
- load(getTestFileDirName(), getTestFileName());
+ loadFromFile(getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -774,7 +774,7 @@ DECLARE_DUMP_TEST(ChartWallTest, Chart2DumpTest, false)
for (const OUString& sTestFile : aTestFiles)
{
setTestFileName(sTestFile);
- load(getTestFileDirName(), getTestFileName());
+ loadFromFile(getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -822,7 +822,6 @@ DECLARE_DUMP_TEST(ChartWallTest, Chart2DumpTest, false)
sal_Int32 nChartWallLineWidth = 0;
xPropSet->getPropertyValue("LineWidth") >>= nChartWallLineWidth;
CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nChartWallLineWidth);
-
}
}
@@ -840,7 +839,7 @@ DECLARE_DUMP_TEST(PieChartTest, Chart2DumpTest, false)
for (const OUString& sTestFile : aTestFiles)
{
setTestFileName(sTestFile);
- load(getTestFileDirName(), getTestFileName());
+ loadFromFile(getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -913,7 +912,7 @@ DECLARE_DUMP_TEST(AreaChartTest, Chart2DumpTest, false)
for (const OUString& sTestFile : aTestFiles)
{
setTestFileName(sTestFile);
- load(getTestFileDirName(), getTestFileName());
+ loadFromFile(getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -986,7 +985,7 @@ DECLARE_DUMP_TEST(PointLineChartTest, Chart2DumpTest, false)
for (const OUString& sTestFile : aTestFiles)
{
setTestFileName(sTestFile);
- load(getTestFileDirName(), getTestFileName());
+ loadFromFile(getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -1078,7 +1077,7 @@ DECLARE_DUMP_TEST(PointLineChartTest, Chart2DumpTest, false)
DECLARE_DUMP_TEST( PivotChartDataButtonTest, Chart2DumpTest, false )
{
setTestFileName( "pivotchart_data_button.ods" );
- load( getTestFileDirName(), getTestFileName() );
+ loadFromFile(getTestFileName());
// Check that we have pivot chart in the document
uno::Reference<table::XTablePivotCharts> xTablePivotCharts = getTablePivotChartsFromSheet( 1, mxComponent );
@@ -1101,7 +1100,7 @@ DECLARE_DUMP_TEST( PivotChartDataButtonTest, Chart2DumpTest, false )
{
return xShapeNode->getShapeType() == "com.sun.star.drawing.TextShape";
} );
- CPPUNIT_ASSERT_MESSAGE( OString( "Cannot find Data button shape" ).getStr(), xButton.is() );
+ CPPUNIT_ASSERT_MESSAGE( "Cannot find Data button shape", xButton.is() );
// Make sure that there is no arrow shape with the Data button
uno::Reference<drawing::XShape> xArrow = getShapeByName( xShapes, "FieldButton.Row.8",
@@ -1109,7 +1108,7 @@ DECLARE_DUMP_TEST( PivotChartDataButtonTest, Chart2DumpTest, false )
{
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() );
+ CPPUNIT_ASSERT_MESSAGE( "Arrow shape should not be present for the Data button", !xArrow.is() );
// Assert the background color of the Data button
util::Color aButtonFillColor = 0;
diff --git a/chart2/qa/extras/chart2dump/reference/chartdatatest/simple_chart.txt b/chart2/qa/extras/chart2dump/reference/chartdatatest/simple_chart.txt
index 28a125d7a5ed..ec3bfa72e397 100644
--- a/chart2/qa/extras/chart2dump/reference/chartdatatest/simple_chart.txt
+++ b/chart2/qa/extras/chart2dump/reference/chartdatatest/simple_chart.txt
@@ -11,7 +11,7 @@ Quarter
// sYAxisTitle
Income (Ft)
// nYAxisNumberFormat
-151
+159
// nYAxisNumberType
17
// aColumnLabels.getLength()
diff --git a/chart2/qa/extras/chart2dump/reference/piecharttest/donut_chart.txt b/chart2/qa/extras/chart2dump/reference/piecharttest/donut_chart.txt
index b2dfd33295a2..c1af41103de5 100644
--- a/chart2/qa/extras/chart2dump/reference/piecharttest/donut_chart.txt
+++ b/chart2/qa/extras/chart2dump/reference/piecharttest/donut_chart.txt
@@ -35,15 +35,15 @@
16728590
/// /D=0:CS=0:CT=0:Series=0:Point=2
// aSlicePosition.X
-8909
+9033
// aSlicePosition.Y
-4532
+4635
// aSliceSize.Height
-4689
+4659
// aSliceSize.Width
-2544
+2458
// aSliceTransformation
-2544;0;8909;0;4689;4532;0;0;1
+2458;0;9033;0;4659;4635;0;0;1
// static_cast<sal_Int32>(aSliceFillStyle)
1
// static_cast<sal_Int32>(aSliceFillColor)
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index a5c2e20cc58c..3f5866e8c49c 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -16,215 +16,18 @@
#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
-#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
+#include <com/sun/star/chart2/PieChartSubType.hpp>
using uno::Reference;
using beans::XPropertySet;
class Chart2ExportTest : public ChartTest
{
-protected:
-
- virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override;
public:
- Chart2ExportTest() : ChartTest() {}
-
- void testErrorBarXLSX();
- void testErrorBarPropXLSX();
- void testTrendline();
- void testTrendlineOOXML();
- void testTrendlineXLS();
- void testMovingAverage();
- 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 testColorGradientWithTransparencyDOCX();
- void testColorGradientWithTransparencyODS();
- void testColorGradientStopXLSX();
- void testRadialColorGradientDOCX();
- void testBarChartDataPointPropDOCX();
- void testFdo83058dlblPos();
- void testAutoTitleDelXLSX();
- void testDispBlanksAsXLSX();
- void testMarkerColorXLSX();
- void testRoundedCornersXLSX();
- void testAxisNumberFormatXLSX();
- void testDataPointLabelNumberFormatXLSX();
- void testDataLabelDefaultValuesXLSX();
- void testDataLabelFillColor();
- 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 testTdf96161();
- void testMultipleAxisXLSX();
- void testSecondaryAxisXLSX();
- void testBarChartSecondaryAxisXLSX();
-
- CPPUNIT_TEST_SUITE(Chart2ExportTest);
- CPPUNIT_TEST(testErrorBarXLSX);
- CPPUNIT_TEST(testErrorBarPropXLSX);
- CPPUNIT_TEST(testTrendline);
- CPPUNIT_TEST(testTrendlineOOXML);
- CPPUNIT_TEST(testTrendlineXLS);
- CPPUNIT_TEST(testMovingAverage);
- 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(testColorGradientWithTransparencyDOCX);
- CPPUNIT_TEST(testColorGradientWithTransparencyODS);
- 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(testDataLabelFillColor);
- 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(testTdf96161);
- CPPUNIT_TEST(testMultipleAxisXLSX);
- CPPUNIT_TEST(testSecondaryAxisXLSX);
- CPPUNIT_TEST(testBarChartSecondaryAxisXLSX);
-
- CPPUNIT_TEST_SUITE_END();
+ Chart2ExportTest() : ChartTest("/chart2/qa/extras/data/") {}
};
-void Chart2ExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
-{
- XmlTestTools::registerOOXMLNamespaces(pXmlXPathCtx);
-}
-
namespace {
void testErrorBar( Reference< XPropertySet > const & xErrorBar )
@@ -249,7 +52,7 @@ void checkCommonTrendline(
Reference<chart2::XRegressionCurve> const & xCurve,
double aExpectedExtrapolateForward, double aExpectedExtrapolateBackward,
bool aExpectedForceIntercept, double aExpectedInterceptValue,
- bool aExpectedShowEquation, bool aExpectedR2)
+ bool aExpectedShowEquation, bool aExpectedR2, bool aExpectedMayHaveR2)
{
Reference<XPropertySet> xProperties( xCurve , uno::UNO_QUERY );
CPPUNIT_ASSERT(xProperties.is());
@@ -283,6 +86,10 @@ void checkCommonTrendline(
bool bShowCorrelationCoefficient = false;
CPPUNIT_ASSERT(xEquationProperties->getPropertyValue("ShowCorrelationCoefficient") >>= bShowCorrelationCoefficient);
CPPUNIT_ASSERT_EQUAL(aExpectedR2, bShowCorrelationCoefficient);
+
+ bool bMayHaveR2 = false;
+ CPPUNIT_ASSERT(xEquationProperties->getPropertyValue("MayHaveCorrelationCoefficient") >>= bMayHaveR2);
+ CPPUNIT_ASSERT_EQUAL(aExpectedMayHaveR2, bMayHaveR2);
}
void checkNameAndType(Reference<XPropertySet> const & xProperties, const OUString& aExpectedName, const OUString& aExpectedServiceName)
@@ -312,7 +119,7 @@ void checkLinearTrendline(
xCurve,
aExpectedExtrapolateForward, aExpectedExtrapolateBackward,
/*aExpectedForceIntercept*/false, aExpectedInterceptValue,
- /*aExpectedShowEquation*/true, /*aExpectedR2*/false);
+ /*aExpectedShowEquation*/true, /*aExpectedR2*/false, /*aExpectedMayHaveR2*/true);
}
void checkPolynomialTrendline(
@@ -334,7 +141,7 @@ void checkPolynomialTrendline(
xCurve,
aExpectedExtrapolateForward, aExpectedExtrapolateBackward,
/*aExpectedForceIntercept*/true, aExpectedInterceptValue,
- /*aExpectedShowEquation*/true, /*aExpectedR2*/true);
+ /*aExpectedShowEquation*/true, /*aExpectedR2*/true, /*aExpectedMayHaveR2*/true);
}
void checkMovingAverageTrendline(
@@ -348,6 +155,12 @@ void checkMovingAverageTrendline(
sal_Int32 aPeriod = 2;
CPPUNIT_ASSERT(xProperties->getPropertyValue("MovingAveragePeriod") >>= aPeriod);
CPPUNIT_ASSERT_EQUAL(aExpectedPeriod, aPeriod);
+
+ checkCommonTrendline(
+ xCurve,
+ /*aExpectedExtrapolateForward*/0.0, /*aExpectedExtrapolateBackward*/0.0,
+ /*aExpectedForceIntercept*/false, /*aExpectedInterceptValue*/0.0,
+ /*aExpectedShowEquation*/false, /*aExpectedR2*/false, /*aExpectedMayHaveR2*/false);
}
void checkTrendlinesInChart(uno::Reference< chart2::XChartDocument > const & xChartDoc)
@@ -381,9 +194,9 @@ void checkTrendlinesInChart(uno::Reference< chart2::XChartDocument > const & xCh
}
// improve the test
-void Chart2ExportTest::testErrorBarXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarXLSX)
{
- load(u"/chart2/qa/extras/data/ods/", "error_bar.ods");
+ loadFromFile(u"ods/error_bar.ods");
{
// make sure the ODS import was successful
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
@@ -400,7 +213,7 @@ void Chart2ExportTest::testErrorBarXLSX()
testErrorBar(xErrorBarYProps);
}
- reload("Calc Office Open XML");
+ saveAndReload("Calc Office Open XML");
{
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
CPPUNIT_ASSERT(xChartDoc.is());
@@ -417,56 +230,57 @@ void Chart2ExportTest::testErrorBarXLSX()
}
}
-void Chart2ExportTest::testErrorBarPropXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarPropXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "testErrorBarProp.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
+ loadFromFile(u"xlsx/testErrorBarProp.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:errDir"_ostr, "val"_ostr, "y");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:spPr/a:ln"_ostr, "w"_ostr, "12600");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:errDir"_ostr, "val"_ostr, "x");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:spPr/a:ln"_ostr, "w"_ostr, "9360");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "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()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendline)
{
- mbSkipValidation = true;
- load(u"/chart2/qa/extras/data/ods/", "trendline.ods");
+ // Validation fails with
+ // Error: tag name "chart:symbol-image" is not allowed. Possible tag names are: <label-separator>
+ skipValidation();
+ loadFromFile(u"ods/trendline.ods");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
- reload("calc8");
+ saveAndReload("calc8");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
}
-void Chart2ExportTest::testTrendlineOOXML()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendlineOOXML)
{
- load(u"/chart2/qa/extras/data/ods/", "trendline.ods");
+ loadFromFile(u"ods/trendline.ods");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
- reload("Calc Office Open XML");
+ saveAndReload("Calc Office Open XML");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
}
-void Chart2ExportTest::testTrendlineXLS()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendlineXLS)
{
- mbSkipValidation = true;
- load(u"/chart2/qa/extras/data/ods/", "trendline.ods");
+ loadFromFile(u"ods/trendline.ods");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
- reload("MS Excel 97");
+ saveAndReload("MS Excel 97");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
}
-void Chart2ExportTest::testMovingAverage()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testMovingAverage)
{
- mbSkipValidation = true;
- load(u"/chart2/qa/extras/data/ods/", "moving-type.ods");
- reload("calc8");
+ loadFromFile(u"ods/moving-type.ods");
+ saveAndReload("calc8");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -491,7 +305,7 @@ void Chart2ExportTest::testMovingAverage()
CPPUNIT_ASSERT_EQUAL(chart2::MovingAverageType::Central, nMovingAverageType);
}
-void Chart2ExportTest::testStockChart()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testStockChart)
{
/* For attached file Stock_Chart.docx, in chart1.xml,
* <c:stockChart>, there are four types of series as
@@ -500,50 +314,54 @@ void Chart2ExportTest::testStockChart()
* an attribute val of index should start from 1 and not from 0.
* Which was problem area.
*/
- load(u"/chart2/qa/extras/data/docx/", "testStockChart.docx");
+ loadFromFile(u"docx/testStockChart.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- 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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:idx"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:order"_ostr, "val"_ostr, "1");
assertXPathContent(
pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:tx/c:strRef/c:strCache/c:pt/c:v",
+ "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:tx/c:strRef/c:strCache/c:pt/c:v"_ostr,
"Open");
}
-void Chart2ExportTest::testBarChart()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarChart)
{
- load(u"/chart2/qa/extras/data/docx/", "testBarChart.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/testBarChart.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:barDir", "val", "col");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:barDir"_ostr, "val"_ostr, "col");
}
-void Chart2ExportTest::testCrosses()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testCrosses)
{
// test crosses val="autoZero" with DOCX
{
- load(u"/chart2/qa/extras/data/docx/", "Bar_horizontal_cone.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/Bar_horizontal_cone.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses", "val", "autoZero");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses"_ostr, "val"_ostr, "autoZero");
}
// tdf#142351: test crossesAt val="-50" with XLSX
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf142351.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf142351.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crossesAt", "val", "-50");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crossesAt"_ostr, "val"_ostr, "-50");
}
}
-void Chart2ExportTest::testScatterChartTextXValues()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterChartTextXValues)
{
- load(u"/chart2/qa/extras/data/docx/", "scatter-chart-text-x-values.docx");
+ loadFromFile(u"docx/scatter-chart-text-x-values.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -583,66 +401,69 @@ void Chart2ExportTest::testScatterChartTextXValues()
CPPUNIT_ASSERT_EQUAL(5.0, aYValues[2][3]);
// Test the export.
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal[1]/c:numRef[1]/c:numCache[1]/c:pt[1]/c:v[1]", "1");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal[1]/c:numRef[1]/c:numCache[1]/c:pt[1]/c:v[1]"_ostr, "1");
}
-void Chart2ExportTest::testScatterXAxisValues()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisValues)
{
- load(u"/chart2/qa/extras/data/odt/", "tdf114657.odt");
+ loadFromFile(u"odt/tdf114657.odt");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ assertXPath(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:ptCount"_ostr, "val"_ostr, "5");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[1]/c:v"_ostr, "15");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[2]/c:v"_ostr, "11");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[3]/c:v"_ostr, "20");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[4]/c:v"_ostr, "16");
}
-void Chart2ExportTest::testScatterXAxisCategories()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisCategories)
{
- load(u"/chart2/qa/extras/data/odt/", "tdf131143.odt");
+ loadFromFile(u"odt/tdf131143.odt");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ assertXPath(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:ptCount"_ostr, "val"_ostr, "4");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:pt[1]/c:v"_ostr, "Row 1");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:pt[2]/c:v"_ostr, "Row 2");
}
-void Chart2ExportTest::testChartDataTable()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartDataTable)
{
- load(u"/chart2/qa/extras/data/docx/", "testChartDataTable.docx");
+ loadFromFile(u"docx/testChartDataTable.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showHorzBorder"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showVertBorder"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showOutline"_ostr, "val"_ostr, "1");
}
-void Chart2ExportTest::testChartExternalData()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartExternalData)
{
- load(u"/chart2/qa/extras/data/docx/", "testMultipleChart.docx");
+ loadFromFile(u"docx/testMultipleChart.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- xmlXPathObjectPtr pXmlPathObj = getXPathNode(pXmlDoc, "/c:chartSpace/c:externalData");
- xmlNodeSetPtr pXmlNodes = pXmlPathObj->nodesetval;
- CPPUNIT_ASSERT(pXmlNodes);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:externalData"_ostr);
}
-void Chart2ExportTest::testEmbeddingsGrabBag()
+CPPUNIT_TEST_FIXTURE(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(u"/chart2/qa/extras/data/docx/", "testMultiplechartembeddings.docx" );
+ loadFromFile(u"docx/testMultiplechartembeddings.docx" );
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag(0);
@@ -652,7 +473,7 @@ void Chart2ExportTest::testEmbeddingsGrabBag()
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))
+ for (beans::PropertyValue const& prop : aGrabBag)
{
if (prop.Name == "OOXEmbeddings")
{
@@ -675,119 +496,158 @@ void Chart2ExportTest::testEmbeddingsGrabBag()
CPPUNIT_ASSERT(bEmbeddings); // Grab Bag has all the expected elements
}
-void Chart2ExportTest::testAreaChartLoad()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAreaChartLoad)
{
- load (u"/chart2/qa/extras/data/docx/", "testAreaChartLoad.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
+ loadFromFile(u"docx/testAreaChartLoad.docx");
+
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:showVal"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLbl"_ostr, 0);
}
-void Chart2ExportTest::testUpDownBars()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testUpDownBars)
{
- /*
- load("/chart2/qa/extras/data/docx/", "UpDownBars.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/UpDownBars.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:upDownBars");
- */
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:upDownBars"_ostr, 0);
}
-void Chart2ExportTest::testDoughnutChart()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDoughnutChart)
{
- load(u"/chart2/qa/extras/data/docx/", "doughnutChart.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/doughnutChart.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart"_ostr);
}
-void Chart2ExportTest::testDisplayUnits()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieOfPieChart)
{
- load(u"/chart2/qa/extras/data/docx/", "DisplayUnits.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"xlsx/pieOfPieChart.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:dispUnits/c:builtInUnit", "val", "billions");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:ofPieChart"_ostr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:ofPieChart/c:ofPieType[1]"_ostr, "val"_ostr, "pie");
}
-// 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");
-// }
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarOfPieChart)
+{
+ loadFromFile(u"xlsx/barOfPieChart.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
-void Chart2ExportTest::testFdo74115WallBitmapFill()
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:ofPieChart"_ostr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:ofPieChart/c:ofPieType[1]"_ostr, "val"_ostr, "bar");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDisplayUnits)
{
- load(u"/chart2/qa/extras/data/docx/", "fdo74115_WallBitmapFill.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/DisplayUnits.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:blipFill");
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:dispUnits/c:builtInUnit"_ostr, "val"_ostr, "billions");
}
-void Chart2ExportTest::testPieChartWallLineStyle()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallGradientFill)
{
- load(u"/chart2/qa/extras/data/odt/", "testPieChartWallLineStyle.odt");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/fdo74115_WallGradientFill.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:ln/a:noFill");
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallBitmapFill)
+{
+ loadFromFile(u"docx/fdo74115_WallBitmapFill.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:blipFill"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartWallLineStyle)
+{
+ loadFromFile(u"odt/testPieChartWallLineStyle.odt");
+
+ // FIXME: validation error in OOXML export: Errors: 9
+ skipValidation();
+
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:ln/a:noFill"_ostr);
}
//The below test case tests the built in marker 'x' for Office 2010 in Line charts
-void Chart2ExportTest::testFdo78290LineChartMarkerX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290LineChartMarkerX)
{
- load(u"/chart2/qa/extras/data/docx/", "fdo78290_Line_Chart_Marker_x.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/fdo78290_Line_Chart_Marker_x.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]"_ostr,"val"_ostr,"x");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:size[1]"_ostr,"val"_ostr,"7");
}
// We can also use the built in marker 'x' in scatter chart, hence writing the test case for the same.
-void Chart2ExportTest::testFdo78290ScatterChartMarkerX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290ScatterChartMarkerX)
{
- load(u"/chart2/qa/extras/data/docx/", "fdo78290_Scatter_Chart_Marker_x.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/fdo78290_Scatter_Chart_Marker_x.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:scatterChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]"_ostr,"val"_ostr,"x");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:scatterChart[1]/c:ser[1]/c:marker[1]/c:size[1]"_ostr,"val"_ostr,"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()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290CombinationChartMarkerX)
{
- load(u"/chart2/qa/extras/data/docx/", "fdo78290_Combination_Chart_Marker_x.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/fdo78290_Combination_Chart_Marker_x.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]"_ostr,"val"_ostr,"x");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:size[1]"_ostr,"val"_ostr,"7");
}
-void Chart2ExportTest::testTdf126115IndividualMarker()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTdf126115IndividualMarker)
{
// Check individual marker properties.
- load(u"/chart2/qa/extras/data/xlsx/", "tdf126115.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf126115.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:symbol"_ostr, "val"_ostr, "square");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:size"_ostr, "val"_ostr, "8");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:symbol"_ostr, "val"_ostr, "x");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:size"_ostr, "val"_ostr, "15");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "7030a0");
}
-void Chart2ExportTest::testAxisNumberFormatODS()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatODS)
{
struct
{
@@ -824,18 +684,18 @@ void Chart2ExportTest::testAxisNumberFormatODS()
} aTest;
- load(u"/chart2/qa/extras/data/ods/", "axis-numformats-linked.ods");
+ loadFromFile(u"ods/axis-numformats-linked.ods");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
aTest.check(xChartDoc);
// Reload the document and make sure everything remains intact.
- reload("calc8");
+ saveAndReload("calc8");
xChartDoc = getChartDocFromSheet(0, mxComponent);
aTest.check(xChartDoc);
}
-void Chart2ExportTest::testAxisNumberFormatXLS()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatXLS)
{
struct
{
@@ -880,19 +740,19 @@ void Chart2ExportTest::testAxisNumberFormatXLS()
} aTest;
- load( u"/chart2/qa/extras/data/xls/", "axis_sourceformatting.xls" );
+ loadFromFile(u"xls/axis_sourceformatting.xls" );
Reference<chart2::XChartDocument> 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" );
+ saveAndReload( "MS Excel 97" );
xChartDoc = getChartDocFromSheet( 0, mxComponent );
aTest.check( xChartDoc, false, util::NumberFormat::NUMBER );
}
-void Chart2ExportTest::testDataLabelBordersDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBordersDOCX)
{
struct Check
{
@@ -932,7 +792,7 @@ void Chart2ExportTest::testDataLabelBordersDOCX()
{ 2, css::drawing::LineStyle_SOLID, 0x00FF0000 } // solid red
};
- for (size_t i = 0; i < SAL_N_ELEMENTS(aDataPoints); ++i)
+ for (size_t i = 0; i < std::size(aDataPoints); ++i)
{
xPropSet = xDataSeries->getDataPointByIndex(aDataPoints[i].mnIndex);
CPPUNIT_ASSERT(xPropSet.is());
@@ -979,7 +839,7 @@ void Chart2ExportTest::testDataLabelBordersDOCX()
} aTest;
- load(u"/chart2/qa/extras/data/docx/", "data-label-borders.docx");
+ loadFromFile(u"docx/data-label-borders.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
@@ -997,7 +857,10 @@ void Chart2ExportTest::testDataLabelBordersDOCX()
xChartDoc.set(getChartDocFromWriter(1), uno::UNO_QUERY);
aTest.checkObject2(xChartDoc);
- reload("Office Open XML Text");
+ // FIXME: validation error in OOXML export: Errors: 3
+ skipValidation();
+
+ saveAndReload("Office Open XML Text");
xChartDoc.set(getChartDocFromWriter(0), uno::UNO_QUERY);
aTest.checkObject1(xChartDoc);
@@ -1005,108 +868,126 @@ void Chart2ExportTest::testDataLabelBordersDOCX()
aTest.checkObject2(xChartDoc);
}
-void Chart2ExportTest::testDataLabel3DChartDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabel3DChartDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "3d-bar-label.docx");
+ loadFromFile(u"docx/3d-bar-label.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:ser/c:dLbls/c:dLblPos"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:ser/c:dLbls/c:dLbl/c:dLblPos"_ostr, 0);
}
-void Chart2ExportTest::testDataLabelBarChartDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBarChartDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "bar-chart-labels.docx");
+ loadFromFile(u"docx/bar-chart-labels.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLblPos"_ostr, "val"_ostr, "ctr");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:dLblPos"_ostr, "val"_ostr, "inEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:dLbls/c:dLblPos"_ostr, "val"_ostr, "inBase");
}
-void Chart2ExportTest::testDataLabelClusteredBarChartDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelClusteredBarChartDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "clustered-bar-chart-labels.docx");
+ loadFromFile(u"docx/clustered-bar-chart-labels.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
+ // FIXME: validation error in OOXML export: Errors: 9
+ skipValidation();
+
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLbl[2]/c:dLblPos"_ostr, "val"_ostr, "outEnd");
}
-void Chart2ExportTest::testDataLabelRadarChartDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelRadarChartDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "radar-chart-labels.docx");
+ loadFromFile(u"docx/radar-chart-labels.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:radarChart/c:ser/c:dLbls/c:dLblPos"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:radarChart/c:ser/c:dLbls/c:dLbl/c:dLblPos"_ostr, 0);
}
-void Chart2ExportTest::testDataLabelDoughnutChartDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelDoughnutChartDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "doughnut-chart-labels.docx");
+ loadFromFile(u"docx/doughnut-chart-labels.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart/c:ser/c:dLbls/c:dLblPos"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart/c:ser/c:dLbls/c:dLbl/c:dLblPos"_ostr, 0);
}
-void Chart2ExportTest::testDataLabelAreaChartDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelAreaChartDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "area-chart-labels.docx");
+ loadFromFile(u"docx/area-chart-labels.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLblPos"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLbl/c:dLblPos"_ostr, 0);
}
-void Chart2ExportTest::testDataLabelDefaultLineChartDOCX()
+CPPUNIT_TEST_FIXTURE(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(u"/chart2/qa/extras/data/docx/", "line-chart-label-default-placement.docx");
+ loadFromFile(u"docx/line-chart-label-default-placement.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
- reload("Office Open XML Text");
+ saveAndReload("Office Open XML Text");
xChartDoc.set(getChartDocFromWriter(0), uno::UNO_QUERY);
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
@@ -1118,190 +999,81 @@ void Chart2ExportTest::testDataLabelDefaultLineChartDOCX()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Line chart's default label placement should be 'right'.", chart::DataLabelPlacement::RIGHT, nLabelPlacement );
}
-void Chart2ExportTest::testIndividualDataLabelProps()
-{
- load(u"/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(u"/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(u"/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()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testIndividualDataLabelProps)
{
- load(u"/chart2/qa/extras/data/ods/", "tdf64224.ods");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
- CPPUNIT_ASSERT(pXmlDoc);
+ loadFromFile(u"xlsx/tdf122915.xlsx");
- //no fill
- assertXPath(pXmlDoc, "/c:chartSpace/c:spPr/a:noFill", 1);
- assertXPath(pXmlDoc, "/c:chartSpace/c:spPr/a:solidFill", 0);
-}
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
-void Chart2ExportTest::testChartTitlePropertiesColorFillDOCX()
-{
- load(u"/chart2/qa/extras/data/docx/", "testChartTitlePropertiesColorFill.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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);
+ 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"_ostr, "b"_ostr, "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"_ostr, "sz"_ostr, "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"_ostr, "val"_ostr, "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"_ostr, "typeface"_ostr, "Times New Roman");
}
-void Chart2ExportTest::testChartTitlePropertiesGradientFillDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarChartRotation)
{
- load(u"/chart2/qa/extras/data/docx/", "testChartTitlePropertiesGradientFill.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
+ loadFromFile(u"docx/barChartRotation.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.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::testChartTitlePropertiesBitmapFillDOCX()
-{
- load(u"/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);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX"_ostr, "val"_ostr, "30");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotY"_ostr, "val"_ostr, "50");
}
-void Chart2ExportTest::testColorGradientWithTransparencyDOCX()
-{
- // Test color gradient (two color) with gradient transparency
- load(u"/chart2/qa/extras/data/docx/", "testColorGradientWithTransparency.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::testColorGradientWithTransparencyODS()
-{
- // Test color gradient (two color) with simple transparency
- load(u"/chart2/qa/extras/data/ods/", "testColorGradientWithTransparency.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(u"/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(u"/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(u"/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 (u"/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()
+CPPUNIT_TEST_FIXTURE(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(u"/chart2/qa/extras/data/docx/", "FDO74430.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/document", "Office Open XML Text" );
+ loadFromFile(u"docx/FDO74430.docx");
+
+ // FIXME: validation error in OOXML export: Errors: 5
+ skipValidation();
+
+ save("Office Open XML Text" );
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
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");
+ OUString aValueOfFirstDocPR = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:drawing[1]/wp:inline[1]/wp:docPr[1]"_ostr, "id"_ostr);
+ 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]"_ostr, "id"_ostr);
CPPUNIT_ASSERT( aValueOfFirstDocPR != aValueOfSecondDocPR );
}
-void Chart2ExportTest::testPieChartDataLabels()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartDataLabels)
{
- load(u"/chart2/qa/extras/data/docx/", "PieChartDataLabels.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/PieChartDataLabels.docx");
+
+ // FIXME: validation error in OOXML export: Errors: 19
+ skipValidation();
+
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart/c:ser[1]/c:dLbls/c:dLbl[1]/c:dLblPos", "val", "outEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart/c:ser[1]/c:dLbls/c:dLbl[1]/c:dLblPos"_ostr, "val"_ostr, "outEnd");
}
-void Chart2ExportTest::testSeriesIdxOrder()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSeriesIdxOrder)
{
- load(u"/chart2/qa/extras/data/docx/", "testSeriesIdxOrder.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/testSeriesIdxOrder.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:idx[1]"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:order[1]"_ostr, "val"_ostr, "1");
}
-void Chart2ExportTest::testScatterPlotLabels()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterPlotLabels)
{
- load(u"/chart2/qa/extras/data/odt/", "scatter-plot-labels.odt");
+ loadFromFile(u"odt/scatter-plot-labels.odt");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1316,7 +1088,7 @@ void Chart2ExportTest::testScatterPlotLabels()
CPPUNIT_ASSERT_EQUAL(OUString("c"), aLabels[2][0].get<OUString>());
// Reload the doc and check again. The labels should not change.
- reload("writer8");
+ saveAndReload("writer8");
xChartDoc.set(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1331,10 +1103,10 @@ void Chart2ExportTest::testScatterPlotLabels()
CPPUNIT_ASSERT_EQUAL(OUString("c"), aLabels[2][0].get<OUString>());
}
-void Chart2ExportTest::testErrorBarDataRangeODS()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarDataRangeODS)
{
- load(u"/chart2/qa/extras/data/ods/", "ErrorBarRange.ods");
- reload("calc8");
+ loadFromFile(u"ods/ErrorBarRange.ods");
+ saveAndReload("calc8");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1360,29 +1132,83 @@ void Chart2ExportTest::testErrorBarDataRangeODS()
CPPUNIT_ASSERT_EQUAL(OUString("$Sheet1.$C$1:$C$3"), aNegRange);
}
-void Chart2ExportTest::testChartCrash()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf50934_barOfPie)
{
- load(u"/chart2/qa/extras/data/docx/", "FDO75975.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"ods/tdf50934_barOfPie.ods");
+ saveAndReload("calc8");
+
+ uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
+ CPPUNIT_ASSERT(xChartDoc.is());
+
+ Reference< chart2::XChartType > xChartType = getChartTypeFromDoc( xChartDoc, 0 );
+ CPPUNIT_ASSERT(xChartType.is());
+
+ CPPUNIT_ASSERT_EQUAL(u"com.sun.star.chart2.PieChartType"_ustr,
+ xChartType->getChartType());
+
+ // Verify that it saves and loads as bar-of-pie
+ Reference< chart2::XDiagram> xDia(xChartDoc->getFirstDiagram());
+ CPPUNIT_ASSERT(xDia.is());
+ uno::Reference< beans::XPropertySet > xDiaProp( xDia, uno::UNO_QUERY );
+ CPPUNIT_ASSERT(xDiaProp.is());
+ uno::Any aAny = xDiaProp->getPropertyValue("SubPieType");
+ CPPUNIT_ASSERT(aAny.hasValue());
+ chart2::PieChartSubType subPieType;
+ aAny >>= subPieType;
+ CPPUNIT_ASSERT_EQUAL(chart2::PieChartSubType_BAR, subPieType);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf50934_pieOfPie)
+{
+ loadFromFile(u"ods/tdf50934_pieOfPie.ods");
+ saveAndReload("calc8");
+
+ uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
+ CPPUNIT_ASSERT(xChartDoc.is());
+
+ Reference< chart2::XChartType > xChartType = getChartTypeFromDoc( xChartDoc, 0 );
+ CPPUNIT_ASSERT(xChartType.is());
+
+ CPPUNIT_ASSERT_EQUAL(u"com.sun.star.chart2.PieChartType"_ustr,
+ xChartType->getChartType());
+
+ // Verify that it saves and loads as pie-of-pie
+ Reference< chart2::XDiagram> xDia(xChartDoc->getFirstDiagram());
+ CPPUNIT_ASSERT(xDia.is());
+ uno::Reference< beans::XPropertySet > xDiaProp( xDia, uno::UNO_QUERY );
+ CPPUNIT_ASSERT(xDiaProp.is());
+ uno::Any aAny = xDiaProp->getPropertyValue("SubPieType");
+ CPPUNIT_ASSERT(aAny.hasValue());
+ chart2::PieChartSubType subPieType;
+ aAny >>= subPieType;
+ CPPUNIT_ASSERT_EQUAL(chart2::PieChartSubType_PIE, subPieType);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartCrash)
+{
+ loadFromFile(u"docx/FDO75975.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
}
-void Chart2ExportTest::testPieChartRotation()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartRotation)
{
- load (u"/chart2/qa/extras/data/docx/", "pieChartRotation.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
+ loadFromFile(u"docx/pieChartRotation.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX"_ostr, "val"_ostr, "40");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotY"_ostr, "val"_ostr, "30");
}
-void Chart2ExportTest::testEmbeddingsOleObjectGrabBag()
+CPPUNIT_TEST_FIXTURE(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(u"/chart2/qa/extras/data/docx/", "testchartoleobjectembeddings.docx" );
+ loadFromFile(u"docx/testchartoleobjectembeddings.docx" );
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag(0);
@@ -1390,7 +1216,7 @@ void Chart2ExportTest::testEmbeddingsOleObjectGrabBag()
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))
+ for (beans::PropertyValue const& prop : aGrabBag)
{
if (prop.Name == "OOXEmbeddings")
{
@@ -1451,9 +1277,9 @@ void checkSheetForGapWidthAndOverlap(uno::Reference< chart2::XChartDocument > co
}
-void Chart2ExportTest::testGapWidthXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testGapWidthXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "gapWidth.xlsx");
+ loadFromFile(u"xlsx/gapWidth.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
checkSheetForGapWidthAndOverlap(xChartDoc, 120, -60);
@@ -1461,7 +1287,7 @@ void Chart2ExportTest::testGapWidthXLSX()
xChartDoc = getChartDocFromSheet( 1, mxComponent );
checkSheetForGapWidthAndOverlap(xChartDoc, 50, 30);
- reload("Calc Office Open XML");
+ saveAndReload("Calc Office Open XML");
xChartDoc = getChartDocFromSheet( 0, mxComponent );
checkSheetForGapWidthAndOverlap(xChartDoc, 120, -60);
@@ -1470,17 +1296,18 @@ void Chart2ExportTest::testGapWidthXLSX()
checkSheetForGapWidthAndOverlap(xChartDoc, 50, 30);
}
-void Chart2ExportTest::testSmoothedLines()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSmoothedLines)
{
- load(u"/chart2/qa/extras/data/ods/", "smoothedLines.ods");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"ods/smoothedLines.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:smooth", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:smooth"_ostr, "val"_ostr, "0");
}
-void Chart2ExportTest::testLabelStringODS()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testLabelStringODS)
{
- load(u"/chart2/qa/extras/data/ods/", "labelString.ods");
+ loadFromFile(u"ods/labelString.ods");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
Reference< chart2::data::XDataSequence > xLabelSeq =
@@ -1490,7 +1317,7 @@ void Chart2ExportTest::testLabelStringODS()
OUString aLabelString = xLabelSeq->getSourceRangeRepresentation();
CPPUNIT_ASSERT_EQUAL(OUString("\"LabelName\""), aLabelString);
- reload("calc8");
+ saveAndReload("calc8");
xChartDoc = getChartDocFromSheet( 0, mxComponent );
xLabelSeq = getLabelDataSequenceFromDoc(xChartDoc);
@@ -1500,457 +1327,6 @@ void Chart2ExportTest::testLabelStringODS()
CPPUNIT_ASSERT_EQUAL(OUString("\"LabelName\""), aLabelString);
}
-void Chart2ExportTest::testFdo83058dlblPos()
-{
- load (u"/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(u"/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(u"/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(u"/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(u"/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(u"/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(u"/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(u"/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(u"/chart2/qa/extras/data/xlsx/", "data_label.xlsx");
- Reference< chart2::XChartDocument> xDoc = getChartDocFromSheet(0, mxComponent);
- Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xDoc, 0);
- Reference<beans::XPropertySet> 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::testDataLabelFillColor()
-{
- load(u"/chart2/qa/extras/data/xlsx/", "data_labels_fill_color.xlsx");
- Reference< chart2::XChartDocument> xDoc = getChartDocFromSheet(0, mxComponent);
- Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xDoc, 0);
- Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("LabelFillColor");
- sal_Int32 nLabelFillColor;
- CPPUNIT_ASSERT(aAny >>= nLabelFillColor);
-
- 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:spPr/a:solidFill/a:srgbClr", "val", "F79646");
-}
-
-void Chart2ExportTest::testTitleOverlayXLSX()
-{
- load(u"/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(u"/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(u"/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(u"/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(u"/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);
- CPPUNIT_ASSERT(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);
- CPPUNIT_ASSERT(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(u"/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);
- CPPUNIT_ASSERT(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);
- CPPUNIT_ASSERT(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);
- CPPUNIT_ASSERT(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);
- CPPUNIT_ASSERT(nH < 1);
- CPPUNIT_ASSERT(nH != nW);
-}
-
-void Chart2ExportTest::testLegendManualLayoutXLSX()
-{
- load(u"/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);
- CPPUNIT_ASSERT(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);
- CPPUNIT_ASSERT(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);
- CPPUNIT_ASSERT(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);
- CPPUNIT_ASSERT(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(u"/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(u"/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(u"/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(u"/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(u"/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(u"/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(u"/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(u"/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(u"/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(u"/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(u"/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(u"/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::testTdf96161()
-{
- load(u"/chart2/qa/extras/data/ods/", "tdf96161.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:varyColors", "val", "0");
-}
-
-void Chart2ExportTest::testMultipleAxisXLSX()
-{
- load(u"/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(u"/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 <lineChart> 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 <lineChart> 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::testBarChartSecondaryAxisXLSX()
-{
- load(u"/chart2/qa/extras/data/xlsx/", "testSecondaryAxis.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
- CPPUNIT_ASSERT(pXmlDoc);
- // Collect barchart axID on primary Axis
- OUString XValueIdOf1Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[1]/c:axId[1]", "val");
- OUString YValueIdOf1Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[1]/c:axId[2]", "val");
- // Collect barchart axID on secondary Axis
- OUString XValueIdOf2Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[2]/c:axId[1]", "val");
- OUString YValueIdOf2Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[2]/c:axId[2]", "val");
- // Check which c:catAx and c:valAx contain the AxisId of barcharts
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[1]/c:axId", "val", XValueIdOf1Barchart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId", "val", YValueIdOf1Barchart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId", "val", XValueIdOf2Barchart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId", "val", YValueIdOf2Barchart);
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
-
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/qa/extras/chart2export2.cxx b/chart2/qa/extras/chart2export2.cxx
index 1fa862291459..f5378dc9444c 100644
--- a/chart2/qa/extras/chart2export2.cxx
+++ b/chart2/qa/extras/chart2export2.cxx
@@ -22,153 +22,16 @@ using beans::XPropertySet;
class Chart2ExportTest2 : public ChartTest
{
-protected:
- virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override;
-
public:
Chart2ExportTest2()
- : ChartTest()
+ : ChartTest("/chart2/qa/extras/data/")
{
}
- void testSetSeriesToSecondaryAxisXLSX();
- void testCombinedChartSecondaryAxisXLSX();
- void testCombinedChartSecondaryAxisODS();
- void testCrossBetweenXLSX();
- void testCrossBetweenWithDeletedAxis();
- void testCrossBetweenODS();
- void testAxisTitleRotationXLSX();
- void testAxisTitlePositionDOCX();
- void testAxisCrossBetweenDOCX();
- void testPieChartDataPointExplosionXLSX();
- void testCustomDataLabel();
- void testDataSeriesName();
- 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 testTdf134118();
- void testTdf123206_customLabelText();
- void testCustomLabelText();
- void testDeletedLegendEntries();
- void testTdf60316();
- void testTdf130225();
- void testTdf59857();
- void testTdf126076();
- void testTdf75330();
- void testTdf127792();
- void testTdf131979();
- void testTdf132076();
- void testTdf125812();
- void testTdf133190();
- void testTdf133191();
- void testTdf132594();
- void testTdf134255();
- void testTdf134977();
- void testTdf123647();
- void testTdf136267();
- void testDataLabelPlacementPieChart();
- void testTdf137917();
- void testTdf138204();
- void testTdf138181();
- void testCustomShapeText();
- void testuserShapesXLSX();
- void testuserShapesDOCX();
- void testGraphicBlipXLSX();
- void testNameRangeXLSX();
- void testTdf143942();
- void testDateCategoriesPPTX();
-
- CPPUNIT_TEST_SUITE(Chart2ExportTest2);
- 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(testDataSeriesName);
- 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(testTdf134118);
- CPPUNIT_TEST(testTdf123206_customLabelText);
- CPPUNIT_TEST(testCustomLabelText);
- CPPUNIT_TEST(testDeletedLegendEntries);
- CPPUNIT_TEST(testTdf60316);
- 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(testTdf134255);
- CPPUNIT_TEST(testTdf134977);
- CPPUNIT_TEST(testTdf123647);
- CPPUNIT_TEST(testTdf136267);
- CPPUNIT_TEST(testDataLabelPlacementPieChart);
- CPPUNIT_TEST(testTdf137917);
- CPPUNIT_TEST(testTdf138204);
- CPPUNIT_TEST(testTdf138181);
- CPPUNIT_TEST(testCustomShapeText);
- CPPUNIT_TEST(testuserShapesXLSX);
- CPPUNIT_TEST(testuserShapesDOCX);
- CPPUNIT_TEST(testGraphicBlipXLSX);
- CPPUNIT_TEST(testNameRangeXLSX);
- CPPUNIT_TEST(testTdf143942);
- CPPUNIT_TEST(testDateCategoriesPPTX);
- CPPUNIT_TEST_SUITE_END();
};
-void Chart2ExportTest2::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testSetSeriesToSecondaryAxisXLSX)
{
- XmlTestTools::registerOOXMLNamespaces(pXmlXPathCtx);
-}
-
-void Chart2ExportTest2::testSetSeriesToSecondaryAxisXLSX()
-{
- load(u"/chart2/qa/extras/data/xlsx/", "add_series_secondary_axis.xlsx");
+ loadFromFile(u"xlsx/add_series_secondary_axis.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
// Second series
Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xChartDoc, 1);
@@ -179,176 +42,192 @@ void Chart2ExportTest2::testSetSeriesToSecondaryAxisXLSX()
// 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");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// Check there are only two <lineChart> 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);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart"_ostr, 2);
}
-void Chart2ExportTest2::testCombinedChartSecondaryAxisXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCombinedChartSecondaryAxisXLSX)
{
// Original file was created with MS Office
- load(u"/chart2/qa/extras/data/xlsx/", "combined_chart_secondary_axis.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/combined_chart_secondary_axis.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ OUString XValueIdOfBarchart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueIdOfBarchart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]"_ostr, "val"_ostr);
// 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");
+ OUString XValueIdOfLinechart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueIdOfLinechart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]"_ostr, "val"_ostr);
// 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",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[1]/c:axId"_ostr, "val"_ostr,
XValueIdOfLinechart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId"_ostr, "val"_ostr,
YValueIdOfLinechart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId"_ostr, "val"_ostr,
XValueIdOfBarchart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId"_ostr, "val"_ostr,
YValueIdOfBarchart);
}
-void Chart2ExportTest2::testCombinedChartSecondaryAxisODS()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCombinedChartSecondaryAxisODS)
{
// Original file was created with LibreOffice
- load(u"/chart2/qa/extras/data/ods/", "combined_chart_secondary_axis.ods");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"ods/combined_chart_secondary_axis.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ OUString XValueIdOfBarchart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueIdOfBarchart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]"_ostr, "val"_ostr);
// 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");
+ OUString XValueIdOfLinechart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueIdOfLinechart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]"_ostr, "val"_ostr);
// 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",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[1]/c:axId"_ostr, "val"_ostr,
XValueIdOfLinechart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId"_ostr, "val"_ostr,
YValueIdOfLinechart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId"_ostr, "val"_ostr,
XValueIdOfBarchart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId"_ostr, "val"_ostr,
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);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:crosses"_ostr, 0);
}
-void Chart2ExportTest2::testCrossBetweenXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenXLSX)
{
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
// Original files were created with MS Office
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf127777.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf127777.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
- "between");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr,
+ "val"_ostr, "between");
}
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf132076.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf132076.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
- "between");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr,
+ "val"_ostr, "between");
}
}
-void Chart2ExportTest2::testCrossBetweenWithDeletedAxis()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenWithDeletedAxis)
{
// Original file was created with MS Office (the category axis is deleted in the file)
- load(u"/chart2/qa/extras/data/xlsx/", "tdf128633.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf128633.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr, "val"_ostr,
"between");
}
-void Chart2ExportTest2::testCrossBetweenODS()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenODS)
{
// Original file was created with LibreOffice
- load(u"/chart2/qa/extras/data/ods/", "test_CrossBetween.ods");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"ods/test_CrossBetween.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr, "val"_ostr,
"between");
}
-void Chart2ExportTest2::testAxisTitleRotationXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitleRotationXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "axis_title_rotation.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/axis_title_rotation.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:tx/c:rich/a:bodyPr",
- "rot", "0");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:tx/c:rich/a:bodyPr"_ostr,
+ "rot"_ostr, "0");
}
-void Chart2ExportTest2::testAxisTitlePositionDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitlePositionDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "testAxisTitlePosition.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/testAxisTitlePosition.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:title/c:layout/c:manualLayout/c:x"_ostr,
+ "val"_ostr);
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");
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:title/c:layout/c:manualLayout/c:y"_ostr,
+ "val"_ostr);
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");
+ aXVal = getXPath(
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:layout/c:manualLayout/c:x"_ostr,
+ "val"_ostr);
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");
+ aYVal = getXPath(
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:layout/c:manualLayout/c:y"_ostr,
+ "val"_ostr);
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 Chart2ExportTest2::testAxisCrossBetweenDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisCrossBetweenDOCX)
{
- load(u"/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");
+ loadFromFile(u"odt/axis-position.odt");
+
+ // FIXME: validation error in OOXML export: Errors: 3
+ skipValidation();
+
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ assertXPath(pXmlDoc, "(//c:crossBetween)[1]"_ostr, "val"_ostr, "midCat");
}
-void Chart2ExportTest2::testPieChartDataPointExplosionXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testPieChartDataPointExplosionXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "pie_chart_datapoint_explosion.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/pie_chart_datapoint_explosion.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dPt/c:explosion",
- "val", "28");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dPt/c:explosion"_ostr,
+ "val"_ostr, "28");
}
-void Chart2ExportTest2::testCustomDataLabel()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabel)
{
- load(u"/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");
+ loadFromFile(u"pptx/tdf115107.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -456,15 +335,24 @@ void Chart2ExportTest2::testCustomDataLabel()
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT,
aFields[1]->getFieldType());
CPPUNIT_ASSERT_EQUAL(OUString(" <CELLREF"), aFields[1]->getString());
+
+ save("Impress MS PowerPoint 2007 XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.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"_ostr,
+ "val"_ostr, "404040");
}
/// Test for tdf#94235
-void Chart2ExportTest2::testDataSeriesName()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataSeriesName)
{
// ODF
{
- load(u"/chart2/qa/extras/data/ods/", "ser_labels.ods");
- reload("calc8");
+ loadFromFile(u"ods/ser_labels.ods");
+ saveAndReload("calc8");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
CPPUNIT_ASSERT(xDataSeries.is());
@@ -477,8 +365,8 @@ void Chart2ExportTest2::testDataSeriesName()
// OOXML
{
- load(u"/chart2/qa/extras/data/xlsx/", "ser_labels.xlsx");
- reload("Calc Office Open XML");
+ loadFromFile(u"xlsx/ser_labels.xlsx");
+ saveAndReload("Calc Office Open XML");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
CPPUNIT_ASSERT(xDataSeries.is());
@@ -490,59 +378,66 @@ void Chart2ExportTest2::testDataSeriesName()
}
}
-void Chart2ExportTest2::testCustomPositionofDataLabel()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel)
{
- load(u"/chart2/qa/extras/data/xlsx/", "testCustomPosDataLabels.xlsx");
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
+ loadFromFile(u"xlsx/testCustomPosDataLabels.xlsx");
{
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ assertXPath(
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:idx"_ostr,
+ "val"_ostr, "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");
+ "c:dLbl[1]/c:layout/c:manualLayout/c:x"_ostr,
+ "val"_ostr);
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");
+ "c:dLbl[1]/c:layout/c:manualLayout/c:y"_ostr,
+ "val"_ostr);
double nY = aYVal.toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.0742140311063737, nY, 1e-7);
}
- load(u"/chart2/qa/extras/data/docx/", "testTdf108110.docx");
+ loadFromFile(u"docx/testTdf108110.docx");
{
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ assertXPath(
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[2]/c:idx"_ostr,
+ "val"_ostr, "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");
+ "c:dLbl[2]/c:layout/c:manualLayout/c:x"_ostr,
+ "val"_ostr);
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");
+ "c:dLbl[2]/c:layout/c:manualLayout/c:y"_ostr,
+ "val"_ostr);
double nY = aYVal.toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.172648731408574, nY, 1e-7);
}
- load(u"/chart2/qa/extras/data/ods/", "tdf136024.ods");
+ loadFromFile(u"ods/tdf136024.ods");
{
- reload("calc8");
+ saveAndReload("calc8");
// tdf#136024: test custom position of pie chart data label after an ods export
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -555,16 +450,14 @@ void Chart2ExportTest2::testCustomPositionofDataLabel()
chart2::RelativePosition aCustomLabelPosition;
CPPUNIT_ASSERT(xPropertySet->getPropertyValue("CustomLabelPosition")
>>= aCustomLabelPosition);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(aCustomLabelPosition.Primary, -0.0961935120945059, 1e-5);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(aCustomLabelPosition.Secondary, 0.209578842093566, 1e-5);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.0961935120945059, aCustomLabelPosition.Primary, 1e-5);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.209578842093566, aCustomLabelPosition.Secondary, 1e-5);
}
}
-void Chart2ExportTest2::testCustomDataLabelMultipleSeries()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabelMultipleSeries)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf115107-2.pptx");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart2", "Impress MS PowerPoint 2007 XML");
- CPPUNIT_ASSERT(pXmlDoc);
+ loadFromFile(u"pptx/tdf115107-2.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -624,228 +517,251 @@ void Chart2ExportTest2::testCustomDataLabelMultipleSeries()
CPPUNIT_ASSERT_EQUAL(OUString("Line"), aFields[2]->getString());
}
-void Chart2ExportTest2::testLeaderLines()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLeaderLines)
{
- load(u"/chart2/qa/extras/data/xlsx/", "testTdf90749.xlsx");
+ // FIXME: validation error in OOXML export: Errors: 2
+ skipValidation();
+
+ loadFromFile(u"xlsx/testTdf90749.xlsx");
{
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ "c15:showLeaderLines"_ostr,
+ "val"_ostr, "1");
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:dLbls/c:extLst/c:ext/"
- "c15:showLeaderLines",
- "val", "0");
+ "c15:showLeaderLines"_ostr,
+ "val"_ostr, "0");
}
- load(u"/chart2/qa/extras/data/docx/", "MSO_Custom_Leader_Line.docx");
+ loadFromFile(u"docx/MSO_Custom_Leader_Line.docx");
{
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1", "Office Open XML Text");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// tdf#134571: Check the leader line is switch off.
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:extLst/c:ext/"
- "c15:showLeaderLines",
- "val", "0");
+ "c15:showLeaderLines"_ostr,
+ "val"_ostr, "0");
}
}
-void Chart2ExportTest2::testNumberFormatExportPPTX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNumberFormatExportPPTX)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf115859.pptx");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
+ loadFromFile(u"pptx/tdf115859.pptx");
+ save("Impress MS PowerPoint 2007 XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:numFmt"_ostr,
+ "formatCode"_ostr, "#,##0.00,\\K");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:numFmt"_ostr,
+ "sourceLinked"_ostr, "0");
}
-void Chart2ExportTest2::testLabelSeparatorExportDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLabelSeparatorExportDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "testLabelSeparator.docx");
+ loadFromFile(u"docx/testLabelSeparator.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:separator"_ostr,
+ "\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", ", ");
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:separator"_ostr,
+ ", ");
// The text separator should be a semicolon
assertXPathContent(
- pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:dLbls/c:separator", "; ");
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:dLbls/c:separator"_ostr,
+ "; ");
}
-void Chart2ExportTest2::testChartTitlePropertiesColorFillPPTX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesColorFillPPTX)
{
- load(u"/chart2/qa/extras/data/pptx/", "testChartTitlePropertiesColorFill.pptx");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
+ loadFromFile(u"pptx/testChartTitlePropertiesColorFill.pptx");
+ save("Impress MS PowerPoint 2007 XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.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);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr,
+ "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
-void Chart2ExportTest2::testChartTitlePropertiesGradientFillPPTX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesGradientFillPPTX)
{
- load(u"/chart2/qa/extras/data/pptx/", "testChartTitlePropertiesGradientFill.pptx");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
+ loadFromFile(u"pptx/testChartTitlePropertiesGradientFill.pptx");
+ save("Impress MS PowerPoint 2007 XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.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");
+ "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr"_ostr,
+ "val"_ostr, "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);
+ "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr"_ostr,
+ "val"_ostr, "c7d5ed");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
-void Chart2ExportTest2::testChartTitlePropertiesBitmapFillPPTX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesBitmapFillPPTX)
{
- load(u"/chart2/qa/extras/data/pptx/", "testChartTitlePropertiesBitmapFill.pptx");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
+ loadFromFile(u"pptx/testChartTitlePropertiesBitmapFill.pptx");
+ save("Impress MS PowerPoint 2007 XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.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);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip"_ostr,
+ "embed"_ostr, "rId1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
-void Chart2ExportTest2::testxAxisLabelsRotation()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testxAxisLabelsRotation)
{
- load(u"/chart2/qa/extras/data/xlsx/", "xAxisLabelsRotation.xlsx");
- xmlDocUniquePtr pXmlDoc1 = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/xAxisLabelsRotation.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc1 = parseExport("xl/charts/chart1.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");
+ assertXPath(pXmlDoc1, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr"_ostr,
+ "rot"_ostr, "2700000");
}
-void Chart2ExportTest2::testMultipleCategoryAxisLablesXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesXLSX)
{
- load(u"/chart2/qa/extras/data/ods/", "multilevelcat.ods");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"ods/multilevelcat.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ "c:multiLvlStrCache/c:ptCount"_ostr,
+ "val"_ostr, "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",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[1]/c:v"_ostr,
"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",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[6]/c:v"_ostr,
"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",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[1]/c:v"_ostr,
"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",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[3]/c:v"_ostr,
"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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:noMultiLvlLbl"_ostr,
+ "val"_ostr, "0");
}
-void Chart2ExportTest2::testMultipleCategoryAxisLablesDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesDOCX)
{
- load(u"/chart2/qa/extras/data/odt/", "multilevelcat.odt");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"odt/multilevelcat.odt");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.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", "4");
+ "c:multiLvlStrCache/c:ptCount"_ostr,
+ "val"_ostr, "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",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[1]/c:v"_ostr,
"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",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[4]/c:v"_ostr,
"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",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[1]/c:v"_ostr,
"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",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[2]/c:v"_ostr,
"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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:noMultiLvlLbl"_ostr,
+ "val"_ostr, "0");
}
-void Chart2ExportTest2::testTdf116163()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf116163)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf116163.pptx");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
+ loadFromFile(u"pptx/tdf116163.pptx");
+ save("Impress MS PowerPoint 2007 XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr", "rot",
- "-5400000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr"_ostr,
+ "rot"_ostr, "-5400000");
}
-void Chart2ExportTest2::testTdf111824()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf111824)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf111824.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf111824.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ OUString zAxisIdOf3DBarchart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:axId[3]"_ostr, "val"_ostr);
// 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",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:serAx/c:axId"_ostr, "val"_ostr,
zAxisIdOf3DBarchart);
}
-void Chart2ExportTest2::test3DAreaChartZAxis()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, test3DAreaChartZAxis)
{
- load(u"/chart2/qa/extras/data/xlsx/", "test3DAreaChartZAxis.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/test3DAreaChartZAxis.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ OUString zAxisIdOf3DAreachart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:area3DChart/c:axId[3]"_ostr, "val"_ostr);
// 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",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:serAx/c:axId"_ostr, "val"_ostr,
zAxisIdOf3DAreachart);
}
-void Chart2ExportTest2::testTdf119029()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf119029)
{
- load(u"/chart2/qa/extras/data/odp/", "tdf119029.odp");
+ loadFromFile(u"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");
+ save("Impress MS PowerPoint 2007 XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:txPr/a:bodyPr", "rot",
- "-5400000");
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:txPr/a:bodyPr"_ostr,
+ "rot"_ostr, "-5400000");
}
-void Chart2ExportTest2::testTdf108022()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf108022)
{
- load(u"/chart2/qa/extras/data/odt/", "tdf108022.odt");
- reload("Office Open XML Text");
+ loadFromFile(u"odt/tdf108022.odt");
+ saveAndReload("Office Open XML Text");
// assert we really have two charts
Reference<chart2::XChartDocument> xChartDoc1(getChartDocFromWriter(0), uno::UNO_QUERY);
@@ -854,25 +770,28 @@ void Chart2ExportTest2::testTdf108022()
CPPUNIT_ASSERT(xChartDoc2.is());
}
-void Chart2ExportTest2::testTdf121744()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121744)
{
- load(u"/chart2/qa/extras/data/docx/", "tdf121744.docx");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ loadFromFile(u"docx/tdf121744.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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");
+ OUString XValueId = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueId = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]"_ostr, "val"_ostr);
- 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);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]"_ostr, "val"_ostr,
+ XValueId);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]"_ostr, "val"_ostr,
+ YValueId);
}
-void Chart2ExportTest2::testTdf121189()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121189)
{
- load(u"/chart2/qa/extras/data/odp/", "tdf121189.odp");
- reload("Impress Office Open XML");
+ loadFromFile(u"odp/tdf121189.odp");
+ saveAndReload("Impress Office Open XML");
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0),
@@ -882,101 +801,119 @@ void Chart2ExportTest2::testTdf121189()
CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.OLE2Shape"), xShape->getShapeType());
}
-void Chart2ExportTest2::testTdf122031()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf122031)
{
//Checks pie chart data label format.
+ loadFromFile(u"xlsx/tdf122031.xlsx");
+
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
- load(u"/chart2/qa/extras/data/xlsx/", "tdf122031.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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:numFmt"_ostr,
+ "formatCode"_ostr, "0.000%");
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt",
- "formatCode", "0.000%");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt"_ostr,
+ "formatCode"_ostr, "0.000%");
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:numFmt",
- "formatCode", "0.000%");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:numFmt"_ostr,
+ "formatCode"_ostr, "0.000%");
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:numFmt",
- "formatCode", "0.000%");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:numFmt"_ostr,
+ "formatCode"_ostr, "0.000%");
}
-void Chart2ExportTest2::testTdf115012()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf115012)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf115012.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf115012.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs"_ostr, "val"_ostr, "zero");
}
-void Chart2ExportTest2::testTdf134118()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134118)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf134118.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf134118.xlsx");
+
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// workaround: use leave-gap instead of zero to show the original line chart
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs", "val", "gap");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs"_ostr, "val"_ostr, "gap");
}
-void Chart2ExportTest2::testTdf123206_customLabelText()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123206_customLabelText)
{
- load(u"/chart2/qa/extras/data/docx/", "tdf123206.docx");
+ loadFromFile(u"docx/tdf123206.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ // FIXME: validation error in OOXML export: Errors: 2
+ skipValidation();
+
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
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",
+ "c:rich/a:p/a:r/a:t"_ostr,
"kiscica");
}
-void Chart2ExportTest2::testCustomLabelText()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomLabelText)
{
- load(u"/chart2/qa/extras/data/docx/", "testCustomlabeltext.docx");
+ loadFromFile(u"docx/testCustomlabeltext.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ // FIXME: validation error in OOXML export: Errors: 3
+ skipValidation();
+
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[1]/c:idx", "val",
- "2");
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[1]/c:idx"_ostr,
+ "val"_ostr, "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",
+ "c:rich/a:p/a:r[1]/a:t"_ostr,
"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",
+ "c:rich/a:p/a:r[3]/a:t"_ostr,
"CustomLabel 1");
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[2]/c:idx", "val",
- "3");
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[2]/c:idx"_ostr,
+ "val"_ostr, "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",
+ "c:rich/a:p/a:r[1]/a:t"_ostr,
"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",
+ "c:rich/a:p/a:r[3]/a:t"_ostr,
"CustomLabel 2");
}
-void Chart2ExportTest2::testDeletedLegendEntries()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDeletedLegendEntries)
{
- load(u"/chart2/qa/extras/data/xlsx/", "deleted_legend_entry.xlsx");
+ loadFromFile(u"xlsx/deleted_legend_entry.xlsx");
{
- reload("Calc Office Open XML");
+ saveAndReload("Calc Office Open XML");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 1));
@@ -987,9 +924,9 @@ void Chart2ExportTest2::testDeletedLegendEntries()
CPPUNIT_ASSERT(!bShowLegendEntry);
}
- load(u"/chart2/qa/extras/data/xlsx/", "deleted_legend_entry2.xlsx");
+ loadFromFile(u"xlsx/deleted_legend_entry2.xlsx");
{
- reload("Calc Office Open XML");
+ saveAndReload("Calc Office Open XML");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -1011,21 +948,22 @@ void Chart2ExportTest2::testDeletedLegendEntries()
}
}
-void Chart2ExportTest2::testTdf60316()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf60316)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf60316.pptx");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
+ loadFromFile(u"pptx/tdf60316.pptx");
+ save("Impress MS PowerPoint 2007 XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// Without the fix in place, the shape would have had a solidFill background
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:noFill", 1);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:solidFill", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:noFill"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:solidFill"_ostr, 0);
}
-void Chart2ExportTest2::testTdf130225()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf130225)
{
- load(u"/chart2/qa/extras/data/docx/", "piechart_deleted_legend_entry.docx");
- reload("Office Open XML Text");
+ loadFromFile(u"docx/piechart_deleted_legend_entry.docx");
+ saveAndReload("Office Open XML Text");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -1037,38 +975,41 @@ void Chart2ExportTest2::testTdf130225()
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), deletedLegendEntriesSeq[0]);
}
-void Chart2ExportTest2::testTdf59857()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf59857)
{
- load(u"/chart2/qa/extras/data/ods/", "tdf59857.ods");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"ods/tdf59857.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:floor/c:spPr/a:ln/a:noFill"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:floor/c:spPr/a:solidFill/a:srgbClr"_ostr,
+ "val"_ostr, "cccccc");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:backWall/c:spPr/a:ln/a:noFill"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:backWall/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr,
+ "val"_ostr, "b3b3b3");
}
-void Chart2ExportTest2::testTdf126076()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf126076)
{
- load(u"/chart2/qa/extras/data/xlsx/", "auto_marker_excel10.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/auto_marker_excel10.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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);
+ "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:marker/c:symbol[@val='square']"_ostr,
+ 0);
// instead of skipping markers
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:marker", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:marker"_ostr, 0);
}
-void Chart2ExportTest2::testTdf75330()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf75330)
{
- load(u"/chart2/qa/extras/data/ods/", "legend_overlay.ods");
- reload("calc8");
+ loadFromFile(u"ods/legend_overlay.ods");
+ saveAndReload("calc8");
{
uno::Reference<chart2::XChartDocument> xChart2Doc = getChartDocFromSheet(0, mxComponent);
uno::Reference<chart::XChartDocument> xChartDoc(xChart2Doc, uno::UNO_QUERY);
@@ -1078,7 +1019,7 @@ void Chart2ExportTest2::testTdf75330()
CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Overlay") >>= bOverlay);
CPPUNIT_ASSERT(bOverlay);
}
- reload("Calc Office Open XML");
+ saveAndReload("Calc Office Open XML");
{
uno::Reference<chart2::XChartDocument> xChart2Doc = getChartDocFromSheet(0, mxComponent);
uno::Reference<chart::XChartDocument> xChartDoc(xChart2Doc, uno::UNO_QUERY);
@@ -1090,28 +1031,26 @@ void Chart2ExportTest2::testTdf75330()
}
}
-void Chart2ExportTest2::testTdf127792()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf127792)
{
- load(u"/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");
- }
+ loadFromFile(u"docx/MSO_axis_position.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr, "val"_ostr,
+ "between");
+
+ pXmlDoc = parseExport("word/charts/chart2.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr, "val"_ostr,
+ "midCat");
}
-void Chart2ExportTest2::testTdf131979()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf131979)
{
- load(u"/chart2/qa/extras/data/ods/", "tdf131115.ods");
+ loadFromFile(u"ods/tdf131115.ods");
{
- reload("calc8");
+ saveAndReload("calc8");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -1125,9 +1064,9 @@ void Chart2ExportTest2::testTdf131979()
!blinknumberformattosource);
}
- load(u"/chart2/qa/extras/data/ods/", "tdf131979.ods");
+ loadFromFile(u"ods/tdf131979.ods");
{
- reload("calc8");
+ saveAndReload("calc8");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -1142,87 +1081,108 @@ void Chart2ExportTest2::testTdf131979()
}
}
-void Chart2ExportTest2::testTdf132076()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132076)
{
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
{
- load(u"/chart2/qa/extras/data/ods/", "tdf132076.ods");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"ods/tdf132076.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:numFmt"_ostr,
+ "formatCode"_ostr, "dd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:numFmt"_ostr,
+ "sourceLinked"_ostr, "0");
}
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf132076.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf132076.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:numFmt"_ostr,
+ "formatCode"_ostr, "dd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:numFmt"_ostr,
+ "sourceLinked"_ostr, "0");
}
}
-void Chart2ExportTest2::testTdf125812()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf125812)
{
- load(u"/chart2/qa/extras/data/odp/", "ellipticalGradientFill.odp");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
+ loadFromFile(u"odp/ellipticalGradientFill.odp");
+ save("Impress MS PowerPoint 2007 XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.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 Chart2ExportTest2::testTdf133190()
-{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf133190_tdf133191.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path"_ostr,
+ "path"_ostr, "circle");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect"_ostr,
+ "l"_ostr, "50000");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect"_ostr,
+ "t"_ostr, "49000");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect"_ostr,
+ "r"_ostr, "50000");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect"_ostr,
+ "b"_ostr, "51000");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133190)
+{
+ loadFromFile(u"xlsx/tdf133190_tdf133191.xlsx");
+
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:txPr/a:bodyPr"_ostr,
+ "wrap"_ostr, "none");
assertXPath(
pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:txPr/a:bodyPr",
- "wrap", "square");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:txPr/a:bodyPr"_ostr,
+ "wrap"_ostr, "square");
}
-void Chart2ExportTest2::testTdf133191()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133191)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf133190_tdf133191.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf133190_tdf133191.xlsx");
+
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:txPr/a:bodyPr"_ostr,
+ "rot"_ostr, "-4500000");
}
-void Chart2ExportTest2::testTdf132594()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132594)
{
- load(u"/chart2/qa/extras/data/xlsx/", "chart_pie2007.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/chart_pie2007.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:cat", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:cat"_ostr, 1);
}
-void Chart2ExportTest2::testTdf134255()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134255)
{
- load(u"/chart2/qa/extras/data/docx/", "tdf134255.docx");
+ loadFromFile(u"docx/tdf134255.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1234,18 +1194,22 @@ void Chart2ExportTest2::testTdf134255()
CPPUNIT_ASSERT((xPropSet->getPropertyValue("TextWordWrap") >>= bWrap));
CPPUNIT_ASSERT(bWrap);
+ // FIXME: validation error in OOXML export: Errors: 11
+ skipValidation();
+
// export test
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:txPr/a:bodyPr", "wrap",
- "square");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:txPr/a:bodyPr"_ostr,
+ "wrap"_ostr, "square");
}
-void Chart2ExportTest2::testTdf134977()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134977)
{
- load(u"/chart2/qa/extras/data/xlsx/", "custom_data_label.xlsx");
+ loadFromFile(u"xlsx/custom_data_label.xlsx");
//import test
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
@@ -1260,41 +1224,51 @@ void Chart2ExportTest2::testTdf134977()
aFields[0]->getPropertyValue("CharHeight") >>= nFontSize;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(9), nFontSize);
+ // FIXME: validation error in OOXML export: Errors: 2
+ skipValidation();
+
//export test
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:tx/c:rich/a:p/"
- "a:r/a:rPr",
- "sz", "900");
+ "a:r/a:rPr"_ostr,
+ "sz"_ostr, "900");
}
-void Chart2ExportTest2::testTdf123647()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123647)
{
- load(u"/chart2/qa/extras/data/xlsx/", "empty_chart.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/empty_chart.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart"_ostr, 1);
}
-void Chart2ExportTest2::testTdf136267()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf136267)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf136267.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf136267.xlsx");
+
+ // FIXME: validation error in OOXML export: Errors: 2
+ skipValidation();
+
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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",
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:cat/c:strRef/c:strCache/c:pt/c:v"_ostr,
"John");
}
-void Chart2ExportTest2::testDataLabelPlacementPieChart()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataLabelPlacementPieChart)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf134978.xlsx");
- reload("calc8");
- uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, mxComponent),
+ loadFromFile(u"xlsx/tdf134978.xlsx");
+ saveAndReload("calc8");
+ uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
UNO_QUERY_THROW);
// test the placement of the manually positioned label
Reference<beans::XPropertySet> xDataPointPropSet(
@@ -1306,37 +1280,32 @@ void Chart2ExportTest2::testDataLabelPlacementPieChart()
CPPUNIT_ASSERT_EQUAL(chart::DataLabelPlacement::OUTSIDE, nLabelPlacement);
}
-void Chart2ExportTest2::testTdf137917()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf137917)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf137917.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
- CPPUNIT_ASSERT(pXmlDoc);
+ loadFromFile(u"xlsx/tdf137917.xlsx");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:baseTimeUnit", "val", "days");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:majorUnit", "val", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:majorTimeUnit", "val",
- "months");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:minorUnit", "val", "7");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:minorTimeUnit", "val",
- "days");
-}
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
-void Chart2ExportTest2::testTdf138204()
-{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf138204.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- // Check the first data label field type
- assertXPath(
- pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLbl/c:tx/c:rich/a:p/a:fld",
- "type", "CELLRANGE");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:baseTimeUnit"_ostr,
+ "val"_ostr, "days");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:majorUnit"_ostr, "val"_ostr,
+ "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:majorTimeUnit"_ostr,
+ "val"_ostr, "months");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:minorUnit"_ostr, "val"_ostr,
+ "7");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:minorTimeUnit"_ostr,
+ "val"_ostr, "days");
+}
- assertXPath(
- pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:dLbl/c:tx/c:rich/a:p/a:fld",
- "type", "CELLRANGE");
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138204)
+{
+ loadFromFile(u"xlsx/tdf138204.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1387,11 +1356,29 @@ void Chart2ExportTest2::testTdf138204()
CPPUNIT_ASSERT_EQUAL(aTestEntry.aCellRange, aFields[0]->getCellRange());
CPPUNIT_ASSERT_EQUAL(aTestEntry.aString, aFields[0]->getString());
}
+
+ // FIXME: validation error in OOXML export: Errors: 2
+ skipValidation();
+
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Check the first data label field type
+ assertXPath(
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLbl/c:tx/c:rich/a:p/a:fld"_ostr,
+ "type"_ostr, "CELLRANGE");
+
+ assertXPath(
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:dLbl/c:tx/c:rich/a:p/a:fld"_ostr,
+ "type"_ostr, "CELLRANGE");
}
-void Chart2ExportTest2::testTdf138181()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138181)
{
- load(u"/chart2/qa/extras/data/xlsx/", "piechart_deleted_legendentry.xlsx");
+ loadFromFile(u"xlsx/piechart_deleted_legendentry.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
@@ -1415,10 +1402,10 @@ void Chart2ExportTest2::testTdf138181()
CPPUNIT_ASSERT(xLegendEntry3.is());
}
-void Chart2ExportTest2::testCustomShapeText()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomShapeText)
{
- load(u"/chart2/qa/extras/data/ods/", "tdf72776.ods");
- reload("calc8");
+ loadFromFile(u"ods/tdf72776.ods");
+ saveAndReload("calc8");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
// test that the text of custom shape exists inside the chart
@@ -1431,10 +1418,10 @@ void Chart2ExportTest2::testCustomShapeText()
CPPUNIT_ASSERT(!xRange->getString().isEmpty());
}
-void Chart2ExportTest2::testuserShapesXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf128621.xlsx");
- reload("Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf128621.xlsx");
+ saveAndReload("Calc Office Open XML");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1459,10 +1446,10 @@ void Chart2ExportTest2::testuserShapesXLSX()
CPPUNIT_ASSERT(!xRange->getString().isEmpty());
}
-void Chart2ExportTest2::testuserShapesDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "tdf143130.docx");
- reload("Office Open XML Text");
+ loadFromFile(u"docx/tdf143130.docx");
+ saveAndReload("Office Open XML Text");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1487,10 +1474,10 @@ void Chart2ExportTest2::testuserShapesDOCX()
CPPUNIT_ASSERT(!xRange->getString().isEmpty());
}
-void Chart2ExportTest2::testGraphicBlipXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testGraphicBlipXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf143127.xlsx");
- reload("Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf143127.xlsx");
+ saveAndReload("Calc Office Open XML");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1515,26 +1502,31 @@ void Chart2ExportTest2::testGraphicBlipXLSX()
CPPUNIT_ASSERT_GREATER(size_t(0), nDataSize);
}
-void Chart2ExportTest2::testNameRangeXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNameRangeXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "chart_with_name_range.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/chart_with_name_range.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// test the syntax of local range name on the local sheet.
assertXPathContent(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:cat/c:strRef/c:f",
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:cat/c:strRef/c:f"_ostr,
"Sheet1!local_name_range");
// test the syntax of a global range name.
assertXPathContent(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:val/c:numRef/c:f",
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:val/c:numRef/c:f"_ostr,
"[0]!series1");
}
-void Chart2ExportTest2::testTdf143942()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf143942)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf143942.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
- CPPUNIT_ASSERT(pXmlDoc);
+ loadFromFile(u"xlsx/tdf143942.xlsx");
+
+ Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
+ CPPUNIT_ASSERT(xChartDoc.is());
+
+ uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
+ CPPUNIT_ASSERT(xDataSeries.is());
constexpr size_t nLabels = 4;
OUString aCellRange = "Sheet1!$A$2:$A$5";
@@ -1545,26 +1537,48 @@ void Chart2ExportTest2::testTdf143942()
"Test4",
};
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:extLst/c:ext",
- "uri", "{02D57815-91ED-43cb-92C2-25804820EDAC}");
+ uno::Reference<beans::XPropertySet> xPropertySet;
+ uno::Sequence<uno::Reference<chart2::XDataPointCustomLabelField>> aFields;
+ for (size_t i = 0; i < nLabels; ++i)
+ {
+ xPropertySet.set(xDataSeries->getDataPointByIndex(i), uno::UNO_SET_THROW);
+ xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aFields.getLength());
+ CPPUNIT_ASSERT_EQUAL(
+ chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLRANGE,
+ aFields[0]->getFieldType());
+ CPPUNIT_ASSERT_EQUAL(aCellRange, aFields[0]->getCellRange());
+ CPPUNIT_ASSERT_EQUAL(aLabels[i], aFields[0]->getString());
+ }
+
+ // FIXME: validation error in OOXML export: Errors: 4
+ skipValidation();
+
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:extLst/c:ext"_ostr,
+ "uri"_ostr, "{02D57815-91ED-43cb-92C2-25804820EDAC}");
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:extLst/c:ext/"
- "c15:datalabelsRange/c15:dlblRangeCache/c:ptCount",
- "val", "4");
+ "c15:datalabelsRange/c15:dlblRangeCache/c:ptCount"_ostr,
+ "val"_ostr, "4");
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:extLst/c:ext/"
- "c15:datalabelsRange/c15:f",
+ "c15:datalabelsRange/c15:f"_ostr,
aCellRange);
for (size_t i = 0; i < nLabels; ++i)
{
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dLbls/c:dLbl["
+ OString::number(i + 1) + "]/c:tx/c:rich/a:p/a:fld",
- "type", "CELLRANGE");
+ "type"_ostr, "CELLRANGE");
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dLbls/c:dLbl["
+ OString::number(i + 1) + "]/c:extLst/c:ext/c15:showDataLabelsRange",
- "val", "1");
+ "val"_ostr, "1");
// Check if the actual label is stored under c15:datalabelsRange
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:extLst/"
@@ -1572,31 +1586,17 @@ void Chart2ExportTest2::testTdf143942()
+ OString::number(i + 1) + "]/c:v",
aLabels[i]);
}
-
- Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
- CPPUNIT_ASSERT(xChartDoc.is());
- uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
- CPPUNIT_ASSERT(xDataSeries.is());
-
- uno::Reference<beans::XPropertySet> xPropertySet;
- uno::Sequence<uno::Reference<chart2::XDataPointCustomLabelField>> aFields;
- for (size_t i = 0; i < nLabels; ++i)
- {
- xPropertySet.set(xDataSeries->getDataPointByIndex(i), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aFields.getLength());
- CPPUNIT_ASSERT_EQUAL(
- chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLRANGE,
- aFields[0]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(aCellRange, aFields[0]->getCellRange());
- CPPUNIT_ASSERT_EQUAL(aLabels[i], aFields[0]->getString());
- }
}
-void Chart2ExportTest2::testDateCategoriesPPTX()
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDateCategoriesPPTX)
{
- load(u"/chart2/qa/extras/data/pptx/", "bnc889755.pptx");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress Office Open XML");
+ loadFromFile(u"pptx/bnc889755.pptx");
+
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
+ save("Impress Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
constexpr size_t nCats = 16;
@@ -1605,15 +1605,15 @@ void Chart2ExportTest2::testDateCategoriesPPTX()
41426, 41456, 41487, 41518, 41548, 41579, 41609, 41640,
};
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat"_ostr);
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:numRef/"
- "c:numCache/c:formatCode",
+ "c:numCache/c:formatCode"_ostr,
"mmm\\-yy");
assertXPath(
pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:numRef/c:numCache/c:ptCount",
- "val", OUString::number(nCats));
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:numRef/c:numCache/c:ptCount"_ostr,
+ "val"_ostr, OUString::number(nCats));
for (size_t i = 0; i < nCats; ++i)
{
@@ -1621,7 +1621,7 @@ void Chart2ExportTest2::testDateCategoriesPPTX()
pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:numRef/c:numCache/c:pt["
+ OString::number(i + 1) + "]",
- "idx", OUString::number(i));
+ "idx"_ostr, OUString::number(i));
assertXPathContent(
pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:numRef/c:numCache/c:pt["
@@ -1630,7 +1630,55 @@ void Chart2ExportTest2::testDateCategoriesPPTX()
}
}
-CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest2);
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataTableImportExport)
+{
+ loadFromFile(u"xlsx/ChartDataTable.xlsx");
+ {
+ uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
+ CPPUNIT_ASSERT(xChartDoc.is());
+ auto xDiagram = xChartDoc->getFirstDiagram();
+ CPPUNIT_ASSERT(xDiagram.is());
+ auto xDataTable = xDiagram->getDataTable();
+ CPPUNIT_ASSERT(xDataTable.is());
+ uno::Reference<beans::XPropertySet> xPropertySet(xDataTable, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPropertySet.is());
+ bool bHBorder;
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue("HBorder") >>= bHBorder);
+ CPPUNIT_ASSERT_EQUAL(true, bHBorder);
+ bool bVBorder;
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue("VBorder") >>= bVBorder);
+ CPPUNIT_ASSERT_EQUAL(true, bVBorder);
+ bool bOutline;
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Outline") >>= bOutline);
+ CPPUNIT_ASSERT_EQUAL(false, bOutline);
+ bool bKeys;
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Keys") >>= bKeys);
+ CPPUNIT_ASSERT_EQUAL(false, bKeys);
+ }
+ saveAndReload("calc8");
+ {
+ uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
+ CPPUNIT_ASSERT(xChartDoc.is());
+ auto xDiagram = xChartDoc->getFirstDiagram();
+ CPPUNIT_ASSERT(xDiagram.is());
+ auto xDataTable = xDiagram->getDataTable();
+ CPPUNIT_ASSERT(xDataTable.is());
+ uno::Reference<beans::XPropertySet> xPropertySet(xDataTable, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPropertySet.is());
+ bool bHBorder;
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue("HBorder") >>= bHBorder);
+ CPPUNIT_ASSERT_EQUAL(true, bHBorder);
+ bool bVBorder;
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue("VBorder") >>= bVBorder);
+ CPPUNIT_ASSERT_EQUAL(true, bVBorder);
+ bool bOutline;
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Outline") >>= bOutline);
+ CPPUNIT_ASSERT_EQUAL(false, bOutline);
+ bool bKeys;
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Keys") >>= bKeys);
+ CPPUNIT_ASSERT_EQUAL(false, bKeys);
+ }
+}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/chart2export3.cxx b/chart2/qa/extras/chart2export3.cxx
new file mode 100644
index 000000000000..df70cd603d89
--- /dev/null
+++ b/chart2/qa/extras/chart2export3.cxx
@@ -0,0 +1,945 @@
+/* -*- 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 <com/sun/star/chart2/DataPointLabel.hpp>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/awt/FontUnderline.hpp>
+
+using uno::Reference;
+using beans::XPropertySet;
+
+class Chart2ExportTest3 : public ChartTest
+{
+public:
+ Chart2ExportTest3() : ChartTest("/chart2/qa/extras/data/") {}
+};
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf108107)
+{
+ loadFromFile(u"xlsx/tdf108107.xlsx");
+
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:idx"_ostr, "val"_ostr, "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"_ostr, "b"_ostr, "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"_ostr, "sz"_ostr, "2000");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf114139)
+{
+ loadFromFile(u"xlsx/tdf114139.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart"_ostr, 1);
+ //no fill
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:solidFill"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf64224)
+{
+ loadFromFile(u"ods/tdf64224.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ //no fill
+ assertXPath(pXmlDoc, "/c:chartSpace/c:spPr/a:noFill"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:spPr/a:solidFill"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillDOCX)
+{
+ loadFromFile(u"docx/testChartTitlePropertiesColorFill.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillDOCX)
+{
+ loadFromFile(u"docx/testChartTitlePropertiesGradientFill.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr"_ostr, "val"_ostr, "cccccc");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr"_ostr, "val"_ostr, "666666");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillDOCX)
+{
+ loadFromFile(u"docx/testChartTitlePropertiesBitmapFill.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip"_ostr, "embed"_ostr, "rId1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
+}
+
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyDOCX)
+{
+ // Test color gradient (two color) with gradient transparency
+ loadFromFile(u"docx/testColorGradientWithTransparency.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.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"_ostr, "val"_ostr, "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"_ostr, "val"_ostr, "90000");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyODS)
+{
+ // Test color gradient (two color) with simple transparency
+ loadFromFile(u"ods/testColorGradientWithTransparency.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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"_ostr, "val"_ostr, "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"_ostr, "val"_ostr, "60000");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientStopXLSX)
+{
+ // Test color gradient (two color) stop of the first color
+ loadFromFile(u"xlsx/tdf128619.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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]"_ostr, "pos"_ostr, "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]"_ostr, "pos"_ostr, "100000");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRadialColorGradientDOCX)
+{
+ loadFromFile(u"docx/tdf128794.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ 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"_ostr, 0);
+ // Test the linear gradient angle
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:lin"_ostr, "ang"_ostr, "13500000");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropDOCX)
+{
+ loadFromFile(u"docx/testBarChartDataPointPropDOCX.docx");
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors"_ostr, "val"_ostr, "0");
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:idx"_ostr, "val"_ostr, "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"_ostr, "val"_ostr, "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"_ostr, "val"_ostr, "c7d5ed");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "70ad47");
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:idx"_ostr, "val"_ostr, "2");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "000000");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFdo83058dlblPos)
+{
+ loadFromFile(u"docx/fdo83058_dlblPos.docx");
+
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[2]/c:dLblPos"_ostr, "val"_ostr, "outEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[3]/c:dLblPos"_ostr, "val"_ostr, "outEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[4]/c:dLblPos"_ostr, "val"_ostr, "outEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[5]/c:dLblPos"_ostr, "val"_ostr, "outEnd");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDelXLSX)
+{
+ loadFromFile(u"xlsx/autotitledel_2007.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted"_ostr, "val"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDispBlanksAsXLSX)
+{
+ loadFromFile(u"xlsx/dispBlanksAs_2007.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs"_ostr, "val"_ostr, "gap");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMarkerColorXLSX)
+{
+ loadFromFile(u"xlsx/markerColor.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:marker/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "92d050");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRoundedCornersXLSX)
+{
+ loadFromFile(u"xlsx/markerColor.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:roundedCorners"_ostr, "val"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisNumberFormatXLSX)
+{
+ loadFromFile(u"ods/axis_number_format.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx"_ostr, 2);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:numFmt"_ostr, "formatCode"_ostr, "0.00E+000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:numFmt"_ostr, "sourceLinked"_ostr, "0");
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:numFmt"_ostr, "formatCode"_ostr, "[$$-409]#,##0;\\-[$$-409]#,##0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:numFmt"_ostr, "sourceLinked"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataPointLabelNumberFormatXLSX)
+{
+ // FIXME: validation error in OOXML export: Errors: 1
+ skipValidation();
+
+ loadFromFile(u"ods/tdf123774.ods");
+ {
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt"_ostr, "formatCode"_ostr, "[$-40E]0.00%");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt"_ostr, "sourceLinked"_ostr, "0");
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt"_ostr, "formatCode"_ostr, "[$-40E]0.00%");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt"_ostr, "sourceLinked"_ostr, "0");
+ }
+
+ loadFromFile(u"xlsx/tdf130986.xlsx");
+ {
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:idx"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:numFmt"_ostr, "formatCode"_ostr, "0.00E+00");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:numFmt"_ostr, "sourceLinked"_ostr, "0");
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelDefaultValuesXLSX)
+{
+ loadFromFile(u"xlsx/data_label.xlsx");
+ Reference< chart2::XChartDocument> xDoc = getChartDocFromSheet(0, mxComponent);
+ Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xDoc, 0);
+ Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY_THROW);
+ uno::Any aAny = xPropSet->getPropertyValue("Label");
+ chart2::DataPointLabel aLabel;
+ CPPUNIT_ASSERT(aAny >>= aLabel);
+ CPPUNIT_ASSERT(aLabel.ShowNumber);
+
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:showVal"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLblPos"_ostr, "val"_ostr, "outEnd");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelFillColor)
+{
+ loadFromFile(u"xlsx/data_labels_fill_color.xlsx");
+ Reference< chart2::XChartDocument> xDoc = getChartDocFromSheet(0, mxComponent);
+ Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xDoc, 0);
+ Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY_THROW);
+ uno::Any aAny = xPropSet->getPropertyValue("LabelFillColor");
+ sal_Int32 nLabelFillColor;
+ CPPUNIT_ASSERT(aAny >>= nLabelFillColor);
+
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "F79646");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleOverlayXLSX)
+{
+ loadFromFile(u"xlsx/chart_title.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:overlay"_ostr, "val"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testInvertIfNegativeXLSX)
+{
+ loadFromFile(u"xlsx/bar_chart_simple.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:invertIfNegative"_ostr, "val"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBubble3DXLSX)
+{
+ loadFromFile(u"xlsx/bubble_chart_simple.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[1]/c:bubble3D"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[2]/c:bubble3D"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[3]/c:bubble3D"_ostr, "val"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testNoMarkerXLSX)
+{
+ loadFromFile(u"xlsx/no_marker.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:marker/c:symbol"_ostr, "val"_ostr, "none");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:marker/c:symbol"_ostr, "val"_ostr, "none");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:marker"_ostr, "val"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleManualLayoutXLSX)
+{
+ loadFromFile(u"xlsx/title_manual_layout.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:layoutTarget"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:xMode"_ostr, "val"_ostr, "edge");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:yMode"_ostr, "val"_ostr, "edge");
+
+ OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:x"_ostr, "val"_ostr);
+ double nX = aXVal.toDouble();
+ CPPUNIT_ASSERT(nX > 0);
+ CPPUNIT_ASSERT(nX < 1);
+
+ OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:y"_ostr, "val"_ostr);
+ double nY = aYVal.toDouble();
+ CPPUNIT_ASSERT(nY > 0);
+ CPPUNIT_ASSERT(nY < 1);
+ CPPUNIT_ASSERT(nX != nY);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:bodyPr"_ostr, "rot"_ostr, "1200000");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotAreaManualLayoutXLSX)
+{
+ loadFromFile(u"xlsx/plot_area_manual_layout.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget"_ostr, "val"_ostr, "inner");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:xMode"_ostr, "val"_ostr, "edge");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:yMode"_ostr, "val"_ostr, "edge");
+
+ OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:x"_ostr, "val"_ostr);
+ double nX = aXVal.toDouble();
+ CPPUNIT_ASSERT(nX > 0);
+ CPPUNIT_ASSERT(nX < 1);
+
+ OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:y"_ostr, "val"_ostr);
+ double nY = aYVal.toDouble();
+ CPPUNIT_ASSERT(nY > 0);
+ CPPUNIT_ASSERT(nY < 1);
+ CPPUNIT_ASSERT(nX != nY);
+
+ OUString aWVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:w"_ostr, "val"_ostr);
+ double nW = aWVal.toDouble();
+ CPPUNIT_ASSERT(nW > 0);
+ CPPUNIT_ASSERT(nW < 1);
+
+ OUString aHVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:h"_ostr, "val"_ostr);
+ double nH = aHVal.toDouble();
+ CPPUNIT_ASSERT(nH > 0);
+ CPPUNIT_ASSERT(nH < 1);
+ CPPUNIT_ASSERT(nH != nW);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testLegendManualLayoutXLSX)
+{
+ loadFromFile(u"xlsx/legend_manual_layout.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:xMode"_ostr, "val"_ostr, "edge");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:yMode"_ostr, "val"_ostr, "edge");
+
+ OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:x"_ostr, "val"_ostr);
+ double nX = aXVal.toDouble();
+ CPPUNIT_ASSERT(nX > 0);
+ CPPUNIT_ASSERT(nX < 1);
+
+ OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:y"_ostr, "val"_ostr);
+ double nY = aYVal.toDouble();
+ CPPUNIT_ASSERT(nY > 0);
+ CPPUNIT_ASSERT(nY < 1);
+ CPPUNIT_ASSERT(nX != nY);
+
+ OUString aWVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:w"_ostr, "val"_ostr);
+ double nW = aWVal.toDouble();
+ CPPUNIT_ASSERT(nW > 0);
+ CPPUNIT_ASSERT(nW < 1);
+
+ OUString aHVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:h"_ostr, "val"_ostr);
+ double nH = aHVal.toDouble();
+ CPPUNIT_ASSERT(nH > 0);
+ CPPUNIT_ASSERT(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"_ostr, "sz"_ostr, "900");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartSubTitle)
+{
+ loadFromFile(u"ods/testChartSubTitle.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ // test properties of subtitle
+ // paragraph props
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, "1100");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, "1");
+ // run props
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "sz"_ostr, "1100");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "b"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "00a933");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin"_ostr, "typeface"_ostr, "Times New Roman");
+ // text
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t"_ostr, "It is a Subtitle");
+ // shape props
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "b2b2b2");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartMainWithSubTitle)
+{
+ loadFromFile(u"ods/testChartMainWithSubTitle.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ // test properties of title
+ // paragraph props
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, "sz"_ostr, "1300");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, "b"_ostr, "0");
+ // run props
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr"_ostr, "sz"_ostr, "1300");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr"_ostr, "b"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr"_ostr, "i"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "f10d0c");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr/a:latin"_ostr, "typeface"_ostr, "Arial");
+ // text
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:t"_ostr, "It is a Maintitle");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r/a:t"_ostr, "It is a Subtitle");
+ // shape props
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "81d41a");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDeleted)
+{
+ loadFromFile(u"xlsx/testAutoTitleDeleted.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted"_ostr, "val"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillXLSX)
+{
+ loadFromFile(u"xlsx/testChartTitlePropertiesColorFill.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillXLSX)
+{
+ loadFromFile(u"xlsx/testChartTitlePropertiesGradientFill.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr"_ostr, "val"_ostr, "cccccc");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr"_ostr, "val"_ostr, "666666");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillXLSX)
+{
+ loadFromFile(u"xlsx/testChartTitlePropertiesBitmapFill.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip"_ostr, "embed"_ostr, "rId1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropXLSX)
+{
+ loadFromFile(u"xlsx/testBarChartDataPointPropXLSX.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors"_ostr, "val"_ostr, "0");
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:idx"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "000000");
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:idx"_ostr, "val"_ostr, "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"_ostr, "val"_ostr, "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"_ostr, "val"_ostr, "c7d5ed");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "70ad47");
+}
+
+namespace {
+
+void checkGapWidth(Reference<beans::XPropertySet> 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<beans::XPropertySet> 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);
+
+}
+
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataseriesOverlapStackedChartXLSX)
+{
+ loadFromFile(u"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);
+
+ saveAndReload("Calc Office Open XML");
+
+ xChartDoc = getChartDocFromSheet( 0, mxComponent );
+ checkSheetForGapWidthAndOverlap(xChartDoc, 100, 100);
+
+ xChartDoc = getChartDocFromSheet( 1, mxComponent );
+ checkSheetForGapWidthAndOverlap(xChartDoc, 100, 100);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisCharacterPropertiesXLSX)
+{
+ loadFromFile(u"xlsx/axis_character_properties.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, "1000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "i"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "u"_ostr, "sng");
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, "900");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "strike"_ostr, "sngStrike");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleCharacterPropertiesXLSX)
+{
+ loadFromFile(u"xlsx/title_character_properties.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, "1300");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, "0");
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "sz"_ostr, "2400");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "b"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotVisOnlyXLSX)
+{
+ loadFromFile(u"xlsx/hidden_cells.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotVisOnly"_ostr, "val"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartVaryColorsXLSX)
+{
+ loadFromFile(u"xlsx/tdf90876.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors"_ostr, "val"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf96161)
+{
+ loadFromFile(u"ods/tdf96161.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:varyColors"_ostr, "val"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTableOnPage3)
+{
+ loadFromFile(u"docx/TableOnPage3.docx");
+
+ // FIXME: validation error in OOXML export: Errors: 2
+ skipValidation();
+
+ saveAndReload("Office Open XML Text");
+
+ Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xChartDoc.is());
+ uno::Reference< chart::XChartDataArray > xDataArray(xChartDoc->getDataProvider(), UNO_QUERY_THROW);
+ Sequence<OUString> aColumnDesc = xDataArray->getColumnDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("There must be 4 columns and descriptions", static_cast<sal_Int32>(4), aColumnDesc.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("If oversubscription relative to allowance increases at the same average rate B15-B17"), aColumnDesc[0]);
+ CPPUNIT_ASSERT_EQUAL(OUString("Known requirements"), aColumnDesc[1]);
+ CPPUNIT_ASSERT_EQUAL(OUString("Allowance"), aColumnDesc[2]);
+ CPPUNIT_ASSERT_EQUAL(OUString("If oversubscription relative to allowance holds steady at average oversubscription level B15-B17"), aColumnDesc[3]);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, tdf137691)
+{
+ // given a doc where the banana negative data formats as ($123) and the pineapple data as $(123)
+ loadFromFile(u"pptx/tdf137691_dataTable.pptx");
+ saveAndReload("Impress MS PowerPoint 2007 XML");
+
+ Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
+
+ Reference< chart2::data::XDataSequence > xDataSeq;
+ xDataSeq.set(getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0));
+ const sal_Int32 nKey_bananas = xDataSeq->getNumberFormatKeyByIndex(-1);
+ // This should not be General format (0), but a defined format (129)
+ CPPUNIT_ASSERT(nKey_bananas);
+
+ xDataSeq.set(getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1));
+ const sal_Int32 nKey_pineapples = xDataSeq->getNumberFormatKeyByIndex(-1);
+ // This should not be General format (0), but a defined format (130)
+ CPPUNIT_ASSERT(nKey_pineapples);
+ CPPUNIT_ASSERT(nKey_pineapples != nKey_bananas);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMultipleAxisXLSX)
+{
+ loadFromFile(u"ods/multiple_axis.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart"_ostr, 2);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart[1]/c:ser"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart[2]/c:ser"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx"_ostr, 4);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:delete[@val='1']"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:axPos[@val='l']"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:axPos[@val='r']"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testSecondaryAxisXLSX)
+{
+ loadFromFile(u"ods/secondary_axis.ods");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart"_ostr, 2);
+ // test there is just those series in the first <lineChart> tag which are attached to the primary axis
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[1]/c:ser"_ostr, 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"_ostr, "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"_ostr, "c");
+ // test there is just those series in the second <lineChart> tag which are attached to the secondary axis
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[2]/c:ser"_ostr, 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"_ostr, "a");
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartSecondaryAxisXLSX)
+{
+ loadFromFile(u"xlsx/testSecondaryAxis.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ // Collect barchart axID on primary Axis
+ OUString XValueIdOf1Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[1]/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueIdOf1Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[1]/c:axId[2]"_ostr, "val"_ostr);
+ // Collect barchart axID on secondary Axis
+ OUString XValueIdOf2Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[2]/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueIdOf2Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[2]/c:axId[2]"_ostr, "val"_ostr);
+ // Check which c:catAx and c:valAx contain the AxisId of barcharts
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[1]/c:axId"_ostr, "val"_ostr, XValueIdOf1Barchart);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId"_ostr, "val"_ostr, YValueIdOf1Barchart);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId"_ostr, "val"_ostr, XValueIdOf2Barchart);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId"_ostr, "val"_ostr, YValueIdOf2Barchart);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf148142)
+{
+ // The document contains a line chart with "Between tick marks" X axis position.
+ loadFromFile(u"ods/tdf148142.ods");
+ Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
+ CPPUNIT_ASSERT(xChartDoc.is());
+ Reference<chart2::XAxis> xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
+ CPPUNIT_ASSERT(xAxis.is());
+ chart2::ScaleData aScaleData = xAxis->getScaleData();
+ CPPUNIT_ASSERT(aScaleData.ShiftedCategoryPosition);
+
+ // Set the X axis position to "On tick marks".
+ aScaleData.ShiftedCategoryPosition = false;
+ xAxis->setScaleData(aScaleData);
+
+ // Check the X axis position after export.
+ saveAndReload("calc8");
+ Reference<chart2::XChartDocument> xChartDoc2 = getChartDocFromSheet(0, mxComponent);
+ CPPUNIT_ASSERT(xChartDoc2.is());
+ Reference<chart2::XAxis> xAxis2 = getAxisFromDoc(xChartDoc2, 0, 0, 0);
+ CPPUNIT_ASSERT(xAxis2.is());
+ chart2::ScaleData aScaleData2 = xAxis2->getScaleData();
+ CPPUNIT_ASSERT(!aScaleData2.ShiftedCategoryPosition);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFormattedChartTitles)
+{
+ loadFromFile(u"xlsx/tdf39052.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Check run level properties [1] - first paragraph
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr"_ostr, "b"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr"_ostr, "sz"_ostr, "1400");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr/a:latin"_ostr, "typeface"_ostr, "Aptos Narrow");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:t"_ostr, "This");
+ // Check run level properties [2]
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:rPr"_ostr, "b"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:rPr"_ostr, "sz"_ostr, "1400");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "595959");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:t"_ostr, " is");
+ // Check run level properties [3]
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[3]/a:rPr"_ostr, "b"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[3]/a:rPr"_ostr, "sz"_ostr, "1400");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[3]/a:rPr"_ostr, "baseline"_ostr, "30000");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[3]/a:t"_ostr, "3");
+ // Check run level properties [4]
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[4]/a:rPr"_ostr, "b"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[4]/a:rPr"_ostr, "sz"_ostr, "1400");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[4]/a:t"_ostr, " a ");
+ // Check run level properties [5]
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr"_ostr, "b"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr"_ostr, "i"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr"_ostr, "sz"_ostr, "2000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr"_ostr, "u"_ostr, "sng");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "4ea72e");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr/a:uFillTx"_ostr, 1);
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:t"_ostr, "custom");
+ // Check run level properties [6]
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[6]/a:rPr"_ostr, "b"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[6]/a:rPr"_ostr, "sz"_ostr, "1400");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[6]/a:t"_ostr, " erte1");
+ // Check run level properties [1] - second paragraph
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:rPr"_ostr, "b"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:rPr"_ostr, "sz"_ostr, "1400");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "595959");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:rPr/a:latin"_ostr, "typeface"_ostr, "Aptos Narrow");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:t"_ostr, "2dfgd ch");
+ // Check run level properties [2]
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[2]/a:rPr"_ostr, "b"_ostr, "1");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[2]/a:t"_ostr, "ar");
+ // Check run level properties [3]
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[3]/a:rPr"_ostr, "b"_ostr, "0");;
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[3]/a:t"_ostr, "t ");
+ // Check run level properties [4]
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[4]/a:rPr"_ostr, "b"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[4]/a:rPr"_ostr, "strike"_ostr, "sngStrike");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[4]/a:t"_ostr, "title");
+}
+
+namespace {
+
+void checkCharacterProps(Reference<beans::XPropertySet> const & xTitleProp)
+{
+ Sequence< uno::Reference< chart2::XFormattedString > > xFormattedSubTitle;
+ CPPUNIT_ASSERT(xTitleProp->getPropertyValue("FormattedStrings") >>= xFormattedSubTitle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(10), xFormattedSubTitle.getLength());
+ // check texts
+ std::vector<OUString> aValues = { "This", " is", "3", " a ", "custom", " erte1\n", "2dfgd ch", "ar", "t ", "title" };
+ for (sal_Int32 i = 0; i < xFormattedSubTitle.getLength(); i++)
+ {
+ const OUString aText = xFormattedSubTitle[i]->getString();
+ CPPUNIT_ASSERT_EQUAL(aValues[i], aText);
+ Reference< beans::XPropertySet > xRunPropSet(xFormattedSubTitle[i], uno::UNO_QUERY);
+ // common props
+ uno::Any aAny = xRunPropSet->getPropertyValue("CharFontName");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Aptos Narrow")), aAny);
+ // unique props
+ if (aText == aValues[0])
+ {
+ aAny = xRunPropSet->getPropertyValue("CharWeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontWeight::BOLD), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharHeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(14.0f), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharColor");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0xff0000)), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharEscapement");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(short(0)), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharEscapementHeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(short(100)), aAny);
+ }
+ else if (aText == aValues[1] || aText == aValues[3] || aText == aValues[5] ||
+ aText == aValues[6] || aText == aValues[8])
+ {
+ aAny = xRunPropSet->getPropertyValue("CharWeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontWeight::NORMAL), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharHeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(14.0f), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharColor");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0x595959)), aAny);
+ }
+ else if (aText == aValues[2])
+ {
+ aAny = xRunPropSet->getPropertyValue("CharWeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontWeight::NORMAL), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharHeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(14.0f), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharColor");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0x595959)), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharEscapement");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(short(30)), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharEscapementHeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(short(58)), aAny);
+ }
+ else if (aText == aValues[4])
+ {
+ aAny = xRunPropSet->getPropertyValue("CharWeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontWeight::NORMAL), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharHeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(20.0f), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharColor");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0x4ea72e)), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharPosture");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontSlant_ITALIC), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharUnderline");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontUnderline::SINGLE), aAny);
+ }
+ else if (aText == aValues[7])
+ {
+ aAny = xRunPropSet->getPropertyValue("CharWeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontWeight::BOLD), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharHeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(14.0f), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharColor");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0x595959)), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharPosture");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontSlant_NONE), aAny);
+ }
+ else // aText == aValues[9]
+ {
+ aAny = xRunPropSet->getPropertyValue("CharWeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontWeight::NORMAL), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharHeight");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(14.0f), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharColor");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0x595959)), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharPosture");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontSlant_ITALIC), aAny);
+ aAny = xRunPropSet->getPropertyValue("CharOverline");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontUnderline::NONE), aAny);
+ }
+ }
+}
+
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testODSFormattedChartTitles)
+{
+ // The document contains a line chart with "Between tick marks" X axis position.
+ loadFromFile(u"ods/tdf39052.ods");
+ // Check formatted strings after export.
+ saveAndReload("calc8");
+
+ Reference<chart2::XChartDocument> xChart2Doc = getChartDocFromSheet(0, mxComponent);
+ CPPUNIT_ASSERT(xChart2Doc.is());
+ Reference< chart::XChartDocument > xChartDoc(xChart2Doc, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xChartDoc.is());
+ uno::Reference< beans::XPropertySet > xTitleProp(xChartDoc->getTitle(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xTitleProp.is());
+
+ checkCharacterProps(xTitleProp);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/qa/extras/chart2geometry.cxx b/chart2/qa/extras/chart2geometry.cxx
index f460ac467621..c554fc950c61 100644
--- a/chart2/qa/extras/chart2geometry.cxx
+++ b/chart2/qa/extras/chart2geometry.cxx
@@ -9,8 +9,6 @@
#include "charttest.hxx"
-#include <test/xmltesttools.hxx>
-
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
@@ -25,12 +23,9 @@ using beans::XPropertySet;
class Chart2GeometryTest : public ChartTest
{
-protected:
- virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override;
-
public:
Chart2GeometryTest()
- : ChartTest()
+ : ChartTest("/chart2/qa/extras/data/")
{
}
// Mostly tests for line and fill properties
@@ -68,12 +63,6 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-void Chart2GeometryTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
-{
- XmlTestTools::registerOOXMLNamespaces(pXmlXPathCtx);
- XmlTestTools::registerODFNamespaces(pXmlXPathCtx);
-}
-
static OString OU2O(std::u16string_view sOUSource)
{
return rtl::OUStringToOString(sOUSource, RTL_TEXTENCODING_UTF8);
@@ -84,13 +73,15 @@ static OString OU2O(std::u16string_view sOUSource)
void Chart2GeometryTest::testTdf135184RoundLineCap()
{
// It tests chart area, data series line and regression-curve line.
- load(u"/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "calc8");
+ loadFromFile(u"xlsx/tdf135184RoundLineCap.xlsx");
+ save("calc8");
+ xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
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");
+ static constexpr OString sStyleStart("/office:document-content/office:automatic-styles"_ostr);
+ static constexpr OString sCap("/style:graphic-properties[@svg:stroke-linecap='round']"_ostr);
+ static constexpr OString sChartStart(
+ "/office:document-content/office:body/office:chart/chart:chart"_ostr);
OString sPredicate;
// chart area
const OUString sOUAreaStyleName = getXPathContent(pXmlDoc, sChartStart + "/@chart:style-name");
@@ -111,13 +102,15 @@ void Chart2GeometryTest::testTdf135184RoundLineCap()
void Chart2GeometryTest::testTdf135184RoundLineCap2()
{
// It tests legend, data series sector and title.
- load(u"/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap2.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "calc8");
+ loadFromFile(u"xlsx/tdf135184RoundLineCap2.xlsx");
+ save("calc8");
+ xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
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");
+ static constexpr OString sStyleStart("/office:document-content/office:automatic-styles"_ostr);
+ static constexpr OString sCap("/style:graphic-properties[@svg:stroke-linecap='round']"_ostr);
+ static constexpr OString sChartStart(
+ "/office:document-content/office:body/office:chart/chart:chart"_ostr);
OString sPredicate;
// legend
const OString sLegend(sChartStart + "/chart:legend");
@@ -140,49 +133,58 @@ void Chart2GeometryTest::testTdf135184RoundLineCap2()
void Chart2GeometryTest::testTdf135184RoundLineCap3()
{
// It tests chart area, data series line and regression-curve line.
- load(u"/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf135184RoundLineCap.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- const OString sDash("/c:spPr/a:ln/a:prstDash");
+ static constexpr OString sDash("/c:spPr/a:ln/a:prstDash"_ostr);
// chart area
- assertXPath(pXmlDoc, "/c:chartSpace" + sDash, "val", "dashDot");
+ assertXPath(pXmlDoc, "/c:chartSpace" + sDash, "val"_ostr, "dashDot");
// data series line
- const OString sStart("/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser");
- assertXPath(pXmlDoc, sStart + sDash, "val", "dash");
+ static constexpr OString sStart("/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser"_ostr);
+ assertXPath(pXmlDoc, sStart + sDash, "val"_ostr, "dash");
// regression-curve (trendline)
- assertXPath(pXmlDoc, sStart + "/c:trendline" + sDash, "val", "sysDot");
+ assertXPath(pXmlDoc, sStart + "/c:trendline" + sDash, "val"_ostr, "sysDot");
}
void Chart2GeometryTest::testTdf135184RoundLineCap4()
{
// It tests legend, data series sector and title.
- load(u"/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap2.xlsx");
- xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ loadFromFile(u"xlsx/tdf135184RoundLineCap2.xlsx");
+ save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ static constexpr OString sChartStart("/c:chartSpace/c:chart"_ostr);
+ static constexpr OString sDash("/c:spPr/a:ln/a:prstDash"_ostr);
+ assertXPath(pXmlDoc, sChartStart + "/c:legend" + sDash, "val"_ostr, "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");
+ assertXPath(pXmlDoc, sSeries + sDash, "val"_ostr, "dash");
+ assertXPath(pXmlDoc, sChartStart + "/c:title" + sDash, "val"_ostr, "dashDot");
}
void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_export()
{
// chart area with color gradient and solid transparency
// Without the patch the transparency was lost in saved pptx file.
- load(u"/chart2/qa/extras/data/odp/", "tdf128345_ChartArea_CG_TS.odp");
+ loadFromFile(u"odp/tdf128345_ChartArea_CG_TS.odp");
+
+ // MCGR: Similar to testTdf128345Legend_CS_TG_axial_export:
+ // Checked that it works with the existing import file,
+ // but will change with ODF MCGR im/export again.
+ // Adapting for now, but need to re-check values after
+ // ODF im/export for MCGR is integrated
// Make sure the chart area has a transparency in gradient stops in saved pptx file.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
+ save("Impress MS PowerPoint 2007 XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- OString sPathStart("//c:chartSpace/c:spPr/a:gradFill");
+ OString sPathStart("//c:chartSpace/c:spPr/a:gradFill"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2);
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val", "30000");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val", "30000");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val"_ostr, "30000");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr, "30000");
}
void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
@@ -192,14 +194,21 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
// Make sure chart area has transparency when pptx document is opened and resaved as odp.
// As of Aug 2020, the import generates a transparency gradient. When import is changed to
// generate solid transparency, the test needs to be adapted.
- load(u"/chart2/qa/extras/data/pptx/", "tdf128345_ChartArea_CG_TS.pptx");
+
+ // MCGR: Similar to testTdf128345Legend_CS_TG_axial_export:
+ // Checked that it works with the existing import file,
+ // but will change with ODF MCGR im/export again. We will need to
+ // update the *.odp input file. Disable unclear values for now and
+ // adapt when ODF im/export for MCGR is integrated
+ loadFromFile(u"pptx/tdf128345_ChartArea_CG_TS.pptx");
// Find transparency gradient name
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
+ save("impress8");
+ xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
CPPUNIT_ASSERT(pXmlDoc);
const OUString sOUChartStyleName = getXPathContent(
pXmlDoc,
- "//office:document-content/office:body/office:chart/chart:chart/@chart:style-name");
+ "//office:document-content/office:body/office:chart/chart:chart/@chart:style-name"_ostr);
const OString sStylePath(
"//office:document-content/office:automatic-styles/style:style[@style:name='"
+ OU2O(sOUChartStyleName) + "']");
@@ -209,7 +218,8 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
= getXPathContent(pXmlDoc, sStylePath + "/style:graphic-properties/@draw:opacity-name");
// Verify the content of the opacity definition
- xmlDocUniquePtr pXmlDoc2 = parseExport("Object 1/styles.xml", "impress8");
+ save("impress8");
+ xmlDocUniquePtr pXmlDoc2 = parseExport("Object 1/styles.xml");
CPPUNIT_ASSERT(pXmlDoc2);
const OString sAttribute("@draw:name='" + OU2O(sOUOpacityName) + "'");
const OString sStart("//office:document-styles/office:styles/draw:opacity[" + sAttribute);
@@ -218,23 +228,24 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
assertXPath(pXmlDoc2, sStart + " and @draw:start='30%']");
assertXPath(pXmlDoc2, sStart + " and @draw:end='30%']");
assertXPath(pXmlDoc2, sStart + " and @draw:angle='30deg']");
- assertXPath(pXmlDoc2, sStart + " and @draw:border='20%']");
+ assertXPath(pXmlDoc2, sStart + " and @draw:border='0%']"); // MCGR: no border anymore 20% -> 0%
}
void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_export()
{
// chart wall with solid color and transparency gradient
// Without the patch the transparency was lost.
- load(u"/chart2/qa/extras/data/odp/", "tdf128345_ChartWall_CS_TG.odp");
+ loadFromFile(u"odp/tdf128345_ChartWall_CS_TG.odp");
// Make sure the chart has a gradient with transparency in gradient stops in saved pptx file.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
+ save("Impress MS PowerPoint 2007 XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- OString sPathStart("//c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill");
+ OString sPathStart("//c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2); //linear
// MS Office has opacity, so 100% transparency is val="0"
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val", "0");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val"_ostr, "0");
// no element for 0% transparent
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", 0);
}
@@ -243,14 +254,15 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_import()
{
// This works on the file, which was exported from file tdf128345_ChartWall_CS_TG.odp to pptx.
// Make sure chart wall has transparency when pptx document is resaved as odp.
- load(u"/chart2/qa/extras/data/pptx/", "tdf128345_ChartWall_CS_TG.pptx");
+ loadFromFile(u"pptx/tdf128345_ChartWall_CS_TG.pptx");
// Find transparency gradient name
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
+ save("impress8");
+ xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
CPPUNIT_ASSERT(pXmlDoc);
const OUString sOUChartStyleName
= getXPathContent(pXmlDoc, "//office:document-content/office:body/office:chart/chart:chart/"
- "chart:plot-area/chart:wall/@chart:style-name");
+ "chart:plot-area/chart:wall/@chart:style-name"_ostr);
const OString sStylePath(
"//office:document-content/office:automatic-styles/style:style[@style:name='"
+ OU2O(sOUChartStyleName) + "']");
@@ -260,7 +272,8 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_import()
= getXPathContent(pXmlDoc, sStylePath + "/style:graphic-properties/@draw:opacity-name");
// Verify content of the opacity definition
- xmlDocUniquePtr pXmlDoc2 = parseExport("Object 1/styles.xml", "impress8");
+ save("impress8");
+ xmlDocUniquePtr pXmlDoc2 = parseExport("Object 1/styles.xml");
CPPUNIT_ASSERT(pXmlDoc2);
const OString sAttribute("@draw:name='" + OU2O(sOUOpacityName) + "'");
const OString sStart("//office:document-styles/office:styles/draw:opacity[" + sAttribute);
@@ -274,34 +287,44 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_export()
{
// legend with solid color and transparency gradient
// Without the patch the transparency was lost.
- load(u"/chart2/qa/extras/data/odp/", "tdf128345_Legend_CS_TG_axial.odp");
+ loadFromFile(u"odp/tdf128345_Legend_CS_TG_axial.odp");
// Make sure the chart has a gradient with transparency in gradient stops in saved pptx file.
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
+ save("Impress MS PowerPoint 2007 XML");
+ xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- OString sPathStart("//c:chartSpace/c:chart/c:legend/c:spPr/a:gradFill");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 3); // axial
- // no element for 0% transparent
+ OString sPathStart("//c:chartSpace/c:chart/c:legend/c:spPr/a:gradFill"_ostr);
+
+ // MCGR: three entries due to axial being mirrored+expanded to linear
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 3);
+
+ // MCGR: start entry, no transparence, pos zero
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", 0);
- // 100% transparent = opacity 0. It comes from "axial", therefore it is in the middle.
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val", "0");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]", "pos", "50000");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]", "pos"_ostr, "0");
+
+ // MCGR: middle entry, 100% transparence, pos 0.5
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr, "0");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]", "pos"_ostr, "50000");
+
+ // MCGR: end entry, no transparence, pos 1.0
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[3]/a:srgbClr/a:alpha", 0);
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[3]", "pos"_ostr, "100000");
}
void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
{
// This works on the file, which was exported from file tdf128345_Legend_CS_TG_axial.odp to pptx.
// Error was, that in case of axial not the middle value was taken but start and end value.
- load(u"/chart2/qa/extras/data/pptx/", "tdf128345_Legend_CS_TG_axial.pptx");
+ loadFromFile(u"pptx/tdf128345_Legend_CS_TG_axial.pptx");
// Find transparency gradient name
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
+ save("impress8");
+ xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
CPPUNIT_ASSERT(pXmlDoc);
const OUString sOUChartStyleName
= getXPathContent(pXmlDoc, "//office:document-content/office:body/office:chart/chart:chart/"
- "chart:legend/@chart:style-name");
+ "chart:legend/@chart:style-name"_ostr);
const OString sStylePath(
"//office:document-content/office:automatic-styles/style:style[@style:name='"
+ OU2O(sOUChartStyleName) + "']");
@@ -311,7 +334,8 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
= getXPathContent(pXmlDoc, sStylePath + "/style:graphic-properties/@draw:opacity-name");
// Verify content of the opacity definition
- xmlDocUniquePtr pXmlDoc2 = parseExport("Object 1/styles.xml", "impress8");
+ save("impress8");
+ xmlDocUniquePtr pXmlDoc2 = parseExport("Object 1/styles.xml");
CPPUNIT_ASSERT(pXmlDoc2);
const OString sAttribute("@draw:name='" + OU2O(sOUOpacityName) + "'");
const OString sStart("//office:document-styles/office:styles/draw:opacity[" + sAttribute);
@@ -325,7 +349,7 @@ void Chart2GeometryTest::testTdf135366LabelOnSeries()
{
// Error was, that the fill and line properties of a <chart:data-label> were not
// imported at all. Here they should be at the series.
- load(u"/chart2/qa/extras/data/ods/", "tdf135366_data_label_series.ods");
+ loadFromFile(u"ods/tdf135366_data_label_series.ods");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
@@ -363,7 +387,7 @@ void Chart2GeometryTest::testTdf135366LabelOnPoint()
{
// Error was, that the fill and line properties of a <chart:data-label> were not
// imported at all. Here they should be at point 2.
- load(u"/chart2/qa/extras/data/odt/", "tdf135366_data_label_point.odt");
+ loadFromFile(u"odt/tdf135366_data_label_point.odt");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
@@ -410,14 +434,19 @@ void Chart2GeometryTest::testTdf135366LabelExport()
// Error was, that line and fill properties were not exported as
// graphic-properties of a <chart:data-label> element, but only
// as loext chart-properties of the <chart:data-point> element.
- load(u"/chart2/qa/extras/data/odt/", "tdf135366_data_label_export.odt");
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "writer8");
+ loadFromFile(u"odt/tdf135366_data_label_export.odt");
+
+ // FIXME: Error: unexpected attribute "loext:label-stroke-color"
+ skipValidation();
+
+ save("writer8");
+ xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
CPPUNIT_ASSERT(pXmlDoc);
// Find label style
const OUString sOULabelStyleName = getXPathContent(
pXmlDoc, "//office:document-content/office:body/office:chart/chart:chart/chart:plot-area"
- "/chart:series/chart:data-point[1]/chart:data-label/@chart:style-name");
+ "/chart:series/chart:data-point[1]/chart:data-label/@chart:style-name"_ostr);
// Verify content of graphic properties of label style
const OString sStylePath(
@@ -437,14 +466,15 @@ void Chart2GeometryTest::testTdf135366_CustomLabelText()
// although the used <chart:data-label> element exists since ODF 1.2.
const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion(GetODFDefaultVersion());
SetODFDefaultVersion(SvtSaveOptions::ODFVER_012);
- load(u"/chart2/qa/extras/data/pptx/", "tdf135366_CustomLabelText.pptx");
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
+ loadFromFile(u"pptx/tdf135366_CustomLabelText.pptx");
+ save("impress8");
+ xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
CPPUNIT_ASSERT(pXmlDoc);
// Find custom text. As of version 7.0 it is in a <text:span> element.
- const OString sCustomTextPath(
+ static constexpr OString sCustomTextPath(
"//office:document-content/office:body/office:chart/chart:chart/chart:plot-area"
- "/chart:series/chart:data-point[2]/chart:data-label/text:p/text:span");
+ "/chart:series/chart:data-point[2]/chart:data-label/text:p/text:span"_ostr);
assertXPath(pXmlDoc, sCustomTextPath, 1);
// Verify text content
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 0b4f6d89303e..02c00daed941 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -29,210 +29,35 @@
#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/qa/XDumper.hpp>
#include <iterator>
#include <com/sun/star/util/Color.hpp>
-#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/awt/Gradient2.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <docmodel/uno/UnoGradientTools.hxx>
+namespace
+{
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 testTdf81396();
- 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 testTransparencyGradientValue();
- void testBnc889755();
- void testSimpleStrictXLSX();
- void testDelayedCellImport(); // chart range referencing content on later sheets
- void testFlatODSStackedColumnChart();
- void testFdo78080();
- void testFdo54361();
- void testFdo54361_1();
- void testTdf127811();
- 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);
+ Chart2ImportTest() : ChartTest("/chart2/qa/extras/data/") {}
- // 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 testTdf140489MultiSeriesChartAxisXLSX();
-
- 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();
-
- 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(testTdf81396);
- 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(testTransparencyGradientValue);
- CPPUNIT_TEST(testBnc889755);
- CPPUNIT_TEST(testSimpleStrictXLSX);
- CPPUNIT_TEST(testDelayedCellImport);
- CPPUNIT_TEST(testFlatODSStackedColumnChart);
- CPPUNIT_TEST(testFdo78080);
- CPPUNIT_TEST(testFdo54361);
- CPPUNIT_TEST(testFdo54361_1);
- CPPUNIT_TEST(testTdf127811);
- 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(testTdf140489MultiSeriesChartAxisXLSX);
- 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_SUITE_END();
+protected:
+ void testTransparentBackground(std::u16string_view filename);
};
+OUString getShapeDump(css::uno::Reference<css::chart::XChartDocument> const& doc)
+{
+ return css::uno::Reference<css::qa::XDumper>(doc, css::uno::UNO_QUERY_THROW)->dump("shapes");
+}
+
// error bar import
// split method up into smaller chunks for more detailed tests
-void Chart2ImportTest::Fdo60083()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFdo60083)
{
- load(u"/chart2/qa/extras/data/ods/", "fdo60083.ods");
+ loadFromFile(u"ods/fdo60083.ods");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
CPPUNIT_ASSERT(xChartDoc.is());
@@ -279,9 +104,9 @@ void Chart2ImportTest::Fdo60083()
CPPUNIT_ASSERT(!xErrorBarXProps.is());
}
-void Chart2ImportTest::testErrorBarRange()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testErrorBarRange)
{
- load(u"/chart2/qa/extras/data/ods/", "error_bar_range.ods");
+ loadFromFile(u"ods/error_bar_range.ods");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
CPPUNIT_ASSERT(xChartDoc.is());
@@ -308,9 +133,9 @@ void Chart2ImportTest::testErrorBarRange()
CPPUNIT_ASSERT_EQUAL(OUString("$Sheet1.$C$2:$C$4"), aRangePos);
}
-void Chart2ImportTest::testErrorBarFormatting()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testErrorBarFormatting)
{
- load(u"/chart2/qa/extras/data/ods/", "error_bar_properties.ods");
+ loadFromFile(u"ods/error_bar_properties.ods");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
CPPUNIT_ASSERT(xChartDoc.is());
@@ -331,7 +156,7 @@ void Chart2ImportTest::testErrorBarFormatting()
}
// stepped line interpolation
-void Chart2ImportTest::testSteppedLines()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSteppedLines)
{
const sal_Int32 MAXSHEET = 14;
chart2::CurveStyle const curveStyle[] = {
@@ -351,7 +176,7 @@ void Chart2ImportTest::testSteppedLines()
chart2::CurveStyle_STEP_CENTER_Y
};
- load(u"/chart2/qa/extras/data/ods/", "stepped_lines.ods");
+ loadFromFile(u"ods/stepped_lines.ods");
for(sal_Int32 nSheet = 0; nSheet < MAXSHEET; ++nSheet)
{
uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet( nSheet, mxComponent );
@@ -369,7 +194,7 @@ void Chart2ImportTest::testSteppedLines()
}
}
-static uno::Sequence < OUString > getChartColumnDescriptions( uno::Reference< chart::XChartDocument > const & xChart1Doc)
+uno::Sequence < OUString > getChartColumnDescriptions( uno::Reference< chart::XChartDocument > const & xChart1Doc)
{
CPPUNIT_ASSERT(xChart1Doc.is());
uno::Reference< chart::XChartDataArray > xChartData ( xChart1Doc->getData(), UNO_QUERY_THROW);
@@ -377,10 +202,10 @@ static uno::Sequence < OUString > getChartColumnDescriptions( uno::Reference< ch
return seriesList;
}
-void Chart2ImportTest::testODSChartSeries()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testODSChartSeries)
{
- load(u"/chart2/qa/extras/data/ods/", "chart.ods");
- uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
+ loadFromFile(u"ods/chart.ods");
+ uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 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]);
@@ -388,10 +213,10 @@ void Chart2ImportTest::testODSChartSeries()
}
-void Chart2ImportTest::testXLSXChartSeries()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testXLSXChartSeries)
{
- load(u"/chart2/qa/extras/data/xlsx/", "chart.xlsx");
- uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
+ loadFromFile(u"xlsx/chart.xlsx");
+ uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 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]);
@@ -399,10 +224,10 @@ void Chart2ImportTest::testXLSXChartSeries()
}
-void Chart2ImportTest::testXLSChartSeries()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testXLSChartSeries)
{
- load(u"/chart2/qa/extras/data/xls/", "chart.xls");
- uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
+ loadFromFile(u"xls/chart.xls");
+ uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 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]);
@@ -410,9 +235,9 @@ void Chart2ImportTest::testXLSChartSeries()
}
-void Chart2ImportTest::testODTChartSeries()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testODTChartSeries)
{
- load(u"/chart2/qa/extras/data/odt/", "chart.odt");
+ loadFromFile(u"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]);
@@ -420,18 +245,18 @@ void Chart2ImportTest::testODTChartSeries()
}
-void Chart2ImportTest::testDOCChartSeries()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCChartSeries)
{
- load(u"/chart2/qa/extras/data/doc/", "chart.doc");
+ loadFromFile(u"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()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartSeries)
{
- load(u"/chart2/qa/extras/data/docx/", "chart.docx");
+ loadFromFile(u"docx/chart.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -445,9 +270,9 @@ void Chart2ImportTest::testDOCXChartSeries()
CPPUNIT_ASSERT_EQUAL(OUString("Series 3"), aLabels[2][0].get<OUString>());
}
-void Chart2ImportTest::testDOCXChartEmptySeries()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartEmptySeries)
{
- load(u"/chart2/qa/extras/data/docx/", "tdf125337.docx");
+ loadFromFile(u"docx/tdf125337.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -471,9 +296,9 @@ void Chart2ImportTest::testDOCXChartEmptySeries()
CPPUNIT_ASSERT(std::isnan(aValues[2][1]));
}
-void Chart2ImportTest::testTdf81396()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf81396)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf81396.xlsx");
+ loadFromFile(u"xlsx/tdf81396.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -488,9 +313,22 @@ void Chart2ImportTest::testTdf81396()
CPPUNIT_ASSERT_EQUAL(105.210801910481, aDataSeriesYValues[0][0]);
}
-void Chart2ImportTest::testDOCXChartValuesSize()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXChartErrorBars)
{
- load( u"/chart2/qa/extras/data/docx/", "bubblechart.docx" );
+ loadFromFile(u"pptx/tdf127720.pptx");
+ Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xChartDoc.is());
+
+ uno::Reference< chart::XChartDataArray > xDataArray(xChartDoc->getDataProvider(), UNO_QUERY_THROW);
+ Sequence<OUString> aColumnDesc = xDataArray->getColumnDescriptions();
+ // Number of columns = 4 (Y-values, X-values and positive/negative error bars).
+ // Without the fix there would only be 2 columns (no error range).
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("There must be 4 columns and descriptions", static_cast<sal_Int32>(4), aColumnDesc.getLength());
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartValuesSize)
+{
+ loadFromFile(u"docx/bubblechart.docx" );
Reference<chart2::XChartDocument> xChartDoc( getChartDocFromWriter(0), uno::UNO_QUERY );
CPPUNIT_ASSERT( xChartDoc.is() );
@@ -509,10 +347,11 @@ void Chart2ImportTest::testDOCXChartValuesSize()
CPPUNIT_ASSERT_DOUBLES_EQUAL( aExpected[nRowIdx][nColIdx], aData[nRowIdx][nColIdx], 1e-1 );
}
-void Chart2ImportTest::testPPTChartSeries()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTChartSeries)
{
//test chart series names for ppt
- uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions(u"/chart2/qa/extras/data/ppt/", "chart.ppt");
+ loadFromFile(u"ppt/chart.ppt");
+ uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions(0, 0);
CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
@@ -520,10 +359,10 @@ void Chart2ImportTest::testPPTChartSeries()
}
-void Chart2ImportTest::testPPTXChartSeries()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXChartSeries)
{
//test chart series names for pptx
- load(u"/chart2/qa/extras/data/pptx/", "chart.pptx");
+ loadFromFile(u"pptx/chart.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -537,10 +376,10 @@ void Chart2ImportTest::testPPTXChartSeries()
CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), aLabels[2][0].get<OUString>());
}
-void Chart2ImportTest::testPPTXSparseChartSeries()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXSparseChartSeries)
{
//test chart series sparse data for pptx
- load(u"/chart2/qa/extras/data/pptx/", "sparse-chart.pptx");
+ loadFromFile(u"pptx/sparse-chart.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -559,9 +398,14 @@ void Chart2ImportTest::testPPTXSparseChartSeries()
CPPUNIT_ASSERT_EQUAL(-2.8, aValues[1][3]);
}
-void Chart2ImportTest::testPPTXHiddenDataSeries()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXHiddenDataSeries)
{
- load(u"/chart2/qa/extras/data/pptx/", "stacked-bar-chart-hidden-series.pptx");
+ /**
+ * 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).
+ */
+ loadFromFile(u"pptx/stacked-bar-chart-hidden-series.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -598,9 +442,9 @@ void Chart2ImportTest::testPPTXHiddenDataSeries()
CPPUNIT_ASSERT_EQUAL(OUString("Category 4"), aCategories[3][0]);
}
-void Chart2ImportTest::testPPTXPercentageNumberFormats()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXPercentageNumberFormats)
{
- load(u"/chart2/qa/extras/data/pptx/", "percentage-number-formats.pptx");
+ loadFromFile(u"pptx/percentage-number-formats.pptx");
// 1st chart
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
@@ -664,10 +508,10 @@ void Chart2ImportTest::testPPTXPercentageNumberFormats()
CPPUNIT_ASSERT_MESSAGE("Y axis should be a percent format.", (nType & util::NumberFormat::PERCENT));
}
-void Chart2ImportTest::testPieChartLabelsNumFormat()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPieChartLabelsNumFormat)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdfPieNumFormat.xlsx");
- uno::Reference< chart::XChartDocument > xChartDoc(getChartCompFromSheet(0, mxComponent), UNO_QUERY_THROW);
+ loadFromFile(u"xlsx/tdfPieNumFormat.xlsx");
+ uno::Reference< chart::XChartDocument > xChartDoc(getChartCompFromSheet(0, 0, mxComponent), UNO_QUERY_THROW);
CPPUNIT_ASSERT(xChartDoc.is());
// test data point labels format
Reference<beans::XPropertySet> xDataPointPropSet(xChartDoc->getDiagram()->getDataPointProperties(0, 0), uno::UNO_SET_THROW);
@@ -676,9 +520,9 @@ void Chart2ImportTest::testPieChartLabelsNumFormat()
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber);
}
-void Chart2ImportTest::testPPTXStackedNonStackedYAxis()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXStackedNonStackedYAxis)
{
- load(u"/chart2/qa/extras/data/pptx/", "stacked-non-stacked-mix-y-axis.pptx");
+ loadFromFile(u"pptx/stacked-non-stacked-mix-y-axis.pptx");
// 1st chart is a normal stacked column.
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
@@ -735,19 +579,21 @@ void Chart2ImportTest::testPPTXStackedNonStackedYAxis()
CPPUNIT_ASSERT_MESSAGE("Y axis should NOT be a percent format.", !(nType & util::NumberFormat::PERCENT));
}
-void Chart2ImportTest::testODPChartSeries()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testODPChartSeries)
{
//test chart series names for odp
- uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions(u"/chart2/qa/extras/data/odp/", "chart.odp");
+ loadFromFile(u"odp/chart.odp");
+ uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions(0, 0);
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()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc864396)
{
- uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress(u"/chart2/qa/extras/data/pptx/", "bnc864396.pptx"), uno::UNO_QUERY_THROW);
+ loadFromFile(u"pptx/bnc864396.pptx");
+ uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0,0), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider());
uno::Reference< chart2::XInternalDataProvider > xDataProvider( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
@@ -760,9 +606,9 @@ void Chart2ImportTest::testBnc864396()
}
}
-void Chart2ImportTest::testBnc889755()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc889755)
{
- load(u"/chart2/qa/extras/data/pptx/", "bnc889755.pptx");
+ loadFromFile(u"pptx/bnc889755.pptx");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 5), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider());
@@ -784,17 +630,26 @@ void Chart2ImportTest::testBnc889755()
//tdf#139940 - the title's gradient was lost and was filled with solid blue, instead of a "blue underline".
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW);
+
// Shape "Title 3"
+ // MCGR: Use the whole completely imported transparency gradient to check for correctness
uno::Reference<beans::XPropertySet> xShapeProps(xPage->getByIndex(4), uno::UNO_QUERY_THROW);
- awt::Gradient aTransparence;
+ awt::Gradient2 aTransparence;
xShapeProps->getPropertyValue("FillTransparenceGradient") >>= aTransparence;
- CPPUNIT_ASSERT(aTransparence.StartColor != aTransparence.EndColor);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xffffff), aTransparence.StartColor);
+ const basegfx::BColorStops aColorStops = model::gradient::getColorStopsFromUno(aTransparence.ColorStops);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(3), aColorStops.size());
+ CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0));
+ CPPUNIT_ASSERT_EQUAL(Color(0x404040), Color(aColorStops[0].getStopColor()));
+ CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 0.070000000000000007));
+ CPPUNIT_ASSERT_EQUAL(Color(0x404040), Color(aColorStops[1].getStopColor()));
+ CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[2].getStopOffset(), 0.080000000000000002));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(aColorStops[2].getStopColor()));
}
-void Chart2ImportTest::testBnc882383()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc882383)
{
- load(u"/chart2/qa/extras/data/pptx/", "bnc882383.pptx");
+ loadFromFile(u"pptx/bnc882383.pptx");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY_THROW);
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
CPPUNIT_ASSERT(xDataSeries.is());
@@ -805,9 +660,9 @@ void Chart2ImportTest::testBnc882383()
CPPUNIT_ASSERT(!sGradientName.isEmpty());
}
-void Chart2ImportTest::testTransparencyGradientValue()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTransparencyGradientValue)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf128732.xlsx");
+ loadFromFile(u"xlsx/tdf128732.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -818,19 +673,25 @@ void Chart2ImportTest::testTransparencyGradientValue()
xPropertySet->getPropertyValue("FillTransparenceGradientName") >>= sTranspGradientName;
CPPUNIT_ASSERT(!sTranspGradientName.isEmpty());
- awt::Gradient aTransparenceGradient;
+ awt::Gradient2 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);
+ const basegfx::BColorStops aColorStops = model::gradient::getColorStopsFromUno(aTransparenceGradient.ColorStops);
+
+ // MCGR: Use the whole completely imported transparency gradient to check for correctness
+ CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
+ CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0));
+ CPPUNIT_ASSERT_EQUAL(Color(0x4d4d4d), Color(aColorStops[0].getStopColor()));
+ CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 1.0));
+ CPPUNIT_ASSERT_EQUAL(Color(0x333333), Color(aColorStops[1].getStopColor()));
}
-void Chart2ImportTest::testSimpleStrictXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSimpleStrictXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "strict_chart.xlsx");
+ loadFromFile(u"xlsx/strict_chart.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
CPPUNIT_ASSERT(xChartDoc.is());
@@ -839,9 +700,10 @@ void Chart2ImportTest::testSimpleStrictXLSX()
}
-void Chart2ImportTest::testDelayedCellImport()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDelayedCellImport)
{
- load(u"/chart2/qa/extras/data/xlsx/", "fdo70609.xlsx");
+ // chart range referencing content on later sheets
+ loadFromFile(u"xlsx/fdo70609.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
Reference< chart2::data::XDataSequence > xDataSeq =
getDataSequenceFromDocByRole(xChartDoc, u"values-x");
@@ -850,9 +712,9 @@ void Chart2ImportTest::testDelayedCellImport()
CPPUNIT_ASSERT_EQUAL(OUString("$Sheet2.$C$5:$C$9"), aRange);
}
-void Chart2ImportTest::testFlatODSStackedColumnChart()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFlatODSStackedColumnChart)
{
- load(u"/chart2/qa/extras/data/fods/", "stacked-column-chart.fods");
+ loadFromFile(u"fods/stacked-column-chart.fods");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -867,9 +729,9 @@ void Chart2ImportTest::testFlatODSStackedColumnChart()
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aSeriesSeq.getLength());
}
-void Chart2ImportTest::testFdo78080()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFdo78080)
{
- load(u"/chart2/qa/extras/data/xlsx/", "fdo78080.xlsx");
+ loadFromFile(u"xlsx/fdo78080.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -878,9 +740,9 @@ void Chart2ImportTest::testFdo78080()
CPPUNIT_ASSERT(!xTitle.is());
}
-void Chart2ImportTest::testTdf127811()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf127811)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf127811.pptx");
+ loadFromFile(u"pptx/tdf127811.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -897,9 +759,10 @@ void Chart2ImportTest::testTdf127811()
CPPUNIT_ASSERT_EQUAL(OUString("2. second"), aLabels[1][0].get<OUString>());
}
-void Chart2ImportTest::testTdf86624()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf86624)
{
- load(u"/chart2/qa/extras/data/ods/", "tdf86624.ods");
+ // manually placed legends
+ loadFromFile(u"ods/tdf86624.ods");
uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet(0, mxComponent);
uno::Reference< chart::XChartDocument > xChartDoc (xChart2Doc, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xLegend = xChartDoc->getLegend();
@@ -908,9 +771,9 @@ void Chart2ImportTest::testTdf86624()
CPPUNIT_ASSERT(aPos.Y > 4000); // real value for ms is above 7000
}
-void Chart2ImportTest::testTdf105517()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf105517)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf105517.pptx");
+ loadFromFile(u"pptx/tdf105517.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -936,9 +799,9 @@ void Chart2ImportTest::testTdf105517()
CPPUNIT_ASSERT_EQUAL(tools::Long(0x1e69a8), lineColor);
}
-void Chart2ImportTest::testTdf106217()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf106217)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf106217.pptx");
+ loadFromFile(u"pptx/tdf106217.pptx");
uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromDrawImpress(0, 0);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -958,14 +821,14 @@ void Chart2ImportTest::testTdf106217()
CPPUNIT_ASSERT_EQUAL(sal_Int32(2700), aSize.Height);
}
-void Chart2ImportTest::testTdf108021()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf108021)
{
// Tdf108021 : To check TextBreak value is true.
- load(u"/chart2/qa/extras/data/ods/", "tdf108021.ods");
+ loadFromFile(u"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);
+ uno::Reference< chart::XChartDocument > xChartDoc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW);
mxDiagram.set(xChartDoc->getDiagram());
CPPUNIT_ASSERT(mxDiagram.is());
uno::Reference< chart::XAxisXSupplier > xAxisXSupp( mxDiagram, uno::UNO_QUERY );
@@ -976,19 +839,19 @@ void Chart2ImportTest::testTdf108021()
CPPUNIT_ASSERT(bTextBreak);
}
-void Chart2ImportTest::testTdf100084()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf100084)
{
// The test file was created with IBM Cognos, make sure there is a diagram.
- load(u"/chart2/qa/extras/data/xlsx/", "tdf100084.xlsx");
+ loadFromFile(u"xlsx/tdf100084.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
Reference<beans::XPropertySet> xDiagram(xChartDoc->getFirstDiagram(), UNO_QUERY);
CPPUNIT_ASSERT_MESSAGE("There should be a Diagram.", xDiagram.is());
}
-void Chart2ImportTest::testTdf124817()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf124817)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf124817.xlsx");
+ loadFromFile(u"xlsx/tdf124817.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1017,9 +880,9 @@ void Chart2ImportTest::testTdf124817()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xFF0000), aSymblProp.BorderColor);
}
-void Chart2ImportTest::testTdf126033()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf126033)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf126033.xlsx");
+ loadFromFile(u"xlsx/tdf126033.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1034,9 +897,9 @@ void Chart2ImportTest::testTdf126033()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(176), aSymblProp.Size.Height);
}
-void Chart2ImportTest::testTransparentBackground(OUString const & filename)
+void Chart2ImportTest::testTransparentBackground(std::u16string_view filename)
{
- load(u"/chart2/qa/extras/data/xlsx/", filename);
+ loadFromFile(filename);
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1051,19 +914,20 @@ void Chart2ImportTest::testTransparentBackground(OUString const & filename)
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()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFdo54361)
{
- testTransparentBackground("fdo54361.xlsx");
+ testTransparentBackground(u"xlsx/fdo54361.xlsx");
}
-void Chart2ImportTest::testFdo54361_1()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFdo54361_1)
{
- testTransparentBackground("fdo54361-1.xlsx");
+ testTransparentBackground(u"xlsx/fdo54361-1.xlsx");
}
-void Chart2ImportTest::testAutoBackgroundXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoBackgroundXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "chart-auto-background.xlsx");
+ loadFromFile(u"xlsx/chart-auto-background.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1078,9 +942,9 @@ void Chart2ImportTest::testAutoBackgroundXLSX()
sal_Int32(0x00FFFFFF), sal_Int32(nColor & 0x00FFFFFF)); // highest 2 bytes are transparency which we ignore here.
}
-void Chart2ImportTest::testAutoChartAreaBorderPropXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoChartAreaBorderPropXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "chart-area-style-border.xlsx");
+ loadFromFile(u"xlsx/chart-area-style-border.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1098,9 +962,23 @@ void Chart2ImportTest::testAutoChartAreaBorderPropXLSX()
sal_Int32(26), nWidth);
}
-void Chart2ImportTest::testChartAreaStyleBackgroundXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoChartAreaBorderPropPPTX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "chart-area-style-background.xlsx");
+ loadFromFile(u"pptx/tdf150176.pptx");
+ Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
+
+ // Test "Automatic" chartarea border style/color/width.
+ Reference<beans::XPropertySet> xPropSet = xChartDoc->getPageBackground();
+ CPPUNIT_ASSERT(xPropSet.is());
+ drawing::LineStyle eStyle = xPropSet->getPropertyValue("LineStyle").get<drawing::LineStyle>();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chartarea border should be loaded as none style for pptx.",
+ drawing::LineStyle_NONE, eStyle);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testChartAreaStyleBackgroundXLSX)
+{
+ loadFromFile(u"xlsx/chart-area-style-background.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1115,9 +993,9 @@ void Chart2ImportTest::testChartAreaStyleBackgroundXLSX()
sal_Int32(0), nColor);
}
-void Chart2ImportTest::testChartHatchFillXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testChartHatchFillXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "chart-hatch-fill.xlsx");
+ loadFromFile(u"xlsx/chart-hatch-fill.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1157,9 +1035,9 @@ void Chart2ImportTest::testChartHatchFillXLSX()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0x00B050), nBackgroundColorofDatapoint);
}
-void Chart2ImportTest::testAxisTextRotationXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTextRotationXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "axis-label-rotation.xlsx");
+ loadFromFile(u"xlsx/axis-label-rotation.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1174,34 +1052,31 @@ void Chart2ImportTest::testAxisTextRotationXLSX()
CPPUNIT_ASSERT_DOUBLES_EQUAL(90, nRotation, 1e-10);
}
-/* TODO : temporarily disabled.
-void Chart2ImportTest::testTextCanOverlapXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTextCanOverlapXLSX)
{
// fdo#84647 : To check textoverlap value is imported correctly.
- load("/chart2/qa/extras/data/xlsx/", "chart-text-can-overlap.xlsx");
+ loadFromFile(u"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);
+ uno::Reference< chart::XChartDocument > xChartDoc ( getChartCompFromSheet( 0, 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);
+ CPPUNIT_ASSERT(!bTextCanOverlap);
}
-*/
-void Chart2ImportTest::testTextBreakXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTextBreakXLSX)
{
// tdf#122091: To check textbreak value is true in case of 0° degree of Axis label rotation.
- load(u"/chart2/qa/extras/data/xlsx/", "chart_label_text_break.xlsx");
+ loadFromFile(u"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);
+ uno::Reference< chart::XChartDocument > xChartDoc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW);
CPPUNIT_ASSERT(xChartDoc.is());
mxDiagram.set(xChartDoc->getDiagram());
CPPUNIT_ASSERT(mxDiagram.is());
@@ -1213,9 +1088,9 @@ void Chart2ImportTest::testTextBreakXLSX()
CPPUNIT_ASSERT(textBreak);
}
-void Chart2ImportTest::testNumberFormatsXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testNumberFormatsXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "number-formats.xlsx");
+ loadFromFile(u"xlsx/number-formats.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1265,9 +1140,9 @@ void Chart2ImportTest::testNumberFormatsXLSX()
CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bLinkNumberFormatToSource);
}
-void Chart2ImportTest::testNumberFormatsDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testNumberFormatsDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "tdf132174.docx");
+ loadFromFile(u"docx/tdf132174.docx");
{
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1288,7 +1163,7 @@ void Chart2ImportTest::testNumberFormatsDOCX()
CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to false.", !bLinkNumberFormatToSource);
}
- load(u"/chart2/qa/extras/data/docx/", "tdf136650.docx");
+ loadFromFile(u"docx/tdf136650.docx");
{
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1310,9 +1185,9 @@ void Chart2ImportTest::testNumberFormatsDOCX()
}
}
-void Chart2ImportTest::testPercentageNumberFormatsDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPercentageNumberFormatsDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "tdf133632.docx");
+ loadFromFile(u"docx/tdf133632.docx");
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1331,9 +1206,11 @@ void Chart2ImportTest::testPercentageNumberFormatsDOCX()
CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bLinkNumberFormatToSource);
}
-void Chart2ImportTest::testAutoTitleDelDefaultValue2007XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoTitleDelDefaultValue2007XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "autotitledel_2007.xlsx");
+ // below are OOXML default value tests for cases
+ // where we fixed the handling of MSO 2007 vs OOXML
+ loadFromFile(u"xlsx/autotitledel_2007.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1343,9 +1220,9 @@ void Chart2ImportTest::testAutoTitleDelDefaultValue2007XLSX()
!aTitle.isEmpty());
}
-void Chart2ImportTest::testAutoTitleDelDefaultValue2013XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoTitleDelDefaultValue2013XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "autotitledel_2013.xlsx");
+ loadFromFile(u"xlsx/autotitledel_2013.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1355,9 +1232,9 @@ void Chart2ImportTest::testAutoTitleDelDefaultValue2013XLSX()
!xTitle.is());
}
-void Chart2ImportTest::testDispBlanksAsDefaultValue2007XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDispBlanksAsDefaultValue2007XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2007.xlsx");
+ loadFromFile(u"xlsx/dispBlanksAs_2007.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1369,9 +1246,9 @@ void Chart2ImportTest::testDispBlanksAsDefaultValue2007XLSX()
CPPUNIT_ASSERT_EQUAL(chart::MissingValueTreatment::LEAVE_GAP, nMissingValueTreatment);
}
-void Chart2ImportTest::testDispBlanksAsDefaultValue2013XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDispBlanksAsDefaultValue2013XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2013.xlsx");
+ loadFromFile(u"xlsx/dispBlanksAs_2013.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1383,9 +1260,9 @@ void Chart2ImportTest::testDispBlanksAsDefaultValue2013XLSX()
CPPUNIT_ASSERT_EQUAL(chart::MissingValueTreatment::USE_ZERO, nMissingValueTreatment);
}
-void Chart2ImportTest::testSmoothDefaultValue2007XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSmoothDefaultValue2007XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "smoothed_series2007.xlsx");
+ loadFromFile(u"xlsx/smoothed_series2007.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1401,9 +1278,9 @@ void Chart2ImportTest::testSmoothDefaultValue2007XLSX()
CPPUNIT_ASSERT_EQUAL(chart2::CurveStyle_LINES, eCurveStyle);
}
-void Chart2ImportTest::testSmoothDefaultValue2013XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSmoothDefaultValue2013XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "smoothed_series.xlsx");
+ loadFromFile(u"xlsx/smoothed_series.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1419,9 +1296,9 @@ void Chart2ImportTest::testSmoothDefaultValue2013XLSX()
CPPUNIT_ASSERT(eCurveStyle != chart2::CurveStyle_LINES);
}
-void Chart2ImportTest::testTrendlineDefaultValue2007XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTrendlineDefaultValue2007XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "trendline2007.xlsx");
+ loadFromFile(u"xlsx/trendline2007.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1445,9 +1322,9 @@ void Chart2ImportTest::testTrendlineDefaultValue2007XLSX()
CPPUNIT_ASSERT(!bShowCorrelation);
}
-void Chart2ImportTest::testTrendlineDefaultValue2013XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTrendlineDefaultValue2013XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "trendline.xlsx");
+ loadFromFile(u"xlsx/trendline.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1471,9 +1348,9 @@ void Chart2ImportTest::testTrendlineDefaultValue2013XLSX()
CPPUNIT_ASSERT(bShowCorrelation);
}
-void Chart2ImportTest::testVaryColorDefaultValues2007XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testVaryColorDefaultValues2007XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "vary_color2007.xlsx");
+ loadFromFile(u"xlsx/vary_color2007.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1486,9 +1363,9 @@ void Chart2ImportTest::testVaryColorDefaultValues2007XLSX()
CPPUNIT_ASSERT(!bVaryColor);
}
-void Chart2ImportTest::testVaryColorDefaultValues2013XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testVaryColorDefaultValues2013XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "vary_color.xlsx");
+ loadFromFile(u"xlsx/vary_color.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1501,10 +1378,10 @@ void Chart2ImportTest::testVaryColorDefaultValues2013XLSX()
CPPUNIT_ASSERT(!bVaryColor);
}
-void Chart2ImportTest::testPlotVisOnlyDefaultValue2013XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPlotVisOnlyDefaultValue2013XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "plotVisOnly.xlsx");
- uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
+ loadFromFile(u"xlsx/plotVisOnly.xlsx");
+ uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW);
Reference<beans::XPropertySet> xPropSet(xChart1Doc->getDiagram(), uno::UNO_QUERY_THROW);
uno::Any aAny = xPropSet->getPropertyValue("IncludeHiddenCells");
CPPUNIT_ASSERT(aAny.hasValue());
@@ -1513,10 +1390,10 @@ void Chart2ImportTest::testPlotVisOnlyDefaultValue2013XLSX()
CPPUNIT_ASSERT(!bShowHiddenValues);
}
-void Chart2ImportTest::testRAngAxDefaultValue2013XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testRAngAxDefaultValue2013XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "rAngAx.xlsx");
- uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
+ loadFromFile(u"xlsx/rAngAx.xlsx");
+ uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW);
Reference<beans::XPropertySet> xPropSet(xChart1Doc->getDiagram(), uno::UNO_QUERY_THROW);
uno::Any aAny = xPropSet->getPropertyValue("RightAngledAxes");
CPPUNIT_ASSERT(aAny.hasValue());
@@ -1525,9 +1402,9 @@ void Chart2ImportTest::testRAngAxDefaultValue2013XLSX()
CPPUNIT_ASSERT(bRightAngleAxes);
}
-void Chart2ImportTest::testMajorTickMarksDefaultValue2013XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testMajorTickMarksDefaultValue2013XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "majorTickMark.xlsx");
+ loadFromFile(u"xlsx/majorTickMark.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
Reference<chart2::XAxis> xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
@@ -1540,9 +1417,9 @@ void Chart2ImportTest::testMajorTickMarksDefaultValue2013XLSX()
CPPUNIT_ASSERT_EQUAL(chart2::TickmarkStyle::INNER | chart2::TickmarkStyle::OUTER, nMajorTickmarks);
}
-void Chart2ImportTest::testMinorTickMarksDefaultValue2013XLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testMinorTickMarksDefaultValue2013XLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "minorTickMark.xlsx");
+ loadFromFile(u"xlsx/minorTickMark.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
Reference<chart2::XAxis> xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
@@ -1555,9 +1432,9 @@ void Chart2ImportTest::testMinorTickMarksDefaultValue2013XLSX()
CPPUNIT_ASSERT_EQUAL(chart2::TickmarkStyle::INNER | chart2::TickmarkStyle::OUTER, nMajorTickmarks);
}
-void Chart2ImportTest::testAxisTitleDefaultRotationXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTitleDefaultRotationXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "axis_title_default_rotation.xlsx");
+ loadFromFile(u"xlsx/axis_title_default_rotation.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
Reference<chart2::XAxis> xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0);
@@ -1572,9 +1449,9 @@ void Chart2ImportTest::testAxisTitleDefaultRotationXLSX()
CPPUNIT_ASSERT_EQUAL(90.0, nRotation);
}
-void Chart2ImportTest::testSecondaryAxisTitleDefaultRotationXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSecondaryAxisTitleDefaultRotationXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "secondary_axis_title_default_rotation.xlsx");
+ loadFromFile(u"xlsx/secondary_axis_title_default_rotation.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
Reference<chart2::XAxis> xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 1);
@@ -1589,9 +1466,9 @@ void Chart2ImportTest::testSecondaryAxisTitleDefaultRotationXLSX()
CPPUNIT_ASSERT_EQUAL(90.0, nRotation);
}
-void Chart2ImportTest::testAxisTitleRotationXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTitleRotationXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "axis_title_rotated.xlsx");
+ loadFromFile(u"xlsx/axis_title_rotated.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
{
@@ -1621,9 +1498,9 @@ void Chart2ImportTest::testAxisTitleRotationXLSX()
}
-void Chart2ImportTest::testAxisTitlePositionDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTitlePositionDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "testAxisTitlePosition.docx");
+ loadFromFile(u"docx/testAxisTitlePosition.docx");
uno::Reference< chart::XDiagram > mxDiagram;
uno::Reference< drawing::XShape > xAxisTitle;
uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromWriter(0);
@@ -1653,9 +1530,9 @@ void Chart2ImportTest::testAxisTitlePositionDOCX()
CPPUNIT_ASSERT_DOUBLES_EQUAL(6378, aPos.Y, 300);
}
-void Chart2ImportTest::testCombinedChartAttachedAxisXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testCombinedChartAttachedAxisXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "testCombinedChartAxis.xlsx");
+ loadFromFile(u"xlsx/testCombinedChartAxis.xlsx");
Reference< chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
// First series
Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xChartDoc, 0);
@@ -1679,9 +1556,9 @@ void Chart2ImportTest::testCombinedChartAttachedAxisXLSX()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nAxisIndex);
}
-void Chart2ImportTest::testTdf140489MultiSeriesChartAxisXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf140489MultiSeriesChartAxisXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf140489.xlsx");
+ loadFromFile(u"xlsx/tdf140489.xlsx");
Reference< chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
// First series
Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xChartDoc, 0);
@@ -1712,8 +1589,10 @@ void Chart2ImportTest::testTdf140489MultiSeriesChartAxisXLSX()
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), nAxisIndex);
}
-void Chart2ImportTest::testInternalDataProvider() {
- uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress(u"/chart2/qa/extras/data/odp/", "chart.odp"), uno::UNO_QUERY_THROW);
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testInternalDataProvider)
+{
+ loadFromFile(u"odp/chart.odp");
+ uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0,0), uno::UNO_QUERY_THROW);
const uno::Reference< chart2::data::XDataProvider >& rxDataProvider = xChartDoc->getDataProvider();
// Parse 42 array
@@ -1757,10 +1636,11 @@ void Chart2ImportTest::testInternalDataProvider() {
CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Row 4 world")), xSequence[3]);
}
-void Chart2ImportTest::testTdf90510()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf90510)
{
- load(u"/chart2/qa/extras/data/xls/", "piechart_outside.xls");
- uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
+ // Pie chart label placement settings(XLS)
+ loadFromFile(u"xls/piechart_outside.xls");
+ uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW );
Reference<beans::XPropertySet> xPropSet( xChart1Doc->getDiagram()->getDataPointProperties( 0, 0 ), uno::UNO_SET_THROW );
uno::Any aAny = xPropSet->getPropertyValue( "LabelPlacement" );
CPPUNIT_ASSERT( aAny.hasValue() );
@@ -1769,10 +1649,11 @@ void Chart2ImportTest::testTdf90510()
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data labels should be placed outside", chart::DataLabelPlacement::OUTSIDE, nLabelPlacement );
}
-void Chart2ImportTest::testTdf109858()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf109858)
{
- load(u"/chart2/qa/extras/data/xlsx/", "piechart_outside.xlsx");
- uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
+ // Pie chart label placement settings(XLSX)
+ loadFromFile(u"xlsx/piechart_outside.xlsx");
+ uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW );
// test data point labels position
Reference<beans::XPropertySet> xDataPointPropSet( xChart1Doc->getDiagram()->getDataPointProperties( 0, 0 ), uno::UNO_SET_THROW );
@@ -1789,9 +1670,9 @@ void Chart2ImportTest::testTdf109858()
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data series labels should be placed outside", chart::DataLabelPlacement::OUTSIDE, nLabelPlacement );
}
-void Chart2ImportTest::testTdf130105()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf130105)
{
- load(u"/chart2/qa/extras/data/xlsx/", "barchart_outend.xlsx");
+ loadFromFile(u"xlsx/barchart_outend.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -1805,15 +1686,15 @@ void Chart2ImportTest::testTdf130105()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Data label should be placed outend", chart::DataLabelPlacement::OUTSIDE, nLabelPlacement);
}
-void Chart2ImportTest::testTdf111173()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf111173)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf111173.xlsx");
- uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
+ loadFromFile(u"xlsx/tdf111173.xlsx");
+ uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW );
}
-void Chart2ImportTest::testTdf122226()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf122226)
{
- load( u"/chart2/qa/extras/data/docx/", "testTdf122226.docx" );
+ loadFromFile(u"docx/testTdf122226.docx" );
uno::Reference< chart2::XChartDocument > xChartDoc ( getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT( xChartDoc.is() );
@@ -1829,9 +1710,10 @@ void Chart2ImportTest::testTdf122226()
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data labels should be separated into new lines", OUString("\n"), nLabelSeparator );
}
-void Chart2ImportTest::testTdf115107()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf115107)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf115107.pptx");
+ // import complex data point labels
+ loadFromFile(u"pptx/tdf115107.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1920,9 +1802,10 @@ void Chart2ImportTest::testTdf115107()
CPPUNIT_ASSERT_EQUAL(OUString(" <CELLREF"), aFields[1]->getString());
}
-void Chart2ImportTest::testTdf115107_2()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf115107_2)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf115107-2.pptx");
+ // import complex data point labels in cobo charts with multiple data series
+ loadFromFile(u"pptx/tdf115107-2.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1975,9 +1858,9 @@ void Chart2ImportTest::testTdf115107_2()
}
-void Chart2ImportTest::testTdf116163()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf116163)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf116163.pptx");
+ loadFromFile(u"pptx/tdf116163.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2040,9 +1923,9 @@ void Chart2ImportTest::testTdf116163()
CPPUNIT_ASSERT_EQUAL(OUString("Dddd..."), xLabel3->getString());
}
-void Chart2ImportTest::testTdf48041()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf48041)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf48041.pptx");
+ loadFromFile(u"pptx/tdf48041.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2090,9 +1973,9 @@ void Chart2ImportTest::testTdf48041()
CPPUNIT_ASSERT_EQUAL(OUString("5"), xLabel5->getString());
}
-void Chart2ImportTest::testTdf121205()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf121205)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf121205.pptx");
+ loadFromFile(u"pptx/tdf121205.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
uno::Reference<chart2::XTitled> xTitled(xChartDoc, uno::UNO_QUERY_THROW);
@@ -2103,8 +1986,310 @@ void Chart2ImportTest::testTdf121205()
CPPUNIT_ASSERT_EQUAL(OUString("Firstline\nSecondline\nThirdline"), aTitle);
}
-CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf146487)
+{
+ loadFromFile(u"pptx/tdf146487.pptx");
+ Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
+
+ Reference<chart2::XTitled> xTitled(xChartDoc, uno::UNO_QUERY_THROW);
+ uno::Reference<chart2::XTitle> xTitle = xTitled->getTitleObject();
+ CPPUNIT_ASSERT_MESSAGE("chart doc should not have a title", !xTitle.is());
+
+ // tdf#146756 use manualLayout Width that was provided (so Green; $7,654,321 is not wrapped
+ if (!IsDefaultDPI())
+ return;
+ uno::Reference<chart::XChartDocument> xDoc = getChartDocFromDrawImpress(0, 0);
+ OString aXmlDump = OUStringToOString(getShapeDump(xDoc), RTL_TEXTENCODING_UTF8);
+ xmlDocUniquePtr pXmlDoc(xmlParseDoc(reinterpret_cast<const xmlChar*>(aXmlDump.getStr())));
+ OString aPath("//XShape[@text='Green; $7,654,321 ']"_ostr);
+ assertXPath(pXmlDoc, aPath, 1);
+ // Expected - 1 line tall(371), not 4 lines(1481).
+ CPPUNIT_ASSERT_EQUAL(OUString("371"), getXPath(pXmlDoc, aPath, "sizeY"_ostr));
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf146756)
+{
+ // 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 (!IsDefaultDPI())
+ return;
+
+ // given a chart on page 2
+ loadFromFile(u"pptx/tdf146756_bestFit.pptx");
+ Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(1, 0);
+ OString aXmlDump = OUStringToOString(getShapeDump(xChartDoc), RTL_TEXTENCODING_UTF8);
+ xmlDocUniquePtr pXmlDoc(xmlParseDoc(reinterpret_cast<const xmlChar*>(aXmlDump.getStr())));
+ OString aPath("//XShape[@text='New service request and approval; 18%']"_ostr);
+ assertXPath(pXmlDoc, aPath, 1);
+ // Expected something like 4 lines tall(1697), not 11 lines(3817).
+ CPPUNIT_ASSERT_EQUAL(OUString("1697"), getXPath(pXmlDoc, aPath, "sizeY"_ostr));
+ // Expected some reasonable maximum text length for the label like 2350, not 881.
+ sal_Int32 nTextLength = getXPath(pXmlDoc, aPath, "textMaximumFrameWidth"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2350), nTextLength);
+ // MSO doesn't allow much more than 1/5 of the total chart width, so never go higher than that
+ CPPUNIT_ASSERT_LESS(sal_Int32(2370.6), nTextLength);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFixedSizeBarChartVeryLongLabel)
+{
+ // Bar chart area size is fixed (not automatic) so we can't resize
+ // the chart area to let the label break into multiple lines. In this
+ // case the best course of action is to just crop the label text. This
+ // test checks that the rendered text is actually cropped.
+
+ loadFromFile(u"odp/BarChartVeryLongLabel.odp");
+
+ // Select shape 0 which has fixed size chart
+ Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xChartDoc.is());
+
+ Reference<chart2::XAxis> xHAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
+ CPPUNIT_ASSERT(xHAxis.is());
+
+ chart2::ScaleData aScaleData = xHAxis->getScaleData();
+ CPPUNIT_ASSERT(aScaleData.Categories.is());
+
+ Reference<chart2::data::XLabeledDataSequence> xLabeledDataSequence = aScaleData.Categories;
+ CPPUNIT_ASSERT(xLabeledDataSequence.is());
+
+ Reference<chart2::data::XDataSequence> xDataSequence = xLabeledDataSequence->getValues();
+ CPPUNIT_ASSERT(xDataSequence.is());
+
+ Reference<chart2::data::XTextualDataSequence> xTextualDataSequence(xDataSequence, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xTextualDataSequence.is());
+
+ std::vector<OUString> aCategories;
+ const Sequence<OUString> aTextData(xTextualDataSequence->getTextualData());
+ ::std::copy(aTextData.begin(), aTextData.end(),
+ ::std::back_inserter(aCategories));
+
+ // Check that we have a very very long label text
+ CPPUNIT_ASSERT_EQUAL(OUString("Very very very very very very very very very very very loooooooooooong label"), aCategories[0]);
+
+ // Check visible text
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShapes.is());
+
+ uno::Reference<drawing::XShape> xXAxis = getShapeByName(xShapes, "CID/D=0:CS=0:Axis=0,0",
+ // Axis occurs twice in chart xshape representation so need to get the one related to labels
+ [](const uno::Reference<drawing::XShape>& rXShape) -> bool
+ {
+ uno::Reference<drawing::XShapes> xAxisShapes(rXShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xAxisShapes.is());
+ uno::Reference<drawing::XShape> 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<container::XIndexAccess> xIndexAccess(xXAxis, UNO_QUERY_THROW);
+
+ // Check text is actually cropped. Depending on DPI,
+ // it may be "Very very very very very very..." or "Very very very very very ver..."
+ uno::Reference<text::XTextRange> xLabel(xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW);
+ const OUString aLabelString = xLabel->getString();
+ CPPUNIT_ASSERT_LESSEQUAL(sal_Int32(32), aLabelString.getLength());
+ CPPUNIT_ASSERT(aLabelString.endsWith(u"..."));
+
+ uno::Reference<drawing::XShape> xChartWall = getShapeByName(xShapes, "CID/DiagramWall=");
+ CPPUNIT_ASSERT(xChartWall.is());
+
+ // The text shape width should be smaller than the chart wall
+ CPPUNIT_ASSERT_LESS(xChartWall->getSize().Width, xXAxis->getSize().Width);
+
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(7113, xChartWall->getSize().Height, 100);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(398, xXAxis->getSize().Height, 100);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutomaticSizeBarChartVeryLongLabel)
+{
+ // Bar chart area size is automatic so we expect the label to be broken
+ // into multiple lines.
+
+ loadFromFile(u"odp/BarChartVeryLongLabel.odp");
+
+ // Select shape 1, which has an automatic sized chart
+ Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xChartDoc.is());
+
+ Reference<chart2::XAxis> xHAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
+ CPPUNIT_ASSERT(xHAxis.is());
+
+ chart2::ScaleData aScaleData = xHAxis->getScaleData();
+ CPPUNIT_ASSERT(aScaleData.Categories.is());
+
+ Reference<chart2::data::XLabeledDataSequence> xLabeledDataSequence = aScaleData.Categories;
+ CPPUNIT_ASSERT(xLabeledDataSequence.is());
+
+ Reference<chart2::data::XDataSequence> xDataSequence = xLabeledDataSequence->getValues();
+ CPPUNIT_ASSERT(xDataSequence.is());
+
+ Reference<chart2::data::XTextualDataSequence> xTextualDataSequence(xDataSequence, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xTextualDataSequence.is());
+
+ std::vector<OUString> aCategories;
+ const Sequence<OUString> aTextData(xTextualDataSequence->getTextualData());
+ ::std::copy(aTextData.begin(), aTextData.end(),
+ ::std::back_inserter(aCategories));
+
+ // Check that we have a very very long label text
+ CPPUNIT_ASSERT_EQUAL(OUString("Very very very very very very very very very very very loooooooooooong label"), aCategories[0]);
+
+ // Check visible text
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShapes.is());
+
+ uno::Reference<drawing::XShape> xXAxis = getShapeByName(xShapes, "CID/D=0:CS=0:Axis=0,0",
+ // Axis occurs twice in chart xshape representation so need to get the one related to labels
+ [](const uno::Reference<drawing::XShape>& rXShape) -> bool
+ {
+ uno::Reference<drawing::XShapes> xAxisShapes(rXShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xAxisShapes.is());
+ uno::Reference<drawing::XShape> 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<container::XIndexAccess> xIndexAccess(xXAxis, UNO_QUERY_THROW);
+
+ // Check text is unmodified
+ uno::Reference<text::XTextRange> xLabel(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Very very very very very very very very very very very loooooooooooong label"), xLabel->getString());
+
+ uno::Reference<drawing::XShape> xChartWall = getShapeByName(xShapes, "CID/DiagramWall=");
+ CPPUNIT_ASSERT(xChartWall.is());
+
+ // The text shape width should be smaller than the chart wall
+ CPPUNIT_ASSERT_LESS(xChartWall->getSize().Width, xXAxis->getSize().Width);
+
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(7200, xChartWall->getSize().Height, 100);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1192, xXAxis->getSize().Height, 100);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTotalsRowIgnored)
+{
+ loadFromFile(u"xlsx/barchart_totalsrow.xlsx");
+ {
+ uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
+ CPPUNIT_ASSERT(xChartDoc.is());
+
+ Reference<chart2::data::XDataSequence> xDataSeq =
+ getDataSequenceFromDocByRole(xChartDoc, u"values-y");
+ CPPUNIT_ASSERT(xDataSeq.is());
+
+ // Table data range is D2:D9 (8 rows) but because last row is totals row it is ignored
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(7u), xDataSeq->getData().size());
+ }
+ {
+ uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(1, mxComponent);
+ CPPUNIT_ASSERT(xChartDoc.is());
+
+ Reference<chart2::data::XDataSequence> xDataSeq =
+ getDataSequenceFromDocByRole(xChartDoc, u"values-y");
+ CPPUNIT_ASSERT(xDataSeq.is());
+
+ // Table data range is D2:D10 (9 rows) and totals row isn't the last row so it's not ignored
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(9u), xDataSeq->getData().size());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPieChartPlotAreaMarginWithAutomaticLayout)
+{
+ // tdf#91265
+ // Checks the margin and calculation of the plot area for the pie chart inside the chart area.
+
+ loadFromFile(u"pptx/PieChartWithAutomaticLayout_SizeAndPosition.pptx");
+
+ OUString aCheckShapeName = "CID/D=0:CS=0:CT=0:Series=0";
+ // Chart Wuse case Width == Height
+ {
+ // Load chart Chart_2_2 - 2cm x 2cm -
+ auto xDocument = getChartDocFromDrawImpressNamed(0, u"Chart_2_2");
+ CPPUNIT_ASSERT(xDocument.is());
+
+ uno::Reference<chart2::XChartDocument>xChartDocument(xDocument, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xChartDocument.is());
+
+ // Get the shape of the diagram / chart
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDocument, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xDrawPageSupplier.is());
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShapes.is());
+
+ uno::Reference<drawing::XShape> xChartDiagramShape = getShapeByName(xShapes, aCheckShapeName);
+ CPPUNIT_ASSERT(xChartDiagramShape.is());
+
+ // Size
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1300, xChartDiagramShape->getSize().Width, 5); // calculated chart area size - 2 * margin
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1300, xChartDiagramShape->getSize().Height, 5); // calculated chart area size - 2 * margin
+ // Position
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(350, xChartDiagramShape->getPosition().X, 5); // margin
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(350, xChartDiagramShape->getPosition().Y, 5); // margin
+ }
+
+ // Chart use case - Width < Height
+ {
+ // Load chart Chart_3_4 - 3cm x 4cm
+ auto xDocument = getChartDocFromDrawImpressNamed(0, u"Chart_3_4");
+ CPPUNIT_ASSERT(xDocument.is());
+
+ uno::Reference<chart2::XChartDocument>xChartDocument(xDocument, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xChartDocument.is());
+
+ // Get the shape of the diagram / chart
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDocument, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xDrawPageSupplier.is());
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShapes.is());
+
+ uno::Reference<drawing::XShape> xChartDiagramShape = getShapeByName(xShapes, aCheckShapeName);
+ CPPUNIT_ASSERT(xChartDiagramShape.is());
+
+ // Size
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2300, xChartDiagramShape->getSize().Width, 5); // calculated chart area size - 2 * margin
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2300, xChartDiagramShape->getSize().Height, 5); // calculated chart area size - 2 * margin
+ // Position
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(350, xChartDiagramShape->getPosition().X, 5); // margin
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(850, xChartDiagramShape->getPosition().Y, 5); // margin + calculated centering
+ }
+
+ // Chart use case - Width > Height
+ {
+ // Load chart Chart_3_2 - 3cm x 2cm
+ auto xDocument = getChartDocFromDrawImpressNamed(0, u"Chart_3_2");
+ CPPUNIT_ASSERT(xDocument.is());
+
+ uno::Reference<chart2::XChartDocument>xChartDocument(xDocument, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xChartDocument.is());
+
+ // Get the shape of the diagram / chart
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDocument, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xDrawPageSupplier.is());
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShapes.is());
+
+ uno::Reference<drawing::XShape> xChartDiagramShape = getShapeByName(xShapes, aCheckShapeName);
+ CPPUNIT_ASSERT(xChartDiagramShape.is());
+
+ // Size
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1300, xChartDiagramShape->getSize().Width, 5); // calculated chart area size - 2 * margin
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1300, xChartDiagramShape->getSize().Height, 5); // calculated chart area size - 2 * margin
+ // Position
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(850, xChartDiagramShape->getPosition().X, 5); // margin + calculated centering
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(350, xChartDiagramShape->getPosition().Y, 5); // margin
+ }
+}
+} // end of anonymous namespace
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/qa/extras/chart2import2.cxx b/chart2/qa/extras/chart2import2.cxx
index f84254c30c2a..dc9a2cddae46 100644
--- a/chart2/qa/extras/chart2import2.cxx
+++ b/chart2/qa/extras/chart2import2.cxx
@@ -22,88 +22,15 @@
class Chart2ImportTest2 : public ChartTest
{
public:
- 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 testTdf134978();
- void testTdf119138MissingAutoTitleDeleted();
- void testStockChartShiftedCategoryPosition();
- void testTdf133376();
- void testTdf134225();
- void testTdf136105();
- void testTdf91250();
- void testTdf134111();
- void testTdf136752();
- void testTdf137505();
- void testTdf137734();
- void testTdf137874();
- void testTdfCustomShapePos();
- void testTdf121281();
- void testTdf139658();
-
- CPPUNIT_TEST_SUITE(Chart2ImportTest2);
-
- 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(testTdf134978);
- CPPUNIT_TEST(testTdf119138MissingAutoTitleDeleted);
- CPPUNIT_TEST(testStockChartShiftedCategoryPosition);
- CPPUNIT_TEST(testTdf133376);
- CPPUNIT_TEST(testTdf134225);
- CPPUNIT_TEST(testTdf136105);
- CPPUNIT_TEST(testTdf91250);
- CPPUNIT_TEST(testTdf134111);
- CPPUNIT_TEST(testTdf136752);
- CPPUNIT_TEST(testTdf137505);
- CPPUNIT_TEST(testTdf137734);
- CPPUNIT_TEST(testTdf137874);
- CPPUNIT_TEST(testTdfCustomShapePos);
- CPPUNIT_TEST(testTdf121281);
- CPPUNIT_TEST(testTdf139658);
-
- CPPUNIT_TEST_SUITE_END();
+ Chart2ImportTest2()
+ : ChartTest("/chart2/qa/extras/data/")
+ {
+ }
};
-void Chart2ImportTest2::testTdf114179()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf114179)
{
- load(u"/chart2/qa/extras/data/docx/", "testTdf114179.docx");
+ loadFromFile(u"docx/testTdf114179.docx");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
css::uno::Reference<chart2::XDiagram> xDiagram;
@@ -115,9 +42,9 @@ void Chart2ImportTest2::testTdf114179()
CPPUNIT_ASSERT(aSize.Height > 0);
}
-void Chart2ImportTest2::testTdf124243()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf124243)
{
- load(u"/chart2/qa/extras/data/docx/", "tdf124243.docx");
+ loadFromFile(u"docx/tdf124243.docx");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -132,9 +59,9 @@ void Chart2ImportTest2::testTdf124243()
CPPUNIT_ASSERT(!bShow);
}
-void Chart2ImportTest2::testTdf127393()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf127393)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf127393.pptx");
+ loadFromFile(u"pptx/tdf127393.pptx");
// 1st chart
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
@@ -159,9 +86,9 @@ void Chart2ImportTest2::testTdf127393()
CPPUNIT_ASSERT(!aScaleData2.ShiftedCategoryPosition);
}
-void Chart2ImportTest2::testTdf128733()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf128733)
{
- load(u"/chart2/qa/extras/data/odt/", "tdf128733.odt");
+ loadFromFile(u"odt/tdf128733.odt");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -174,9 +101,9 @@ void Chart2ImportTest2::testTdf128733()
CPPUNIT_ASSERT(aScaleData.ShiftedCategoryPosition);
}
-void Chart2ImportTest2::testTdf128432()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf128432)
{
- load(u"/chart2/qa/extras/data/ods/", "tdf128432.ods");
+ loadFromFile(u"ods/tdf128432.ods");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -189,9 +116,9 @@ void Chart2ImportTest2::testTdf128432()
CPPUNIT_ASSERT(aScaleData.ShiftedCategoryPosition);
}
-void Chart2ImportTest2::testTdf128627()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf128627)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf128627.xlsx");
+ loadFromFile(u"xlsx/tdf128627.xlsx");
// Test ShiftedCategoryPosition for Radar Chart
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -204,9 +131,9 @@ void Chart2ImportTest2::testTdf128627()
CPPUNIT_ASSERT(!aScaleData.ShiftedCategoryPosition);
}
-void Chart2ImportTest2::testTdf128634()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf128634)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf128634.xlsx");
+ loadFromFile(u"xlsx/tdf128634.xlsx");
// Test ShiftedCategoryPosition for 3D Charts
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -219,9 +146,9 @@ void Chart2ImportTest2::testTdf128634()
CPPUNIT_ASSERT(aScaleData.ShiftedCategoryPosition);
}
-void Chart2ImportTest2::testTdf130657()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf130657)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf130657.xlsx");
+ loadFromFile(u"xlsx/tdf130657.xlsx");
// Test ShiftedCategoryPosition for charts which is not contain a "crossbetween" OOXML tag.
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -248,10 +175,10 @@ void checkDataLabelProperties(const Reference<chart2::XDataSeries>& xDataSeries,
}
}
-void Chart2ImportTest2::testDeletedDataLabel()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testDeletedDataLabel)
{
- load(u"/chart2/qa/extras/data/xlsx/", "deleted_data_labels.xlsx");
- uno::Reference<chart2::XChartDocument> xChartDoc(getChartCompFromSheet(0, mxComponent),
+ loadFromFile(u"xlsx/deleted_data_labels.xlsx");
+ uno::Reference<chart2::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
UNO_QUERY_THROW);
Reference<chart2::XDataSeries> xDataSeries0 = getDataSeriesFromDoc(xChartDoc, 0);
CPPUNIT_ASSERT(xDataSeries0.is());
@@ -265,9 +192,9 @@ void Chart2ImportTest2::testDeletedDataLabel()
checkDataLabelProperties(xDataSeries1, 2, false);
}
-void Chart2ImportTest2::testDataPointInheritedColorDOCX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testDataPointInheritedColorDOCX)
{
- load(u"/chart2/qa/extras/data/docx/", "data_point_inherited_color.docx");
+ loadFromFile(u"docx/data_point_inherited_color.docx");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
css::uno::Reference<chart2::XDiagram> xDiagram(xChartDoc->getFirstDiagram(), UNO_SET_THROW);
@@ -280,10 +207,10 @@ void Chart2ImportTest2::testDataPointInheritedColorDOCX()
CPPUNIT_ASSERT_EQUAL(sal_Int32(16776960), nColor);
}
-void Chart2ImportTest2::testExternalStrRefsXLSX()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testExternalStrRefsXLSX)
{
- load(u"/chart2/qa/extras/data/xlsx/", "external_str_ref.xlsx");
- uno::Reference<chart2::XChartDocument> xChartDoc(getChartCompFromSheet(0, mxComponent),
+ loadFromFile(u"xlsx/external_str_ref.xlsx");
+ uno::Reference<chart2::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
UNO_QUERY_THROW);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -294,10 +221,10 @@ void Chart2ImportTest2::testExternalStrRefsXLSX()
CPPUNIT_ASSERT_EQUAL(OUString("test2"), aValues[1].get<OUString>());
}
-void Chart2ImportTest2::testSourceNumberFormatComplexCategoriesXLS()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testSourceNumberFormatComplexCategoriesXLS)
{
- load(u"/chart2/qa/extras/data/xls/", "source_number_format_axis.xls");
- uno::Reference<chart2::XChartDocument> xChartDoc(getChartCompFromSheet(0, mxComponent),
+ loadFromFile(u"xls/source_number_format_axis.xls");
+ uno::Reference<chart2::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
UNO_QUERY_THROW);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -307,9 +234,9 @@ void Chart2ImportTest2::testSourceNumberFormatComplexCategoriesXLS()
CPPUNIT_ASSERT(nNumberFormat != 0);
}
-void Chart2ImportTest2::testSimpleCategoryAxis()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testSimpleCategoryAxis)
{
- load(u"/chart2/qa/extras/data/docx/", "testSimpleCategoryAxis.docx");
+ loadFromFile(u"docx/testSimpleCategoryAxis.docx");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -335,9 +262,9 @@ void Chart2ImportTest2::testSimpleCategoryAxis()
CPPUNIT_ASSERT(aCategories[3][0].endsWith("ria 4"));
}
-void Chart2ImportTest2::testMultilevelCategoryAxis()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testMultilevelCategoryAxis)
{
- load(u"/chart2/qa/extras/data/docx/", "testMultilevelCategoryAxis.docx");
+ loadFromFile(u"docx/testMultilevelCategoryAxis.docx");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -364,9 +291,9 @@ void Chart2ImportTest2::testMultilevelCategoryAxis()
CPPUNIT_ASSERT_EQUAL(OUString("Categoria 4"), aCategories[3][1]);
}
-void Chart2ImportTest2::testXaxisValues()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testXaxisValues)
{
- load(u"/chart2/qa/extras/data/docx/", "tdf124083.docx");
+ loadFromFile(u"docx/tdf124083.docx");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -381,9 +308,9 @@ void Chart2ImportTest2::testXaxisValues()
CPPUNIT_ASSERT(std::isnan(*static_cast<const double*>(xSequence[4].getValue())));
}
-void Chart2ImportTest2::testTdf123504()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf123504)
{
- load(u"/chart2/qa/extras/data/ods/", "pie_chart_100_and_0.ods");
+ loadFromFile(u"ods/pie_chart_100_and_0.ods");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -408,14 +335,14 @@ void Chart2ImportTest2::testTdf123504()
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);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(8300.0, aSliceSize.Height, 10);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(8300.0, aSliceSize.Width, 10);
}
-void Chart2ImportTest2::testTdf122765()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf122765)
{
// The horizontal position of the slices was wrong.
- load(u"/chart2/qa/extras/data/pptx/", "tdf122765.pptx");
+ loadFromFile(u"pptx/tdf122765.pptx");
Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 0);
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
@@ -433,14 +360,14 @@ void Chart2ImportTest2::testTdf122765()
CPPUNIT_ASSERT_GREATER(sal_Int32(7000), aSlicePosition.X);
}
-void Chart2ImportTest2::testTdf123206CustomLabelField()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, 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(u"/chart2/qa/extras/data/odp/", "tdf123206.odp"),
- uno::UNO_QUERY_THROW);
+ loadFromFile(u"odp/tdf123206.odp");
+ uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0),
+ uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
@@ -452,9 +379,9 @@ void Chart2ImportTest2::testTdf123206CustomLabelField()
CPPUNIT_ASSERT_EQUAL(OUString("Kiskacsa"), aLabelFields[0]->getString());
}
-void Chart2ImportTest2::testTdf125444PercentageCustomLabel()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf125444PercentageCustomLabel)
{
- load(u"/chart2/qa/extras/data/pptx/", "tdf125444.pptx");
+ loadFromFile(u"pptx/tdf125444.pptx");
// 1st chart
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
@@ -472,10 +399,10 @@ void Chart2ImportTest2::testTdf125444PercentageCustomLabel()
aLabelFields[2]->getFieldType());
}
-void Chart2ImportTest2::testDataPointLabelCustomPos()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testDataPointLabelCustomPos)
{
// test CustomLabelPosition on Bar chart
- load(u"/chart2/qa/extras/data/xlsx/", "testDataPointLabelCustomPos.xlsx");
+ loadFromFile(u"xlsx/testDataPointLabelCustomPos.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -487,18 +414,18 @@ void Chart2ImportTest2::testDataPointLabelCustomPos()
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);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.14621409921671025, aCustomLabelPosition.Primary, 1e-7);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(-5.2887961029923464E-2, aCustomLabelPosition.Secondary, 1e-7);
sal_Int32 aPlacement;
xPropertySet->getPropertyValue("LabelPlacement") >>= aPlacement;
CPPUNIT_ASSERT_EQUAL(chart::DataLabelPlacement::OUTSIDE, aPlacement);
}
-void Chart2ImportTest2::testTdf130032()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf130032)
{
// test CustomLabelPosition on Line chart
- load(u"/chart2/qa/extras/data/xlsx/", "testTdf130032.xlsx");
+ loadFromFile(u"xlsx/testTdf130032.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -510,18 +437,18 @@ void Chart2ImportTest2::testTdf130032()
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);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.0438333333333334, aCustomLabelPosition.Primary, 1e-7);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.086794050743657, aCustomLabelPosition.Secondary, 1e-7);
sal_Int32 aPlacement;
xPropertySet->getPropertyValue("LabelPlacement") >>= aPlacement;
CPPUNIT_ASSERT_EQUAL(chart::DataLabelPlacement::RIGHT, aPlacement);
}
-void Chart2ImportTest2::testTdf134978()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf134978)
{
// test CustomLabelPosition on Pie chart
- load(u"/chart2/qa/extras/data/xlsx/", "tdf134978.xlsx");
+ loadFromFile(u"xlsx/tdf134978.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -537,9 +464,9 @@ void Chart2ImportTest2::testTdf134978()
CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.25635352872557599, aCustomLabelPosition.Secondary, 1e-7);
}
-void Chart2ImportTest2::testTdf119138MissingAutoTitleDeleted()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf119138MissingAutoTitleDeleted)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf119138-missing-autotitledeleted.xlsx");
+ loadFromFile(u"xlsx/tdf119138-missing-autotitledeleted.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -549,9 +476,9 @@ void Chart2ImportTest2::testTdf119138MissingAutoTitleDeleted()
"Missing autoTitleDeleted is implied to be True if title text is present", xTitle.is());
}
-void Chart2ImportTest2::testStockChartShiftedCategoryPosition()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testStockChartShiftedCategoryPosition)
{
- load(u"/chart2/qa/extras/data/odt/", "stock_chart_LO_6_2.odt");
+ loadFromFile(u"odt/stock_chart_LO_6_2.odt");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -564,14 +491,14 @@ void Chart2ImportTest2::testStockChartShiftedCategoryPosition()
CPPUNIT_ASSERT(aScaleData.ShiftedCategoryPosition);
}
-void Chart2ImportTest2::testTdf133376()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf133376)
{
// 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 (!IsDefaultDPI())
return;
- load(u"/chart2/qa/extras/data/xlsx/", "tdf133376.xlsx");
+ loadFromFile(u"xlsx/tdf133376.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -586,13 +513,13 @@ void Chart2ImportTest2::testTdf133376()
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(1082, aLabelPosition.X, 30);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(5462, aLabelPosition.Y, 30);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1624, aLabelPosition.X, 30);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(5635, aLabelPosition.Y, 30);
}
-void Chart2ImportTest2::testTdf134225()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf134225)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf134225.xlsx");
+ loadFromFile(u"xlsx/tdf134225.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -617,19 +544,19 @@ void Chart2ImportTest2::testTdf134225()
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(1669, sal_Int32(aLabelPosition2.X - aLabelPosition1.X), 30);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(2166, sal_Int32(aLabelPosition2.Y - aLabelPosition1.Y), 30);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1493, sal_Int32(aLabelPosition2.X - aLabelPosition1.X), 30);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2015, sal_Int32(aLabelPosition2.Y - aLabelPosition1.Y), 30);
#endif
}
-void Chart2ImportTest2::testTdf136105()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf136105)
{
// 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 (!IsDefaultDPI())
return;
- load(u"/chart2/qa/extras/data/xlsx/", "tdf136105.xlsx");
+ loadFromFile(u"xlsx/tdf136105.xlsx");
// 1st chart with fix inner position and size
{
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
@@ -666,13 +593,13 @@ void Chart2ImportTest2::testTdf136105()
// Check the position of the 1st data point label, which is out from the pie slice
awt::Point aLabelPosition = xDataPointLabel->getPosition();
CPPUNIT_ASSERT_DOUBLES_EQUAL(7978, aLabelPosition.X, 500);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(1048, aLabelPosition.Y, 500);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1550, aLabelPosition.Y, 500);
}
}
-void Chart2ImportTest2::testTdf91250()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf91250)
{
- load(u"/chart2/qa/extras/data/docx/", "tdf91250.docx");
+ loadFromFile(u"docx/tdf91250.docx");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XInternalDataProvider> xInternalProvider(xChartDoc->getDataProvider(),
@@ -691,10 +618,10 @@ void Chart2ImportTest2::testTdf91250()
CPPUNIT_ASSERT_EQUAL(OUString("8.657"), aCategories[3]);
}
-void Chart2ImportTest2::testTdf134111()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf134111)
{
// tdf134111 : To check TextBreak value is true
- load(u"/chart2/qa/extras/data/docx/", "tdf134111.docx");
+ loadFromFile(u"docx/tdf134111.docx");
uno::Reference<chart::XChartDocument> xChartDoc = getChartDocFromWriter(0);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
uno::Reference<chart::XDiagram> mxDiagram(xChartDoc->getDiagram());
@@ -708,9 +635,9 @@ void Chart2ImportTest2::testTdf134111()
CPPUNIT_ASSERT(bTextBreak);
}
-void Chart2ImportTest2::testTdf136752()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf136752)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf136752.xlsx");
+ loadFromFile(u"xlsx/tdf136752.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -729,9 +656,9 @@ void Chart2ImportTest2::testTdf136752()
CPPUNIT_ASSERT_DOUBLES_EQUAL(1458, aLabelPosition.Y, 500);
}
-void Chart2ImportTest2::testTdf137505()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137505)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf137505.xlsx");
+ loadFromFile(u"xlsx/tdf137505.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -749,9 +676,9 @@ void Chart2ImportTest2::testTdf137505()
CPPUNIT_ASSERT_EQUAL(float(12), nFontSize);
}
-void Chart2ImportTest2::testTdf137734()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137734)
{
- load(u"/chart2/qa/extras/data/xlsx/", "tdf137734.xlsx");
+ loadFromFile(u"xlsx/tdf137734.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -776,9 +703,9 @@ void Chart2ImportTest2::testTdf137734()
CPPUNIT_ASSERT_EQUAL(0.0, nRotation);
}
-void Chart2ImportTest2::testTdf137874()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137874)
{
- load(u"/chart2/qa/extras/data/xlsx/", "piechart_legend.xlsx");
+ loadFromFile(u"xlsx/piechart_legend.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
@@ -790,9 +717,36 @@ void Chart2ImportTest2::testTdf137874()
CPPUNIT_ASSERT(xLegendEntry.is());
}
-void Chart2ImportTest2::testTdfCustomShapePos()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf146463)
{
- load(u"/chart2/qa/extras/data/docx/", "testcustomshapepos.docx");
+ loadFromFile(u"ods/tdf146463.ods");
+ Reference<chart2::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent));
+ Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
+ Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
+ Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
+ Reference<chart2::XChartType> xChartType = getChartTypeFromDoc(xChartDoc, 0);
+ std::vector<std::vector<double>> aDataSeriesYValues
+ = getDataSeriesYValuesFromChartType(xChartType);
+ size_t nLegendEntryCount = aDataSeriesYValues.size();
+ CPPUNIT_ASSERT_EQUAL(size_t(14), nLegendEntryCount);
+
+ for (size_t nSeriesIndex = 0; nSeriesIndex < nLegendEntryCount; ++nSeriesIndex)
+ {
+ uno::Reference<drawing::XShape> xLegendEntry
+ = getShapeByName(xShapes, "CID/MultiClick/D=0:CS=0:CT=0:Series="
+ + OUString::number(nSeriesIndex) + ":LegendEntry=0");
+ if (nSeriesIndex == 0)
+ CPPUNIT_ASSERT_MESSAGE("Legend 0 is not visible", xLegendEntry.is());
+ else
+ CPPUNIT_ASSERT_MESSAGE(
+ OString("Legend " + OString::number(nSeriesIndex) + " is visible").getStr(),
+ !xLegendEntry.is());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdfCustomShapePos)
+{
+ loadFromFile(u"docx/testcustomshapepos.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), UNO_QUERY_THROW);
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
@@ -818,9 +772,9 @@ void Chart2ImportTest2::testTdfCustomShapePos()
}
}
-void Chart2ImportTest2::testTdf121281()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf121281)
{
- load(u"/chart2/qa/extras/data/xlsx/", "incorrect_label_position.xlsx");
+ loadFromFile(u"xlsx/incorrect_label_position.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
@@ -837,9 +791,9 @@ void Chart2ImportTest2::testTdf121281()
CPPUNIT_ASSERT_GREATEREQUAL(static_cast<sal_Int32>(0), aLabelPosition.Y);
}
-void Chart2ImportTest2::testTdf139658()
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf139658)
{
- load(u"/chart2/qa/extras/data/docx/", "tdf139658.docx");
+ loadFromFile(u"docx/tdf139658.docx");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XInternalDataProvider> xInternalProvider(xChartDoc->getDataProvider(),
@@ -857,7 +811,81 @@ void Chart2ImportTest2::testTdf139658()
CPPUNIT_ASSERT_EQUAL(OUString("category\"3"), aCategories[2]);
}
-CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest2);
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf146066)
+{
+ loadFromFile(u"ods/tdf146066.ods");
+ Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
+ UNO_QUERY_THROW);
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShapes.is());
+
+ uno::Reference<drawing::XShape> xYAxisShape = getShapeByName(
+ xShapes, "CID/D=0:CS=0:Axis=1,0", // Y Axis
+ // Axis occurs twice in chart xshape representation so need to get the one related to labels
+ [](const uno::Reference<drawing::XShape>& rXShape) -> bool {
+ uno::Reference<drawing::XShapes> xAxisShapes(rXShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xAxisShapes.is());
+ uno::Reference<drawing::XShape> 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<container::XIndexAccess> xIndexAccess(xYAxisShape, UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(8), xIndexAccess->getCount());
+
+ // Check text
+ uno::Reference<text::XTextRange> xLabel0(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("0"), xLabel0->getString());
+ uno::Reference<text::XTextRange> xLabel1(xIndexAccess->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("5"), xLabel1->getString());
+ uno::Reference<text::XTextRange> xLabel2(xIndexAccess->getByIndex(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("10"), xLabel2->getString());
+ uno::Reference<text::XTextRange> xLabel3(xIndexAccess->getByIndex(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("15"), xLabel3->getString());
+ uno::Reference<text::XTextRange> xLabel4(xIndexAccess->getByIndex(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("20"), xLabel4->getString());
+ uno::Reference<text::XTextRange> xLabel5(xIndexAccess->getByIndex(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("25"), xLabel5->getString());
+ uno::Reference<text::XTextRange> xLabel6(xIndexAccess->getByIndex(6), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("30"), xLabel6->getString());
+ uno::Reference<text::XTextRange> xLabel7(xIndexAccess->getByIndex(7), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("35"), xLabel7->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf150434)
+{
+ loadFromFile(u"xlsx/tdf150434.xlsx");
+ Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
+ UNO_QUERY_THROW);
+ Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
+ Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
+ Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
+ Reference<drawing::XShape> xLegend = getShapeByName(xShapes, "CID/D=0:Legend=");
+ CPPUNIT_ASSERT(xLegend.is());
+ awt::Point aPosition = xLegend->getPosition();
+
+ // This failed, if the legend flowed out of the chart area.
+ CPPUNIT_ASSERT_GREATEREQUAL(static_cast<sal_Int32>(0), aPosition.Y);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testChartDataTableWithMultipleLegendEntriesForOneDataSeries)
+{
+ loadFromFile(u"xlsx/DataTable-MultipleLegendEntriesForOneDataSeries.xlsx");
+ // Loading this file caused a crash in the data table code
+
+ Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
+ UNO_QUERY_THROW);
+ Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
+ Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
+ Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
+ Reference<drawing::XShape> xDataTableShape = getShapeByName(xShapes, "CID/D=0:DataTable=");
+ CPPUNIT_ASSERT(xDataTableShape.is());
+}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx
index 02ad9675d930..db416affaa9f 100644
--- a/chart2/qa/extras/charttest.hxx
+++ b/chart2/qa/extras/charttest.hxx
@@ -9,9 +9,7 @@
#pragma once
-#include <test/bootstrapfixture.hxx>
-#include <test/xmltesttools.hxx>
-#include <unotest/macros_test.hxx>
+#include <test/unoapixml_test.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
@@ -28,7 +26,6 @@
#include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
#include <o3tl/string_view.hxx>
#include <unotools/tempfile.hxx>
@@ -67,8 +64,6 @@
#include <com/sun/star/embed/XVisualObject.hpp>
#include <com/sun/star/chart2/RelativeSize.hpp>
-#include <unotools/ucbstreamhelper.hxx>
-
using namespace css;
using namespace css::uno;
@@ -77,160 +72,27 @@ namespace com::sun::star::chart2 { class XDiagram; }
namespace com::sun::star::table { class XTableCharts; }
namespace com::sun::star::table { class XTablePivotCharts; }
-namespace {
-
-struct CheckForChartName
+class ChartTest : public UnoApiXmlTest
{
-private:
- OUString aDir;
-
public:
- explicit CheckForChartName( const OUString& rDir ):
- aDir(rDir) {}
-
- bool operator()(std::u16string_view rName)
+ ChartTest(OUString path)
+ : UnoApiXmlTest(path)
{
- if(!o3tl::starts_with(rName, aDir))
- return false;
-
- if(!o3tl::ends_with(rName, u".xml"))
- return false;
-
- return true;
}
-};
-
-OUString findChartFile(const OUString& rDir, uno::Reference< container::XNameAccess > const & xNames )
-{
- const uno::Sequence<OUString> aNames = xNames->getElementNames();
- const OUString* pElement = std::find_if(aNames.begin(), aNames.end(), CheckForChartName(rDir));
-
- CPPUNIT_ASSERT(pElement != aNames.end());
- return *pElement;
-}
-}
-
-class ChartTest : public test::BootstrapFixture, public unotest::MacrosTest, public XmlTestTools
-{
-public:
- ChartTest():mbSkipValidation(false) {}
- void load( std::u16string_view rDir, const OUString& rFileName );
- std::shared_ptr<utl::TempFile> save( const OUString& rFileName );
- std::shared_ptr<utl::TempFile> reload( const OUString& rFileName );
- uno::Sequence < OUString > getImpressChartColumnDescriptions( std::u16string_view pDir, const char* pName );
- OUString getFileExtension( const OUString& rFileName );
-
- uno::Reference< chart::XChartDocument > getChartDocFromImpress( std::u16string_view pDir, const char* pName );
+ uno::Sequence < OUString > getImpressChartColumnDescriptions(sal_Int32 nPage, sal_Int32 nShape);
uno::Reference<chart::XChartDocument> getChartDocFromDrawImpress( sal_Int32 nPage, sal_Int32 nShape );
+ uno::Reference<chart::XChartDocument> getChartDocFromDrawImpressNamed( sal_Int32 nPage, std::u16string_view rName);
+
uno::Reference<chart::XChartDocument> getChartDocFromWriter( sal_Int32 nShape );
Sequence< OUString > getFormattedDateCategories( const Reference<chart2::XChartDocument>& xChartDoc );
awt::Size getPageSize( const Reference< chart2::XChartDocument > & xChartDoc );
awt::Size getSize(css::uno::Reference<chart2::XDiagram> 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!
-
- /**
- * 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);
};
-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( std::u16string_view 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);
-}
-
-std::shared_ptr<utl::TempFile> ChartTest::save(const OUString& rFilterName)
-{
- uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
- auto aArgs(::comphelper::InitPropertySequence({
- { "FilterName", Any(rFilterName) }
- }));
- std::shared_ptr<utl::TempFile> pTempFile = std::make_shared<utl::TempFile>();
- pTempFile->EnableKillingFile();
- xStorable->storeToURL(pTempFile->GetURL(), aArgs);
-
- return pTempFile;
-}
-
-std::shared_ptr<utl::TempFile> ChartTest::reload(const OUString& rFilterName)
-{
- std::shared_ptr<utl::TempFile> 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);
- }
- 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 )
+Reference< lang::XComponent > getChartCompFromSheet( sal_Int32 nSheet, sal_Int32 nChart, uno::Reference< lang::XComponent > const & xComponent )
{
// let us assume that we only have one chart per sheet
@@ -244,7 +106,7 @@ Reference< lang::XComponent > getChartCompFromSheet( sal_Int32 nSheet, uno::Refe
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< table::XTableChart > xChart( xIACharts->getByIndex(nChart), UNO_QUERY_THROW);
uno::Reference< document::XEmbeddedObjectSupplier > xEmbObjectSupplier(xChart, UNO_QUERY_THROW);
@@ -256,7 +118,7 @@ Reference< lang::XComponent > getChartCompFromSheet( sal_Int32 nSheet, uno::Refe
Reference< chart2::XChartDocument > getChartDocFromSheet( sal_Int32 nSheet, uno::Reference< lang::XComponent > const & xComponent )
{
- uno::Reference< chart2::XChartDocument > xChartDoc ( getChartCompFromSheet(nSheet, xComponent), UNO_QUERY_THROW );
+ uno::Reference< chart2::XChartDocument > xChartDoc ( getChartCompFromSheet(nSheet, 0, xComponent), UNO_QUERY_THROW );
// Update the chart view, so that its draw page is updated and ready for the test
css::uno::Reference<css::frame::XModel> xModel(xChartDoc, css::uno::UNO_QUERY_THROW);
@@ -524,23 +386,6 @@ std::vector<uno::Sequence<uno::Any> > getDataSeriesLabelsFromChartType( const Re
return aRet;
}
-uno::Reference< chart::XChartDocument > ChartTest::getChartDocFromImpress( std::u16string_view 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<chart::XChartDocument> ChartTest::getChartDocFromDrawImpress(
sal_Int32 nPage, sal_Int32 nShape )
{
@@ -566,6 +411,42 @@ uno::Reference<chart::XChartDocument> ChartTest::getChartDocFromDrawImpress(
return xChartDoc;
}
+uno::Reference<chart::XChartDocument> ChartTest::getChartDocFromDrawImpressNamed(sal_Int32 nPage, std::u16string_view rName)
+{
+ uno::Reference<chart::XChartDocument> xChart;
+
+ uno::Reference<drawing::XDrawPagesSupplier> xPages(mxComponent, uno::UNO_QUERY);
+ if (!xPages.is())
+ return xChart;
+
+ uno::Reference<drawing::XDrawPage> xPage(xPages->getDrawPages()->getByIndex(nPage), uno::UNO_QUERY);
+ if (!xPage.is())
+ return xChart;
+
+ for (sal_Int32 i=0; i < xPage->getCount(); ++i)
+ {
+ uno::Reference<container::XNamed> xNamedShape(xPage->getByIndex(i), uno::UNO_QUERY);
+ if (!xNamedShape.is())
+ continue;
+
+ if (xNamedShape->getName() != rName)
+ continue;
+
+ uno::Reference<beans::XPropertySet> xShapeProps(xNamedShape, uno::UNO_QUERY);
+ if (!xShapeProps.is())
+ continue;
+
+ uno::Reference<frame::XModel> xDocModel;
+ xShapeProps->getPropertyValue("Model") >>= xDocModel;
+ if (!xDocModel.is())
+ continue;
+
+ return uno::Reference<chart::XChartDocument>(xDocModel, uno::UNO_QUERY);
+ }
+
+ return xChart;
+}
+
uno::Reference<chart::XChartDocument> ChartTest::getChartDocFromWriter( sal_Int32 nShape )
{
// DO NOT use XDrawPageSupplier since SwVirtFlyDrawObj are not created
@@ -586,9 +467,9 @@ uno::Reference<chart::XChartDocument> ChartTest::getChartDocFromWriter( sal_Int3
return xChartDoc;
}
-uno::Sequence < OUString > ChartTest::getImpressChartColumnDescriptions( std::u16string_view pDir, const char* pName )
+uno::Sequence < OUString > ChartTest::getImpressChartColumnDescriptions(sal_Int32 nPage, sal_Int32 nShape)
{
- uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromImpress( pDir, pName );
+ uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromDrawImpress( nPage, nShape );
uno::Reference< chart::XChartDataArray > xChartData ( xChartDoc->getData(), uno::UNO_QUERY_THROW);
uno::Sequence < OUString > seriesList = xChartData->getColumnDescriptions();
return seriesList;
@@ -721,17 +602,4 @@ getShapeByName(const uno::Reference<drawing::XShapes>& rShapes, const OUString&
return uno::Reference<drawing::XShape>();
}
-xmlDocUniquePtr ChartTest::parseExport(const OUString& rDir, const OUString& rFilterFormat)
-{
- std::shared_ptr<utl::TempFile> pTempFile = save(rFilterFormat);
-
- // Read the XML stream we're interested in.
- uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), pTempFile->GetURL());
- uno::Reference<io::XInputStream> xInputStream(xNameAccess->getByName(findChartFile(rDir, xNameAccess)), uno::UNO_QUERY);
- CPPUNIT_ASSERT(xInputStream.is());
- std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
-
- return parseXmlStream(pStream.get());
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/qa/extras/data/docx/TableOnPage3.docx b/chart2/qa/extras/data/docx/TableOnPage3.docx
new file mode 100644
index 000000000000..79763bd35290
--- /dev/null
+++ b/chart2/qa/extras/data/docx/TableOnPage3.docx
Binary files differ
diff --git a/chart2/qa/extras/data/odp/BarChartVeryLongLabel.odp b/chart2/qa/extras/data/odp/BarChartVeryLongLabel.odp
new file mode 100644
index 000000000000..c627af79e4d5
--- /dev/null
+++ b/chart2/qa/extras/data/odp/BarChartVeryLongLabel.odp
Binary files differ
diff --git a/chart2/qa/extras/data/ods/chartWithDotInSheetName.ods b/chart2/qa/extras/data/ods/chartWithDotInSheetName.ods
new file mode 100644
index 000000000000..873d45f4be8c
--- /dev/null
+++ b/chart2/qa/extras/data/ods/chartWithDotInSheetName.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf101894.ods b/chart2/qa/extras/data/ods/tdf101894.ods
new file mode 100644
index 000000000000..70d8b3a0dd55
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf101894.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf107097.ods b/chart2/qa/extras/data/ods/tdf107097.ods
new file mode 100644
index 000000000000..efa9f1c013f3
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf107097.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf120348.ods b/chart2/qa/extras/data/ods/tdf120348.ods
new file mode 100644
index 000000000000..7a593c1bff7b
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf120348.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf136011.ods b/chart2/qa/extras/data/ods/tdf136011.ods
new file mode 100644
index 000000000000..03a0a7dd6324
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf136011.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf146066.ods b/chart2/qa/extras/data/ods/tdf146066.ods
new file mode 100644
index 000000000000..03abe9ae68ca
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf146066.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf146463.ods b/chart2/qa/extras/data/ods/tdf146463.ods
new file mode 100644
index 000000000000..6214f4a50075
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf146463.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf148142.ods b/chart2/qa/extras/data/ods/tdf148142.ods
new file mode 100644
index 000000000000..9b736a06d19a
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf148142.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf151091.ods b/chart2/qa/extras/data/ods/tdf151091.ods
new file mode 100644
index 000000000000..b3a43b3ceac8
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf151091.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf153706_XY_scatter_chart.ods b/chart2/qa/extras/data/ods/tdf153706_XY_scatter_chart.ods
new file mode 100644
index 000000000000..2c6153ed6ab2
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf153706_XY_scatter_chart.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf158223.ods b/chart2/qa/extras/data/ods/tdf158223.ods
new file mode 100644
index 000000000000..33a71697444f
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf158223.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf39052.ods b/chart2/qa/extras/data/ods/tdf39052.ods
new file mode 100644
index 000000000000..68089195507e
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf39052.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf50934_barOfPie.ods b/chart2/qa/extras/data/ods/tdf50934_barOfPie.ods
new file mode 100644
index 000000000000..d9b577a38a36
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf50934_barOfPie.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf50934_pieOfPie.ods b/chart2/qa/extras/data/ods/tdf50934_pieOfPie.ods
new file mode 100644
index 000000000000..74a9f85f6981
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf50934_pieOfPie.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf62057.ods b/chart2/qa/extras/data/ods/tdf62057.ods
new file mode 100644
index 000000000000..3945c41d0318
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf62057.ods
Binary files differ
diff --git a/chart2/qa/extras/data/ods/tdf99969.ods b/chart2/qa/extras/data/ods/tdf99969.ods
new file mode 100644
index 000000000000..f30212ec73b4
--- /dev/null
+++ b/chart2/qa/extras/data/ods/tdf99969.ods
Binary files differ
diff --git a/chart2/qa/extras/data/pptx/PieChartWithAutomaticLayout_SizeAndPosition.pptx b/chart2/qa/extras/data/pptx/PieChartWithAutomaticLayout_SizeAndPosition.pptx
new file mode 100644
index 000000000000..3f95e932b1c5
--- /dev/null
+++ b/chart2/qa/extras/data/pptx/PieChartWithAutomaticLayout_SizeAndPosition.pptx
Binary files differ
diff --git a/chart2/qa/extras/data/pptx/tdf127720.pptx b/chart2/qa/extras/data/pptx/tdf127720.pptx
new file mode 100644
index 000000000000..b10a4c5ab4ed
--- /dev/null
+++ b/chart2/qa/extras/data/pptx/tdf127720.pptx
Binary files differ
diff --git a/chart2/qa/extras/data/pptx/tdf137691_dataTable.pptx b/chart2/qa/extras/data/pptx/tdf137691_dataTable.pptx
new file mode 100644
index 000000000000..edb465d729af
--- /dev/null
+++ b/chart2/qa/extras/data/pptx/tdf137691_dataTable.pptx
Binary files differ
diff --git a/chart2/qa/extras/data/pptx/tdf146487.pptx b/chart2/qa/extras/data/pptx/tdf146487.pptx
new file mode 100644
index 000000000000..2a78ae5d859b
--- /dev/null
+++ b/chart2/qa/extras/data/pptx/tdf146487.pptx
Binary files differ
diff --git a/chart2/qa/extras/data/pptx/tdf146756_bestFit.pptx b/chart2/qa/extras/data/pptx/tdf146756_bestFit.pptx
new file mode 100644
index 000000000000..628491079a52
--- /dev/null
+++ b/chart2/qa/extras/data/pptx/tdf146756_bestFit.pptx
Binary files differ
diff --git a/chart2/qa/extras/data/pptx/tdf150176.pptx b/chart2/qa/extras/data/pptx/tdf150176.pptx
new file mode 100644
index 000000000000..fa217f92c822
--- /dev/null
+++ b/chart2/qa/extras/data/pptx/tdf150176.pptx
Binary files differ
diff --git a/chart2/qa/extras/data/xlsx/ChartDataTable.xlsx b/chart2/qa/extras/data/xlsx/ChartDataTable.xlsx
new file mode 100644
index 000000000000..fff4f00aeafa
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/ChartDataTable.xlsx
Binary files differ
diff --git a/chart2/qa/extras/data/xlsx/DataTable-MultipleLegendEntriesForOneDataSeries.xlsx b/chart2/qa/extras/data/xlsx/DataTable-MultipleLegendEntriesForOneDataSeries.xlsx
new file mode 100644
index 000000000000..b077fd2e0315
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/DataTable-MultipleLegendEntriesForOneDataSeries.xlsx
Binary files differ
diff --git a/chart2/qa/extras/data/xlsx/barOfPieChart.xlsx b/chart2/qa/extras/data/xlsx/barOfPieChart.xlsx
new file mode 100644
index 000000000000..227ab832a4ac
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/barOfPieChart.xlsx
Binary files differ
diff --git a/chart2/qa/extras/data/xlsx/barchart_totalsrow.xlsx b/chart2/qa/extras/data/xlsx/barchart_totalsrow.xlsx
new file mode 100644
index 000000000000..c87b2b3186ac
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/barchart_totalsrow.xlsx
Binary files differ
diff --git a/chart2/qa/extras/data/xlsx/chart_pie2007.xlsx b/chart2/qa/extras/data/xlsx/chart_pie2007.xlsx
index b122680257c0..583c6720a4da 100644
--- a/chart2/qa/extras/data/xlsx/chart_pie2007.xlsx
+++ b/chart2/qa/extras/data/xlsx/chart_pie2007.xlsx
Binary files differ
diff --git a/chart2/qa/extras/data/xlsx/pieOfPieChart.xlsx b/chart2/qa/extras/data/xlsx/pieOfPieChart.xlsx
new file mode 100644
index 000000000000..b3a1c3588427
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/pieOfPieChart.xlsx
Binary files differ
diff --git a/chart2/qa/extras/data/xlsx/tdf150434.xlsx b/chart2/qa/extras/data/xlsx/tdf150434.xlsx
new file mode 100644
index 000000000000..309a0c4c25f7
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/tdf150434.xlsx
Binary files differ
diff --git a/chart2/qa/extras/data/xlsx/tdf39052.xlsx b/chart2/qa/extras/data/xlsx/tdf39052.xlsx
new file mode 100644
index 000000000000..5b0285bab292
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/tdf39052.xlsx
Binary files differ
diff --git a/chart2/qa/extras/data/xlsx/tdf98690.xlsx b/chart2/qa/extras/data/xlsx/tdf98690.xlsx
new file mode 100644
index 000000000000..4269afa9eadd
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/tdf98690.xlsx
Binary files differ
diff --git a/chart2/qa/extras/uichart.cxx b/chart2/qa/extras/uichart.cxx
new file mode 100644
index 000000000000..50d6c9a27495
--- /dev/null
+++ b/chart2/qa/extras/uichart.cxx
@@ -0,0 +1,569 @@
+/* -*- 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 <comphelper/propertyvalue.hxx>
+
+using namespace ::com::sun::star;
+
+class Chart2UiChartTest : public ChartTest
+{
+public:
+ Chart2UiChartTest()
+ : ChartTest("/chart2/qa/extras/data/")
+ {
+ }
+
+ void testCopyPasteToNewSheet(uno::Reference<chart::XChartDocument> xChartDoc,
+ OUString aObjectName, sal_Int32 nColumns, sal_Int32 nRows);
+};
+
+void Chart2UiChartTest::testCopyPasteToNewSheet(uno::Reference<chart::XChartDocument> xChartDoc,
+ OUString aObjectName, sal_Int32 nColumns,
+ sal_Int32 nRows)
+{
+ CPPUNIT_ASSERT(xChartDoc.is());
+ uno::Reference<chart::XChartDataArray> xChartData(xChartDoc->getData(), uno::UNO_QUERY_THROW);
+
+ uno::Sequence<OUString> aExpectedColumnDescriptions = xChartData->getColumnDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of columns in origin file", nColumns,
+ aExpectedColumnDescriptions.getLength());
+
+ uno::Sequence<OUString> aExpectedRowDescriptions = xChartData->getRowDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of rows in origin file", nRows,
+ aExpectedRowDescriptions.getLength());
+
+ Sequence<Sequence<double>> aExpectedData = xChartData->getData();
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues = {
+ comphelper::makePropertyValue("ToObject", aObjectName),
+ };
+ dispatchCommand(mxComponent, ".uno:GoToObject", aPropertyValues);
+
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+
+ // create a new document
+ load("private:factory/scalc");
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+
+ uno::Reference<chart2::XChartDocument> xChartDoc2 = getChartDocFromSheet(0, mxComponent);
+ CPPUNIT_ASSERT(xChartDoc2.is());
+
+ uno::Reference<chart::XChartDataArray> xDataArray(xChartDoc2->getDataProvider(),
+ UNO_QUERY_THROW);
+
+ Sequence<OUString> aColumnDesc = xDataArray->getColumnDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of columns in destination file", nColumns,
+ aColumnDesc.getLength());
+ for (sal_Int32 i = 0; i < nColumns; ++i)
+ {
+ OString sMessage("Incorrect description in column: " + OString::number(i));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), aExpectedColumnDescriptions[i],
+ aColumnDesc[i]);
+ }
+
+ Sequence<OUString> aRowDesc = xDataArray->getRowDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of rows in destination file", nRows,
+ aRowDesc.getLength());
+ for (sal_Int32 i = 0; i < nRows; ++i)
+ {
+ OString sMessage("Incorrect description in row: " + OString::number(i));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), aExpectedRowDescriptions[i], aRowDesc[i]);
+ }
+
+ Sequence<Sequence<double>> aData = xDataArray->getData();
+
+ for (sal_Int32 nRowIdx = 0; nRowIdx < nRows; ++nRowIdx)
+ {
+ for (sal_Int32 nColIdx = 0; nColIdx < nColumns; ++nColIdx)
+ {
+ double nValue = aData[nRowIdx][nColIdx];
+ double nExpected = aExpectedData[nRowIdx][nColIdx];
+ OString sMessage("Incorrect value in Col: " + OString::number(nColIdx)
+ + " Row: " + OString::number(nRowIdx));
+
+ if (std::isnan(nValue))
+ {
+ // On paste, 0 becomes NaN, check whether it's expected
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(sMessage.getStr(), 0.0, nExpected, 1e-1);
+ }
+ else
+ {
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(sMessage.getStr(), nExpected, nValue, 1e-1);
+ }
+ }
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf99969)
+{
+ loadFromFile(u"ods/tdf99969.ods");
+ uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
+ uno::UNO_QUERY_THROW);
+ sal_Int32 nColumns = 2;
+ sal_Int32 nRows = 6;
+ CPPUNIT_ASSERT(xChartDoc.is());
+ uno::Reference<chart::XChartDataArray> xChartData(xChartDoc->getData(), uno::UNO_QUERY_THROW);
+
+ uno::Sequence<OUString> aExpectedColumnDescriptions = xChartData->getColumnDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of columns in origin file", nColumns,
+ aExpectedColumnDescriptions.getLength());
+
+ uno::Sequence<OUString> aExpectedRowDescriptions = xChartData->getRowDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of rows in origin file", nRows,
+ aExpectedRowDescriptions.getLength());
+
+ Sequence<Sequence<double>> aExpectedData = xChartData->getData();
+
+ dispatchCommand(mxComponent, ".uno:GoToCell",
+ { comphelper::makePropertyValue("ToPoint", uno::Any(OUString("C2:L25"))) });
+
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+
+ // create a new document
+ load("private:factory/scalc");
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+
+ uno::Reference<chart2::XChartDocument> xChartDoc2 = getChartDocFromSheet(0, mxComponent);
+ CPPUNIT_ASSERT(xChartDoc2.is());
+
+ uno::Reference<chart::XChartDataArray> xDataArray(xChartDoc2->getDataProvider(),
+ UNO_QUERY_THROW);
+
+ Sequence<OUString> aColumnDesc = xDataArray->getColumnDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of columns in destination file", nColumns,
+ aColumnDesc.getLength());
+ for (sal_Int32 i = 0; i < nColumns; ++i)
+ {
+ // Without the fix in place, this test would have failed with
+ // - Expected: ABC
+ // - Actual :
+ // - Incorrect description in column: 0
+ OString sMessage("Incorrect description in column: " + OString::number(i));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), aExpectedColumnDescriptions[i],
+ aColumnDesc[i]);
+ }
+
+ Sequence<OUString> aRowDesc = xDataArray->getRowDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of rows in destination file", nRows,
+ aRowDesc.getLength());
+ for (sal_Int32 i = 0; i < nRows; ++i)
+ {
+ OString sMessage("Incorrect description in row: " + OString::number(i));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), aExpectedRowDescriptions[i], aRowDesc[i]);
+ }
+
+ Sequence<Sequence<double>> aData = xDataArray->getData();
+
+ for (sal_Int32 nRowIdx = 0; nRowIdx < nRows; ++nRowIdx)
+ {
+ for (sal_Int32 nColIdx = 0; nColIdx < nColumns; ++nColIdx)
+ {
+ double nValue = aData[nRowIdx][nColIdx];
+ double nExpected = aExpectedData[nRowIdx][nColIdx];
+ OString sMessage("Incorrect value in Col: " + OString::number(nColIdx)
+ + " Row: " + OString::number(nRowIdx));
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), nExpected, nValue);
+ }
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf120348)
+{
+ loadFromFile(u"ods/tdf120348.ods");
+ uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
+ uno::UNO_QUERY_THROW);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 0
+ // - Actual : 3.33625955201419
+ // - Incorrect value in Col: 2 Row: 51
+ testCopyPasteToNewSheet(xChartDoc, "Object 2", 4, 158);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf151091)
+{
+ std::vector<OUString> aExpected
+ = { u"Ωφέλιμο"_ustr, u"Επικίνδυνο"_ustr, u"Απόσταση"_ustr, u"Μάσκα"_ustr, u"Εμβόλιο"_ustr };
+
+ loadFromFile(u"ods/tdf151091.ods");
+ uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
+ uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xChartDoc.is());
+ uno::Reference<chart::XChartDataArray> xChartData(xChartDoc->getData(), uno::UNO_QUERY_THROW);
+ uno::Sequence<OUString> aSeriesList = xChartData->getColumnDescriptions();
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5), aSeriesList.getLength());
+
+ for (size_t i = 0; i < 5; ++i)
+ CPPUNIT_ASSERT_EQUAL(aExpected[i], aSeriesList[i]);
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues = {
+ comphelper::makePropertyValue("ToObject", OUString("Object 1")),
+ };
+ dispatchCommand(mxComponent, ".uno:GoToObject", aPropertyValues);
+
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+
+ // create a new writer document
+ load("private:factory/swriter");
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+
+ aSeriesList = getWriterChartColumnDescriptions(mxComponent);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 5
+ // - Actual : 1
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5), aSeriesList.getLength());
+
+ for (size_t i = 0; i < 5; ++i)
+ CPPUNIT_ASSERT_EQUAL(aExpected[i], aSeriesList[i]);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf107097)
+{
+ loadFromFile(u"ods/tdf107097.ods");
+ uno::Reference<chart::XChartDocument> xChartDoc(getPivotChartDocFromSheet(1, mxComponent),
+ uno::UNO_QUERY_THROW);
+ testCopyPasteToNewSheet(xChartDoc, "Object 1", 4, 12);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf136011)
+{
+ loadFromFile(u"ods/tdf136011.ods");
+ uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
+ uno::UNO_QUERY_THROW);
+ testCopyPasteToNewSheet(xChartDoc, "Object 1", 3, 9);
+
+ loadFromFile(u"ods/tdf136011.ods");
+ uno::Reference<chart::XChartDocument> xChartDoc2(getChartCompFromSheet(0, 1, mxComponent),
+ uno::UNO_QUERY_THROW);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: Test 1 1
+ // - Actual : Test 1
+ // - Incorrect description in row: 0
+ testCopyPasteToNewSheet(xChartDoc2, "Object 2", 3, 9);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf62057)
+{
+ loadFromFile(u"ods/tdf62057.ods");
+ uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
+ uno::UNO_QUERY_THROW);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 2
+ // - Actual : 7
+ // - Incorrect number of columns in destination file
+ testCopyPasteToNewSheet(xChartDoc, "Object 1", 2, 6);
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf98690)
+{
+ loadFromFile(u"xlsx/tdf98690.xlsx");
+ uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
+ uno::UNO_QUERY_THROW);
+
+ CPPUNIT_ASSERT(xChartDoc.is());
+ uno::Reference<chart::XChartDataArray> xChartData(xChartDoc->getData(), uno::UNO_QUERY_THROW);
+ uno::Sequence<OUString> aSeriesList = xChartData->getColumnDescriptions();
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(6), aSeriesList.getLength());
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues = {
+ comphelper::makePropertyValue("ToObject", OUString("Chart 2")),
+ };
+ dispatchCommand(mxComponent, ".uno:GoToObject", aPropertyValues);
+
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+
+ // create a new document
+ load("private:factory/scalc");
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+
+ uno::Reference<chart::XChartDocument> xChartDoc2(getChartCompFromSheet(0, 0, mxComponent),
+ uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xChartDoc2.is());
+ uno::Reference<chart::XChartDataArray> xChartData2(xChartDoc2->getData(), uno::UNO_QUERY_THROW);
+ uno::Sequence<OUString> aSeriesList2 = xChartData2->getColumnDescriptions();
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 12
+ // - Actual : 0
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(12), aSeriesList2.getLength());
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf101894)
+{
+ loadFromFile(u"ods/tdf101894.ods");
+ uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
+ uno::UNO_QUERY_THROW);
+
+ CPPUNIT_ASSERT(xChartDoc.is());
+ uno::Reference<chart::XChartDataArray> xChartData(xChartDoc->getData(), uno::UNO_QUERY_THROW);
+
+ uno::Sequence<OUString> aExpectedColumnDescriptions = xChartData->getColumnDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of columns in origin file",
+ static_cast<sal_Int32>(12),
+ aExpectedColumnDescriptions.getLength());
+
+ uno::Sequence<OUString> aExpectedRowDescriptions = xChartData->getRowDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of rows in origin file",
+ static_cast<sal_Int32>(8), aExpectedRowDescriptions.getLength());
+
+ Sequence<Sequence<double>> aExpectedData = xChartData->getData();
+
+ // Create a copy of the sheet and move to the end
+ uno::Sequence<beans::PropertyValue> aArgs(
+ comphelper::InitPropertySequence({ { "DocName", uno::Any(OUString("tdf101894")) },
+ { "Index", uno::Any(sal_uInt16(32767)) },
+ { "Copy", uno::Any(true) } }));
+ dispatchCommand(mxComponent, ".uno:Move", aArgs);
+
+ uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
+ uno::Reference<container::XIndexAccess> xIA(xDoc->getSheets(), UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xIA->getCount());
+
+ for (sal_Int32 sheetIndex = 0; sheetIndex < 2; ++sheetIndex)
+ {
+ uno::Reference<chart::XChartDocument> xChartDoc2(
+ getChartCompFromSheet(sheetIndex, 0, mxComponent), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xChartDoc2.is());
+ uno::Reference<chart::XChartDataArray> xChartData2(xChartDoc2->getData(),
+ uno::UNO_QUERY_THROW);
+
+ uno::Sequence<OUString> aColumnDescriptions = xChartData2->getColumnDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of columns in origin file",
+ static_cast<sal_Int32>(12), aColumnDescriptions.getLength());
+ for (sal_Int32 i = 0; i < 12; ++i)
+ {
+ OString sMessage("Incorrect description in column: " + OString::number(i));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), aExpectedColumnDescriptions[i],
+ aColumnDescriptions[i]);
+ }
+
+ uno::Sequence<OUString> aRowDescriptions = xChartData2->getRowDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of rows in origin file",
+ static_cast<sal_Int32>(8), aRowDescriptions.getLength());
+ for (sal_Int32 i = 0; i < 8; ++i)
+ {
+ OString sMessage("Incorrect description in row: " + OString::number(i));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), aExpectedRowDescriptions[i],
+ aRowDescriptions[i]);
+ }
+
+ Sequence<Sequence<double>> aData = xChartData2->getData();
+
+ for (sal_Int32 nRowIdx = 0; nRowIdx < 8; ++nRowIdx)
+ {
+ for (sal_Int32 nColIdx = 0; nColIdx < 12; ++nColIdx)
+ {
+ double nValue = aData[nRowIdx][nColIdx];
+ double nExpected = aExpectedData[nRowIdx][nColIdx];
+ OString sMessage("Incorrect value in Col: " + OString::number(nColIdx)
+ + " Row: " + OString::number(nRowIdx));
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 1
+ // - Actual : 2.2250738585072e-308
+ // - Incorrect value in Col: 0 Row: 0
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(sMessage.getStr(), nExpected, nValue, 1e-1);
+ }
+ }
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testCopyPasteChartWithDotInSheetName)
+{
+ loadFromFile(u"ods/chartWithDotInSheetName.ods");
+ uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
+ uno::UNO_QUERY_THROW);
+
+ CPPUNIT_ASSERT(xChartDoc.is());
+ uno::Reference<chart::XChartDataArray> xChartData(xChartDoc->getData(), uno::UNO_QUERY_THROW);
+
+ uno::Sequence<OUString> aExpectedColumnDescriptions = xChartData->getColumnDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of columns in origin file",
+ static_cast<sal_Int32>(4),
+ aExpectedColumnDescriptions.getLength());
+
+ uno::Sequence<OUString> aExpectedRowDescriptions = xChartData->getRowDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of rows in origin file",
+ static_cast<sal_Int32>(7), aExpectedRowDescriptions.getLength());
+
+ Sequence<Sequence<double>> aExpectedData = xChartData->getData();
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+
+ uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
+ { { "Name", uno::Any(OUString("NewTab")) }, { "Index", uno::Any(sal_uInt16(2)) } }));
+ dispatchCommand(mxComponent, ".uno:Insert", aArgs);
+
+ uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
+ uno::Reference<container::XIndexAccess> xIA(xDoc->getSheets(), UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xIA->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+
+ for (sal_Int32 sheetIndex = 0; sheetIndex < 2; ++sheetIndex)
+ {
+ uno::Reference<chart::XChartDocument> xChartDoc2(
+ getChartCompFromSheet(sheetIndex, 0, mxComponent), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xChartDoc2.is());
+ uno::Reference<chart::XChartDataArray> xChartData2(xChartDoc2->getData(),
+ uno::UNO_QUERY_THROW);
+
+ uno::Sequence<OUString> aColumnDescriptions = xChartData2->getColumnDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of columns in origin file",
+ static_cast<sal_Int32>(4), aColumnDescriptions.getLength());
+ for (sal_Int32 i = 0; i < 4; ++i)
+ {
+ OString sMessage("Incorrect description in column: " + OString::number(i));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), aExpectedColumnDescriptions[i],
+ aColumnDescriptions[i]);
+ }
+
+ uno::Sequence<OUString> aRowDescriptions = xChartData2->getRowDescriptions();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect number of rows in origin file",
+ static_cast<sal_Int32>(7), aRowDescriptions.getLength());
+ for (sal_Int32 i = 0; i < 7; ++i)
+ {
+ OString sMessage("Incorrect description in row: " + OString::number(i));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), aExpectedRowDescriptions[i],
+ aRowDescriptions[i]);
+ }
+
+ Sequence<Sequence<double>> aData = xChartData2->getData();
+
+ for (sal_Int32 nRowIdx = 0; nRowIdx < 7; ++nRowIdx)
+ {
+ for (sal_Int32 nColIdx = 0; nColIdx < 4; ++nColIdx)
+ {
+ double nValue = aData[nRowIdx][nColIdx];
+ double nExpected = aExpectedData[nRowIdx][nColIdx];
+ OString sMessage("Incorrect value in Col: " + OString::number(nColIdx)
+ + " Row: " + OString::number(nRowIdx));
+
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(sMessage.getStr(), nExpected, nValue, 1e-1);
+ }
+ }
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf158223)
+{
+ loadFromFile(u"ods/tdf158223.ods");
+
+ uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
+ uno::Reference<container::XIndexAccess> xIA(xDoc->getSheets(), UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), xIA->getCount());
+
+ for (sal_Int32 sheetIndex = 0; sheetIndex < 2; ++sheetIndex)
+ {
+ OUString sExpectedValuesX("$Tabelle" + OUString::number(sheetIndex + 1) + ".$A$2:$A$11");
+ OUString sExpectedValuesY("$Tabelle" + OUString::number(sheetIndex + 1) + ".$B$2:$B$11");
+ uno::Reference<chart2::XChartDocument> xChartDoc
+ = getChartDocFromSheet(sheetIndex, mxComponent);
+ Reference<chart2::data::XDataSequence> xValuesX
+ = getDataSequenceFromDocByRole(xChartDoc, u"values-x");
+ CPPUNIT_ASSERT_EQUAL(sExpectedValuesX, xValuesX->getSourceRangeRepresentation());
+ Reference<chart2::data::XDataSequence> xValuesY
+ = getDataSequenceFromDocByRole(xChartDoc, u"values-y");
+ CPPUNIT_ASSERT_EQUAL(sExpectedValuesY, xValuesY->getSourceRangeRepresentation());
+ }
+
+ // Remove last sheet
+ uno::Sequence<beans::PropertyValue> aArgs(
+ comphelper::InitPropertySequence({ { "Index", uno::Any(sal_uInt16(3)) } }));
+ dispatchCommand(mxComponent, ".uno:Remove", aArgs);
+
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xIA->getCount());
+
+ for (sal_Int32 sheetIndex = 0; sheetIndex < 2; ++sheetIndex)
+ {
+ OUString sExpectedValuesX("$Tabelle" + OUString::number(sheetIndex + 1) + ".$A$2:$A$11");
+ OUString sExpectedValuesY("$Tabelle" + OUString::number(sheetIndex + 1) + ".$B$2:$B$11");
+ uno::Reference<chart2::XChartDocument> xChartDoc
+ = getChartDocFromSheet(sheetIndex, mxComponent);
+ Reference<chart2::data::XDataSequence> xValuesX
+ = getDataSequenceFromDocByRole(xChartDoc, u"values-x");
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: $Tabelle2.$A$2:$A$11
+ // - Actual : $Tabelle2.$A$2:$Tabelle1.$A$11
+ CPPUNIT_ASSERT_EQUAL(sExpectedValuesX, xValuesX->getSourceRangeRepresentation());
+ Reference<chart2::data::XDataSequence> xValuesY
+ = getDataSequenceFromDocByRole(xChartDoc, u"values-y");
+ CPPUNIT_ASSERT_EQUAL(sExpectedValuesY, xValuesY->getSourceRangeRepresentation());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf153706)
+{
+ // Load a spreadsheet with a to-page XY scatter chart with the sheet as data source
+ loadFromFile(u"ods/tdf153706_XY_scatter_chart.ods");
+
+ // Select the cell range around the chart, and copy the range to clipboard, including the chart
+ dispatchCommand(mxComponent, u".uno:GoToCell"_ustr,
+ { comphelper::makePropertyValue(u"ToPoint"_ustr, u"D1:K23"_ustr) });
+ dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
+
+ // create a new document
+ load(u"private:factory/scalc"_ustr);
+
+ // Paste; this must create a chart with own data source having a proper copy of the data
+ dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
+
+ css::uno::Reference xChartDoc(getChartDocFromSheet(0, mxComponent), css::uno::UNO_SET_THROW);
+ auto xDataArray(xChartDoc->getDataProvider().queryThrow<chart::XChartDataArray>());
+
+ css::uno::Sequence<Sequence<double>> aData = xDataArray->getData();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aData.getLength());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aData[0].getLength());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aData[1].getLength());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aData[2].getLength());
+ CPPUNIT_ASSERT_EQUAL(2.0, aData[0][0]);
+ CPPUNIT_ASSERT_EQUAL(3.0, aData[0][1]);
+ CPPUNIT_ASSERT_EQUAL(3.0, aData[1][0]);
+ CPPUNIT_ASSERT_EQUAL(2.0, aData[1][1]);
+ CPPUNIT_ASSERT_EQUAL(4.0, aData[2][0]);
+ CPPUNIT_ASSERT_EQUAL(1.0, aData[2][1]);
+
+ // Without the fix, this would fail with
+ // - Expected: 1
+ // - Actual : 2
+ // i.e., the X values were treated as another Y series
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc));
+
+ auto xSeries(getDataSeriesFromDoc(xChartDoc, 0).queryThrow<chart2::data::XDataSource>());
+ auto sequences = xSeries->getDataSequences();
+ // Without the fix, this would fail with
+ // - Expected: 2
+ // - Actual : 1
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), sequences.getLength());
+
+ auto propX(sequences[0]->getValues().queryThrow<beans::XPropertySet>());
+ // Without the fix, this would fail with
+ // - Expected: values-x
+ // - Actual : values-y
+ CPPUNIT_ASSERT_EQUAL(u"values-x"_ustr, propX->getPropertyValue("Role").get<OUString>());
+
+ auto propY(sequences[1]->getValues().queryThrow<beans::XPropertySet>());
+ CPPUNIT_ASSERT_EQUAL(u"values-y"_ustr, propY->getPropertyValue("Role").get<OUString>());
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/qa/extras/xshape/chart2xshape.cxx b/chart2/qa/extras/xshape/chart2xshape.cxx
index 18141a9ede88..b968a29c8940 100644
--- a/chart2/qa/extras/xshape/chart2xshape.cxx
+++ b/chart2/qa/extras/xshape/chart2xshape.cxx
@@ -21,54 +21,71 @@
class Chart2XShapeTest : public ChartTest
{
public:
+ Chart2XShapeTest()
+ : ChartTest("/chart2/qa/extras/xshape/data/")
+ {
+ }
+
+ void testTdf150832();
+ void testTdf149204();
+ void testTdf151424();
void testFdo75075();
void testPropertyMappingBarChart();
void testPieChartLabels1();
void testPieChartLabels2();
void testPieChartLabels3();
void testPieChartLabels4();
+ void testChart();
void testTdf76649TrendLineBug();
void testTdf88154LabelRotatedLayout();
CPPUNIT_TEST_SUITE(Chart2XShapeTest);
+ CPPUNIT_TEST(testTdf150832);
+ CPPUNIT_TEST(testTdf149204);
+ CPPUNIT_TEST(testTdf151424);
CPPUNIT_TEST(testFdo75075);
CPPUNIT_TEST(testPropertyMappingBarChart);
CPPUNIT_TEST(testPieChartLabels1);
CPPUNIT_TEST(testPieChartLabels2);
CPPUNIT_TEST(testPieChartLabels3);
CPPUNIT_TEST(testPieChartLabels4);
+ CPPUNIT_TEST(testChart);
CPPUNIT_TEST(testTdf76649TrendLineBug);
CPPUNIT_TEST(testTdf88154LabelRotatedLayout);
CPPUNIT_TEST_SUITE_END();
private:
- void compareAgainstReference(std::u16string_view rReferenceFile);
+ void compareAgainstReference(std::u16string_view rDump, std::u16string_view rReferenceFile);
OUString getXShapeDumpString();
xmlDocUniquePtr getXShapeDumpXmlDoc();
};
namespace
{
-bool checkDumpAgainstFile(const OUString& rDump, std::u16string_view aFilePath,
+OUString getShapeDump(css::uno::Reference<css::chart::XChartDocument> const& doc)
+{
+ return css::uno::Reference<css::qa::XDumper>(doc, css::uno::UNO_QUERY_THROW)->dump("shapes");
+}
+
+bool checkDumpAgainstFile(std::u16string_view rDump, std::u16string_view aFilePath,
char const* toleranceFile)
{
OString aOFile = OUStringToOString(aFilePath, RTL_TEXTENCODING_UTF8);
- CPPUNIT_ASSERT_MESSAGE("dump is empty", !rDump.isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("dump is empty", !rDump.empty());
OString aDump = OUStringToOString(rDump, RTL_TEXTENCODING_UTF8);
- return doXMLDiff(aOFile.getStr(), aDump.getStr(), static_cast<int>(rDump.getLength()),
+ return doXMLDiff(aOFile.getStr(), aDump.getStr(), static_cast<int>(rDump.size()),
toleranceFile);
}
}
OUString Chart2XShapeTest::getXShapeDumpString()
{
- uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, mxComponent),
+ uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
UNO_QUERY_THROW);
- uno::Reference<qa::XDumper> xDumper(xChartDoc, UNO_QUERY_THROW);
- return xDumper->dump();
+ return getShapeDump(xChartDoc);
}
xmlDocUniquePtr Chart2XShapeTest::getXShapeDumpXmlDoc()
@@ -78,33 +95,86 @@ xmlDocUniquePtr Chart2XShapeTest::getXShapeDumpXmlDoc()
return xmlDocUniquePtr(xmlParseDoc(reinterpret_cast<const xmlChar*>(aXmlDump.getStr())));
}
-void Chart2XShapeTest::compareAgainstReference(std::u16string_view rReferenceFile)
+void Chart2XShapeTest::compareAgainstReference(std::u16string_view rDump,
+ std::u16string_view rReferenceFile)
{
checkDumpAgainstFile(
- getXShapeDumpString(),
- OUStringConcatenation(
- m_directories.getPathFromSrc(u"/chart2/qa/extras/xshape/data/reference/")
- + rReferenceFile),
+ rDump,
+ Concat2View(m_directories.getPathFromSrc(u"/chart2/qa/extras/xshape/data/reference/")
+ + rReferenceFile),
OUStringToOString(
m_directories.getPathFromSrc(u"/chart2/qa/extras/xshape/data/reference/tolerance.xml"),
RTL_TEXTENCODING_UTF8)
.getStr());
}
+void Chart2XShapeTest::testTdf150832()
+{
+ // 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 (!IsDefaultDPI())
+ return;
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 319
+ // - Actual : 0
+ loadFromFile(u"xls/tdf150832.xls");
+ compareAgainstReference(getXShapeDumpString(), u"tdf150832.xml");
+}
+
+void Chart2XShapeTest::testTdf149204()
+{
+ // 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 (!IsDefaultDPI())
+ return;
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 12230
+ // - Actual : 12940
+ // - Node: /XShapes/XShape[2]
+ // - Attr: sizeX
+ loadFromFile(u"pptx/tdf149204.pptx");
+ uno::Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 0);
+ compareAgainstReference(getShapeDump(xChartDoc), u"tdf149204.xml");
+}
+
+void Chart2XShapeTest::testTdf151424()
+{
+ // 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 (!IsDefaultDPI())
+ return;
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 3717
+ // - Actual : 3530
+ // - Node: /XShapes/XShape[2]/XShapes/XShape[1]
+ // - Attr: positionX
+ loadFromFile(u"ods/tdf151424.ods");
+ compareAgainstReference(getXShapeDumpString(), u"tdf151424.xml");
+}
+
void Chart2XShapeTest::testFdo75075()
{
-#if 0
- load("chart2/qa/extras/xshape/data/ods/", "fdo75075.ods");
- compareAgainstReference("fdo75075.xml");
-#endif
+ // 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 (!IsDefaultDPI())
+ return;
+
+ loadFromFile(u"ods/fdo75075.ods");
+ compareAgainstReference(getXShapeDumpString(), u"fdo75075.xml");
}
void Chart2XShapeTest::testPropertyMappingBarChart()
{
-#if 0
- load("chart2/qa/extras/xshape/data/ods/", "property-mapping-bar.ods");
- compareAgainstReference("property-mapping-bar.xml");
-#endif
+ // 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 (!IsDefaultDPI())
+ return;
+
+ loadFromFile(u"ods/property-mapping-bar.ods");
+ compareAgainstReference(getXShapeDumpString(), u"property-mapping-bar.xml");
}
void Chart2XShapeTest::testPieChartLabels1()
@@ -115,8 +185,8 @@ void Chart2XShapeTest::testPieChartLabels1()
return;
// inside placement for the best fit case
- load(u"chart2/qa/extras/xshape/data/xlsx/", "tdf90839-1.xlsx");
- compareAgainstReference(u"tdf90839-1.xml");
+ loadFromFile(u"xlsx/tdf90839-1.xlsx");
+ compareAgainstReference(getXShapeDumpString(), u"tdf90839-1.xml");
}
void Chart2XShapeTest::testPieChartLabels2()
@@ -126,9 +196,9 @@ void Chart2XShapeTest::testPieChartLabels2()
if (!IsDefaultDPI())
return;
- // text wrap: wrap all text labels except one
- load(u"chart2/qa/extras/xshape/data/xlsx/", "tdf90839-2.xlsx");
- compareAgainstReference(u"tdf90839-2.xml");
+ // text wrap: wrap all text labels except Yellow one
+ loadFromFile(u"xlsx/tdf90839-2.xlsx");
+ compareAgainstReference(getXShapeDumpString(), u"tdf90839-2.xml");
}
void Chart2XShapeTest::testPieChartLabels3()
@@ -138,9 +208,9 @@ void Chart2XShapeTest::testPieChartLabels3()
if (!IsDefaultDPI())
return;
- // text wrap: wrap no text label except one
- load(u"chart2/qa/extras/xshape/data/xlsx/", "tdf90839-3.xlsx");
- compareAgainstReference(u"tdf90839-3.xml");
+ // text wrap: wrap no text label except Yellow one
+ loadFromFile(u"xlsx/tdf90839-3.xlsx");
+ compareAgainstReference(getXShapeDumpString(), u"tdf90839-3.xml");
}
void Chart2XShapeTest::testPieChartLabels4()
@@ -151,8 +221,19 @@ void Chart2XShapeTest::testPieChartLabels4()
return;
// data value and percent value are centered horizontally
- load(u"chart2/qa/extras/xshape/data/ods/", "tdf90839-4.ods");
- compareAgainstReference(u"tdf90839-4.xml");
+ loadFromFile(u"ods/tdf90839-4.ods");
+ compareAgainstReference(getXShapeDumpString(), u"tdf90839-4.xml");
+}
+
+void Chart2XShapeTest::testChart()
+{
+ // 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 (!IsDefaultDPI())
+ return;
+
+ loadFromFile(u"ods/testChart.ods");
+ compareAgainstReference(getXShapeDumpString(), u"testChart.xml");
}
void Chart2XShapeTest::testTdf76649TrendLineBug()
@@ -160,75 +241,74 @@ 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(u"chart2/qa/extras/xshape/data/ods/", "tdf76649_TrendLineBug.ods");
+ loadFromFile(u"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);
+ assertXPath(pXmlDoc, "//XShape[@name='CID/D=0:CS=0:CT=0:Series=0:Curve=0']"_ostr, 1);
}
void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
{
- load(u"chart2/qa/extras/xshape/data/pptx/", "tdf88154_LabelRotatedLayout.pptx");
+ loadFromFile(u"pptx/tdf88154_LabelRotatedLayout.pptx");
uno::Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 5);
- uno::Reference<qa::XDumper> xDumper(xChartDoc, UNO_QUERY_THROW);
- OUString rDump = xDumper->dump();
+ OUString rDump = getShapeDump(xChartDoc);
OString aXmlDump = OUStringToOString(rDump, RTL_TEXTENCODING_UTF8);
xmlDocUniquePtr pXmlDoc(xmlParseDoc(reinterpret_cast<const xmlChar*>(aXmlDump.getStr())));
{
- OString aPath("//XShape[@text='Oct-12']/Transformation");
+ OString aPath("//XShape[@text='Oct-12']/Transformation"_ostr);
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();
+ double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1"_ostr).toDouble();
+ double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2"_ostr).toDouble();
+ double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1"_ostr).toDouble();
+ double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2"_ostr).toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8);
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
}
{
- OString aPath("//XShape[@text='Nov-12']/Transformation");
+ OString aPath("//XShape[@text='Nov-12']/Transformation"_ostr);
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();
+ double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1"_ostr).toDouble();
+ double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2"_ostr).toDouble();
+ double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1"_ostr).toDouble();
+ double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2"_ostr).toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8);
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
}
{
- OString aPath("//XShape[@text='Dec-12']/Transformation");
+ OString aPath("//XShape[@text='Dec-12']/Transformation"_ostr);
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();
+ double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1"_ostr).toDouble();
+ double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2"_ostr).toDouble();
+ double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1"_ostr).toDouble();
+ double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2"_ostr).toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8);
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
}
{
- OString aPath("//XShape[@text='May-13']/Transformation");
+ OString aPath("//XShape[@text='May-13']/Transformation"_ostr);
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();
+ double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1"_ostr).toDouble();
+ double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2"_ostr).toDouble();
+ double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1"_ostr).toDouble();
+ double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2"_ostr).toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8);
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
}
{
- OString aPath("//XShape[@text='Jan-14']/Transformation");
+ OString aPath("//XShape[@text='Jan-14']/Transformation"_ostr);
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();
+ double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1"_ostr).toDouble();
+ double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2"_ostr).toDouble();
+ double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1"_ostr).toDouble();
+ double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2"_ostr).toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8);
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
diff --git a/chart2/qa/extras/xshape/data/ods/tdf151424.ods b/chart2/qa/extras/xshape/data/ods/tdf151424.ods
new file mode 100644
index 000000000000..d1f6adcc24b1
--- /dev/null
+++ b/chart2/qa/extras/xshape/data/ods/tdf151424.ods
Binary files differ
diff --git a/chart2/qa/extras/xshape/data/ods/tdf90839-4.ods b/chart2/qa/extras/xshape/data/ods/tdf90839-4.ods
index fe9950f2797f..3126ac1759e3 100644
--- a/chart2/qa/extras/xshape/data/ods/tdf90839-4.ods
+++ b/chart2/qa/extras/xshape/data/ods/tdf90839-4.ods
Binary files differ
diff --git a/chart2/qa/unit/data/ods/testChart.ods b/chart2/qa/extras/xshape/data/ods/testChart.ods
index 956f57d525f0..956f57d525f0 100644
--- a/chart2/qa/unit/data/ods/testChart.ods
+++ b/chart2/qa/extras/xshape/data/ods/testChart.ods
Binary files differ
diff --git a/chart2/qa/extras/xshape/data/pptx/tdf149204.pptx b/chart2/qa/extras/xshape/data/pptx/tdf149204.pptx
new file mode 100644
index 000000000000..60d006547a2a
--- /dev/null
+++ b/chart2/qa/extras/xshape/data/pptx/tdf149204.pptx
Binary files differ
diff --git a/chart2/qa/extras/xshape/data/reference/fdo75075.xml b/chart2/qa/extras/xshape/data/reference/fdo75075.xml
index 93becacffaa8..6f401aa41edd 100644
--- a/chart2/qa/extras/xshape/data/reference/fdo75075.xml
+++ b/chart2/qa/extras/xshape/data/reference/fdo75075.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<XShapes>
- <XShape positionX="0" positionY="0" sizeX="16000" sizeY="9000" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="0" positionY="0" sizeX="16000" sizeY="9000" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -14,10 +14,10 @@
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="180" sizeX="12878" sizeY="8640" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
+ <XShape positionX="320" positionY="180" sizeX="12850" sizeY="8640" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
<XShapes>
- <XShape positionX="1497" positionY="354" sizeX="10417" sizeY="7872" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="1527" positionY="379" sizeX="10339" sizeY="7794" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -25,13 +25,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="10418.000000" column2="0.000000" column3="1497.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="354.000000"/>
+ <Line1 column1="10340.000000" column2="0.000000" column3="1527.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="379.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="180" sizeX="12878" sizeY="8640" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="180" sizeX="12850" sizeY="8640" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -39,19 +39,19 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="12879.000000" column2="0.000000" column3="320.000000"/>
+ <Line1 column1="12851.000000" column2="0.000000" column3="320.000000"/>
<Line2 column1="0.000000" column2="8641.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="180" sizeX="12878" sizeY="8640" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="320" positionY="180" sizeX="12850" sizeY="8640" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="1347" positionY="352" sizeX="10717" sizeY="8023" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="1377" positionY="378" sizeX="10639" sizeY="7944" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="1497" positionY="354" sizeX="10417" sizeY="7872" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
+ <XShape positionX="1527" positionY="379" sizeX="10339" sizeY="7794" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
<XShapes>
- <XShape positionX="1497" positionY="354" sizeX="10417" sizeY="7872" type="com.sun.star.drawing.RectangleShape" name="CID/DiagramWall=" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="e6e6e6" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="1527" positionY="379" sizeX="10339" sizeY="7794" type="com.sun.star.drawing.RectangleShape" name="CID/DiagramWall=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="e6e6e6" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -59,216 +59,216 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="10418.000000" column2="0.000000" column3="1497.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="354.000000"/>
+ <Line1 column1="10340.000000" column2="0.000000" column3="1527.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="379.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="10418.000000" column2="0.000000" column3="1497.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="354.000000"/>
+ <Line1 column1="10340.000000" column2="0.000000" column3="1527.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="379.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1347" positionY="352" sizeX="10717" sizeY="8023" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
+ <XShape positionX="1377" positionY="378" sizeX="10639" sizeY="7944" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
<XShapes>
- <XShape positionX="1497" positionY="353" sizeX="10417" sizeY="7872" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="1527" positionY="378" sizeX="10339" sizeY="7794" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="1497" positionY="353" sizeX="10417" sizeY="7872" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0:Grid=0">
+ <XShape positionX="1527" positionY="378" sizeX="10339" sizeY="7794" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0:Grid=0">
<XShapes>
- <XShape positionX="1497" positionY="353" sizeX="10417" sizeY="7872" type="com.sun.star.drawing.PolyLineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="1527" positionY="378" sizeX="10339" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="11914" positionY="8225"/>
- <point positionX="1497" positionY="8225"/>
+ <point positionX="11866" positionY="8172"/>
+ <point positionX="1527" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="11914" positionY="7241"/>
- <point positionX="1497" positionY="7241"/>
+ <point positionX="11866" positionY="7197"/>
+ <point positionX="1527" positionY="7197"/>
</pointSequence>
<pointSequence>
- <point positionX="11914" positionY="6257"/>
- <point positionX="1497" positionY="6257"/>
+ <point positionX="11866" positionY="6223"/>
+ <point positionX="1527" positionY="6223"/>
</pointSequence>
<pointSequence>
- <point positionX="11914" positionY="5273"/>
- <point positionX="1497" positionY="5273"/>
+ <point positionX="11866" positionY="5249"/>
+ <point positionX="1527" positionY="5249"/>
</pointSequence>
<pointSequence>
- <point positionX="11914" positionY="4289"/>
- <point positionX="1497" positionY="4289"/>
+ <point positionX="11866" positionY="4275"/>
+ <point positionX="1527" positionY="4275"/>
</pointSequence>
<pointSequence>
- <point positionX="11914" positionY="3305"/>
- <point positionX="1497" positionY="3305"/>
+ <point positionX="11866" positionY="3300"/>
+ <point positionX="1527" positionY="3300"/>
</pointSequence>
<pointSequence>
- <point positionX="11914" positionY="2321"/>
- <point positionX="1497" positionY="2321"/>
+ <point positionX="11866" positionY="2326"/>
+ <point positionX="1527" positionY="2326"/>
</pointSequence>
<pointSequence>
- <point positionX="11914" positionY="1337"/>
- <point positionX="1497" positionY="1337"/>
+ <point positionX="11866" positionY="1352"/>
+ <point positionX="1527" positionY="1352"/>
</pointSequence>
<pointSequence>
- <point positionX="11914" positionY="353"/>
- <point positionX="1497" positionY="353"/>
+ <point positionX="11866" positionY="378"/>
+ <point positionX="1527" positionY="378"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="10417" positionY="7872"/>
- <point positionX="0" positionY="7872"/>
+ <point positionX="10339" positionY="7794"/>
+ <point positionX="0" positionY="7794"/>
</pointSequence>
<pointSequence>
- <point positionX="10417" positionY="6888"/>
- <point positionX="0" positionY="6888"/>
+ <point positionX="10339" positionY="6819"/>
+ <point positionX="0" positionY="6819"/>
</pointSequence>
<pointSequence>
- <point positionX="10417" positionY="5904"/>
- <point positionX="0" positionY="5904"/>
+ <point positionX="10339" positionY="5845"/>
+ <point positionX="0" positionY="5845"/>
</pointSequence>
<pointSequence>
- <point positionX="10417" positionY="4920"/>
- <point positionX="0" positionY="4920"/>
+ <point positionX="10339" positionY="4871"/>
+ <point positionX="0" positionY="4871"/>
</pointSequence>
<pointSequence>
- <point positionX="10417" positionY="3936"/>
- <point positionX="0" positionY="3936"/>
+ <point positionX="10339" positionY="3897"/>
+ <point positionX="0" positionY="3897"/>
</pointSequence>
<pointSequence>
- <point positionX="10417" positionY="2952"/>
- <point positionX="0" positionY="2952"/>
+ <point positionX="10339" positionY="2922"/>
+ <point positionX="0" positionY="2922"/>
</pointSequence>
<pointSequence>
- <point positionX="10417" positionY="1968"/>
- <point positionX="0" positionY="1968"/>
+ <point positionX="10339" positionY="1948"/>
+ <point positionX="0" positionY="1948"/>
</pointSequence>
<pointSequence>
- <point positionX="10417" positionY="984"/>
- <point positionX="0" positionY="984"/>
+ <point positionX="10339" positionY="974"/>
+ <point positionX="0" positionY="974"/>
</pointSequence>
<pointSequence>
- <point positionX="10417" positionY="0"/>
+ <point positionX="10339" positionY="0"/>
<point positionX="0" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="10417.000000" column2="0.000000" column3="1497.000000"/>
- <Line2 column1="0.000000" column2="7872.000000" column3="353.000000"/>
+ <Line1 column1="10339.000000" column2="0.000000" column3="1527.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1497" positionY="353" sizeX="0" sizeY="7872" type="com.sun.star.drawing.PolyLineShape" name="HandlesOnly" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="NONE">
+ <XShape positionX="1527" positionY="378" sizeX="0" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" name="HandlesOnly" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="NONE">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="1497" positionY="8225"/>
- <point positionX="1497" positionY="7241"/>
- <point positionX="1497" positionY="6257"/>
- <point positionX="1497" positionY="5273"/>
- <point positionX="1497" positionY="4289"/>
- <point positionX="1497" positionY="3305"/>
- <point positionX="1497" positionY="2321"/>
- <point positionX="1497" positionY="1337"/>
- <point positionX="1497" positionY="353"/>
+ <point positionX="1527" positionY="8172"/>
+ <point positionX="1527" positionY="7197"/>
+ <point positionX="1527" positionY="6223"/>
+ <point positionX="1527" positionY="5249"/>
+ <point positionX="1527" positionY="4275"/>
+ <point positionX="1527" positionY="3300"/>
+ <point positionX="1527" positionY="2326"/>
+ <point positionX="1527" positionY="1352"/>
+ <point positionX="1527" positionY="378"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="7872"/>
- <point positionX="0" positionY="6888"/>
- <point positionX="0" positionY="5904"/>
- <point positionX="0" positionY="4920"/>
- <point positionX="0" positionY="3936"/>
- <point positionX="0" positionY="2952"/>
- <point positionX="0" positionY="1968"/>
- <point positionX="0" positionY="984"/>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="0" positionY="6819"/>
+ <point positionX="0" positionY="5845"/>
+ <point positionX="0" positionY="4871"/>
+ <point positionX="0" positionY="3897"/>
+ <point positionX="0" positionY="2922"/>
+ <point positionX="0" positionY="1948"/>
+ <point positionX="0" positionY="974"/>
<point positionX="0" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="0.000000" column2="0.000000" column3="1497.000000"/>
- <Line2 column1="0.000000" column2="7872.000000" column3="353.000000"/>
+ <Line1 column1="0.000000" column2="0.000000" column3="1527.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="10418.000000" column2="0.000000" column3="1497.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="353.000000"/>
+ <Line1 column1="10340.000000" column2="0.000000" column3="1527.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="10418.000000" column2="0.000000" column3="1497.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="353.000000"/>
+ <Line1 column1="10340.000000" column2="0.000000" column3="1527.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1347" positionY="352" sizeX="10717" sizeY="8023" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="1377" positionY="378" sizeX="10639" sizeY="7944" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="1497" positionY="8225" sizeX="10417" sizeY="150" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
+ <XShape positionX="1527" positionY="8172" sizeX="10339" sizeY="150" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
<XShapes>
- <XShape positionX="1497" positionY="8225" sizeX="10417" sizeY="150" type="com.sun.star.drawing.PolyLineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="1527" positionY="8172" sizeX="10339" sizeY="150" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="1497" positionY="8375"/>
- <point positionX="1497" positionY="8225"/>
+ <point positionX="1527" positionY="8322"/>
+ <point positionX="1527" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="1497" positionY="8375"/>
- <point positionX="1497" positionY="8225"/>
+ <point positionX="1527" positionY="8322"/>
+ <point positionX="1527" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="3580" positionY="8375"/>
- <point positionX="3580" positionY="8225"/>
+ <point positionX="3594" positionY="8322"/>
+ <point positionX="3594" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="3580" positionY="8375"/>
- <point positionX="3580" positionY="8225"/>
+ <point positionX="3594" positionY="8322"/>
+ <point positionX="3594" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="5663" positionY="8375"/>
- <point positionX="5663" positionY="8225"/>
+ <point positionX="5662" positionY="8322"/>
+ <point positionX="5662" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="5663" positionY="8375"/>
- <point positionX="5663" positionY="8225"/>
+ <point positionX="5662" positionY="8322"/>
+ <point positionX="5662" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="7747" positionY="8375"/>
- <point positionX="7747" positionY="8225"/>
+ <point positionX="7730" positionY="8322"/>
+ <point positionX="7730" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="7747" positionY="8375"/>
- <point positionX="7747" positionY="8225"/>
+ <point positionX="7730" positionY="8322"/>
+ <point positionX="7730" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="9830" positionY="8375"/>
- <point positionX="9830" positionY="8225"/>
+ <point positionX="9798" positionY="8322"/>
+ <point positionX="9798" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="9830" positionY="8375"/>
- <point positionX="9830" positionY="8225"/>
+ <point positionX="9798" positionY="8322"/>
+ <point positionX="9798" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="11914" positionY="8375"/>
- <point positionX="11914" positionY="8225"/>
+ <point positionX="11866" positionY="8322"/>
+ <point positionX="11866" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="11914" positionY="8375"/>
- <point positionX="11914" positionY="8225"/>
+ <point positionX="11866" positionY="8322"/>
+ <point positionX="11866" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
@@ -281,225 +281,225 @@
<point positionX="0" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="2083" positionY="150"/>
- <point positionX="2083" positionY="0"/>
+ <point positionX="2067" positionY="150"/>
+ <point positionX="2067" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="2083" positionY="150"/>
- <point positionX="2083" positionY="0"/>
+ <point positionX="2067" positionY="150"/>
+ <point positionX="2067" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="4166" positionY="150"/>
- <point positionX="4166" positionY="0"/>
+ <point positionX="4135" positionY="150"/>
+ <point positionX="4135" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="4166" positionY="150"/>
- <point positionX="4166" positionY="0"/>
+ <point positionX="4135" positionY="150"/>
+ <point positionX="4135" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="6250" positionY="150"/>
- <point positionX="6250" positionY="0"/>
+ <point positionX="6203" positionY="150"/>
+ <point positionX="6203" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="6250" positionY="150"/>
- <point positionX="6250" positionY="0"/>
+ <point positionX="6203" positionY="150"/>
+ <point positionX="6203" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="8333" positionY="150"/>
- <point positionX="8333" positionY="0"/>
+ <point positionX="8271" positionY="150"/>
+ <point positionX="8271" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="8333" positionY="150"/>
- <point positionX="8333" positionY="0"/>
+ <point positionX="8271" positionY="150"/>
+ <point positionX="8271" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="10417" positionY="150"/>
- <point positionX="10417" positionY="0"/>
+ <point positionX="10339" positionY="150"/>
+ <point positionX="10339" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="10417" positionY="150"/>
- <point positionX="10417" positionY="0"/>
+ <point positionX="10339" positionY="150"/>
+ <point positionX="10339" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="10417.000000" column2="0.000000" column3="1497.000000"/>
- <Line2 column1="0.000000" column2="150.000000" column3="8225.000000"/>
+ <Line1 column1="10339.000000" column2="0.000000" column3="1527.000000"/>
+ <Line2 column1="0.000000" column2="150.000000" column3="8172.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1497" positionY="8225" sizeX="10417" sizeY="0" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="1527" positionY="8172" sizeX="10339" sizeY="0" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="1497" positionY="8225"/>
- <point positionX="11914" positionY="8225"/>
+ <point positionX="1527" positionY="8172"/>
+ <point positionX="11866" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
<point positionX="0" positionY="0"/>
- <point positionX="10417" positionY="0"/>
+ <point positionX="10339" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="10417.000000" column2="0.000000" column3="1497.000000"/>
- <Line2 column1="0.000000" column2="0.000000" column3="8225.000000"/>
+ <Line1 column1="10339.000000" column2="0.000000" column3="1527.000000"/>
+ <Line2 column1="0.000000" column2="0.000000" column3="8172.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="10418.000000" column2="0.000000" column3="1497.000000"/>
- <Line2 column1="0.000000" column2="151.000000" column3="8225.000000"/>
+ <Line1 column1="10340.000000" column2="0.000000" column3="1527.000000"/>
+ <Line2 column1="0.000000" column2="151.000000" column3="8172.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1347" positionY="353" sizeX="150" sizeY="7872" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShape positionX="1377" positionY="378" sizeX="150" sizeY="7794" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
<XShapes>
- <XShape positionX="1347" positionY="353" sizeX="150" sizeY="7872" type="com.sun.star.drawing.PolyLineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="1377" positionY="378" sizeX="150" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="1347" positionY="8225"/>
- <point positionX="1497" positionY="8225"/>
+ <point positionX="1377" positionY="8172"/>
+ <point positionX="1527" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="8225"/>
- <point positionX="1497" positionY="8225"/>
+ <point positionX="1377" positionY="8172"/>
+ <point positionX="1527" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="7241"/>
- <point positionX="1497" positionY="7241"/>
+ <point positionX="1377" positionY="7197"/>
+ <point positionX="1527" positionY="7197"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="7241"/>
- <point positionX="1497" positionY="7241"/>
+ <point positionX="1377" positionY="7197"/>
+ <point positionX="1527" positionY="7197"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="6257"/>
- <point positionX="1497" positionY="6257"/>
+ <point positionX="1377" positionY="6223"/>
+ <point positionX="1527" positionY="6223"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="6257"/>
- <point positionX="1497" positionY="6257"/>
+ <point positionX="1377" positionY="6223"/>
+ <point positionX="1527" positionY="6223"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="5273"/>
- <point positionX="1497" positionY="5273"/>
+ <point positionX="1377" positionY="5249"/>
+ <point positionX="1527" positionY="5249"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="5273"/>
- <point positionX="1497" positionY="5273"/>
+ <point positionX="1377" positionY="5249"/>
+ <point positionX="1527" positionY="5249"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="4289"/>
- <point positionX="1497" positionY="4289"/>
+ <point positionX="1377" positionY="4275"/>
+ <point positionX="1527" positionY="4275"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="4289"/>
- <point positionX="1497" positionY="4289"/>
+ <point positionX="1377" positionY="4275"/>
+ <point positionX="1527" positionY="4275"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="3305"/>
- <point positionX="1497" positionY="3305"/>
+ <point positionX="1377" positionY="3300"/>
+ <point positionX="1527" positionY="3300"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="3305"/>
- <point positionX="1497" positionY="3305"/>
+ <point positionX="1377" positionY="3300"/>
+ <point positionX="1527" positionY="3300"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="2321"/>
- <point positionX="1497" positionY="2321"/>
+ <point positionX="1377" positionY="2326"/>
+ <point positionX="1527" positionY="2326"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="2321"/>
- <point positionX="1497" positionY="2321"/>
+ <point positionX="1377" positionY="2326"/>
+ <point positionX="1527" positionY="2326"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="1337"/>
- <point positionX="1497" positionY="1337"/>
+ <point positionX="1377" positionY="1352"/>
+ <point positionX="1527" positionY="1352"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="1337"/>
- <point positionX="1497" positionY="1337"/>
+ <point positionX="1377" positionY="1352"/>
+ <point positionX="1527" positionY="1352"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="353"/>
- <point positionX="1497" positionY="353"/>
+ <point positionX="1377" positionY="378"/>
+ <point positionX="1527" positionY="378"/>
</pointSequence>
<pointSequence>
- <point positionX="1347" positionY="353"/>
- <point positionX="1497" positionY="353"/>
+ <point positionX="1377" positionY="378"/>
+ <point positionX="1527" positionY="378"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="7872"/>
- <point positionX="150" positionY="7872"/>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="150" positionY="7794"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="7872"/>
- <point positionX="150" positionY="7872"/>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="150" positionY="7794"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="6888"/>
- <point positionX="150" positionY="6888"/>
+ <point positionX="0" positionY="6819"/>
+ <point positionX="150" positionY="6819"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="6888"/>
- <point positionX="150" positionY="6888"/>
+ <point positionX="0" positionY="6819"/>
+ <point positionX="150" positionY="6819"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="5904"/>
- <point positionX="150" positionY="5904"/>
+ <point positionX="0" positionY="5845"/>
+ <point positionX="150" positionY="5845"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="5904"/>
- <point positionX="150" positionY="5904"/>
+ <point positionX="0" positionY="5845"/>
+ <point positionX="150" positionY="5845"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="4920"/>
- <point positionX="150" positionY="4920"/>
+ <point positionX="0" positionY="4871"/>
+ <point positionX="150" positionY="4871"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="4920"/>
- <point positionX="150" positionY="4920"/>
+ <point positionX="0" positionY="4871"/>
+ <point positionX="150" positionY="4871"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="3936"/>
- <point positionX="150" positionY="3936"/>
+ <point positionX="0" positionY="3897"/>
+ <point positionX="150" positionY="3897"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="3936"/>
- <point positionX="150" positionY="3936"/>
+ <point positionX="0" positionY="3897"/>
+ <point positionX="150" positionY="3897"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="2952"/>
- <point positionX="150" positionY="2952"/>
+ <point positionX="0" positionY="2922"/>
+ <point positionX="150" positionY="2922"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="2952"/>
- <point positionX="150" positionY="2952"/>
+ <point positionX="0" positionY="2922"/>
+ <point positionX="150" positionY="2922"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="1968"/>
- <point positionX="150" positionY="1968"/>
+ <point positionX="0" positionY="1948"/>
+ <point positionX="150" positionY="1948"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="1968"/>
- <point positionX="150" positionY="1968"/>
+ <point positionX="0" positionY="1948"/>
+ <point positionX="150" positionY="1948"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="984"/>
- <point positionX="150" positionY="984"/>
+ <point positionX="0" positionY="974"/>
+ <point positionX="150" positionY="974"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="984"/>
- <point positionX="150" positionY="984"/>
+ <point positionX="0" positionY="974"/>
+ <point positionX="150" positionY="974"/>
</pointSequence>
<pointSequence>
<point positionX="0" positionY="0"/>
@@ -511,168 +511,168 @@
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="150.000000" column2="0.000000" column3="1347.000000"/>
- <Line2 column1="0.000000" column2="7872.000000" column3="353.000000"/>
+ <Line1 column1="150.000000" column2="0.000000" column3="1377.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1497" positionY="353" sizeX="0" sizeY="7872" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="1527" positionY="378" sizeX="0" sizeY="7794" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="1497" positionY="8225"/>
- <point positionX="1497" positionY="353"/>
+ <point positionX="1527" positionY="8172"/>
+ <point positionX="1527" positionY="378"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="7872"/>
+ <point positionX="0" positionY="7794"/>
<point positionX="0" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="0.000000" column2="0.000000" column3="1497.000000"/>
- <Line2 column1="0.000000" column2="7872.000000" column3="353.000000"/>
+ <Line1 column1="0.000000" column2="0.000000" column3="1527.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="151.000000" column2="0.000000" column3="1347.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="353.000000"/>
+ <Line1 column1="151.000000" column2="0.000000" column3="1377.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="11914" positionY="352" sizeX="150" sizeY="7873" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,1">
+ <XShape positionX="11866" positionY="378" sizeX="150" sizeY="7794" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,1">
<XShapes>
- <XShape positionX="11914" positionY="352" sizeX="150" sizeY="7873" type="com.sun.star.drawing.PolyLineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="11866" positionY="378" sizeX="150" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="12064" positionY="8225"/>
- <point positionX="11914" positionY="8225"/>
+ <point positionX="12016" positionY="8172"/>
+ <point positionX="11866" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="8225"/>
- <point positionX="11914" positionY="8225"/>
+ <point positionX="12016" positionY="8172"/>
+ <point positionX="11866" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="7100"/>
- <point positionX="11914" positionY="7100"/>
+ <point positionX="12016" positionY="7058"/>
+ <point positionX="11866" positionY="7058"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="7100"/>
- <point positionX="11914" positionY="7100"/>
+ <point positionX="12016" positionY="7058"/>
+ <point positionX="11866" positionY="7058"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="5975"/>
- <point positionX="11914" positionY="5975"/>
+ <point positionX="12016" positionY="5945"/>
+ <point positionX="11866" positionY="5945"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="5975"/>
- <point positionX="11914" positionY="5975"/>
+ <point positionX="12016" positionY="5945"/>
+ <point positionX="11866" positionY="5945"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="4851"/>
- <point positionX="11914" positionY="4851"/>
+ <point positionX="12016" positionY="4831"/>
+ <point positionX="11866" positionY="4831"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="4851"/>
- <point positionX="11914" positionY="4851"/>
+ <point positionX="12016" positionY="4831"/>
+ <point positionX="11866" positionY="4831"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="3726"/>
- <point positionX="11914" positionY="3726"/>
+ <point positionX="12016" positionY="3718"/>
+ <point positionX="11866" positionY="3718"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="3726"/>
- <point positionX="11914" positionY="3726"/>
+ <point positionX="12016" positionY="3718"/>
+ <point positionX="11866" positionY="3718"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="2602"/>
- <point positionX="11914" positionY="2602"/>
+ <point positionX="12016" positionY="2604"/>
+ <point positionX="11866" positionY="2604"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="2602"/>
- <point positionX="11914" positionY="2602"/>
+ <point positionX="12016" positionY="2604"/>
+ <point positionX="11866" positionY="2604"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="1477"/>
- <point positionX="11914" positionY="1477"/>
+ <point positionX="12016" positionY="1491"/>
+ <point positionX="11866" positionY="1491"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="1477"/>
- <point positionX="11914" positionY="1477"/>
+ <point positionX="12016" positionY="1491"/>
+ <point positionX="11866" positionY="1491"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="352"/>
- <point positionX="11914" positionY="352"/>
+ <point positionX="12016" positionY="378"/>
+ <point positionX="11866" positionY="378"/>
</pointSequence>
<pointSequence>
- <point positionX="12064" positionY="352"/>
- <point positionX="11914" positionY="352"/>
+ <point positionX="12016" positionY="378"/>
+ <point positionX="11866" positionY="378"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="150" positionY="7873"/>
- <point positionX="0" positionY="7873"/>
+ <point positionX="150" positionY="7794"/>
+ <point positionX="0" positionY="7794"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="7873"/>
- <point positionX="0" positionY="7873"/>
+ <point positionX="150" positionY="7794"/>
+ <point positionX="0" positionY="7794"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="6748"/>
- <point positionX="0" positionY="6748"/>
+ <point positionX="150" positionY="6680"/>
+ <point positionX="0" positionY="6680"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="6748"/>
- <point positionX="0" positionY="6748"/>
+ <point positionX="150" positionY="6680"/>
+ <point positionX="0" positionY="6680"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="5623"/>
- <point positionX="0" positionY="5623"/>
+ <point positionX="150" positionY="5567"/>
+ <point positionX="0" positionY="5567"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="5623"/>
- <point positionX="0" positionY="5623"/>
+ <point positionX="150" positionY="5567"/>
+ <point positionX="0" positionY="5567"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="4499"/>
- <point positionX="0" positionY="4499"/>
+ <point positionX="150" positionY="4453"/>
+ <point positionX="0" positionY="4453"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="4499"/>
- <point positionX="0" positionY="4499"/>
+ <point positionX="150" positionY="4453"/>
+ <point positionX="0" positionY="4453"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="3374"/>
- <point positionX="0" positionY="3374"/>
+ <point positionX="150" positionY="3340"/>
+ <point positionX="0" positionY="3340"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="3374"/>
- <point positionX="0" positionY="3374"/>
+ <point positionX="150" positionY="3340"/>
+ <point positionX="0" positionY="3340"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="2250"/>
- <point positionX="0" positionY="2250"/>
+ <point positionX="150" positionY="2226"/>
+ <point positionX="0" positionY="2226"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="2250"/>
- <point positionX="0" positionY="2250"/>
+ <point positionX="150" positionY="2226"/>
+ <point positionX="0" positionY="2226"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="1125"/>
- <point positionX="0" positionY="1125"/>
+ <point positionX="150" positionY="1113"/>
+ <point positionX="0" positionY="1113"/>
</pointSequence>
<pointSequence>
- <point positionX="150" positionY="1125"/>
- <point positionX="0" positionY="1125"/>
+ <point positionX="150" positionY="1113"/>
+ <point positionX="0" positionY="1113"/>
</pointSequence>
<pointSequence>
<point positionX="150" positionY="0"/>
@@ -684,53 +684,53 @@
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="150.000000" column2="0.000000" column3="11914.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="352.000000"/>
+ <Line1 column1="150.000000" column2="0.000000" column3="11866.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="11914" positionY="353" sizeX="0" sizeY="7872" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="11866" positionY="378" sizeX="0" sizeY="7794" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="11914" positionY="8225"/>
- <point positionX="11914" positionY="353"/>
+ <point positionX="11866" positionY="8172"/>
+ <point positionX="11866" positionY="378"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="7872"/>
+ <point positionX="0" positionY="7794"/>
<point positionX="0" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="0.000000" column2="0.000000" column3="11914.000000"/>
- <Line2 column1="0.000000" column2="7872.000000" column3="353.000000"/>
+ <Line1 column1="0.000000" column2="0.000000" column3="11866.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="151.000000" column2="0.000000" column3="11914.000000"/>
- <Line2 column1="0.000000" column2="7874.000000" column3="352.000000"/>
+ <Line1 column1="151.000000" column2="0.000000" column3="11866.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="10718.000000" column2="0.000000" column3="1347.000000"/>
- <Line2 column1="0.000000" column2="8024.000000" column3="352.000000"/>
+ <Line1 column1="10640.000000" column2="0.000000" column3="1377.000000"/>
+ <Line2 column1="0.000000" column2="7945.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="2017" positionY="1234" sizeX="9376" sizeY="6991" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="2043" positionY="1250" sizeX="9306" sizeY="6922" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="2017" positionY="1234" sizeX="9376" sizeY="6991" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
+ <XShape positionX="2043" positionY="1250" sizeX="9306" sizeY="6922" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
<XShapes>
- <XShape positionX="10351" positionY="2600" sizeX="1042" sizeY="5625" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=4" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="2043" positionY="3765" sizeX="1034" sizeY="4407" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -739,30 +739,30 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="10351" positionY="8225"/>
- <point positionX="11393" positionY="8225"/>
- <point positionX="11393" positionY="2600"/>
- <point positionX="10351" positionY="2600"/>
- <point positionX="10351" positionY="8225"/>
+ <point positionX="2043" positionY="8172"/>
+ <point positionX="3077" positionY="8172"/>
+ <point positionX="3077" positionY="3765"/>
+ <point positionX="2043" positionY="3765"/>
+ <point positionX="2043" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="5625"/>
- <point positionX="1042" positionY="5625"/>
- <point positionX="1042" positionY="0"/>
+ <point positionX="0" positionY="4407"/>
+ <point positionX="1034" positionY="4407"/>
+ <point positionX="1034" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="5625"/>
+ <point positionX="0" positionY="4407"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1042.000000" column2="0.000000" column3="10351.000000"/>
- <Line2 column1="0.000000" column2="5625.000000" column3="2600.000000"/>
+ <Line1 column1="1034.000000" column2="0.000000" column3="2043.000000"/>
+ <Line2 column1="0.000000" column2="4407.000000" column3="3765.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8268" positionY="1510" sizeX="1041" sizeY="6715" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="4111" positionY="1993" sizeX="1034" sizeY="6179" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -771,30 +771,30 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="8268" positionY="8225"/>
- <point positionX="9309" positionY="8225"/>
- <point positionX="9309" positionY="1510"/>
- <point positionX="8268" positionY="1510"/>
- <point positionX="8268" positionY="8225"/>
+ <point positionX="4111" positionY="8172"/>
+ <point positionX="5145" positionY="8172"/>
+ <point positionX="5145" positionY="1993"/>
+ <point positionX="4111" positionY="1993"/>
+ <point positionX="4111" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="6715"/>
- <point positionX="1041" positionY="6715"/>
- <point positionX="1041" positionY="0"/>
+ <point positionX="0" positionY="6179"/>
+ <point positionX="1034" positionY="6179"/>
+ <point positionX="1034" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="6715"/>
+ <point positionX="0" positionY="6179"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1041.000000" column2="0.000000" column3="8268.000000"/>
- <Line2 column1="0.000000" column2="6715.000000" column3="1510.000000"/>
+ <Line1 column1="1034.000000" column2="0.000000" column3="4111.000000"/>
+ <Line2 column1="0.000000" column2="6179.000000" column3="1993.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="6184" positionY="1234" sizeX="1042" sizeY="6991" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="6179" positionY="1250" sizeX="1034" sizeY="6922" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -803,30 +803,30 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="6184" positionY="8225"/>
- <point positionX="7226" positionY="8225"/>
- <point positionX="7226" positionY="1234"/>
- <point positionX="6184" positionY="1234"/>
- <point positionX="6184" positionY="8225"/>
+ <point positionX="6179" positionY="8172"/>
+ <point positionX="7213" positionY="8172"/>
+ <point positionX="7213" positionY="1250"/>
+ <point positionX="6179" positionY="1250"/>
+ <point positionX="6179" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="6991"/>
- <point positionX="1042" positionY="6991"/>
- <point positionX="1042" positionY="0"/>
+ <point positionX="0" positionY="6922"/>
+ <point positionX="1034" positionY="6922"/>
+ <point positionX="1034" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="6991"/>
+ <point positionX="0" positionY="6922"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1042.000000" column2="0.000000" column3="6184.000000"/>
- <Line2 column1="0.000000" column2="6991.000000" column3="1234.000000"/>
+ <Line1 column1="1034.000000" column2="0.000000" column3="6179.000000"/>
+ <Line2 column1="0.000000" column2="6922.000000" column3="1250.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="4101" positionY="1984" sizeX="1041" sizeY="6241" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="8247" positionY="1524" sizeX="1034" sizeY="6648" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -835,30 +835,30 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="4101" positionY="8225"/>
- <point positionX="5142" positionY="8225"/>
- <point positionX="5142" positionY="1984"/>
- <point positionX="4101" positionY="1984"/>
- <point positionX="4101" positionY="8225"/>
+ <point positionX="8247" positionY="8172"/>
+ <point positionX="9281" positionY="8172"/>
+ <point positionX="9281" positionY="1524"/>
+ <point positionX="8247" positionY="1524"/>
+ <point positionX="8247" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="6241"/>
- <point positionX="1041" positionY="6241"/>
- <point positionX="1041" positionY="0"/>
+ <point positionX="0" positionY="6648"/>
+ <point positionX="1034" positionY="6648"/>
+ <point positionX="1034" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="6241"/>
+ <point positionX="0" positionY="6648"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1041.000000" column2="0.000000" column3="4101.000000"/>
- <Line2 column1="0.000000" column2="6241.000000" column3="1984.000000"/>
+ <Line1 column1="1034.000000" column2="0.000000" column3="8247.000000"/>
+ <Line2 column1="0.000000" column2="6648.000000" column3="1524.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="2017" positionY="3774" sizeX="1042" sizeY="4451" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="10315" positionY="2603" sizeX="1034" sizeY="5569" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=4" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -867,219 +867,219 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="2017" positionY="8225"/>
- <point positionX="3059" positionY="8225"/>
- <point positionX="3059" positionY="3774"/>
- <point positionX="2017" positionY="3774"/>
- <point positionX="2017" positionY="8225"/>
+ <point positionX="10315" positionY="8172"/>
+ <point positionX="11349" positionY="8172"/>
+ <point positionX="11349" positionY="2603"/>
+ <point positionX="10315" positionY="2603"/>
+ <point positionX="10315" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="4451"/>
- <point positionX="1042" positionY="4451"/>
- <point positionX="1042" positionY="0"/>
+ <point positionX="0" positionY="5569"/>
+ <point positionX="1034" positionY="5569"/>
+ <point positionX="1034" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="4451"/>
+ <point positionX="0" positionY="5569"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1042.000000" column2="0.000000" column3="2017.000000"/>
- <Line2 column1="0.000000" column2="4451.000000" column3="3774.000000"/>
+ <Line1 column1="1034.000000" column2="0.000000" column3="10315.000000"/>
+ <Line2 column1="0.000000" column2="5569.000000" column3="2603.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9377.000000" column2="0.000000" column3="2017.000000"/>
- <Line2 column1="0.000000" column2="6992.000000" column3="1234.000000"/>
+ <Line1 column1="9307.000000" column2="0.000000" column3="2043.000000"/>
+ <Line2 column1="0.000000" column2="6923.000000" column3="1250.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9377.000000" column2="0.000000" column3="2017.000000"/>
- <Line2 column1="0.000000" column2="6992.000000" column3="1234.000000"/>
+ <Line1 column1="9307.000000" column2="0.000000" column3="2043.000000"/>
+ <Line2 column1="0.000000" column2="6923.000000" column3="1250.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="2538" positionY="860" sizeX="8334" sizeY="4193" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="2560" positionY="880" sizeX="8272" sizeY="4152" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="2538" positionY="860" sizeX="8334" sizeY="4193" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=1:Series=0">
+ <XShape positionX="2560" positionY="880" sizeX="8272" sizeY="4152" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=1:Series=0">
<XShapes>
- <XShape positionX="2538" positionY="4557" sizeX="0" sizeY="496" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=1:Series=0:Point=0">
+ <XShape positionX="2560" positionY="4541" sizeX="0" sizeY="491" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=1:Series=0:Point=0">
<XShapes>
- <XShape positionX="2538" positionY="4557" sizeX="0" sizeY="496" type="com.sun.star.drawing.LineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="2560" positionY="4541" sizeX="0" sizeY="491" type="com.sun.star.drawing.LineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="2538" positionY="5053"/>
- <point positionX="2538" positionY="4557"/>
+ <point positionX="2560" positionY="5032"/>
+ <point positionX="2560" positionY="4541"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="496"/>
+ <point positionX="0" positionY="491"/>
<point positionX="0" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="0.000000" column2="0.000000" column3="2538.000000"/>
- <Line2 column1="0.000000" column2="496.000000" column3="4557.000000"/>
+ <Line1 column1="0.000000" column2="0.000000" column3="2560.000000"/>
+ <Line2 column1="0.000000" column2="491.000000" column3="4541.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="1.000000" column2="0.000000" column3="2538.000000"/>
- <Line2 column1="0.000000" column2="497.000000" column3="4557.000000"/>
+ <Line1 column1="1.000000" column2="0.000000" column3="2560.000000"/>
+ <Line2 column1="0.000000" column2="492.000000" column3="4541.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="4622" positionY="3881" sizeX="0" sizeY="1071" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=1:Series=0:Point=1">
+ <XShape positionX="4628" positionY="3871" sizeX="0" sizeY="1060" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=1:Series=0:Point=1">
<XShapes>
- <XShape positionX="4622" positionY="3881" sizeX="0" sizeY="1071" type="com.sun.star.drawing.LineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="4628" positionY="3871" sizeX="0" sizeY="1060" type="com.sun.star.drawing.LineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="4622" positionY="4952"/>
- <point positionX="4622" positionY="3881"/>
+ <point positionX="4628" positionY="4931"/>
+ <point positionX="4628" positionY="3871"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="1071"/>
+ <point positionX="0" positionY="1060"/>
<point positionX="0" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="0.000000" column2="0.000000" column3="4622.000000"/>
- <Line2 column1="0.000000" column2="1071.000000" column3="3881.000000"/>
+ <Line1 column1="0.000000" column2="0.000000" column3="4628.000000"/>
+ <Line2 column1="0.000000" column2="1060.000000" column3="3871.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="1.000000" column2="0.000000" column3="4622.000000"/>
- <Line2 column1="0.000000" column2="1072.000000" column3="3881.000000"/>
+ <Line1 column1="1.000000" column2="0.000000" column3="4628.000000"/>
+ <Line2 column1="0.000000" column2="1061.000000" column3="3871.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="6705" positionY="2617" sizeX="0" sizeY="1958" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=1:Series=0:Point=2">
+ <XShape positionX="6696" positionY="2620" sizeX="0" sizeY="1938" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=1:Series=0:Point=2">
<XShapes>
- <XShape positionX="6705" positionY="2617" sizeX="0" sizeY="1958" type="com.sun.star.drawing.LineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="6696" positionY="2620" sizeX="0" sizeY="1938" type="com.sun.star.drawing.LineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="6705" positionY="4575"/>
- <point positionX="6705" positionY="2617"/>
+ <point positionX="6696" positionY="4558"/>
+ <point positionX="6696" positionY="2620"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="1958"/>
+ <point positionX="0" positionY="1938"/>
<point positionX="0" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="0.000000" column2="0.000000" column3="6705.000000"/>
- <Line2 column1="0.000000" column2="1958.000000" column3="2617.000000"/>
+ <Line1 column1="0.000000" column2="0.000000" column3="6696.000000"/>
+ <Line2 column1="0.000000" column2="1938.000000" column3="2620.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="1.000000" column2="0.000000" column3="6705.000000"/>
- <Line2 column1="0.000000" column2="1959.000000" column3="2617.000000"/>
+ <Line1 column1="1.000000" column2="0.000000" column3="6696.000000"/>
+ <Line2 column1="0.000000" column2="1939.000000" column3="2620.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8788" positionY="1789" sizeX="0" sizeY="907" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=1:Series=0:Point=3">
+ <XShape positionX="8764" positionY="1799" sizeX="0" sizeY="899" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=1:Series=0:Point=3">
<XShapes>
- <XShape positionX="8788" positionY="1789" sizeX="0" sizeY="907" type="com.sun.star.drawing.LineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="8764" positionY="1799" sizeX="0" sizeY="899" type="com.sun.star.drawing.LineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="8788" positionY="2696"/>
- <point positionX="8788" positionY="1789"/>
+ <point positionX="8764" positionY="2698"/>
+ <point positionX="8764" positionY="1799"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="907"/>
+ <point positionX="0" positionY="899"/>
<point positionX="0" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="0.000000" column2="0.000000" column3="8788.000000"/>
- <Line2 column1="0.000000" column2="907.000000" column3="1789.000000"/>
+ <Line1 column1="0.000000" column2="0.000000" column3="8764.000000"/>
+ <Line2 column1="0.000000" column2="899.000000" column3="1799.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="1.000000" column2="0.000000" column3="8788.000000"/>
- <Line2 column1="0.000000" column2="908.000000" column3="1789.000000"/>
+ <Line1 column1="1.000000" column2="0.000000" column3="8764.000000"/>
+ <Line2 column1="0.000000" column2="900.000000" column3="1799.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="10872" positionY="860" sizeX="0" sizeY="1254" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=1:Series=0:Point=4">
+ <XShape positionX="10832" positionY="880" sizeX="0" sizeY="1241" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=1:Series=0:Point=4">
<XShapes>
- <XShape positionX="10872" positionY="860" sizeX="0" sizeY="1254" type="com.sun.star.drawing.LineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="10832" positionY="880" sizeX="0" sizeY="1241" type="com.sun.star.drawing.LineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="10872" positionY="2114"/>
- <point positionX="10872" positionY="860"/>
+ <point positionX="10832" positionY="2121"/>
+ <point positionX="10832" positionY="880"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="1254"/>
+ <point positionX="0" positionY="1241"/>
<point positionX="0" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="0.000000" column2="0.000000" column3="10872.000000"/>
- <Line2 column1="0.000000" column2="1254.000000" column3="860.000000"/>
+ <Line1 column1="0.000000" column2="0.000000" column3="10832.000000"/>
+ <Line2 column1="0.000000" column2="1241.000000" column3="880.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="1.000000" column2="0.000000" column3="10872.000000"/>
- <Line2 column1="0.000000" column2="1255.000000" column3="860.000000"/>
+ <Line1 column1="1.000000" column2="0.000000" column3="10832.000000"/>
+ <Line2 column1="0.000000" column2="1242.000000" column3="880.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="8335.000000" column2="0.000000" column3="2538.000000"/>
- <Line2 column1="0.000000" column2="4194.000000" column3="860.000000"/>
+ <Line1 column1="8273.000000" column2="0.000000" column3="2560.000000"/>
+ <Line2 column1="0.000000" column2="4153.000000" column3="880.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="8335.000000" column2="0.000000" column3="2538.000000"/>
- <Line2 column1="0.000000" column2="4194.000000" column3="860.000000"/>
+ <Line1 column1="8273.000000" column2="0.000000" column3="2560.000000"/>
+ <Line2 column1="0.000000" column2="4153.000000" column3="880.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="2017" positionY="4747" sizeX="1041" sizeY="95" type="com.sun.star.drawing.GroupShape" name="CID/StockLoss=">
+ <XShape positionX="2043" positionY="4728" sizeX="1033" sizeY="94" type="com.sun.star.drawing.GroupShape" name="CID/StockLoss=">
<XShapes>
- <XShape positionX="2017" positionY="4747" sizeX="1041" sizeY="95" type="com.sun.star.drawing.RectangleShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="000000" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="2043" positionY="4728" sizeX="1033" sizeY="94" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="000000" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1087,22 +1087,22 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1042.000000" column2="0.000000" column3="2017.000000"/>
- <Line2 column1="0.000000" column2="96.000000" column3="4747.000000"/>
+ <Line1 column1="1034.000000" column2="0.000000" column3="2043.000000"/>
+ <Line2 column1="0.000000" column2="95.000000" column3="4728.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="1042.000000" column2="0.000000" column3="2017.000000"/>
- <Line2 column1="0.000000" column2="96.000000" column3="4747.000000"/>
+ <Line1 column1="1034.000000" column2="0.000000" column3="2043.000000"/>
+ <Line2 column1="0.000000" column2="95.000000" column3="4728.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="4101" positionY="954" sizeX="7291" sizeY="3888" type="com.sun.star.drawing.GroupShape" name="CID/StockGain=">
+ <XShape positionX="4111" positionY="972" sizeX="7237" sizeY="3850" type="com.sun.star.drawing.GroupShape" name="CID/StockGain=">
<XShapes>
- <XShape positionX="4101" positionY="4303" sizeX="1041" sizeY="539" type="com.sun.star.drawing.RectangleShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="4111" positionY="4288" sizeX="1033" sizeY="534" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1110,13 +1110,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1042.000000" column2="0.000000" column3="4101.000000"/>
- <Line2 column1="0.000000" column2="540.000000" column3="4303.000000"/>
+ <Line1 column1="1034.000000" column2="0.000000" column3="4111.000000"/>
+ <Line2 column1="0.000000" column2="535.000000" column3="4288.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="6184" positionY="2668" sizeX="1041" sizeY="1634" type="com.sun.star.drawing.RectangleShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="6179" positionY="2671" sizeX="1033" sizeY="1617" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1124,13 +1124,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1042.000000" column2="0.000000" column3="6184.000000"/>
- <Line2 column1="0.000000" column2="1635.000000" column3="2668.000000"/>
+ <Line1 column1="1034.000000" column2="0.000000" column3="6179.000000"/>
+ <Line2 column1="0.000000" column2="1618.000000" column3="2671.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8268" positionY="1969" sizeX="1041" sizeY="699" type="com.sun.star.drawing.RectangleShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="8247" positionY="1978" sizeX="1033" sizeY="692" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1138,13 +1138,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1042.000000" column2="0.000000" column3="8268.000000"/>
- <Line2 column1="0.000000" column2="700.000000" column3="1969.000000"/>
+ <Line1 column1="1034.000000" column2="0.000000" column3="8247.000000"/>
+ <Line2 column1="0.000000" column2="693.000000" column3="1978.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="10351" positionY="954" sizeX="1041" sizeY="1015" type="com.sun.star.drawing.RectangleShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="10315" positionY="972" sizeX="1033" sizeY="1005" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1152,38 +1152,38 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1042.000000" column2="0.000000" column3="10351.000000"/>
- <Line2 column1="0.000000" column2="1016.000000" column3="954.000000"/>
+ <Line1 column1="1034.000000" column2="0.000000" column3="10315.000000"/>
+ <Line2 column1="0.000000" column2="1006.000000" column3="972.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="7292.000000" column2="0.000000" column3="4101.000000"/>
- <Line2 column1="0.000000" column2="3889.000000" column3="954.000000"/>
+ <Line1 column1="7238.000000" column2="0.000000" column3="4111.000000"/>
+ <Line2 column1="0.000000" column2="3851.000000" column3="972.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="10718.000000" column2="0.000000" column3="1347.000000"/>
- <Line2 column1="0.000000" column2="8024.000000" column3="352.000000"/>
+ <Line1 column1="10640.000000" column2="0.000000" column3="1377.000000"/>
+ <Line2 column1="0.000000" column2="7945.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="10718.000000" column2="0.000000" column3="1347.000000"/>
- <Line2 column1="0.000000" column2="8024.000000" column3="352.000000"/>
+ <Line1 column1="10640.000000" column2="0.000000" column3="1377.000000"/>
+ <Line2 column1="0.000000" column2="7945.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="180" sizeX="12878" sizeY="8640" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="320" positionY="180" sizeX="12850" sizeY="8640" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="1691" positionY="8475" sizeX="10029" sizeY="345" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
+ <XShape positionX="1699" positionY="8422" sizeX="9995" sizeY="398" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
<XShapes>
- <XShape positionX="1691" positionY="8475" sizeX="1695" sizeY="345" type="com.sun.star.drawing.TextShape" text="2014.02.10" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="1699" positionY="8422" sizeX="1723" sizeY="398" type="com.sun.star.drawing.TextShape" text="2014.02.10" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1191,13 +1191,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1696.000000" column2="0.000000" column3="1691.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8475.000000"/>
+ <Line1 column1="1724.000000" column2="0.000000" column3="1699.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="3788" positionY="8475" sizeX="1669" sizeY="345" type="com.sun.star.drawing.TextShape" text="2014.02.11" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="3767" positionY="8422" sizeX="1723" sizeY="398" type="com.sun.star.drawing.TextShape" text="2014.02.11" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1205,13 +1205,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1670.000000" column2="0.000000" column3="3788.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8475.000000"/>
+ <Line1 column1="1724.000000" column2="0.000000" column3="3767.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="5858" positionY="8475" sizeX="1695" sizeY="345" type="com.sun.star.drawing.TextShape" text="2014.02.12" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="5835" positionY="8422" sizeX="1723" sizeY="398" type="com.sun.star.drawing.TextShape" text="2014.02.12" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1219,13 +1219,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1696.000000" column2="0.000000" column3="5858.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8475.000000"/>
+ <Line1 column1="1724.000000" column2="0.000000" column3="5835.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="7941" positionY="8475" sizeX="1695" sizeY="345" type="com.sun.star.drawing.TextShape" text="2014.02.13" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="7903" positionY="8422" sizeX="1723" sizeY="398" type="com.sun.star.drawing.TextShape" text="2014.02.13" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1233,13 +1233,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1696.000000" column2="0.000000" column3="7941.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8475.000000"/>
+ <Line1 column1="1724.000000" column2="0.000000" column3="7903.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="10025" positionY="8475" sizeX="1695" sizeY="345" type="com.sun.star.drawing.TextShape" text="2014.02.14" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="9971" positionY="8422" sizeX="1723" sizeY="398" type="com.sun.star.drawing.TextShape" text="2014.02.14" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1247,22 +1247,22 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1696.000000" column2="0.000000" column3="10025.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8475.000000"/>
+ <Line1 column1="1724.000000" column2="0.000000" column3="9971.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="10030.000000" column2="0.000000" column3="1691.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8475.000000"/>
+ <Line1 column1="9996.000000" column2="0.000000" column3="1699.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="181" sizeX="928" sizeY="8217" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShape positionX="320" positionY="180" sizeX="958" sizeY="8192" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
<XShapes>
- <XShape positionX="1061" positionY="8053" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="0" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="1085" positionY="7974" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="0" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1270,13 +1270,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="1061.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8053.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="1085.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="7974.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="7069" sizeX="928" sizeY="345" type="com.sun.star.drawing.TextShape" text="10000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="6999" sizeX="958" sizeY="398" type="com.sun.star.drawing.TextShape" text="10000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1284,13 +1284,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="929.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="7069.000000"/>
+ <Line1 column1="959.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="6999.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="6085" sizeX="928" sizeY="345" type="com.sun.star.drawing.TextShape" text="20000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="6025" sizeX="958" sizeY="398" type="com.sun.star.drawing.TextShape" text="20000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1298,13 +1298,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="929.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="6085.000000"/>
+ <Line1 column1="959.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="6025.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="5101" sizeX="928" sizeY="345" type="com.sun.star.drawing.TextShape" text="30000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="5051" sizeX="958" sizeY="398" type="com.sun.star.drawing.TextShape" text="30000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1312,13 +1312,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="929.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="5101.000000"/>
+ <Line1 column1="959.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="5051.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="4117" sizeX="928" sizeY="345" type="com.sun.star.drawing.TextShape" text="40000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="4077" sizeX="958" sizeY="398" type="com.sun.star.drawing.TextShape" text="40000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1326,13 +1326,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="929.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="4117.000000"/>
+ <Line1 column1="959.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4077.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="3133" sizeX="928" sizeY="345" type="com.sun.star.drawing.TextShape" text="50000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="3102" sizeX="958" sizeY="398" type="com.sun.star.drawing.TextShape" text="50000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1340,13 +1340,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="929.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="3133.000000"/>
+ <Line1 column1="959.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="3102.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="2149" sizeX="928" sizeY="345" type="com.sun.star.drawing.TextShape" text="60000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="2128" sizeX="958" sizeY="398" type="com.sun.star.drawing.TextShape" text="60000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1354,13 +1354,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="929.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="2149.000000"/>
+ <Line1 column1="959.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="2128.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="1165" sizeX="928" sizeY="345" type="com.sun.star.drawing.TextShape" text="70000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="1154" sizeX="958" sizeY="398" type="com.sun.star.drawing.TextShape" text="70000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1368,13 +1368,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="929.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="1165.000000"/>
+ <Line1 column1="959.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="1154.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="181" sizeX="928" sizeY="345" type="com.sun.star.drawing.TextShape" text="80000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="180" sizeX="958" sizeY="398" type="com.sun.star.drawing.TextShape" text="80000" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1382,22 +1382,22 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="929.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="181.000000"/>
+ <Line1 column1="959.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="929.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="8218.000000" column3="181.000000"/>
+ <Line1 column1="959.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="8193.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="12164" positionY="180" sizeX="1034" sizeY="8218" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,1">
+ <XShape positionX="12116" positionY="180" sizeX="1054" sizeY="8192" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,1">
<XShapes>
- <XShape positionX="12164" positionY="8053" sizeX="1034" sizeY="345" type="com.sun.star.drawing.TextShape" text="1.6100" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="12116" positionY="7974" sizeX="1054" sizeY="398" type="com.sun.star.drawing.TextShape" text="1.6100" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1405,13 +1405,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1035.000000" column2="0.000000" column3="12164.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8053.000000"/>
+ <Line1 column1="1055.000000" column2="0.000000" column3="12116.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="7974.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="12164" positionY="6928" sizeX="1034" sizeY="345" type="com.sun.star.drawing.TextShape" text="1.6200" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="12116" positionY="6860" sizeX="1054" sizeY="398" type="com.sun.star.drawing.TextShape" text="1.6200" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1419,13 +1419,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1035.000000" column2="0.000000" column3="12164.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="6928.000000"/>
+ <Line1 column1="1055.000000" column2="0.000000" column3="12116.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="6860.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="12164" positionY="5803" sizeX="1034" sizeY="345" type="com.sun.star.drawing.TextShape" text="1.6300" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="12116" positionY="5747" sizeX="1054" sizeY="398" type="com.sun.star.drawing.TextShape" text="1.6300" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1433,13 +1433,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1035.000000" column2="0.000000" column3="12164.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="5803.000000"/>
+ <Line1 column1="1055.000000" column2="0.000000" column3="12116.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="5747.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="12164" positionY="4679" sizeX="1034" sizeY="345" type="com.sun.star.drawing.TextShape" text="1.6400" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="12116" positionY="4633" sizeX="1054" sizeY="398" type="com.sun.star.drawing.TextShape" text="1.6400" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1447,13 +1447,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1035.000000" column2="0.000000" column3="12164.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="4679.000000"/>
+ <Line1 column1="1055.000000" column2="0.000000" column3="12116.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4633.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="12164" positionY="3554" sizeX="1034" sizeY="345" type="com.sun.star.drawing.TextShape" text="1.6500" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="12116" positionY="3520" sizeX="1054" sizeY="398" type="com.sun.star.drawing.TextShape" text="1.6500" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1461,13 +1461,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1035.000000" column2="0.000000" column3="12164.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="3554.000000"/>
+ <Line1 column1="1055.000000" column2="0.000000" column3="12116.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="3520.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="12164" positionY="2430" sizeX="1034" sizeY="345" type="com.sun.star.drawing.TextShape" text="1.6600" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="12116" positionY="2406" sizeX="1054" sizeY="398" type="com.sun.star.drawing.TextShape" text="1.6600" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1475,13 +1475,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1035.000000" column2="0.000000" column3="12164.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="2430.000000"/>
+ <Line1 column1="1055.000000" column2="0.000000" column3="12116.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="2406.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="12164" positionY="1305" sizeX="1034" sizeY="345" type="com.sun.star.drawing.TextShape" text="1.6700" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="12116" positionY="1293" sizeX="1054" sizeY="398" type="com.sun.star.drawing.TextShape" text="1.6700" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1489,13 +1489,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1035.000000" column2="0.000000" column3="12164.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="1305.000000"/>
+ <Line1 column1="1055.000000" column2="0.000000" column3="12116.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="1293.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="12164" positionY="180" sizeX="1034" sizeY="345" type="com.sun.star.drawing.TextShape" text="1.6800" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="12116" positionY="180" sizeX="1054" sizeY="398" type="com.sun.star.drawing.TextShape" text="1.6800" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1503,43 +1503,43 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1035.000000" column2="0.000000" column3="12164.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="180.000000"/>
+ <Line1 column1="1055.000000" column2="0.000000" column3="12116.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="1035.000000" column2="0.000000" column3="12164.000000"/>
- <Line2 column1="0.000000" column2="8219.000000" column3="180.000000"/>
+ <Line1 column1="1055.000000" column2="0.000000" column3="12116.000000"/>
+ <Line2 column1="0.000000" column2="8193.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="12879.000000" column2="0.000000" column3="320.000000"/>
+ <Line1 column1="12851.000000" column2="0.000000" column3="320.000000"/>
<Line2 column1="0.000000" column2="8641.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="12879.000000" column2="0.000000" column3="320.000000"/>
+ <Line1 column1="12851.000000" column2="0.000000" column3="320.000000"/>
<Line2 column1="0.000000" column2="8641.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="12879.000000" column2="0.000000" column3="320.000000"/>
+ <Line1 column1="12851.000000" column2="0.000000" column3="320.000000"/>
<Line2 column1="0.000000" column2="8641.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="13518" positionY="4005" sizeX="2272" sizeY="990" type="com.sun.star.drawing.GroupShape" name="CID/D=0:Legend=">
+ <XShape positionX="13490" positionY="3952" sizeX="2300" sizeY="1096" type="com.sun.star.drawing.GroupShape" name="CID/D=0:Legend=">
<XShapes>
- <XShape positionX="13518" positionY="4005" sizeX="2272" sizeY="990" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="e6e6e6" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="13490" positionY="3952" sizeX="2300" sizeY="1096" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="e6e6e6" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1547,17 +1547,17 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="2273.000000" column2="0.000000" column3="13518.000000"/>
- <Line2 column1="0.000000" column2="991.000000" column3="4005.000000"/>
+ <Line1 column1="2301.000000" column2="0.000000" column3="13490.000000"/>
+ <Line2 column1="0.000000" column2="1097.000000" column3="3952.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="13634" positionY="4172" sizeX="800" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="13606" positionY="4145" sizeX="800" sizeY="211" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="13634" positionY="4172" sizeX="800" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:LegendEntry=0">
+ <XShape positionX="13606" positionY="4145" sizeX="800" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:LegendEntry=0">
<XShapes>
- <XShape positionX="13634" positionY="4172" sizeX="800" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="13606" positionY="4145" sizeX="800" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1565,13 +1565,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="801.000000" column2="0.000000" column3="13634.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4172.000000"/>
+ <Line1 column1="801.000000" column2="0.000000" column3="13606.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="13634" positionY="4172" sizeX="800" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="13606" positionY="4145" sizeX="800" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1579,31 +1579,31 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="801.000000" column2="0.000000" column3="13634.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4172.000000"/>
+ <Line1 column1="801.000000" column2="0.000000" column3="13606.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="801.000000" column2="0.000000" column3="13634.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4172.000000"/>
+ <Line1 column1="801.000000" column2="0.000000" column3="13606.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="801.000000" column2="0.000000" column3="13634.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4172.000000"/>
+ <Line1 column1="801.000000" column2="0.000000" column3="13606.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="13634" positionY="4617" sizeX="800" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="13606" positionY="4643" sizeX="800" sizeY="211" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="13634" positionY="4617" sizeX="800" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=1:Series=0:LegendEntry=0">
+ <XShape positionX="13606" positionY="4643" sizeX="800" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=1:Series=0:LegendEntry=0">
<XShapes>
- <XShape positionX="13634" positionY="4617" sizeX="800" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="13606" positionY="4643" sizeX="800" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1611,19 +1611,19 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="801.000000" column2="0.000000" column3="13634.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4617.000000"/>
+ <Line1 column1="801.000000" column2="0.000000" column3="13606.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="13634" positionY="4722" sizeX="800" sizeY="0" type="com.sun.star.drawing.LineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="13606" positionY="4748" sizeX="800" sizeY="0" type="com.sun.star.drawing.LineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="13634" positionY="4722"/>
- <point positionX="14434" positionY="4722"/>
+ <point positionX="13606" positionY="4748"/>
+ <point positionX="14406" positionY="4748"/>
</pointSequence>
</PolyPolygon>
<Geometry>
@@ -1633,27 +1633,27 @@
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="800.000000" column2="0.000000" column3="13634.000000"/>
- <Line2 column1="0.000000" column2="0.000000" column3="4722.000000"/>
+ <Line1 column1="800.000000" column2="0.000000" column3="13606.000000"/>
+ <Line2 column1="0.000000" column2="0.000000" column3="4748.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="801.000000" column2="0.000000" column3="13634.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4617.000000"/>
+ <Line1 column1="801.000000" column2="0.000000" column3="13606.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="801.000000" column2="0.000000" column3="13634.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4617.000000"/>
+ <Line1 column1="801.000000" column2="0.000000" column3="13606.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="14534" positionY="4105" sizeX="1140" sizeY="345" type="com.sun.star.drawing.TextShape" text="Volume" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4800" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="14506" positionY="4052" sizeX="1168" sizeY="398" type="com.sun.star.drawing.TextShape" text="Volume" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4800" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1661,13 +1661,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1141.000000" column2="0.000000" column3="14534.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="4105.000000"/>
+ <Line1 column1="1169.000000" column2="0.000000" column3="14506.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4052.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="14534" positionY="4550" sizeX="875" sizeY="345" type="com.sun.star.drawing.TextShape" text="Close" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4800" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="14506" positionY="4550" sizeX="881" sizeY="398" type="com.sun.star.drawing.TextShape" text="Close" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4800" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1675,15 +1675,15 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="876.000000" column2="0.000000" column3="14534.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="4550.000000"/>
+ <Line1 column1="882.000000" column2="0.000000" column3="14506.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4550.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="2273.000000" column2="0.000000" column3="13518.000000"/>
- <Line2 column1="0.000000" column2="991.000000" column3="4005.000000"/>
+ <Line1 column1="2301.000000" column2="0.000000" column3="13490.000000"/>
+ <Line2 column1="0.000000" column2="1097.000000" column3="3952.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
diff --git a/chart2/qa/extras/xshape/data/reference/property-mapping-bar.xml b/chart2/qa/extras/xshape/data/reference/property-mapping-bar.xml
index cc172969f01f..a64c984797bf 100644
--- a/chart2/qa/extras/xshape/data/reference/property-mapping-bar.xml
+++ b/chart2/qa/extras/xshape/data/reference/property-mapping-bar.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<XShapes>
- <XShape positionX="0" positionY="0" sizeX="16000" sizeY="9000" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="0" positionY="0" sizeX="16000" sizeY="9000" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -14,10 +14,10 @@
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="180" sizeX="13970" sizeY="8640" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
+ <XShape positionX="320" positionY="180" sizeX="13974" sizeY="8640" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
<XShapes>
- <XShape positionX="756" positionY="354" sizeX="13534" sizeY="7872" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="762" positionY="380" sizeX="13532" sizeY="7793" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -25,13 +25,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="13535.000000" column2="0.000000" column3="756.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="354.000000"/>
+ <Line1 column1="13533.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="380.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="180" sizeX="13970" sizeY="8640" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="180" sizeX="13974" sizeY="8640" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -39,19 +39,19 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="13971.000000" column2="0.000000" column3="320.000000"/>
+ <Line1 column1="13975.000000" column2="0.000000" column3="320.000000"/>
<Line2 column1="0.000000" column2="8641.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="180" sizeX="13970" sizeY="8640" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="320" positionY="180" sizeX="13974" sizeY="8640" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="606" positionY="352" sizeX="13684" sizeY="8023" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="612" positionY="378" sizeX="13682" sizeY="7944" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="756" positionY="354" sizeX="13534" sizeY="7872" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
+ <XShape positionX="762" positionY="380" sizeX="13532" sizeY="7793" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
<XShapes>
- <XShape positionX="756" positionY="354" sizeX="13534" sizeY="7872" type="com.sun.star.drawing.RectangleShape" name="CID/DiagramWall=" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="e6e6e6" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="762" positionY="380" sizeX="13532" sizeY="7793" type="com.sun.star.drawing.RectangleShape" name="CID/DiagramWall=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="e6e6e6" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -59,198 +59,198 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="13535.000000" column2="0.000000" column3="756.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="354.000000"/>
+ <Line1 column1="13533.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="380.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="13535.000000" column2="0.000000" column3="756.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="354.000000"/>
+ <Line1 column1="13533.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="380.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="606" positionY="352" sizeX="13684" sizeY="8023" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
+ <XShape positionX="612" positionY="378" sizeX="13682" sizeY="7944" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
<XShapes>
- <XShape positionX="756" positionY="352" sizeX="13534" sizeY="7873" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="762" positionY="378" sizeX="13532" sizeY="7794" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="756" positionY="352" sizeX="13534" sizeY="7873" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0:Grid=0">
+ <XShape positionX="762" positionY="378" sizeX="13532" sizeY="7794" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0:Grid=0">
<XShapes>
- <XShape positionX="756" positionY="352" sizeX="13534" sizeY="7873" type="com.sun.star.drawing.PolyLineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="762" positionY="378" sizeX="13532" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="14290" positionY="8225"/>
- <point positionX="756" positionY="8225"/>
+ <point positionX="14294" positionY="8172"/>
+ <point positionX="762" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="14290" positionY="7100"/>
- <point positionX="756" positionY="7100"/>
+ <point positionX="14294" positionY="7058"/>
+ <point positionX="762" positionY="7058"/>
</pointSequence>
<pointSequence>
- <point positionX="14290" positionY="5975"/>
- <point positionX="756" positionY="5975"/>
+ <point positionX="14294" positionY="5945"/>
+ <point positionX="762" positionY="5945"/>
</pointSequence>
<pointSequence>
- <point positionX="14290" positionY="4851"/>
- <point positionX="756" positionY="4851"/>
+ <point positionX="14294" positionY="4832"/>
+ <point positionX="762" positionY="4832"/>
</pointSequence>
<pointSequence>
- <point positionX="14290" positionY="3726"/>
- <point positionX="756" positionY="3726"/>
+ <point positionX="14294" positionY="3718"/>
+ <point positionX="762" positionY="3718"/>
</pointSequence>
<pointSequence>
- <point positionX="14290" positionY="2602"/>
- <point positionX="756" positionY="2602"/>
+ <point positionX="14294" positionY="2605"/>
+ <point positionX="762" positionY="2605"/>
</pointSequence>
<pointSequence>
- <point positionX="14290" positionY="1477"/>
- <point positionX="756" positionY="1477"/>
+ <point positionX="14294" positionY="1492"/>
+ <point positionX="762" positionY="1492"/>
</pointSequence>
<pointSequence>
- <point positionX="14290" positionY="352"/>
- <point positionX="756" positionY="352"/>
+ <point positionX="14294" positionY="378"/>
+ <point positionX="762" positionY="378"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="13534" positionY="7873"/>
- <point positionX="0" positionY="7873"/>
+ <point positionX="13532" positionY="7794"/>
+ <point positionX="0" positionY="7794"/>
</pointSequence>
<pointSequence>
- <point positionX="13534" positionY="6748"/>
- <point positionX="0" positionY="6748"/>
+ <point positionX="13532" positionY="6680"/>
+ <point positionX="0" positionY="6680"/>
</pointSequence>
<pointSequence>
- <point positionX="13534" positionY="5623"/>
- <point positionX="0" positionY="5623"/>
+ <point positionX="13532" positionY="5567"/>
+ <point positionX="0" positionY="5567"/>
</pointSequence>
<pointSequence>
- <point positionX="13534" positionY="4499"/>
- <point positionX="0" positionY="4499"/>
+ <point positionX="13532" positionY="4454"/>
+ <point positionX="0" positionY="4454"/>
</pointSequence>
<pointSequence>
- <point positionX="13534" positionY="3374"/>
- <point positionX="0" positionY="3374"/>
+ <point positionX="13532" positionY="3340"/>
+ <point positionX="0" positionY="3340"/>
</pointSequence>
<pointSequence>
- <point positionX="13534" positionY="2250"/>
- <point positionX="0" positionY="2250"/>
+ <point positionX="13532" positionY="2227"/>
+ <point positionX="0" positionY="2227"/>
</pointSequence>
<pointSequence>
- <point positionX="13534" positionY="1125"/>
- <point positionX="0" positionY="1125"/>
+ <point positionX="13532" positionY="1114"/>
+ <point positionX="0" positionY="1114"/>
</pointSequence>
<pointSequence>
- <point positionX="13534" positionY="0"/>
+ <point positionX="13532" positionY="0"/>
<point positionX="0" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="13534.000000" column2="0.000000" column3="756.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="352.000000"/>
+ <Line1 column1="13532.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="756" positionY="352" sizeX="0" sizeY="7873" type="com.sun.star.drawing.PolyLineShape" name="HandlesOnly" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="NONE">
+ <XShape positionX="762" positionY="378" sizeX="0" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" name="HandlesOnly" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="NONE">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="756" positionY="8225"/>
- <point positionX="756" positionY="7100"/>
- <point positionX="756" positionY="5975"/>
- <point positionX="756" positionY="4851"/>
- <point positionX="756" positionY="3726"/>
- <point positionX="756" positionY="2602"/>
- <point positionX="756" positionY="1477"/>
- <point positionX="756" positionY="352"/>
+ <point positionX="762" positionY="8172"/>
+ <point positionX="762" positionY="7058"/>
+ <point positionX="762" positionY="5945"/>
+ <point positionX="762" positionY="4832"/>
+ <point positionX="762" positionY="3718"/>
+ <point positionX="762" positionY="2605"/>
+ <point positionX="762" positionY="1492"/>
+ <point positionX="762" positionY="378"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="7873"/>
- <point positionX="0" positionY="6748"/>
- <point positionX="0" positionY="5623"/>
- <point positionX="0" positionY="4499"/>
- <point positionX="0" positionY="3374"/>
- <point positionX="0" positionY="2250"/>
- <point positionX="0" positionY="1125"/>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="0" positionY="6680"/>
+ <point positionX="0" positionY="5567"/>
+ <point positionX="0" positionY="4454"/>
+ <point positionX="0" positionY="3340"/>
+ <point positionX="0" positionY="2227"/>
+ <point positionX="0" positionY="1114"/>
<point positionX="0" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="0.000000" column2="0.000000" column3="756.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="352.000000"/>
+ <Line1 column1="0.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="13535.000000" column2="0.000000" column3="756.000000"/>
- <Line2 column1="0.000000" column2="7874.000000" column3="352.000000"/>
+ <Line1 column1="13533.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="13535.000000" column2="0.000000" column3="756.000000"/>
- <Line2 column1="0.000000" column2="7874.000000" column3="352.000000"/>
+ <Line1 column1="13533.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="606" positionY="352" sizeX="13684" sizeY="8023" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="612" positionY="378" sizeX="13682" sizeY="7944" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="756" positionY="8225" sizeX="13534" sizeY="150" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
+ <XShape positionX="762" positionY="8172" sizeX="13532" sizeY="150" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
<XShapes>
- <XShape positionX="756" positionY="8225" sizeX="13534" sizeY="150" type="com.sun.star.drawing.PolyLineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="762" positionY="8172" sizeX="13532" sizeY="150" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="756" positionY="8375"/>
- <point positionX="756" positionY="8225"/>
+ <point positionX="762" positionY="8322"/>
+ <point positionX="762" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="756" positionY="8375"/>
- <point positionX="756" positionY="8225"/>
+ <point positionX="762" positionY="8322"/>
+ <point positionX="762" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="4139" positionY="8375"/>
- <point positionX="4139" positionY="8225"/>
+ <point positionX="4145" positionY="8322"/>
+ <point positionX="4145" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="4139" positionY="8375"/>
- <point positionX="4139" positionY="8225"/>
+ <point positionX="4145" positionY="8322"/>
+ <point positionX="4145" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="7523" positionY="8375"/>
- <point positionX="7523" positionY="8225"/>
+ <point positionX="7528" positionY="8322"/>
+ <point positionX="7528" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="7523" positionY="8375"/>
- <point positionX="7523" positionY="8225"/>
+ <point positionX="7528" positionY="8322"/>
+ <point positionX="7528" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="10906" positionY="8375"/>
- <point positionX="10906" positionY="8225"/>
+ <point positionX="10911" positionY="8322"/>
+ <point positionX="10911" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="10906" positionY="8375"/>
- <point positionX="10906" positionY="8225"/>
+ <point positionX="10911" positionY="8322"/>
+ <point positionX="10911" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="14290" positionY="8375"/>
- <point positionX="14290" positionY="8225"/>
+ <point positionX="14294" positionY="8322"/>
+ <point positionX="14294" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="14290" positionY="8375"/>
- <point positionX="14290" positionY="8225"/>
+ <point positionX="14294" positionY="8322"/>
+ <point positionX="14294" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
@@ -271,193 +271,193 @@
<point positionX="3383" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="6767" positionY="150"/>
- <point positionX="6767" positionY="0"/>
+ <point positionX="6766" positionY="150"/>
+ <point positionX="6766" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="6767" positionY="150"/>
- <point positionX="6767" positionY="0"/>
+ <point positionX="6766" positionY="150"/>
+ <point positionX="6766" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="10150" positionY="150"/>
- <point positionX="10150" positionY="0"/>
+ <point positionX="10149" positionY="150"/>
+ <point positionX="10149" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="10150" positionY="150"/>
- <point positionX="10150" positionY="0"/>
+ <point positionX="10149" positionY="150"/>
+ <point positionX="10149" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="13534" positionY="150"/>
- <point positionX="13534" positionY="0"/>
+ <point positionX="13532" positionY="150"/>
+ <point positionX="13532" positionY="0"/>
</pointSequence>
<pointSequence>
- <point positionX="13534" positionY="150"/>
- <point positionX="13534" positionY="0"/>
+ <point positionX="13532" positionY="150"/>
+ <point positionX="13532" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="13534.000000" column2="0.000000" column3="756.000000"/>
- <Line2 column1="0.000000" column2="150.000000" column3="8225.000000"/>
+ <Line1 column1="13532.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="150.000000" column3="8172.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="756" positionY="8225" sizeX="13534" sizeY="0" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="762" positionY="8172" sizeX="13532" sizeY="0" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="756" positionY="8225"/>
- <point positionX="14290" positionY="8225"/>
+ <point positionX="762" positionY="8172"/>
+ <point positionX="14294" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
<point positionX="0" positionY="0"/>
- <point positionX="13534" positionY="0"/>
+ <point positionX="13532" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="13534.000000" column2="0.000000" column3="756.000000"/>
- <Line2 column1="0.000000" column2="0.000000" column3="8225.000000"/>
+ <Line1 column1="13532.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="0.000000" column3="8172.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="13535.000000" column2="0.000000" column3="756.000000"/>
- <Line2 column1="0.000000" column2="151.000000" column3="8225.000000"/>
+ <Line1 column1="13533.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="151.000000" column3="8172.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="606" positionY="352" sizeX="150" sizeY="7873" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShape positionX="612" positionY="378" sizeX="150" sizeY="7794" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
<XShapes>
- <XShape positionX="606" positionY="352" sizeX="150" sizeY="7873" type="com.sun.star.drawing.PolyLineShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="612" positionY="378" sizeX="150" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="606" positionY="8225"/>
- <point positionX="756" positionY="8225"/>
+ <point positionX="612" positionY="8172"/>
+ <point positionX="762" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="8225"/>
- <point positionX="756" positionY="8225"/>
+ <point positionX="612" positionY="8172"/>
+ <point positionX="762" positionY="8172"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="7100"/>
- <point positionX="756" positionY="7100"/>
+ <point positionX="612" positionY="7058"/>
+ <point positionX="762" positionY="7058"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="7100"/>
- <point positionX="756" positionY="7100"/>
+ <point positionX="612" positionY="7058"/>
+ <point positionX="762" positionY="7058"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="5975"/>
- <point positionX="756" positionY="5975"/>
+ <point positionX="612" positionY="5945"/>
+ <point positionX="762" positionY="5945"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="5975"/>
- <point positionX="756" positionY="5975"/>
+ <point positionX="612" positionY="5945"/>
+ <point positionX="762" positionY="5945"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="4851"/>
- <point positionX="756" positionY="4851"/>
+ <point positionX="612" positionY="4832"/>
+ <point positionX="762" positionY="4832"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="4851"/>
- <point positionX="756" positionY="4851"/>
+ <point positionX="612" positionY="4832"/>
+ <point positionX="762" positionY="4832"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="3726"/>
- <point positionX="756" positionY="3726"/>
+ <point positionX="612" positionY="3718"/>
+ <point positionX="762" positionY="3718"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="3726"/>
- <point positionX="756" positionY="3726"/>
+ <point positionX="612" positionY="3718"/>
+ <point positionX="762" positionY="3718"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="2602"/>
- <point positionX="756" positionY="2602"/>
+ <point positionX="612" positionY="2605"/>
+ <point positionX="762" positionY="2605"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="2602"/>
- <point positionX="756" positionY="2602"/>
+ <point positionX="612" positionY="2605"/>
+ <point positionX="762" positionY="2605"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="1477"/>
- <point positionX="756" positionY="1477"/>
+ <point positionX="612" positionY="1492"/>
+ <point positionX="762" positionY="1492"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="1477"/>
- <point positionX="756" positionY="1477"/>
+ <point positionX="612" positionY="1492"/>
+ <point positionX="762" positionY="1492"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="352"/>
- <point positionX="756" positionY="352"/>
+ <point positionX="612" positionY="378"/>
+ <point positionX="762" positionY="378"/>
</pointSequence>
<pointSequence>
- <point positionX="606" positionY="352"/>
- <point positionX="756" positionY="352"/>
+ <point positionX="612" positionY="378"/>
+ <point positionX="762" positionY="378"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="7873"/>
- <point positionX="150" positionY="7873"/>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="150" positionY="7794"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="7873"/>
- <point positionX="150" positionY="7873"/>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="150" positionY="7794"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="6748"/>
- <point positionX="150" positionY="6748"/>
+ <point positionX="0" positionY="6680"/>
+ <point positionX="150" positionY="6680"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="6748"/>
- <point positionX="150" positionY="6748"/>
+ <point positionX="0" positionY="6680"/>
+ <point positionX="150" positionY="6680"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="5623"/>
- <point positionX="150" positionY="5623"/>
+ <point positionX="0" positionY="5567"/>
+ <point positionX="150" positionY="5567"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="5623"/>
- <point positionX="150" positionY="5623"/>
+ <point positionX="0" positionY="5567"/>
+ <point positionX="150" positionY="5567"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="4499"/>
- <point positionX="150" positionY="4499"/>
+ <point positionX="0" positionY="4454"/>
+ <point positionX="150" positionY="4454"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="4499"/>
- <point positionX="150" positionY="4499"/>
+ <point positionX="0" positionY="4454"/>
+ <point positionX="150" positionY="4454"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="3374"/>
- <point positionX="150" positionY="3374"/>
+ <point positionX="0" positionY="3340"/>
+ <point positionX="150" positionY="3340"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="3374"/>
- <point positionX="150" positionY="3374"/>
+ <point positionX="0" positionY="3340"/>
+ <point positionX="150" positionY="3340"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="2250"/>
- <point positionX="150" positionY="2250"/>
+ <point positionX="0" positionY="2227"/>
+ <point positionX="150" positionY="2227"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="2250"/>
- <point positionX="150" positionY="2250"/>
+ <point positionX="0" positionY="2227"/>
+ <point positionX="150" positionY="2227"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="1125"/>
- <point positionX="150" positionY="1125"/>
+ <point positionX="0" positionY="1114"/>
+ <point positionX="150" positionY="1114"/>
</pointSequence>
<pointSequence>
- <point positionX="0" positionY="1125"/>
- <point positionX="150" positionY="1125"/>
+ <point positionX="0" positionY="1114"/>
+ <point positionX="150" positionY="1114"/>
</pointSequence>
<pointSequence>
<point positionX="0" positionY="0"/>
@@ -469,53 +469,53 @@
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="150.000000" column2="0.000000" column3="606.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="352.000000"/>
+ <Line1 column1="150.000000" column2="0.000000" column3="612.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="756" positionY="352" sizeX="0" sizeY="7873" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <XShape positionX="762" positionY="378" sizeX="0" sizeY="7794" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
<LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
<LineStart/>
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="756" positionY="8225"/>
- <point positionX="756" positionY="352"/>
+ <point positionX="762" positionY="8172"/>
+ <point positionX="762" positionY="378"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="7873"/>
+ <point positionX="0" positionY="7794"/>
<point positionX="0" positionY="0"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="0.000000" column2="0.000000" column3="756.000000"/>
- <Line2 column1="0.000000" column2="7873.000000" column3="352.000000"/>
+ <Line1 column1="0.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="151.000000" column2="0.000000" column3="606.000000"/>
- <Line2 column1="0.000000" column2="7874.000000" column3="352.000000"/>
+ <Line1 column1="151.000000" column2="0.000000" column3="612.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="13685.000000" column2="0.000000" column3="606.000000"/>
- <Line2 column1="0.000000" column2="8024.000000" column3="352.000000"/>
+ <Line1 column1="13683.000000" column2="0.000000" column3="612.000000"/>
+ <Line2 column1="0.000000" column2="7945.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1319" positionY="1477" sizeX="12407" sizeY="6748" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="1325" positionY="1492" sizeX="12405" sizeY="6680" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="1319" positionY="3726" sizeX="11279" sizeY="4499" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
+ <XShape positionX="1325" positionY="3718" sizeX="11277" sizeY="4454" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
<XShapes>
- <XShape positionX="11470" positionY="3726" sizeX="1128" sizeY="4499" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="1325" positionY="7058" sizeX="1128" sizeY="1114" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff0000" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -524,30 +524,30 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="11470" positionY="8225"/>
- <point positionX="12598" positionY="8225"/>
- <point positionX="12598" positionY="3726"/>
- <point positionX="11470" positionY="3726"/>
- <point positionX="11470" positionY="8225"/>
+ <point positionX="1325" positionY="8172"/>
+ <point positionX="2453" positionY="8172"/>
+ <point positionX="2453" positionY="7058"/>
+ <point positionX="1325" positionY="7058"/>
+ <point positionX="1325" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="4499"/>
- <point positionX="1128" positionY="4499"/>
+ <point positionX="0" positionY="1114"/>
+ <point positionX="1128" positionY="1114"/>
<point positionX="1128" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="4499"/>
+ <point positionX="0" positionY="1114"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1128.000000" column2="0.000000" column3="11470.000000"/>
- <Line2 column1="0.000000" column2="4499.000000" column3="3726.000000"/>
+ <Line1 column1="1128.000000" column2="0.000000" column3="1325.000000"/>
+ <Line2 column1="0.000000" column2="1114.000000" column3="7058.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8086" positionY="4851" sizeX="1128" sizeY="3374" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="0000ff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="4708" positionY="5945" sizeX="1128" sizeY="2227" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="00ff00" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -556,30 +556,30 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="8086" positionY="8225"/>
- <point positionX="9214" positionY="8225"/>
- <point positionX="9214" positionY="4851"/>
- <point positionX="8086" positionY="4851"/>
- <point positionX="8086" positionY="8225"/>
+ <point positionX="4708" positionY="8172"/>
+ <point positionX="5836" positionY="8172"/>
+ <point positionX="5836" positionY="5945"/>
+ <point positionX="4708" positionY="5945"/>
+ <point positionX="4708" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="3374"/>
- <point positionX="1128" positionY="3374"/>
+ <point positionX="0" positionY="2227"/>
+ <point positionX="1128" positionY="2227"/>
<point positionX="1128" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="3374"/>
+ <point positionX="0" positionY="2227"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1128.000000" column2="0.000000" column3="8086.000000"/>
- <Line2 column1="0.000000" column2="3374.000000" column3="4851.000000"/>
+ <Line1 column1="1128.000000" column2="0.000000" column3="4708.000000"/>
+ <Line2 column1="0.000000" column2="2227.000000" column3="5945.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="4703" positionY="5975" sizeX="1128" sizeY="2250" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="00ff00" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="8091" positionY="4832" sizeX="1128" sizeY="3340" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="0000ff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -588,30 +588,30 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="4703" positionY="8225"/>
- <point positionX="5831" positionY="8225"/>
- <point positionX="5831" positionY="5975"/>
- <point positionX="4703" positionY="5975"/>
- <point positionX="4703" positionY="8225"/>
+ <point positionX="8091" positionY="8172"/>
+ <point positionX="9219" positionY="8172"/>
+ <point positionX="9219" positionY="4832"/>
+ <point positionX="8091" positionY="4832"/>
+ <point positionX="8091" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="2250"/>
- <point positionX="1128" positionY="2250"/>
+ <point positionX="0" positionY="3340"/>
+ <point positionX="1128" positionY="3340"/>
<point positionX="1128" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="2250"/>
+ <point positionX="0" positionY="3340"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1128.000000" column2="0.000000" column3="4703.000000"/>
- <Line2 column1="0.000000" column2="2250.000000" column3="5975.000000"/>
+ <Line1 column1="1128.000000" column2="0.000000" column3="8091.000000"/>
+ <Line2 column1="0.000000" column2="3340.000000" column3="4832.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1319" positionY="7100" sizeX="1128" sizeY="1125" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff0000" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="11474" positionY="3718" sizeX="1128" sizeY="4454" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -620,39 +620,39 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="1319" positionY="8225"/>
- <point positionX="2447" positionY="8225"/>
- <point positionX="2447" positionY="7100"/>
- <point positionX="1319" positionY="7100"/>
- <point positionX="1319" positionY="8225"/>
+ <point positionX="11474" positionY="8172"/>
+ <point positionX="12602" positionY="8172"/>
+ <point positionX="12602" positionY="3718"/>
+ <point positionX="11474" positionY="3718"/>
+ <point positionX="11474" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="1125"/>
- <point positionX="1128" positionY="1125"/>
+ <point positionX="0" positionY="4454"/>
+ <point positionX="1128" positionY="4454"/>
<point positionX="1128" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="1125"/>
+ <point positionX="0" positionY="4454"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1128.000000" column2="0.000000" column3="1319.000000"/>
- <Line2 column1="0.000000" column2="1125.000000" column3="7100.000000"/>
+ <Line1 column1="1128.000000" column2="0.000000" column3="11474.000000"/>
+ <Line2 column1="0.000000" column2="4454.000000" column3="3718.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="11280.000000" column2="0.000000" column3="1319.000000"/>
- <Line2 column1="0.000000" column2="4500.000000" column3="3726.000000"/>
+ <Line1 column1="11278.000000" column2="0.000000" column3="1325.000000"/>
+ <Line2 column1="0.000000" column2="4455.000000" column3="3718.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="2447" positionY="1477" sizeX="11279" sizeY="6748" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=1">
+ <XShape positionX="2453" positionY="1492" sizeX="11277" sizeY="6680" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=1">
<XShapes>
- <XShape positionX="12598" positionY="1477" sizeX="1128" sizeY="6748" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=3" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="2453" positionY="4832" sizeX="1128" sizeY="3340" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -661,30 +661,30 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="12598" positionY="8225"/>
- <point positionX="13726" positionY="8225"/>
- <point positionX="13726" positionY="1477"/>
- <point positionX="12598" positionY="1477"/>
- <point positionX="12598" positionY="8225"/>
+ <point positionX="2453" positionY="8172"/>
+ <point positionX="3581" positionY="8172"/>
+ <point positionX="3581" positionY="4832"/>
+ <point positionX="2453" positionY="4832"/>
+ <point positionX="2453" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="6748"/>
- <point positionX="1128" positionY="6748"/>
+ <point positionX="0" positionY="3340"/>
+ <point positionX="1128" positionY="3340"/>
<point positionX="1128" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="6748"/>
+ <point positionX="0" positionY="3340"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1128.000000" column2="0.000000" column3="12598.000000"/>
- <Line2 column1="0.000000" column2="6748.000000" column3="1477.000000"/>
+ <Line1 column1="1128.000000" column2="0.000000" column3="2453.000000"/>
+ <Line2 column1="0.000000" column2="3340.000000" column3="4832.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="9214" positionY="2602" sizeX="1128" sizeY="5623" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="5836" positionY="3718" sizeX="1128" sizeY="4454" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -693,30 +693,30 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="9214" positionY="8225"/>
- <point positionX="10342" positionY="8225"/>
- <point positionX="10342" positionY="2602"/>
- <point positionX="9214" positionY="2602"/>
- <point positionX="9214" positionY="8225"/>
+ <point positionX="5836" positionY="8172"/>
+ <point positionX="6964" positionY="8172"/>
+ <point positionX="6964" positionY="3718"/>
+ <point positionX="5836" positionY="3718"/>
+ <point positionX="5836" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="5623"/>
- <point positionX="1128" positionY="5623"/>
+ <point positionX="0" positionY="4454"/>
+ <point positionX="1128" positionY="4454"/>
<point positionX="1128" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="5623"/>
+ <point positionX="0" positionY="4454"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1128.000000" column2="0.000000" column3="9214.000000"/>
- <Line2 column1="0.000000" column2="5623.000000" column3="2602.000000"/>
+ <Line1 column1="1128.000000" column2="0.000000" column3="5836.000000"/>
+ <Line2 column1="0.000000" column2="4454.000000" column3="3718.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="5831" positionY="3726" sizeX="1128" sizeY="4499" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="9219" positionY="2605" sizeX="1128" sizeY="5567" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -725,30 +725,30 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="5831" positionY="8225"/>
- <point positionX="6959" positionY="8225"/>
- <point positionX="6959" positionY="3726"/>
- <point positionX="5831" positionY="3726"/>
- <point positionX="5831" positionY="8225"/>
+ <point positionX="9219" positionY="8172"/>
+ <point positionX="10347" positionY="8172"/>
+ <point positionX="10347" positionY="2605"/>
+ <point positionX="9219" positionY="2605"/>
+ <point positionX="9219" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="4499"/>
- <point positionX="1128" positionY="4499"/>
+ <point positionX="0" positionY="5567"/>
+ <point positionX="1128" positionY="5567"/>
<point positionX="1128" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="4499"/>
+ <point positionX="0" positionY="5567"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1128.000000" column2="0.000000" column3="5831.000000"/>
- <Line2 column1="0.000000" column2="4499.000000" column3="3726.000000"/>
+ <Line1 column1="1128.000000" column2="0.000000" column3="9219.000000"/>
+ <Line2 column1="0.000000" column2="5567.000000" column3="2605.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="2447" positionY="4851" sizeX="1128" sizeY="3374" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="12602" positionY="1492" sizeX="1128" sizeY="6680" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=3" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -757,62 +757,62 @@
<LineEnd/>
<PolyPolygon>
<pointSequence>
- <point positionX="2447" positionY="8225"/>
- <point positionX="3575" positionY="8225"/>
- <point positionX="3575" positionY="4851"/>
- <point positionX="2447" positionY="4851"/>
- <point positionX="2447" positionY="8225"/>
+ <point positionX="12602" positionY="8172"/>
+ <point positionX="13730" positionY="8172"/>
+ <point positionX="13730" positionY="1492"/>
+ <point positionX="12602" positionY="1492"/>
+ <point positionX="12602" positionY="8172"/>
</pointSequence>
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="3374"/>
- <point positionX="1128" positionY="3374"/>
+ <point positionX="0" positionY="6680"/>
+ <point positionX="1128" positionY="6680"/>
<point positionX="1128" positionY="0"/>
<point positionX="0" positionY="0"/>
- <point positionX="0" positionY="3374"/>
+ <point positionX="0" positionY="6680"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="1128.000000" column2="0.000000" column3="2447.000000"/>
- <Line2 column1="0.000000" column2="3374.000000" column3="4851.000000"/>
+ <Line1 column1="1128.000000" column2="0.000000" column3="12602.000000"/>
+ <Line2 column1="0.000000" column2="6680.000000" column3="1492.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="11280.000000" column2="0.000000" column3="2447.000000"/>
- <Line2 column1="0.000000" column2="6749.000000" column3="1477.000000"/>
+ <Line1 column1="11278.000000" column2="0.000000" column3="2453.000000"/>
+ <Line2 column1="0.000000" column2="6681.000000" column3="1492.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="12408.000000" column2="0.000000" column3="1319.000000"/>
- <Line2 column1="0.000000" column2="6749.000000" column3="1477.000000"/>
+ <Line1 column1="12406.000000" column2="0.000000" column3="1325.000000"/>
+ <Line2 column1="0.000000" column2="6681.000000" column3="1492.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="13685.000000" column2="0.000000" column3="606.000000"/>
- <Line2 column1="0.000000" column2="8024.000000" column3="352.000000"/>
+ <Line1 column1="13683.000000" column2="0.000000" column3="612.000000"/>
+ <Line2 column1="0.000000" column2="7945.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="13685.000000" column2="0.000000" column3="606.000000"/>
- <Line2 column1="0.000000" column2="8024.000000" column3="352.000000"/>
+ <Line1 column1="13683.000000" column2="0.000000" column3="612.000000"/>
+ <Line2 column1="0.000000" column2="7945.000000" column3="378.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="180" sizeX="12372" sizeY="8640" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="320" positionY="180" sizeX="12379" sizeY="8640" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="2354" positionY="8475" sizeX="10338" sizeY="345" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
+ <XShape positionX="2357" positionY="8422" sizeX="10342" sizeY="398" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
<XShapes>
- <XShape positionX="2354" positionY="8475" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="1" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="2357" positionY="8422" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="1" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -820,13 +820,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="2354.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8475.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="2357.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="5738" positionY="8475" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="2" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="5740" positionY="8422" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="2" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -834,13 +834,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="5738.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8475.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="5740.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="9121" positionY="8475" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="3" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="9123" positionY="8422" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="3" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -848,13 +848,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="9121.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8475.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="9123.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="12505" positionY="8475" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="4" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="12506" positionY="8422" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="4" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -862,22 +862,22 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="12505.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8475.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="12506.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="10339.000000" column2="0.000000" column3="2354.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8475.000000"/>
+ <Line1 column1="10343.000000" column2="0.000000" column3="2357.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="180" sizeX="187" sizeY="8218" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShape positionX="320" positionY="180" sizeX="193" sizeY="8192" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
<XShapes>
- <XShape positionX="320" positionY="8053" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="0" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="7974" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="0" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -885,13 +885,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="8053.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="7974.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="6928" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="1" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="6860" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="1" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -899,13 +899,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="6928.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="6860.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="5803" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="2" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="5747" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="2" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -913,13 +913,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="5803.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="5747.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="4679" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="3" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="4634" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="3" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -927,13 +927,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="4679.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4634.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="3554" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="4" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="3520" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="4" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -941,13 +941,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="3554.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="3520.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="2430" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="5" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="2407" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="5" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -955,13 +955,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="2430.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="2407.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="1305" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="6" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="1294" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="6" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -969,13 +969,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="1305.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="1294.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="320" positionY="180" sizeX="187" sizeY="345" type="com.sun.star.drawing.TextShape" text="7" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="320" positionY="180" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="7" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -983,43 +983,43 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="180.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="320.000000"/>
- <Line2 column1="0.000000" column2="8219.000000" column3="180.000000"/>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="8193.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="12373.000000" column2="0.000000" column3="320.000000"/>
+ <Line1 column1="12380.000000" column2="0.000000" column3="320.000000"/>
<Line2 column1="0.000000" column2="8641.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="13971.000000" column2="0.000000" column3="320.000000"/>
+ <Line1 column1="13975.000000" column2="0.000000" column3="320.000000"/>
<Line2 column1="0.000000" column2="8641.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="13971.000000" column2="0.000000" column3="320.000000"/>
+ <Line1 column1="13975.000000" column2="0.000000" column3="320.000000"/>
<Line2 column1="0.000000" column2="8641.000000" column3="180.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="14610" positionY="4005" sizeX="1180" sizeY="990" type="com.sun.star.drawing.GroupShape" name="CID/D=0:Legend=">
+ <XShape positionX="14614" positionY="3952" sizeX="1176" sizeY="1096" type="com.sun.star.drawing.GroupShape" name="CID/D=0:Legend=">
<XShapes>
- <XShape positionX="14610" positionY="4005" sizeX="1180" sizeY="990" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="e6e6e6" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="14614" positionY="3952" sizeX="1176" sizeY="1096" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="e6e6e6" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1027,17 +1027,17 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1181.000000" column2="0.000000" column3="14610.000000"/>
- <Line2 column1="0.000000" column2="991.000000" column3="4005.000000"/>
+ <Line1 column1="1177.000000" column2="0.000000" column3="14614.000000"/>
+ <Line2 column1="0.000000" column2="1097.000000" column3="3952.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="14726" positionY="4172" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="14730" positionY="4145" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="14726" positionY="4172" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:LegendEntry=0">
+ <XShape positionX="14730" positionY="4145" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:LegendEntry=0">
<XShapes>
- <XShape positionX="14726" positionY="4172" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="14730" positionY="4145" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1045,13 +1045,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14726.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4172.000000"/>
+ <Line1 column1="212.000000" column2="0.000000" column3="14730.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="14726" positionY="4172" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="14730" positionY="4145" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1059,31 +1059,31 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14726.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4172.000000"/>
+ <Line1 column1="212.000000" column2="0.000000" column3="14730.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14726.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4172.000000"/>
+ <Line1 column1="212.000000" column2="0.000000" column3="14730.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14726.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4172.000000"/>
+ <Line1 column1="212.000000" column2="0.000000" column3="14730.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="14726" positionY="4617" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="14730" positionY="4643" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="14726" positionY="4617" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:LegendEntry=0">
+ <XShape positionX="14730" positionY="4643" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:LegendEntry=0">
<XShapes>
- <XShape positionX="14726" positionY="4617" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="14730" positionY="4643" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1091,13 +1091,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14726.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4617.000000"/>
+ <Line1 column1="212.000000" column2="0.000000" column3="14730.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="14726" positionY="4617" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="24.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="14730" positionY="4643" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1105,27 +1105,27 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14726.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4617.000000"/>
+ <Line1 column1="212.000000" column2="0.000000" column3="14730.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14726.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4617.000000"/>
+ <Line1 column1="212.000000" column2="0.000000" column3="14730.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14726.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4617.000000"/>
+ <Line1 column1="212.000000" column2="0.000000" column3="14730.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="15037" positionY="4105" sizeX="637" sizeY="345" type="com.sun.star.drawing.TextShape" text="col1" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4800" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="15041" positionY="4052" sizeX="633" sizeY="398" type="com.sun.star.drawing.TextShape" text="col1" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4800" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1133,13 +1133,13 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="638.000000" column2="0.000000" column3="15037.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="4105.000000"/>
+ <Line1 column1="634.000000" column2="0.000000" column3="15041.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4052.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="15037" positionY="4550" sizeX="637" sizeY="345" type="com.sun.star.drawing.TextShape" text="col2" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4800" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <XShape positionX="15041" positionY="4550" sizeX="633" sizeY="398" type="com.sun.star.drawing.TextShape" text="col2" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4800" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
<FillBitmap/>
@@ -1147,15 +1147,15 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="638.000000" column2="0.000000" column3="15037.000000"/>
- <Line2 column1="0.000000" column2="346.000000" column3="4550.000000"/>
+ <Line1 column1="634.000000" column2="0.000000" column3="15041.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4550.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="1181.000000" column2="0.000000" column3="14610.000000"/>
- <Line2 column1="0.000000" column2="991.000000" column3="4005.000000"/>
+ <Line1 column1="1177.000000" column2="0.000000" column3="14614.000000"/>
+ <Line2 column1="0.000000" column2="1097.000000" column3="3952.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
diff --git a/chart2/qa/extras/xshape/data/reference/tdf149204.xml b/chart2/qa/extras/xshape/data/reference/tdf149204.xml
new file mode 100644
index 000000000000..b14a27418d0a
--- /dev/null
+++ b/chart2/qa/extras/xshape/data/reference/tdf149204.xml
@@ -0,0 +1,397 @@
+<?xml version="1.0"?>
+<XShapes>
+ <XShape positionX="0" positionY="0" sizeX="14277" sizeY="10471" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="14278.000000" column2="0.000000" column3="0.000000"/>
+ <Line2 column1="0.000000" column2="10472.000000" column3="0.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="1741" positionY="1996" sizeX="12230" sizeY="7836" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
+ <XShapes>
+ <XShape positionX="1741" positionY="1996" sizeX="12230" sizeY="7836" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="12231.000000" column2="0.000000" column3="1741.000000"/>
+ <Line2 column1="0.000000" column2="7837.000000" column3="1996.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="1741" positionY="2023" sizeX="12230" sizeY="7782" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="12231.000000" column2="0.000000" column3="1741.000000"/>
+ <Line2 column1="0.000000" column2="7783.000000" column3="2023.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="1741" positionY="2023" sizeX="12230" sizeY="7782" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="1741" positionY="2023" sizeX="12230" sizeY="7782" type="com.sun.star.drawing.Shape3DSceneObject" name="PlotAreaExcludingAxes"/>
+ <XShape positionX="3838" positionY="3445" sizeX="9345" sizeY="5248" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="3838" positionY="3445" sizeX="9345" sizeY="5248" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="12788" positionY="8216" sizeX="395" sizeY="477" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels=">
+ <XShapes>
+ <XShape positionX="12788" positionY="8216" sizeX="395" sizeY="477" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0">
+ <XShapes>
+ <XShape positionX="12788" positionY="8216" sizeX="395" sizeY="477" type="com.sun.star.drawing.TextShape" text="13" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3490" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="396.000000" column2="0.000000" column3="12788.000000"/>
+ <Line2 column1="0.000000" column2="478.000000" column3="8216.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="396.000000" column2="0.000000" column3="12788.000000"/>
+ <Line2 column1="0.000000" column2="478.000000" column3="8216.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="396.000000" column2="0.000000" column3="12788.000000"/>
+ <Line2 column1="0.000000" column2="478.000000" column3="8216.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7092" positionY="5831" sizeX="199" sizeY="477" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=1:DataLabels=">
+ <XShapes>
+ <XShape positionX="7092" positionY="5831" sizeX="199" sizeY="477" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=1:DataLabels=:DataLabel=0">
+ <XShapes>
+ <XShape positionX="7092" positionY="5831" sizeX="199" sizeY="477" type="com.sun.star.drawing.TextShape" text="6" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3490" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="200.000000" column2="0.000000" column3="7092.000000"/>
+ <Line2 column1="0.000000" column2="478.000000" column3="5831.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="200.000000" column2="0.000000" column3="7092.000000"/>
+ <Line2 column1="0.000000" column2="478.000000" column3="5831.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="200.000000" column2="0.000000" column3="7092.000000"/>
+ <Line2 column1="0.000000" column2="478.000000" column3="5831.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="3838" positionY="3445" sizeX="199" sizeY="477" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=2:DataLabels=">
+ <XShapes>
+ <XShape positionX="3838" positionY="3445" sizeX="199" sizeY="477" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=2:DataLabels=:DataLabel=0">
+ <XShapes>
+ <XShape positionX="3838" positionY="3445" sizeX="199" sizeY="477" type="com.sun.star.drawing.TextShape" text="2" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3490" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="200.000000" column2="0.000000" column3="3838.000000"/>
+ <Line2 column1="0.000000" column2="478.000000" column3="3445.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="200.000000" column2="0.000000" column3="3838.000000"/>
+ <Line2 column1="0.000000" column2="478.000000" column3="3445.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="200.000000" column2="0.000000" column3="3838.000000"/>
+ <Line2 column1="0.000000" column2="478.000000" column3="3445.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="9346.000000" column2="0.000000" column3="3838.000000"/>
+ <Line2 column1="0.000000" column2="5249.000000" column3="3445.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="9346.000000" column2="0.000000" column3="3838.000000"/>
+ <Line2 column1="0.000000" column2="5249.000000" column3="3445.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="12231.000000" column2="0.000000" column3="1741.000000"/>
+ <Line2 column1="0.000000" column2="7783.000000" column3="2023.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="12231.000000" column2="0.000000" column3="1741.000000"/>
+ <Line2 column1="0.000000" column2="7837.000000" column3="1996.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="4074" positionY="985" sizeX="9286" sizeY="1295" type="com.sun.star.drawing.TextShape" name="CID/Title=" text="Gr&#xE1;fico de Colunas ou Barras" fontHeight="18.600000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="118" textRightDistance="118" textUpperDistance="197" textLowerDistance="197" textMaximumFrameHeight="0" textMaximumFrameWidth="11421" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="d9d9d9" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="9287.000000" column2="0.000000" column3="4074.000000"/>
+ <Line2 column1="0.000000" column2="1296.000000" column3="985.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="4928" positionY="9793" sizeX="4420" sizeY="677" type="com.sun.star.drawing.GroupShape" name="CID/D=0:Legend=">
+ <XShapes>
+ <XShape positionX="4928" positionY="9793" sizeX="4420" sizeY="677" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="d9d9d9" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="4421.000000" column2="0.000000" column3="4928.000000"/>
+ <Line2 column1="0.000000" column2="678.000000" column3="9793.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7919" positionY="10026" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="7919" positionY="10026" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:LegendEntry=0">
+ <XShapes>
+ <XShape positionX="7919" positionY="10026" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="7919.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="10026.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7919" positionY="10026" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="5b9bd5" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="7919.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="10026.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="7919.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="10026.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="7919.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="10026.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="6424" positionY="10026" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="6424" positionY="10026" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:LegendEntry=0">
+ <XShapes>
+ <XShape positionX="6424" positionY="10026" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="6424.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="10026.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="6424" positionY="10026" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ed7d31" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="6424.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="10026.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="6424.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="10026.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="6424.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="10026.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="5044" positionY="10026" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="5044" positionY="10026" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=2:LegendEntry=0">
+ <XShapes>
+ <XShape positionX="5044" positionY="10026" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="5044.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="10026.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="5044" positionY="10026" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="a5a5a5" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="5044.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="10026.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="5044.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="10026.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="5044.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="10026.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="5355" positionY="9893" sizeX="837" sizeY="477" type="com.sun.star.drawing.TextShape" text="Cupe" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="13966" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="838.000000" column2="0.000000" column3="5355.000000"/>
+ <Line2 column1="0.000000" column2="478.000000" column3="9893.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="6735" positionY="9893" sizeX="952" sizeY="477" type="com.sun.star.drawing.TextShape" text="Hatch" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="13966" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="953.000000" column2="0.000000" column3="6735.000000"/>
+ <Line2 column1="0.000000" column2="478.000000" column3="9893.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="8230" positionY="9893" sizeX="1002" sizeY="477" type="com.sun.star.drawing.TextShape" text="Sedan" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="13966" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="1003.000000" column2="0.000000" column3="8230.000000"/>
+ <Line2 column1="0.000000" column2="478.000000" column3="9893.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="4421.000000" column2="0.000000" column3="4928.000000"/>
+ <Line2 column1="0.000000" column2="678.000000" column3="9793.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+</XShapes>
+
+
diff --git a/chart2/qa/extras/xshape/data/reference/tdf150832.xml b/chart2/qa/extras/xshape/data/reference/tdf150832.xml
new file mode 100644
index 000000000000..83750aea2054
--- /dev/null
+++ b/chart2/qa/extras/xshape/data/reference/tdf150832.xml
@@ -0,0 +1,974 @@
+<?xml version="1.0"?>
+<XShapes>
+ <XShape positionX="0" positionY="0" sizeX="15990" sizeY="8998" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="15991.000000" column2="0.000000" column3="0.000000"/>
+ <Line2 column1="0.000000" column2="8999.000000" column3="0.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="319" positionY="179" sizeX="13087" sizeY="8640" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
+ <XShapes>
+ <XShape positionX="761" positionY="379" sizeX="12645" sizeY="7793" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="12646.000000" column2="0.000000" column3="761.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="379.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="319" positionY="179" sizeX="13087" sizeY="8640" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="13088.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="8641.000000" column3="179.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="319" positionY="179" sizeX="13087" sizeY="8640" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="611" positionY="377" sizeX="12795" sizeY="7944" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="761" positionY="379" sizeX="12645" sizeY="7793" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
+ <XShapes>
+ <XShape positionX="761" positionY="379" sizeX="12645" sizeY="7793" type="com.sun.star.drawing.RectangleShape" name="CID/DiagramWall=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="000000" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="12646.000000" column2="0.000000" column3="761.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="379.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="12646.000000" column2="0.000000" column3="761.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="379.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="611" positionY="377" sizeX="12795" sizeY="7944" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
+ <XShapes>
+ <XShape positionX="761" positionY="377" sizeX="12645" sizeY="7794" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="761" positionY="377" sizeX="12645" sizeY="7794" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0:Grid=0">
+ <XShapes>
+ <XShape positionX="761" positionY="377" sizeX="12645" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="13406" positionY="8171"/>
+ <point positionX="761" positionY="8171"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13406" positionY="7057"/>
+ <point positionX="761" positionY="7057"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13406" positionY="5944"/>
+ <point positionX="761" positionY="5944"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13406" positionY="4831"/>
+ <point positionX="761" positionY="4831"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13406" positionY="3717"/>
+ <point positionX="761" positionY="3717"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13406" positionY="2604"/>
+ <point positionX="761" positionY="2604"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13406" positionY="1491"/>
+ <point positionX="761" positionY="1491"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13406" positionY="377"/>
+ <point positionX="761" positionY="377"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="12645" positionY="7794"/>
+ <point positionX="0" positionY="7794"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="12645" positionY="6680"/>
+ <point positionX="0" positionY="6680"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="12645" positionY="5567"/>
+ <point positionX="0" positionY="5567"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="12645" positionY="4454"/>
+ <point positionX="0" positionY="4454"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="12645" positionY="3340"/>
+ <point positionX="0" positionY="3340"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="12645" positionY="2227"/>
+ <point positionX="0" positionY="2227"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="12645" positionY="1114"/>
+ <point positionX="0" positionY="1114"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="12645" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="12645.000000" column2="0.000000" column3="761.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="377.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="761" positionY="377" sizeX="0" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" name="HandlesOnly" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="NONE">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="761" positionY="8171"/>
+ <point positionX="761" positionY="7057"/>
+ <point positionX="761" positionY="5944"/>
+ <point positionX="761" positionY="4831"/>
+ <point positionX="761" positionY="3717"/>
+ <point positionX="761" positionY="2604"/>
+ <point positionX="761" positionY="1491"/>
+ <point positionX="761" positionY="377"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="0" positionY="6680"/>
+ <point positionX="0" positionY="5567"/>
+ <point positionX="0" positionY="4454"/>
+ <point positionX="0" positionY="3340"/>
+ <point positionX="0" positionY="2227"/>
+ <point positionX="0" positionY="1114"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="0.000000" column2="0.000000" column3="761.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="377.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="12646.000000" column2="0.000000" column3="761.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="377.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="12646.000000" column2="0.000000" column3="761.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="377.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="611" positionY="377" sizeX="12795" sizeY="7944" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="761" positionY="8171" sizeX="12645" sizeY="150" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
+ <XShapes>
+ <XShape positionX="761" positionY="8171" sizeX="12645" sizeY="150" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="761" positionY="8321"/>
+ <point positionX="761" positionY="8171"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="4976" positionY="8321"/>
+ <point positionX="4976" positionY="8171"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="9191" positionY="8321"/>
+ <point positionX="9191" positionY="8171"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13406" positionY="8321"/>
+ <point positionX="13406" positionY="8171"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="150"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="4215" positionY="150"/>
+ <point positionX="4215" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="8430" positionY="150"/>
+ <point positionX="8430" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="12645" positionY="150"/>
+ <point positionX="12645" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="12645.000000" column2="0.000000" column3="761.000000"/>
+ <Line2 column1="0.000000" column2="150.000000" column3="8171.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="761" positionY="8171" sizeX="12645" sizeY="0" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="761" positionY="8171"/>
+ <point positionX="13406" positionY="8171"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="0"/>
+ <point positionX="12645" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="12645.000000" column2="0.000000" column3="761.000000"/>
+ <Line2 column1="0.000000" column2="0.000000" column3="8171.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="12646.000000" column2="0.000000" column3="761.000000"/>
+ <Line2 column1="0.000000" column2="151.000000" column3="8171.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="611" positionY="377" sizeX="150" sizeY="7794" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShapes>
+ <XShape positionX="611" positionY="377" sizeX="150" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="611" positionY="8171"/>
+ <point positionX="761" positionY="8171"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="611" positionY="7057"/>
+ <point positionX="761" positionY="7057"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="611" positionY="5944"/>
+ <point positionX="761" positionY="5944"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="611" positionY="4831"/>
+ <point positionX="761" positionY="4831"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="611" positionY="3717"/>
+ <point positionX="761" positionY="3717"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="611" positionY="2604"/>
+ <point positionX="761" positionY="2604"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="611" positionY="1491"/>
+ <point positionX="761" positionY="1491"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="611" positionY="377"/>
+ <point positionX="761" positionY="377"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="150" positionY="7794"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="6680"/>
+ <point positionX="150" positionY="6680"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="5567"/>
+ <point positionX="150" positionY="5567"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="4454"/>
+ <point positionX="150" positionY="4454"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="3340"/>
+ <point positionX="150" positionY="3340"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="2227"/>
+ <point positionX="150" positionY="2227"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="1114"/>
+ <point positionX="150" positionY="1114"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="0"/>
+ <point positionX="150" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="150.000000" column2="0.000000" column3="611.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="377.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="761" positionY="377" sizeX="0" sizeY="7794" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="761" positionY="8171"/>
+ <point positionX="761" positionY="377"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="0.000000" column2="0.000000" column3="761.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="377.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="151.000000" column2="0.000000" column3="611.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="377.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="12796.000000" column2="0.000000" column3="611.000000"/>
+ <Line2 column1="0.000000" column2="7945.000000" column3="377.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="1463" positionY="1491" sizeX="11240" sizeY="6680" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="1463" positionY="2604" sizeX="9835" sizeY="5567" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
+ <XShapes>
+ <XShape positionX="1463" positionY="7057" sizeX="1405" sizeY="1114" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="1463" positionY="8171"/>
+ <point positionX="2868" positionY="8171"/>
+ <point positionX="2868" positionY="7057"/>
+ <point positionX="1463" positionY="7057"/>
+ <point positionX="1463" positionY="8171"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="1114"/>
+ <point positionX="1405" positionY="1114"/>
+ <point positionX="1405" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="1114"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="1405.000000" column2="0.000000" column3="1463.000000"/>
+ <Line2 column1="0.000000" column2="1114.000000" column3="7057.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="5678" positionY="4831" sizeX="1405" sizeY="3340" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="5678" positionY="8171"/>
+ <point positionX="7083" positionY="8171"/>
+ <point positionX="7083" positionY="4831"/>
+ <point positionX="5678" positionY="4831"/>
+ <point positionX="5678" positionY="8171"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="3340"/>
+ <point positionX="1405" positionY="3340"/>
+ <point positionX="1405" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="3340"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="1405.000000" column2="0.000000" column3="5678.000000"/>
+ <Line2 column1="0.000000" column2="3340.000000" column3="4831.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="9893" positionY="2604" sizeX="1405" sizeY="5567" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="9893" positionY="8171"/>
+ <point positionX="11298" positionY="8171"/>
+ <point positionX="11298" positionY="2604"/>
+ <point positionX="9893" positionY="2604"/>
+ <point positionX="9893" positionY="8171"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="5567"/>
+ <point positionX="1405" positionY="5567"/>
+ <point positionX="1405" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="5567"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="1405.000000" column2="0.000000" column3="9893.000000"/>
+ <Line2 column1="0.000000" column2="5567.000000" column3="2604.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="9836.000000" column2="0.000000" column3="1463.000000"/>
+ <Line2 column1="0.000000" column2="5568.000000" column3="2604.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="2868" positionY="1491" sizeX="9835" sizeY="6680" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=1">
+ <XShapes>
+ <XShape positionX="2868" positionY="5944" sizeX="1405" sizeY="2227" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="2868" positionY="8171"/>
+ <point positionX="4273" positionY="8171"/>
+ <point positionX="4273" positionY="5944"/>
+ <point positionX="2868" positionY="5944"/>
+ <point positionX="2868" positionY="8171"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="2227"/>
+ <point positionX="1405" positionY="2227"/>
+ <point positionX="1405" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="2227"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="1405.000000" column2="0.000000" column3="2868.000000"/>
+ <Line2 column1="0.000000" column2="2227.000000" column3="5944.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7083" positionY="3717" sizeX="1405" sizeY="4454" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7083" positionY="8171"/>
+ <point positionX="8488" positionY="8171"/>
+ <point positionX="8488" positionY="3717"/>
+ <point positionX="7083" positionY="3717"/>
+ <point positionX="7083" positionY="8171"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="4454"/>
+ <point positionX="1405" positionY="4454"/>
+ <point positionX="1405" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="4454"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="1405.000000" column2="0.000000" column3="7083.000000"/>
+ <Line2 column1="0.000000" column2="4454.000000" column3="3717.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="11298" positionY="1491" sizeX="1405" sizeY="6680" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="11298" positionY="8171"/>
+ <point positionX="12703" positionY="8171"/>
+ <point positionX="12703" positionY="1491"/>
+ <point positionX="11298" positionY="1491"/>
+ <point positionX="11298" positionY="8171"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="6680"/>
+ <point positionX="1405" positionY="6680"/>
+ <point positionX="1405" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="6680"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="1405.000000" column2="0.000000" column3="11298.000000"/>
+ <Line2 column1="0.000000" column2="6680.000000" column3="1491.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="9836.000000" column2="0.000000" column3="2868.000000"/>
+ <Line2 column1="0.000000" column2="6681.000000" column3="1491.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="11241.000000" column2="0.000000" column3="1463.000000"/>
+ <Line2 column1="0.000000" column2="6681.000000" column3="1491.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="12796.000000" column2="0.000000" column3="611.000000"/>
+ <Line2 column1="0.000000" column2="7945.000000" column3="377.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="12796.000000" column2="0.000000" column3="611.000000"/>
+ <Line2 column1="0.000000" column2="7945.000000" column3="377.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="319" positionY="179" sizeX="11076" sizeY="8640" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="2772" positionY="8421" sizeX="8623" sizeY="398" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
+ <XShapes>
+ <XShape positionX="2772" positionY="8421" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="1" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="2772.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8421.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="6987" positionY="8421" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="2" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="6987.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8421.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="11202" positionY="8421" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="3" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="11202.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8421.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="8624.000000" column2="0.000000" column3="2772.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8421.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="319" positionY="179" sizeX="193" sizeY="8192" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShapes>
+ <XShape positionX="319" positionY="7973" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="0" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="7973.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="319" positionY="6859" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="1" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="6859.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="319" positionY="5746" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="2" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="5746.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="319" positionY="4633" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="3" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4633.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="319" positionY="3519" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="4" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="3519.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="319" positionY="2406" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="5" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="2406.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="319" positionY="1293" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="6" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="1293.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="319" positionY="179" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="7" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="179.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="8193.000000" column3="179.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="11077.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="8641.000000" column3="179.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="13088.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="8641.000000" column3="179.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="13088.000000" column2="0.000000" column3="319.000000"/>
+ <Line2 column1="0.000000" column2="8641.000000" column3="179.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="13725" positionY="3951" sizeX="2055" sizeY="1096" type="com.sun.star.drawing.GroupShape" name="CID/D=0:Legend=">
+ <XShapes>
+ <XShape positionX="13725" positionY="3951" sizeX="2055" sizeY="1096" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="000000" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="2056.000000" column2="0.000000" column3="13725.000000"/>
+ <Line2 column1="0.000000" column2="1097.000000" column3="3951.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="13841" positionY="4144" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="13841" positionY="4144" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:LegendEntry=0">
+ <XShapes>
+ <XShape positionX="13841" positionY="4144" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="13841.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4144.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="13841" positionY="4144" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="13841.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4144.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="13841.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4144.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="13841.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4144.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="13841" positionY="4642" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="13841" positionY="4642" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:LegendEntry=0">
+ <XShapes>
+ <XShape positionX="13841" positionY="4642" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="13841.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4642.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="13841" positionY="4642" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="13841.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4642.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="13841.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4642.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="13841.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4642.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14152" positionY="4051" sizeX="1512" sizeY="398" type="com.sun.star.drawing.TextShape" text="Column A" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4797" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="1513.000000" column2="0.000000" column3="14152.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4051.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14152" positionY="4549" sizeX="1512" sizeY="398" type="com.sun.star.drawing.TextShape" text="Column B" fontHeight="10.000000" fontColor="000000" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4797" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="1513.000000" column2="0.000000" column3="14152.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4549.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="2056.000000" column2="0.000000" column3="13725.000000"/>
+ <Line2 column1="0.000000" column2="1097.000000" column3="3951.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+</XShapes>
+
+
diff --git a/chart2/qa/extras/xshape/data/reference/tdf151424.xml b/chart2/qa/extras/xshape/data/reference/tdf151424.xml
new file mode 100644
index 000000000000..eb37ef78c090
--- /dev/null
+++ b/chart2/qa/extras/xshape/data/reference/tdf151424.xml
@@ -0,0 +1,1160 @@
+<?xml version="1.0"?>
+<XShapes>
+ <XShape positionX="0" positionY="0" sizeX="16011" sizeY="9010" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="16012.000000" column2="0.000000" column3="0.000000"/>
+ <Line2 column1="0.000000" column2="9011.000000" column3="0.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="180" sizeX="13511" sizeY="8650" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
+ <XShapes>
+ <XShape positionX="3724" positionY="1154" sizeX="6703" sizeY="6703" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="6704.000000" column2="0.000000" column3="3724.000000"/>
+ <Line2 column1="0.000000" column2="6704.000000" column3="1154.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="180" sizeX="13511" sizeY="8650" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="13512.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="8651.000000" column3="180.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="2985" positionY="180" sizeX="8181" sizeY="8650" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="3724" positionY="1153" sizeX="6703" sizeY="6704" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="3724" positionY="1154" sizeX="6703" sizeY="6703" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
+ <XShapes>
+ <XShape positionX="3724" positionY="1154" sizeX="6703" sizeY="6703" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="e6e6e6" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="6704.000000" column2="0.000000" column3="3724.000000"/>
+ <Line2 column1="0.000000" column2="6704.000000" column3="1154.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="6704.000000" column2="0.000000" column3="3724.000000"/>
+ <Line2 column1="0.000000" column2="6704.000000" column3="1154.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="4098" positionY="1153" sizeX="5954" sizeY="6703" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
+ <XShapes>
+ <XShape positionX="4173" positionY="1153" sizeX="5804" sizeY="6703" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="4173" positionY="1153" sizeX="5804" sizeY="6703" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0:Grid=0">
+ <XShapes>
+ <XShape positionX="4173" positionY="1153" sizeX="5804" sizeY="6703" type="com.sun.star.drawing.PolyLineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7075" positionY="4504"/>
+ <point positionX="7075" positionY="4504"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="7075" positionY="1153"/>
+ <point positionX="4173" positionY="2828"/>
+ <point positionX="4173" positionY="6180"/>
+ <point positionX="7075" positionY="7856"/>
+ <point positionX="9977" positionY="6180"/>
+ <point positionX="9977" positionY="2828"/>
+ <point positionX="7075" positionY="1153"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="2902" positionY="3351"/>
+ <point positionX="2902" positionY="3351"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="2902" positionY="0"/>
+ <point positionX="0" positionY="1675"/>
+ <point positionX="0" positionY="5027"/>
+ <point positionX="2902" positionY="6703"/>
+ <point positionX="5804" positionY="5027"/>
+ <point positionX="5804" positionY="1675"/>
+ <point positionX="2902" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="5804.000000" column2="0.000000" column3="4173.000000"/>
+ <Line2 column1="0.000000" column2="6703.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="5805.000000" column2="0.000000" column3="4173.000000"/>
+ <Line2 column1="0.000000" column2="6704.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="5805.000000" column2="0.000000" column3="4173.000000"/>
+ <Line2 column1="0.000000" column2="6704.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="4098" positionY="1153" sizeX="5954" sizeY="6703" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="4173" positionY="1153" sizeX="5804" sizeY="6703" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
+ <XShapes>
+ <XShape positionX="4173" positionY="1153" sizeX="5804" sizeY="6703" type="com.sun.star.drawing.PolyLineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7075" positionY="1153"/>
+ <point positionX="4173" positionY="2828"/>
+ <point positionX="4173" positionY="6180"/>
+ <point positionX="7075" positionY="7856"/>
+ <point positionX="9977" positionY="6180"/>
+ <point positionX="9977" positionY="2828"/>
+ <point positionX="7075" positionY="1153"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="2902" positionY="0"/>
+ <point positionX="0" positionY="1675"/>
+ <point positionX="0" positionY="5027"/>
+ <point positionX="2902" positionY="6703"/>
+ <point positionX="5804" positionY="5027"/>
+ <point positionX="5804" positionY="1675"/>
+ <point positionX="2902" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="5804.000000" column2="0.000000" column3="4173.000000"/>
+ <Line2 column1="0.000000" column2="6703.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="5805.000000" column2="0.000000" column3="4173.000000"/>
+ <Line2 column1="0.000000" column2="6704.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="6925" positionY="1153" sizeX="300" sizeY="3351" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShapes>
+ <XShape positionX="6925" positionY="1153" sizeX="300" sizeY="3351" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7225" positionY="4504"/>
+ <point positionX="6925" positionY="4504"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="7225" positionY="4504"/>
+ <point positionX="6925" positionY="4504"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="7225" positionY="1153"/>
+ <point positionX="6925" positionY="1153"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="7225" positionY="1153"/>
+ <point positionX="6925" positionY="1153"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="300" positionY="3351"/>
+ <point positionX="0" positionY="3351"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="300" positionY="3351"/>
+ <point positionX="0" positionY="3351"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="300" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="300" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="300.000000" column2="0.000000" column3="6925.000000"/>
+ <Line2 column1="0.000000" column2="3351.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7075" positionY="1153" sizeX="0" sizeY="3351" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7075" positionY="4504"/>
+ <point positionX="7075" positionY="1153"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="3351"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="0.000000" column2="0.000000" column3="7075.000000"/>
+ <Line2 column1="0.000000" column2="3351.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="301.000000" column2="0.000000" column3="6925.000000"/>
+ <Line2 column1="0.000000" column2="3352.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="4098" positionY="2698" sizeX="3052" sizeY="1936" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShapes>
+ <XShape positionX="4098" positionY="2698" sizeX="3052" sizeY="1936" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7150" positionY="4374"/>
+ <point positionX="7000" positionY="4634"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="7150" positionY="4374"/>
+ <point positionX="7000" positionY="4634"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="4248" positionY="2698"/>
+ <point positionX="4098" positionY="2958"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="4248" positionY="2698"/>
+ <point positionX="4098" positionY="2958"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="3052" positionY="1676"/>
+ <point positionX="2902" positionY="1936"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="3052" positionY="1676"/>
+ <point positionX="2902" positionY="1936"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="150" positionY="0"/>
+ <point positionX="0" positionY="260"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="150" positionY="0"/>
+ <point positionX="0" positionY="260"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="3052.000000" column2="0.000000" column3="4098.000000"/>
+ <Line2 column1="0.000000" column2="1936.000000" column3="2698.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="4173" positionY="2828" sizeX="2902" sizeY="1676" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7075" positionY="4504"/>
+ <point positionX="4173" positionY="2828"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="2902" positionY="1676"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="2902.000000" column2="0.000000" column3="4173.000000"/>
+ <Line2 column1="0.000000" column2="1676.000000" column3="2828.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="3053.000000" column2="0.000000" column3="4098.000000"/>
+ <Line2 column1="0.000000" column2="1937.000000" column3="2698.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="4098" positionY="4374" sizeX="3052" sizeY="1936" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShapes>
+ <XShape positionX="4098" positionY="4374" sizeX="3052" sizeY="1936" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7000" positionY="4374"/>
+ <point positionX="7150" positionY="4634"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="7000" positionY="4374"/>
+ <point positionX="7150" positionY="4634"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="4098" positionY="6050"/>
+ <point positionX="4248" positionY="6310"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="4098" positionY="6050"/>
+ <point positionX="4248" positionY="6310"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="2902" positionY="0"/>
+ <point positionX="3052" positionY="260"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="2902" positionY="0"/>
+ <point positionX="3052" positionY="260"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="1676"/>
+ <point positionX="150" positionY="1936"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="1676"/>
+ <point positionX="150" positionY="1936"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="3052.000000" column2="0.000000" column3="4098.000000"/>
+ <Line2 column1="0.000000" column2="1936.000000" column3="4374.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="4173" positionY="4504" sizeX="2902" sizeY="1676" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7075" positionY="4504"/>
+ <point positionX="4173" positionY="6180"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="2902" positionY="0"/>
+ <point positionX="0" positionY="1676"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="2902.000000" column2="0.000000" column3="4173.000000"/>
+ <Line2 column1="0.000000" column2="1676.000000" column3="4504.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="3053.000000" column2="0.000000" column3="4098.000000"/>
+ <Line2 column1="0.000000" column2="1937.000000" column3="4374.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="6925" positionY="4504" sizeX="300" sizeY="3352" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShapes>
+ <XShape positionX="6925" positionY="4504" sizeX="300" sizeY="3352" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="6925" positionY="4504"/>
+ <point positionX="7225" positionY="4504"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="6925" positionY="4504"/>
+ <point positionX="7225" positionY="4504"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="6925" positionY="7856"/>
+ <point positionX="7225" positionY="7856"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="6925" positionY="7856"/>
+ <point positionX="7225" positionY="7856"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="0"/>
+ <point positionX="300" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="0"/>
+ <point positionX="300" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="3352"/>
+ <point positionX="300" positionY="3352"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="3352"/>
+ <point positionX="300" positionY="3352"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="300.000000" column2="0.000000" column3="6925.000000"/>
+ <Line2 column1="0.000000" column2="3352.000000" column3="4504.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7075" positionY="4504" sizeX="0" sizeY="3352" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7075" positionY="4504"/>
+ <point positionX="7075" positionY="7856"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="3352"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="0.000000" column2="0.000000" column3="7075.000000"/>
+ <Line2 column1="0.000000" column2="3352.000000" column3="4504.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="301.000000" column2="0.000000" column3="6925.000000"/>
+ <Line2 column1="0.000000" column2="3353.000000" column3="4504.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7000" positionY="4374" sizeX="3052" sizeY="1936" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShapes>
+ <XShape positionX="7000" positionY="4374" sizeX="3052" sizeY="1936" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7000" positionY="4634"/>
+ <point positionX="7150" positionY="4374"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="7000" positionY="4634"/>
+ <point positionX="7150" positionY="4374"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="9902" positionY="6310"/>
+ <point positionX="10052" positionY="6050"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="9902" positionY="6310"/>
+ <point positionX="10052" positionY="6050"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="260"/>
+ <point positionX="150" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="260"/>
+ <point positionX="150" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="2902" positionY="1936"/>
+ <point positionX="3052" positionY="1676"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="2902" positionY="1936"/>
+ <point positionX="3052" positionY="1676"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="3052.000000" column2="0.000000" column3="7000.000000"/>
+ <Line2 column1="0.000000" column2="1936.000000" column3="4374.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7075" positionY="4504" sizeX="2902" sizeY="1676" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7075" positionY="4504"/>
+ <point positionX="9977" positionY="6180"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="0"/>
+ <point positionX="2902" positionY="1676"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="2902.000000" column2="0.000000" column3="7075.000000"/>
+ <Line2 column1="0.000000" column2="1676.000000" column3="4504.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="3053.000000" column2="0.000000" column3="7000.000000"/>
+ <Line2 column1="0.000000" column2="1937.000000" column3="4374.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7000" positionY="2698" sizeX="3052" sizeY="1936" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShapes>
+ <XShape positionX="7000" positionY="2698" sizeX="3052" sizeY="1936" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7150" positionY="4634"/>
+ <point positionX="7000" positionY="4374"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="7150" positionY="4634"/>
+ <point positionX="7000" positionY="4374"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="10052" positionY="2958"/>
+ <point positionX="9902" positionY="2698"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="10052" positionY="2958"/>
+ <point positionX="9902" positionY="2698"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="150" positionY="1936"/>
+ <point positionX="0" positionY="1676"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="150" positionY="1936"/>
+ <point positionX="0" positionY="1676"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="3052" positionY="260"/>
+ <point positionX="2902" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="3052" positionY="260"/>
+ <point positionX="2902" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="3052.000000" column2="0.000000" column3="7000.000000"/>
+ <Line2 column1="0.000000" column2="1936.000000" column3="2698.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7075" positionY="2828" sizeX="2902" sizeY="1676" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7075" positionY="4504"/>
+ <point positionX="9977" positionY="2828"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="1676"/>
+ <point positionX="2902" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="2902.000000" column2="0.000000" column3="7075.000000"/>
+ <Line2 column1="0.000000" column2="1676.000000" column3="2828.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="3053.000000" column2="0.000000" column3="7000.000000"/>
+ <Line2 column1="0.000000" column2="1937.000000" column3="2698.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="6925" positionY="1153" sizeX="300" sizeY="3351" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShapes>
+ <XShape positionX="6925" positionY="1153" sizeX="300" sizeY="3351" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7225" positionY="4504"/>
+ <point positionX="6925" positionY="4504"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="7225" positionY="4504"/>
+ <point positionX="6925" positionY="4504"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="7225" positionY="1153"/>
+ <point positionX="6925" positionY="1153"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="7225" positionY="1153"/>
+ <point positionX="6925" positionY="1153"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="300" positionY="3351"/>
+ <point positionX="0" positionY="3351"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="300" positionY="3351"/>
+ <point positionX="0" positionY="3351"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="300" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="300" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="300.000000" column2="0.000000" column3="6925.000000"/>
+ <Line2 column1="0.000000" column2="3351.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7075" positionY="1153" sizeX="0" sizeY="3351" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7075" positionY="4504"/>
+ <point positionX="7075" positionY="1153"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="3351"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="0.000000" column2="0.000000" column3="7075.000000"/>
+ <Line2 column1="0.000000" column2="3351.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="301.000000" column2="0.000000" column3="6925.000000"/>
+ <Line2 column1="0.000000" column2="3352.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="5955.000000" column2="0.000000" column3="4098.000000"/>
+ <Line2 column1="0.000000" column2="6704.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="4173" positionY="1153" sizeX="5804" sizeY="6703" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="5334" positionY="3163" sizeX="3482" sizeY="4022" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
+ <XShapes>
+ <XShape positionX="5334" positionY="3163" sizeX="3482" sizeY="4022" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="5334" positionY="3163" sizeX="3482" sizeY="4022" type="com.sun.star.drawing.PolyLineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="40" textRightDistance="40" textUpperDistance="40" textLowerDistance="40" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7075" positionY="3163"/>
+ <point positionX="5334" positionY="3499"/>
+ <point positionX="6495" positionY="4839"/>
+ <point positionX="7075" positionY="7185"/>
+ <point positionX="8816" positionY="5509"/>
+ <point positionX="7655" positionY="4169"/>
+ <point positionX="7075" positionY="3163"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="1741" positionY="0"/>
+ <point positionX="0" positionY="336"/>
+ <point positionX="1161" positionY="1676"/>
+ <point positionX="1741" positionY="4022"/>
+ <point positionX="3482" positionY="2346"/>
+ <point positionX="2321" positionY="1006"/>
+ <point positionX="1741" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="3482.000000" column2="0.000000" column3="5334.000000"/>
+ <Line2 column1="0.000000" column2="4022.000000" column3="3163.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="3483.000000" column2="0.000000" column3="5334.000000"/>
+ <Line2 column1="0.000000" column2="4023.000000" column3="3163.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="3483.000000" column2="0.000000" column3="5334.000000"/>
+ <Line2 column1="0.000000" column2="4023.000000" column3="3163.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="4173" positionY="1153" sizeX="5804" sizeY="6703" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=1">
+ <XShapes>
+ <XShape positionX="4173" positionY="1153" sizeX="5804" sizeY="6703" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="4173" positionY="1153" sizeX="5804" sizeY="6703" type="com.sun.star.drawing.PolyLineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="40" textRightDistance="40" textUpperDistance="40" textLowerDistance="40" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7075" positionY="1153"/>
+ <point positionX="4173" positionY="2828"/>
+ <point positionX="4173" positionY="6180"/>
+ <point positionX="7075" positionY="7856"/>
+ <point positionX="9977" positionY="6180"/>
+ <point positionX="9977" positionY="2828"/>
+ <point positionX="7075" positionY="1153"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="2902" positionY="0"/>
+ <point positionX="0" positionY="1675"/>
+ <point positionX="0" positionY="5027"/>
+ <point positionX="2902" positionY="6703"/>
+ <point positionX="5804" positionY="5027"/>
+ <point positionX="5804" positionY="1675"/>
+ <point positionX="2902" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="5804.000000" column2="0.000000" column3="4173.000000"/>
+ <Line2 column1="0.000000" column2="6703.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="5805.000000" column2="0.000000" column3="4173.000000"/>
+ <Line2 column1="0.000000" column2="6704.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="5805.000000" column2="0.000000" column3="4173.000000"/>
+ <Line2 column1="0.000000" column2="6704.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="5805.000000" column2="0.000000" column3="4173.000000"/>
+ <Line2 column1="0.000000" column2="6704.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="5955.000000" column2="0.000000" column3="4098.000000"/>
+ <Line2 column1="0.000000" column2="6704.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="6704.000000" column2="0.000000" column3="3724.000000"/>
+ <Line2 column1="0.000000" column2="6705.000000" column3="1153.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="2985" positionY="180" sizeX="8181" sizeY="8650" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="2985" positionY="180" sizeX="8181" sizeY="8650" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
+ <XShapes>
+ <XShape positionX="6731" positionY="180" sizeX="690" sizeY="398" type="com.sun.star.drawing.TextShape" text="Bla1" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="691.000000" column2="0.000000" column3="6731.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="180.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="2985" positionY="2143" sizeX="690" sizeY="398" type="com.sun.star.drawing.TextShape" text="Bla2" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="691.000000" column2="0.000000" column3="2985.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="2143.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="2985" positionY="6468" sizeX="690" sizeY="398" type="com.sun.star.drawing.TextShape" text="Bla3" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="691.000000" column2="0.000000" column3="2985.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="6468.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="6731" positionY="8432" sizeX="690" sizeY="398" type="com.sun.star.drawing.TextShape" text="Bla4" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="691.000000" column2="0.000000" column3="6731.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8432.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="10476" positionY="6468" sizeX="690" sizeY="398" type="com.sun.star.drawing.TextShape" text="Bla5" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="691.000000" column2="0.000000" column3="10476.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="6468.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="10476" positionY="2143" sizeX="690" sizeY="398" type="com.sun.star.drawing.TextShape" text="Bla6" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="691.000000" column2="0.000000" column3="10476.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="2143.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="8182.000000" column2="0.000000" column3="2985.000000"/>
+ <Line2 column1="0.000000" column2="8651.000000" column3="180.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7325" positionY="955" sizeX="193" sizeY="3749" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShapes>
+ <XShape positionX="7325" positionY="4306" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="0" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="7325.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4306.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7325" positionY="955" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="5" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="7325.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="955.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="7325.000000"/>
+ <Line2 column1="0.000000" column2="3750.000000" column3="955.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="8182.000000" column2="0.000000" column3="2985.000000"/>
+ <Line2 column1="0.000000" column2="8651.000000" column3="180.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="8182.000000" column2="0.000000" column3="2985.000000"/>
+ <Line2 column1="0.000000" column2="8651.000000" column3="180.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="13512.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="8651.000000" column3="180.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14151" positionY="3957" sizeX="1650" sizeY="1096" type="com.sun.star.drawing.GroupShape" name="CID/D=0:Legend=">
+ <XShapes>
+ <XShape positionX="14151" positionY="3957" sizeX="1650" sizeY="1096" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="e6e6e6" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="1651.000000" column2="0.000000" column3="14151.000000"/>
+ <Line2 column1="0.000000" column2="1097.000000" column3="3957.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14267" positionY="4150" sizeX="800" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="14267" positionY="4150" sizeX="800" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:LegendEntry=0">
+ <XShapes>
+ <XShape positionX="14267" positionY="4150" sizeX="800" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="801.000000" column2="0.000000" column3="14267.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4150.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14267" positionY="4255" sizeX="800" sizeY="0" type="com.sun.star.drawing.LineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="40" textRightDistance="40" textUpperDistance="40" textLowerDistance="40" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="14267" positionY="4255"/>
+ <point positionX="15067" positionY="4255"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="0"/>
+ <point positionX="800" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="800.000000" column2="0.000000" column3="14267.000000"/>
+ <Line2 column1="0.000000" column2="0.000000" column3="4255.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="801.000000" column2="0.000000" column3="14267.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4150.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="801.000000" column2="0.000000" column3="14267.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4150.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14267" positionY="4648" sizeX="800" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="14267" positionY="4648" sizeX="800" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:LegendEntry=0">
+ <XShapes>
+ <XShape positionX="14267" positionY="4648" sizeX="800" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="801.000000" column2="0.000000" column3="14267.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4648.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14267" positionY="4753" sizeX="800" sizeY="0" type="com.sun.star.drawing.LineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="40" textRightDistance="40" textUpperDistance="40" textLowerDistance="40" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="14267" positionY="4753"/>
+ <point positionX="15067" positionY="4753"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="0"/>
+ <point positionX="800" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="800.000000" column2="0.000000" column3="14267.000000"/>
+ <Line2 column1="0.000000" column2="0.000000" column3="4753.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="801.000000" column2="0.000000" column3="14267.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4648.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="801.000000" column2="0.000000" column3="14267.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4648.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="15167" positionY="4057" sizeX="346" sizeY="398" type="com.sun.star.drawing.TextShape" text="ist" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4803" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="347.000000" column2="0.000000" column3="15167.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4057.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="15167" positionY="4555" sizeX="518" sizeY="398" type="com.sun.star.drawing.TextShape" text="soll" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4803" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="519.000000" column2="0.000000" column3="15167.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4555.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="1651.000000" column2="0.000000" column3="14151.000000"/>
+ <Line2 column1="0.000000" column2="1097.000000" column3="3957.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+</XShapes>
+
+
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml b/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
index eb48c3f7293d..46d075a06020 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<XShapes>
- <XShape positionX="0" positionY="0" sizeX="26494" sizeY="18368" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="0" positionY="0" sizeX="29642" sizeY="18368" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -9,14 +9,14 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="26495.000000" column2="0.000000" column3="0.000000"/>
+ <Line1 column1="29643.000000" column2="0.000000" column3="0.000000"/>
<Line2 column1="0.000000" column2="18369.000000" column3="0.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9723" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
+ <XShape positionX="8407" positionY="3819" sizeX="11075" sizeY="9723" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
<XShapes>
- <XShape positionX="8207" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9761" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -25,12 +25,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9722.000000" column3="3821.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9723" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="8407" positionY="3819" sizeX="11075" sizeY="9723" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -39,18 +39,18 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="11076.000000" column2="0.000000" column3="8407.000000"/>
<Line2 column1="0.000000" column2="9724.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9723" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="8407" positionY="3819" sizeX="11075" sizeY="9723" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9723" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="9761" positionY="3819" sizeX="9721" sizeY="9723" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="8207" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
+ <XShape positionX="9761" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
<XShapes>
- <XShape positionX="8207" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="d9d9d9" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9761" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="d9d9d9" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -59,25 +59,25 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9722.000000" column3="3821.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9722.000000" column3="3821.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
+ <XShape positionX="9761" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
<XShapes>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="9761" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
+ <XShape positionX="9761" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
<XShapes>
- <XShape positionX="13067" positionY="5243" sizeX="4861" sizeY="8132" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,17762,9938,22457,11196/D=0:CS=0:CT=0:Series=0:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="4f81bd" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="14621" positionY="5243" sizeX="4861" sizeY="8132" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,19316,9938,24011,11196/D=0:CS=0:CT=0:Series=0:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="4f81bd" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -86,12 +86,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="4861.000000" column2="0.000000" column3="13067.000000"/>
+ <Line1 column1="4861.000000" column2="0.000000" column3="14621.000000"/>
<Line2 column1="0.000000" column2="8132.000000" column3="5243.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8225" positionY="8680" sizeX="6100" sizeY="4861" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,10279,12661,7491,16643/D=0:CS=0:CT=0:Series=0:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="c0504d" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9779" positionY="8680" sizeX="6100" sizeY="4861" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,11833,12661,9045,16643/D=0:CS=0:CT=0:Series=0:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="c0504d" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -100,12 +100,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6100.000000" column2="0.000000" column3="8225.000000"/>
+ <Line1 column1="6100.000000" column2="0.000000" column3="9779.000000"/>
<Line2 column1="0.000000" column2="4861.000000" column3="8680.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8207" positionY="7422" sizeX="4860" sizeY="1682" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,8225,8256,3383,7833/D=0:CS=0:CT=0:Series=0:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="9bbb59" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9761" positionY="7422" sizeX="4860" sizeY="1682" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,9779,8256,4937,7833/D=0:CS=0:CT=0:Series=0:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="9bbb59" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -114,12 +114,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="4860.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="4860.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="1682.000000" column3="7422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8372" positionY="3838" sizeX="4695" sizeY="4842" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,9943,4957,6818,1233/D=0:CS=0:CT=0:Series=0:Point=3" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="8064a2" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9926" positionY="3838" sizeX="4695" sizeY="4842" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,11497,4957,8372,1233/D=0:CS=0:CT=0:Series=0:Point=3" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="8064a2" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -128,12 +128,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="4695.000000" column2="0.000000" column3="8372.000000"/>
+ <Line1 column1="4695.000000" column2="0.000000" column3="9926.000000"/>
<Line2 column1="0.000000" column2="4842.000000" column3="3838.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="12643" positionY="3819" sizeX="3861" sizeY="4861" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,14729,4113,16392,-454/D=0:CS=0:CT=0:Series=0:Point=4" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="4bacc6" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="14197" positionY="3819" sizeX="3861" sizeY="4861" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,16283,4113,17946,-454/D=0:CS=0:CT=0:Series=0:Point=4" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="4bacc6" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -142,48 +142,48 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="3861.000000" column2="0.000000" column3="12643.000000"/>
+ <Line1 column1="3861.000000" column2="0.000000" column3="14197.000000"/>
<Line2 column1="0.000000" column2="4861.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9723.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9723.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9723.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9724.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8394" positionY="4386" sizeX="9180" sizeY="8065" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="8407" positionY="4376" sizeX="10666" sizeY="8129" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="8394" positionY="4386" sizeX="9180" sizeY="8065" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="8407" positionY="4376" sizeX="10666" sizeY="8129" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="8394" positionY="4386" sizeX="9180" sizeY="8065" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels=">
+ <XShape positionX="8407" positionY="4376" sizeX="10666" sizeY="8129" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels=">
<XShapes>
- <XShape positionX="16434" positionY="9300" sizeX="1140" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0">
+ <XShape positionX="17785" positionY="9140" sizeX="1288" sizeY="1165" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0">
<XShapes>
- <XShape positionX="16434" positionY="9300" sizeX="1140" sizeY="849" type="com.sun.star.drawing.TextShape" text="Yellow&#10;33%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="17785" positionY="9140" sizeX="1288" sizeY="1165" type="com.sun.star.drawing.TextShape" text="Yellow&#10;33%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -192,21 +192,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1141.000000" column2="0.000000" column3="16434.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="9300.000000"/>
+ <Line1 column1="1289.000000" column2="0.000000" column3="17785.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="9140.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="1141.000000" column2="0.000000" column3="16434.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="9300.000000"/>
+ <Line1 column1="1289.000000" column2="0.000000" column3="17785.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="9140.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="10197" positionY="11602" sizeX="928" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1">
+ <XShape positionX="11823" positionY="11340" sizeX="1053" sizeY="1165" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1">
<XShapes>
- <XShape positionX="10197" positionY="11602" sizeX="928" sizeY="849" type="com.sun.star.drawing.TextShape" text="Black&#10;28%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="11823" positionY="11340" sizeX="1053" sizeY="1165" type="com.sun.star.drawing.TextShape" text="Black&#10;28%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -215,21 +215,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="929.000000" column2="0.000000" column3="10197.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="11602.000000"/>
+ <Line1 column1="1054.000000" column2="0.000000" column3="11823.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="11340.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="929.000000" column2="0.000000" column3="10197.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="11602.000000"/>
+ <Line1 column1="1054.000000" column2="0.000000" column3="11823.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="11340.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8394" positionY="7893" sizeX="1060" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2">
+ <XShape positionX="8407" positionY="7661" sizeX="1224" sizeY="1165" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2">
<XShapes>
- <XShape positionX="8394" positionY="7893" sizeX="1060" sizeY="849" type="com.sun.star.drawing.TextShape" text="Green&#10;6%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="8407" positionY="7661" sizeX="1224" sizeY="1165" type="com.sun.star.drawing.TextShape" text="Green&#10;6%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="5929" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -238,21 +238,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1061.000000" column2="0.000000" column3="8394.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="7893.000000"/>
+ <Line1 column1="1225.000000" column2="0.000000" column3="8407.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="7661.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="1061.000000" column2="0.000000" column3="8394.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="7893.000000"/>
+ <Line1 column1="1225.000000" column2="0.000000" column3="8407.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="7661.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="10043" positionY="5033" sizeX="716" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=3">
+ <XShape positionX="11686" positionY="4961" sizeX="838" sizeY="1165" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=3">
<XShapes>
- <XShape positionX="10043" positionY="5033" sizeX="716" sizeY="849" type="com.sun.star.drawing.TextShape" text="Red&#10;19%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="11686" positionY="4961" sizeX="838" sizeY="1165" type="com.sun.star.drawing.TextShape" text="Red&#10;19%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -261,21 +261,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="717.000000" column2="0.000000" column3="10043.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="5033.000000"/>
+ <Line1 column1="839.000000" column2="0.000000" column3="11686.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="4961.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="717.000000" column2="0.000000" column3="10043.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="5033.000000"/>
+ <Line1 column1="839.000000" column2="0.000000" column3="11686.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="4961.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="14035" positionY="4386" sizeX="1034" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=4">
+ <XShape positionX="15443" positionY="4376" sizeX="1158" sizeY="1165" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=4">
<XShapes>
- <XShape positionX="14035" positionY="4386" sizeX="1034" sizeY="849" type="com.sun.star.drawing.TextShape" text="White&#10;14%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="15443" positionY="4376" sizeX="1158" sizeY="1165" type="com.sun.star.drawing.TextShape" text="White&#10;14%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="3889" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -284,49 +284,49 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="1035.000000" column2="0.000000" column3="14035.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="4386.000000"/>
+ <Line1 column1="1159.000000" column2="0.000000" column3="15443.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="4376.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="1035.000000" column2="0.000000" column3="14035.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="4386.000000"/>
+ <Line1 column1="1159.000000" column2="0.000000" column3="15443.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="4376.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9181.000000" column2="0.000000" column3="8394.000000"/>
- <Line2 column1="0.000000" column2="8066.000000" column3="4386.000000"/>
+ <Line1 column1="10667.000000" column2="0.000000" column3="8407.000000"/>
+ <Line2 column1="0.000000" column2="8130.000000" column3="4376.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9181.000000" column2="0.000000" column3="8394.000000"/>
- <Line2 column1="0.000000" column2="8066.000000" column3="4386.000000"/>
+ <Line1 column1="10667.000000" column2="0.000000" column3="8407.000000"/>
+ <Line2 column1="0.000000" column2="8130.000000" column3="4376.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9181.000000" column2="0.000000" column3="8394.000000"/>
- <Line2 column1="0.000000" column2="8066.000000" column3="4386.000000"/>
+ <Line1 column1="10667.000000" column2="0.000000" column3="8407.000000"/>
+ <Line2 column1="0.000000" column2="8130.000000" column3="4376.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="11076.000000" column2="0.000000" column3="8407.000000"/>
<Line2 column1="0.000000" column2="9724.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="11076.000000" column2="0.000000" column3="8407.000000"/>
<Line2 column1="0.000000" column2="9724.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
index 639c32d00491..9daee4752d08 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<XShapes>
- <XShape positionX="0" positionY="0" sizeX="26494" sizeY="18368" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="0" positionY="0" sizeX="29643" sizeY="18368" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -9,14 +9,14 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="26495.000000" column2="0.000000" column3="0.000000"/>
+ <Line1 column1="29644.000000" column2="0.000000" column3="0.000000"/>
<Line2 column1="0.000000" column2="18369.000000" column3="0.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
+ <XShape positionX="4506" positionY="2226" sizeX="22007" sizeY="12305" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
<XShapes>
- <XShape positionX="8207" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9762" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -25,12 +25,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9762.000000"/>
<Line2 column1="0.000000" column2="9722.000000" column3="3821.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="4506" positionY="2226" sizeX="22007" sizeY="12305" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -39,18 +39,18 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/>
+ <Line1 column1="22008.000000" column2="0.000000" column3="4506.000000"/>
+ <Line2 column1="0.000000" column2="12306.000000" column3="2226.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="4506" positionY="2226" sizeX="22007" sizeY="12305" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9723" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="9762" positionY="3819" sizeX="9721" sizeY="9723" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="8207" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
+ <XShape positionX="9762" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
<XShapes>
- <XShape positionX="8207" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="d9d9d9" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9762" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="d9d9d9" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -59,25 +59,25 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9762.000000"/>
<Line2 column1="0.000000" column2="9722.000000" column3="3821.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9762.000000"/>
<Line2 column1="0.000000" column2="9722.000000" column3="3821.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
+ <XShape positionX="9762" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
<XShapes>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="9762" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
+ <XShape positionX="9762" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
<XShapes>
- <XShape positionX="13067" positionY="5243" sizeX="4861" sizeY="8132" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,17762,9938,22457,11196/D=0:CS=0:CT=0:Series=0:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="4f81bd" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="14622" positionY="5243" sizeX="4861" sizeY="8132" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,19317,9938,24012,11196/D=0:CS=0:CT=0:Series=0:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="4f81bd" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -86,12 +86,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="4861.000000" column2="0.000000" column3="13067.000000"/>
+ <Line1 column1="4861.000000" column2="0.000000" column3="14622.000000"/>
<Line2 column1="0.000000" column2="8132.000000" column3="5243.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8225" positionY="8680" sizeX="6100" sizeY="4861" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,10279,12661,7491,16643/D=0:CS=0:CT=0:Series=0:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="c0504d" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9780" positionY="8680" sizeX="6100" sizeY="4861" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,11834,12661,9046,16643/D=0:CS=0:CT=0:Series=0:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="c0504d" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -100,12 +100,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6100.000000" column2="0.000000" column3="8225.000000"/>
+ <Line1 column1="6100.000000" column2="0.000000" column3="9780.000000"/>
<Line2 column1="0.000000" column2="4861.000000" column3="8680.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8207" positionY="7422" sizeX="4860" sizeY="1682" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,8225,8256,3383,7833/D=0:CS=0:CT=0:Series=0:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="9bbb59" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9762" positionY="7422" sizeX="4860" sizeY="1682" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,9780,8256,4938,7833/D=0:CS=0:CT=0:Series=0:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="9bbb59" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -114,12 +114,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="4860.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="4860.000000" column2="0.000000" column3="9762.000000"/>
<Line2 column1="0.000000" column2="1682.000000" column3="7422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8372" positionY="3838" sizeX="4695" sizeY="4842" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,9943,4957,6818,1233/D=0:CS=0:CT=0:Series=0:Point=3" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="8064a2" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9927" positionY="3838" sizeX="4695" sizeY="4842" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,11498,4957,8373,1233/D=0:CS=0:CT=0:Series=0:Point=3" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="8064a2" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -128,12 +128,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="4695.000000" column2="0.000000" column3="8372.000000"/>
+ <Line1 column1="4695.000000" column2="0.000000" column3="9927.000000"/>
<Line2 column1="0.000000" column2="4842.000000" column3="3838.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="12643" positionY="3819" sizeX="3861" sizeY="4861" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,14729,4113,16392,-454/D=0:CS=0:CT=0:Series=0:Point=4" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="4bacc6" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="14198" positionY="3819" sizeX="3861" sizeY="4861" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,16284,4113,17947,-454/D=0:CS=0:CT=0:Series=0:Point=4" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="4bacc6" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -142,48 +142,48 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="3861.000000" column2="0.000000" column3="12643.000000"/>
+ <Line1 column1="3861.000000" column2="0.000000" column3="14198.000000"/>
<Line2 column1="0.000000" column2="4861.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9762.000000"/>
<Line2 column1="0.000000" column2="9723.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9762.000000"/>
<Line2 column1="0.000000" column2="9723.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9762.000000"/>
<Line2 column1="0.000000" column2="9723.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9762.000000"/>
<Line2 column1="0.000000" column2="9724.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="4506" positionY="2226" sizeX="22007" sizeY="12305" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="4506" positionY="2226" sizeX="22007" sizeY="12305" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels=">
+ <XShape positionX="4506" positionY="2226" sizeX="22007" sizeY="12305" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels=">
<XShapes>
- <XShape positionX="17907" positionY="9977" sizeX="6114" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0">
+ <XShape positionX="19462" positionY="9977" sizeX="7051" sizeY="1165" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0">
<XShapes>
- <XShape positionX="17907" positionY="9977" sizeX="6114" sizeY="849" type="com.sun.star.drawing.TextShape" text="Yellow - The color of sun and honey&#10;33%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="19462" positionY="9977" sizeX="7051" sizeY="1165" type="com.sun.star.drawing.TextShape" text="Yellow - The color of sun and honey&#10;33%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -192,21 +192,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6115.000000" column2="0.000000" column3="17907.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="9977.000000"/>
+ <Line1 column1="7052.000000" column2="0.000000" column3="19462.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="9977.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6115.000000" column2="0.000000" column3="17907.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="9977.000000"/>
+ <Line1 column1="7052.000000" column2="0.000000" column3="19462.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="9977.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="3974" positionY="12784" sizeX="6220" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1">
+ <XShape positionX="5957" positionY="12784" sizeX="5792" sizeY="1747" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1">
<XShapes>
- <XShape positionX="3974" positionY="12784" sizeX="6220" sizeY="849" type="com.sun.star.drawing.TextShape" text="Black - The color of night and coffee&#10;28%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="7129" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="5957" positionY="12784" sizeX="5792" sizeY="1747" type="com.sun.star.drawing.TextShape" text="Black - The color of night and coffee&#10;28%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="5929" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -215,21 +215,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6221.000000" column2="0.000000" column3="3974.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="12784.000000"/>
+ <Line1 column1="5793.000000" column2="0.000000" column3="5957.000000"/>
+ <Line2 column1="0.000000" column2="1748.000000" column3="12784.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6221.000000" column2="0.000000" column3="3974.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="12784.000000"/>
+ <Line1 column1="5793.000000" column2="0.000000" column3="5957.000000"/>
+ <Line2 column1="0.000000" column2="1748.000000" column3="12784.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1910" positionY="7819" sizeX="6167" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2">
+ <XShape positionX="4506" positionY="7370" sizeX="5126" sizeY="1747" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2">
<XShapes>
- <XShape positionX="1910" positionY="7819" sizeX="6167" sizeY="849" type="com.sun.star.drawing.TextShape" text="Green - The color of grass and hope&#10;6%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="7129" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="4506" positionY="7370" sizeX="5126" sizeY="1747" type="com.sun.star.drawing.TextShape" text="Green - The color of grass and hope&#10;6%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="5929" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -238,21 +238,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6168.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="7819.000000"/>
+ <Line1 column1="5127.000000" column2="0.000000" column3="4506.000000"/>
+ <Line2 column1="0.000000" column2="1748.000000" column3="7370.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6168.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="7819.000000"/>
+ <Line1 column1="5127.000000" column2="0.000000" column3="4506.000000"/>
+ <Line2 column1="0.000000" column2="1748.000000" column3="7370.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="3813" positionY="3994" sizeX="6035" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=3">
+ <XShape positionX="6073" positionY="3096" sizeX="5330" sizeY="1747" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=3">
<XShapes>
- <XShape positionX="3813" positionY="3994" sizeX="6035" sizeY="849" type="com.sun.star.drawing.TextShape" text="Red - The color of rose and passion&#10;19%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="7129" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="6073" positionY="3096" sizeX="5330" sizeY="1747" type="com.sun.star.drawing.TextShape" text="Red - The color of rose and passion&#10;19%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="5929" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -261,21 +261,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6036.000000" column2="0.000000" column3="3813.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="3994.000000"/>
+ <Line1 column1="5331.000000" column2="0.000000" column3="6073.000000"/>
+ <Line2 column1="0.000000" column2="1748.000000" column3="3096.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6036.000000" column2="0.000000" column3="3813.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="3994.000000"/>
+ <Line1 column1="5331.000000" column2="0.000000" column3="6073.000000"/>
+ <Line2 column1="0.000000" column2="1748.000000" column3="3096.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="14780" positionY="3124" sizeX="6140" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=4">
+ <XShape positionX="16335" positionY="2226" sizeX="5692" sizeY="1747" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=4">
<XShapes>
- <XShape positionX="14780" positionY="3124" sizeX="6140" sizeY="849" type="com.sun.star.drawing.TextShape" text="White - The color of milk and purity&#10;14%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="8832" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="16335" positionY="2226" sizeX="5692" sizeY="1747" type="com.sun.star.drawing.TextShape" text="White - The color of milk and purity&#10;14%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="5929" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -284,51 +284,51 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6141.000000" column2="0.000000" column3="14780.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="3124.000000"/>
+ <Line1 column1="5693.000000" column2="0.000000" column3="16335.000000"/>
+ <Line2 column1="0.000000" column2="1748.000000" column3="2226.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6141.000000" column2="0.000000" column3="14780.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="3124.000000"/>
+ <Line1 column1="5693.000000" column2="0.000000" column3="16335.000000"/>
+ <Line2 column1="0.000000" column2="1748.000000" column3="2226.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/>
+ <Line1 column1="22008.000000" column2="0.000000" column3="4506.000000"/>
+ <Line2 column1="0.000000" column2="12306.000000" column3="2226.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/>
+ <Line1 column1="22008.000000" column2="0.000000" column3="4506.000000"/>
+ <Line2 column1="0.000000" column2="12306.000000" column3="2226.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/>
+ <Line1 column1="22008.000000" column2="0.000000" column3="4506.000000"/>
+ <Line2 column1="0.000000" column2="12306.000000" column3="2226.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/>
+ <Line1 column1="22008.000000" column2="0.000000" column3="4506.000000"/>
+ <Line2 column1="0.000000" column2="12306.000000" column3="2226.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/>
+ <Line1 column1="22008.000000" column2="0.000000" column3="4506.000000"/>
+ <Line2 column1="0.000000" column2="12306.000000" column3="2226.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
-</XShapes> \ No newline at end of file
+</XShapes>
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml b/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
index 77be20e2147f..d19a18c1980d 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-3.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<XShapes>
- <XShape positionX="0" positionY="0" sizeX="26494" sizeY="18368" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="0" positionY="0" sizeX="29642" sizeY="18368" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -9,14 +9,14 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="26495.000000" column2="0.000000" column3="0.000000"/>
+ <Line1 column1="29643.000000" column2="0.000000" column3="0.000000"/>
<Line2 column1="0.000000" column2="18369.000000" column3="0.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
+ <XShape positionX="2509" positionY="2808" sizeX="22659" sizeY="11141" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
<XShapes>
- <XShape positionX="8207" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9761" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -25,12 +25,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9722.000000" column3="3821.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="2509" positionY="2808" sizeX="22659" sizeY="11141" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -39,18 +39,18 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/>
+ <Line1 column1="22660.000000" column2="0.000000" column3="2509.000000"/>
+ <Line2 column1="0.000000" column2="11142.000000" column3="2808.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="2509" positionY="2808" sizeX="22659" sizeY="11141" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9723" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="9761" positionY="3819" sizeX="9721" sizeY="9723" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="8207" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
+ <XShape positionX="9761" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
<XShapes>
- <XShape positionX="8207" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="d9d9d9" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9761" positionY="3821" sizeX="9721" sizeY="9721" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="d9d9d9" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -59,25 +59,25 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9722.000000" column3="3821.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9722.000000" column3="3821.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
+ <XShape positionX="9761" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
<XShapes>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="9761" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="8207" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
+ <XShape positionX="9761" positionY="3819" sizeX="9721" sizeY="9722" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
<XShapes>
- <XShape positionX="13067" positionY="5243" sizeX="4861" sizeY="8132" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,17762,9938,22457,11196/D=0:CS=0:CT=0:Series=0:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="4f81bd" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="14621" positionY="5243" sizeX="4861" sizeY="8132" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,19316,9938,24011,11196/D=0:CS=0:CT=0:Series=0:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="4f81bd" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -86,12 +86,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="4861.000000" column2="0.000000" column3="13067.000000"/>
+ <Line1 column1="4861.000000" column2="0.000000" column3="14621.000000"/>
<Line2 column1="0.000000" column2="8132.000000" column3="5243.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8225" positionY="8680" sizeX="6100" sizeY="4861" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,10279,12661,7491,16643/D=0:CS=0:CT=0:Series=0:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="c0504d" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9779" positionY="8680" sizeX="6100" sizeY="4861" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,11833,12661,9045,16643/D=0:CS=0:CT=0:Series=0:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="c0504d" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -100,12 +100,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6100.000000" column2="0.000000" column3="8225.000000"/>
+ <Line1 column1="6100.000000" column2="0.000000" column3="9779.000000"/>
<Line2 column1="0.000000" column2="4861.000000" column3="8680.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8207" positionY="7422" sizeX="4860" sizeY="1682" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,8225,8256,3383,7833/D=0:CS=0:CT=0:Series=0:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="9bbb59" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9761" positionY="7422" sizeX="4860" sizeY="1682" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,9779,8256,4937,7833/D=0:CS=0:CT=0:Series=0:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="9bbb59" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -114,12 +114,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="4860.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="4860.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="1682.000000" column3="7422.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="8372" positionY="3838" sizeX="4695" sizeY="4842" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,9943,4957,6818,1233/D=0:CS=0:CT=0:Series=0:Point=3" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="8064a2" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="9926" positionY="3838" sizeX="4695" sizeY="4842" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,11497,4957,8372,1233/D=0:CS=0:CT=0:Series=0:Point=3" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="8064a2" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -128,12 +128,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="4695.000000" column2="0.000000" column3="8372.000000"/>
+ <Line1 column1="4695.000000" column2="0.000000" column3="9926.000000"/>
<Line2 column1="0.000000" column2="4842.000000" column3="3838.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="12643" positionY="3819" sizeX="3861" sizeY="4861" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,14729,4113,16392,-454/D=0:CS=0:CT=0:Series=0:Point=4" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="4bacc6" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="14197" positionY="3819" sizeX="3861" sizeY="4861" type="com.sun.star.drawing.ClosedBezierShape" name="CID/MultiClick:DragMethod=PieSegmentDragging:DragParameter=0,16283,4113,17946,-454/D=0:CS=0:CT=0:Series=0:Point=4" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="26" textRightDistance="26" textUpperDistance="26" textLowerDistance="26" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="4bacc6" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -142,48 +142,48 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="3861.000000" column2="0.000000" column3="12643.000000"/>
+ <Line1 column1="3861.000000" column2="0.000000" column3="14197.000000"/>
<Line2 column1="0.000000" column2="4861.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9723.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9723.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9723.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="9722.000000" column2="0.000000" column3="8207.000000"/>
+ <Line1 column1="9722.000000" column2="0.000000" column3="9761.000000"/>
<Line2 column1="0.000000" column2="9724.000000" column3="3819.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="2509" positionY="2808" sizeX="22659" sizeY="11141" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="2509" positionY="2808" sizeX="22659" sizeY="11141" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="1910" positionY="3124" sizeX="22111" sizeY="10509" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels=">
+ <XShape positionX="2509" positionY="2808" sizeX="22659" sizeY="11141" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels=">
<XShapes>
- <XShape positionX="17907" positionY="9977" sizeX="6114" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0">
+ <XShape positionX="19461" positionY="9977" sizeX="5707" sizeY="1747" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0">
<XShapes>
- <XShape positionX="17907" positionY="9977" sizeX="6114" sizeY="849" type="com.sun.star.drawing.TextShape" text="Yellow - The color of sun and honey&#10;33%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="7129" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="19461" positionY="9977" sizeX="5707" sizeY="1747" type="com.sun.star.drawing.TextShape" text="Yellow - The color of sun and honey&#10;33%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="5929" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -192,21 +192,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6115.000000" column2="0.000000" column3="17907.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="9977.000000"/>
+ <Line1 column1="5708.000000" column2="0.000000" column3="19461.000000"/>
+ <Line2 column1="0.000000" column2="1748.000000" column3="9977.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6115.000000" column2="0.000000" column3="17907.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="9977.000000"/>
+ <Line1 column1="5708.000000" column2="0.000000" column3="19461.000000"/>
+ <Line2 column1="0.000000" column2="1748.000000" column3="9977.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="3974" positionY="12784" sizeX="6220" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1">
+ <XShape positionX="4618" positionY="12784" sizeX="7130" sizeY="1165" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1">
<XShapes>
- <XShape positionX="3974" positionY="12784" sizeX="6220" sizeY="849" type="com.sun.star.drawing.TextShape" text="Black - The color of night and coffee&#10;28%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="4618" positionY="12784" sizeX="7130" sizeY="1165" type="com.sun.star.drawing.TextShape" text="Black - The color of night and coffee&#10;28%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -215,21 +215,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6221.000000" column2="0.000000" column3="3974.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="12784.000000"/>
+ <Line1 column1="7131.000000" column2="0.000000" column3="4618.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="12784.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6221.000000" column2="0.000000" column3="3974.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="12784.000000"/>
+ <Line1 column1="7131.000000" column2="0.000000" column3="4618.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="12784.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1910" positionY="7819" sizeX="6167" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2">
+ <XShape positionX="2509" positionY="7661" sizeX="7122" sizeY="1165" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2">
<XShapes>
- <XShape positionX="1910" positionY="7819" sizeX="6167" sizeY="849" type="com.sun.star.drawing.TextShape" text="Green - The color of grass and hope&#10;6%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="2509" positionY="7661" sizeX="7122" sizeY="1165" type="com.sun.star.drawing.TextShape" text="Green - The color of grass and hope&#10;6%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -238,21 +238,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6168.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="7819.000000"/>
+ <Line1 column1="7123.000000" column2="0.000000" column3="2509.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="7661.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6168.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="7819.000000"/>
+ <Line1 column1="7123.000000" column2="0.000000" column3="2509.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="7661.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="3813" positionY="3994" sizeX="6035" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=3">
+ <XShape positionX="4432" positionY="3678" sizeX="6970" sizeY="1165" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=3">
<XShapes>
- <XShape positionX="3813" positionY="3994" sizeX="6035" sizeY="849" type="com.sun.star.drawing.TextShape" text="Red - The color of rose and passion&#10;19%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="4432" positionY="3678" sizeX="6970" sizeY="1165" type="com.sun.star.drawing.TextShape" text="Red - The color of rose and passion&#10;19%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -261,21 +261,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6036.000000" column2="0.000000" column3="3813.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="3994.000000"/>
+ <Line1 column1="6971.000000" column2="0.000000" column3="4432.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="3678.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6036.000000" column2="0.000000" column3="3813.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="3994.000000"/>
+ <Line1 column1="6971.000000" column2="0.000000" column3="4432.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="3678.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="14780" positionY="3124" sizeX="6140" sizeY="849" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=4">
+ <XShape positionX="16334" positionY="2808" sizeX="6976" sizeY="1165" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=4">
<XShapes>
- <XShape positionX="14780" positionY="3124" sizeX="6140" sizeY="849" type="com.sun.star.drawing.TextShape" text="White - The color of milk and purity&#10;14%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="16334" positionY="2808" sizeX="6976" sizeY="1165" type="com.sun.star.drawing.TextShape" text="White - The color of milk and purity&#10;14%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -284,51 +284,51 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6141.000000" column2="0.000000" column3="14780.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="3124.000000"/>
+ <Line1 column1="6977.000000" column2="0.000000" column3="16334.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="2808.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6141.000000" column2="0.000000" column3="14780.000000"/>
- <Line2 column1="0.000000" column2="850.000000" column3="3124.000000"/>
+ <Line1 column1="6977.000000" column2="0.000000" column3="16334.000000"/>
+ <Line2 column1="0.000000" column2="1166.000000" column3="2808.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/>
+ <Line1 column1="22660.000000" column2="0.000000" column3="2509.000000"/>
+ <Line2 column1="0.000000" column2="11142.000000" column3="2808.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/>
+ <Line1 column1="22660.000000" column2="0.000000" column3="2509.000000"/>
+ <Line2 column1="0.000000" column2="11142.000000" column3="2808.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/>
+ <Line1 column1="22660.000000" column2="0.000000" column3="2509.000000"/>
+ <Line2 column1="0.000000" column2="11142.000000" column3="2808.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/>
+ <Line1 column1="22660.000000" column2="0.000000" column3="2509.000000"/>
+ <Line2 column1="0.000000" column2="11142.000000" column3="2808.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="22112.000000" column2="0.000000" column3="1910.000000"/>
- <Line2 column1="0.000000" column2="10510.000000" column3="3124.000000"/>
+ <Line1 column1="22660.000000" column2="0.000000" column3="2509.000000"/>
+ <Line2 column1="0.000000" column2="11142.000000" column3="2808.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
-</XShapes> \ No newline at end of file
+</XShapes>
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml b/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml
index 6b182821f1c9..79bd4392962e 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-4.xml
@@ -14,7 +14,7 @@
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1737" positionY="2768" sizeX="21967" sizeY="11230" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
+ <XShape positionX="2778" positionY="1712" sizeX="19649" sizeY="13342" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
<XShapes>
<XShape positionX="8034" positionY="3894" sizeX="9575" sizeY="9575" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
@@ -30,7 +30,7 @@
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1737" positionY="2768" sizeX="21967" sizeY="11230" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="2778" positionY="1712" sizeX="19649" sizeY="13342" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -39,12 +39,12 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="21968.000000" column2="0.000000" column3="1737.000000"/>
- <Line2 column1="0.000000" column2="11231.000000" column3="2768.000000"/>
+ <Line1 column1="19650.000000" column2="0.000000" column3="2778.000000"/>
+ <Line2 column1="0.000000" column2="13343.000000" column3="1712.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1737" positionY="2768" sizeX="21967" sizeY="11230" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="2778" positionY="1712" sizeX="19649" sizeY="13342" type="com.sun.star.drawing.GroupShape">
<XShapes>
<XShape positionX="8034" positionY="3892" sizeX="9575" sizeY="9577" type="com.sun.star.drawing.GroupShape">
<XShapes>
@@ -175,15 +175,15 @@
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1737" positionY="2768" sizeX="21967" sizeY="11230" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="2778" positionY="1712" sizeX="19649" sizeY="13342" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="1737" positionY="2768" sizeX="21967" sizeY="11230" type="com.sun.star.drawing.GroupShape">
+ <XShape positionX="2778" positionY="1712" sizeX="19649" sizeY="13342" type="com.sun.star.drawing.GroupShape">
<XShapes>
- <XShape positionX="1737" positionY="2768" sizeX="21967" sizeY="11230" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels=">
+ <XShape positionX="2778" positionY="1712" sizeX="19649" sizeY="13342" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0:DataLabels=">
<XShapes>
- <XShape positionX="17590" positionY="9958" sizeX="6114" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0">
+ <XShape positionX="17590" positionY="9958" sizeX="4837" sizeY="2329" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0">
<XShapes>
- <XShape positionX="17590" positionY="9958" sizeX="6114" sizeY="1273" type="com.sun.star.drawing.TextShape" text="Yellow - The color of sun and honey&#10;120&#10;33%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="6977" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="17590" positionY="9958" sizeX="4837" sizeY="2329" type="com.sun.star.drawing.TextShape" text="Yellow - The color of sun and honey&#10;120&#10;33%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="5199" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -192,21 +192,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6115.000000" column2="0.000000" column3="17590.000000"/>
- <Line2 column1="0.000000" column2="1274.000000" column3="9958.000000"/>
+ <Line1 column1="4838.000000" column2="0.000000" column3="17590.000000"/>
+ <Line2 column1="0.000000" column2="2330.000000" column3="9958.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6115.000000" column2="0.000000" column3="17590.000000"/>
- <Line2 column1="0.000000" column2="1274.000000" column3="9958.000000"/>
+ <Line1 column1="4838.000000" column2="0.000000" column3="17590.000000"/>
+ <Line2 column1="0.000000" column2="2330.000000" column3="9958.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="3770" positionY="12725" sizeX="6220" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1">
+ <XShape positionX="5068" positionY="12725" sizeX="4922" sizeY="2329" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1">
<XShapes>
- <XShape positionX="3770" positionY="12725" sizeX="6220" sizeY="1273" type="com.sun.star.drawing.TextShape" text="Black - The color of night and coffee&#10;100&#10;28%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="6977" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="5068" positionY="12725" sizeX="4922" sizeY="2329" type="com.sun.star.drawing.TextShape" text="Black - The color of night and coffee&#10;100&#10;28%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="5199" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -215,21 +215,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6221.000000" column2="0.000000" column3="3770.000000"/>
- <Line2 column1="0.000000" column2="1274.000000" column3="12725.000000"/>
+ <Line1 column1="4923.000000" column2="0.000000" column3="5068.000000"/>
+ <Line2 column1="0.000000" column2="2330.000000" column3="12725.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6221.000000" column2="0.000000" column3="3770.000000"/>
- <Line2 column1="0.000000" column2="1274.000000" column3="12725.000000"/>
+ <Line1 column1="4923.000000" column2="0.000000" column3="5068.000000"/>
+ <Line2 column1="0.000000" column2="2330.000000" column3="12725.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="1737" positionY="7614" sizeX="6167" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2">
+ <XShape positionX="2778" positionY="7086" sizeX="5126" sizeY="2329" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2">
<XShapes>
- <XShape positionX="1737" positionY="7614" sizeX="6167" sizeY="1273" type="com.sun.star.drawing.TextShape" text="Green - The color of grass and hope&#10;20&#10;6%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="6977" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="2778" positionY="7086" sizeX="5126" sizeY="2329" type="com.sun.star.drawing.TextShape" text="Green - The color of grass and hope&#10;20&#10;6%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="5199" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -238,21 +238,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6168.000000" column2="0.000000" column3="1737.000000"/>
- <Line2 column1="0.000000" column2="1274.000000" column3="7614.000000"/>
+ <Line1 column1="5127.000000" column2="0.000000" column3="2778.000000"/>
+ <Line2 column1="0.000000" column2="2330.000000" column3="7086.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6168.000000" column2="0.000000" column3="1737.000000"/>
- <Line2 column1="0.000000" column2="1274.000000" column3="7614.000000"/>
+ <Line1 column1="5127.000000" column2="0.000000" column3="2778.000000"/>
+ <Line2 column1="0.000000" column2="2330.000000" column3="7086.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="3614" positionY="3626" sizeX="6035" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=3">
+ <XShape positionX="5188" positionY="2570" sizeX="4461" sizeY="2329" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=3">
<XShapes>
- <XShape positionX="3614" positionY="3626" sizeX="6035" sizeY="1273" type="com.sun.star.drawing.TextShape" text="Red - The color of rose and passion&#10;70&#10;19%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="6977" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="5188" positionY="2570" sizeX="4461" sizeY="2329" type="com.sun.star.drawing.TextShape" text="Red - The color of rose and passion&#10;70&#10;19%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="5199" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -261,21 +261,21 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6036.000000" column2="0.000000" column3="3614.000000"/>
- <Line2 column1="0.000000" column2="1274.000000" column3="3626.000000"/>
+ <Line1 column1="4462.000000" column2="0.000000" column3="5188.000000"/>
+ <Line2 column1="0.000000" column2="2330.000000" column3="2570.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6036.000000" column2="0.000000" column3="3614.000000"/>
- <Line2 column1="0.000000" column2="1274.000000" column3="3626.000000"/>
+ <Line1 column1="4462.000000" column2="0.000000" column3="5188.000000"/>
+ <Line2 column1="0.000000" column2="2330.000000" column3="2570.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
- <XShape positionX="14509" positionY="2768" sizeX="6140" sizeY="1273" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=4">
+ <XShape positionX="14509" positionY="1712" sizeX="4822" sizeY="2329" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=4">
<XShapes>
- <XShape positionX="14509" positionY="2768" sizeX="6140" sizeY="1273" type="com.sun.star.drawing.TextShape" text="White - The color of milk and purity&#10;50&#10;14%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="8664" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="14509" positionY="1712" sizeX="4822" sizeY="2329" type="com.sun.star.drawing.TextShape" text="White - The color of milk and purity&#10;50&#10;14%" fontHeight="12.000000" fontColor="595959" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="BOTTOM" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="5199" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
@@ -284,53 +284,51 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="6141.000000" column2="0.000000" column3="14509.000000"/>
- <Line2 column1="0.000000" column2="1274.000000" column3="2768.000000"/>
+ <Line1 column1="4823.000000" column2="0.000000" column3="14509.000000"/>
+ <Line2 column1="0.000000" column2="2330.000000" column3="1712.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="6141.000000" column2="0.000000" column3="14509.000000"/>
- <Line2 column1="0.000000" column2="1274.000000" column3="2768.000000"/>
+ <Line1 column1="4823.000000" column2="0.000000" column3="14509.000000"/>
+ <Line2 column1="0.000000" column2="2330.000000" column3="1712.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="21968.000000" column2="0.000000" column3="1737.000000"/>
- <Line2 column1="0.000000" column2="11231.000000" column3="2768.000000"/>
+ <Line1 column1="19650.000000" column2="0.000000" column3="2778.000000"/>
+ <Line2 column1="0.000000" column2="13343.000000" column3="1712.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="21968.000000" column2="0.000000" column3="1737.000000"/>
- <Line2 column1="0.000000" column2="11231.000000" column3="2768.000000"/>
+ <Line1 column1="19650.000000" column2="0.000000" column3="2778.000000"/>
+ <Line2 column1="0.000000" column2="13343.000000" column3="1712.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="21968.000000" column2="0.000000" column3="1737.000000"/>
- <Line2 column1="0.000000" column2="11231.000000" column3="2768.000000"/>
+ <Line1 column1="19650.000000" column2="0.000000" column3="2778.000000"/>
+ <Line2 column1="0.000000" column2="13343.000000" column3="1712.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="21968.000000" column2="0.000000" column3="1737.000000"/>
- <Line2 column1="0.000000" column2="11231.000000" column3="2768.000000"/>
+ <Line1 column1="19650.000000" column2="0.000000" column3="2778.000000"/>
+ <Line2 column1="0.000000" column2="13343.000000" column3="1712.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
<Transformation>
- <Line1 column1="21968.000000" column2="0.000000" column3="1737.000000"/>
- <Line2 column1="0.000000" column2="11231.000000" column3="2768.000000"/>
+ <Line1 column1="19650.000000" column2="0.000000" column3="2778.000000"/>
+ <Line2 column1="0.000000" column2="13343.000000" column3="1712.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
</XShape>
</XShapes>
-
-
diff --git a/chart2/qa/extras/xshape/data/reference/testChart.xml b/chart2/qa/extras/xshape/data/reference/testChart.xml
new file mode 100644
index 000000000000..f86dfe0b996b
--- /dev/null
+++ b/chart2/qa/extras/xshape/data/reference/testChart.xml
@@ -0,0 +1,1218 @@
+<?xml version="1.0"?>
+<XShapes>
+ <XShape positionX="0" positionY="0" sizeX="16000" sizeY="9000" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="16001.000000" column2="0.000000" column3="0.000000"/>
+ <Line2 column1="0.000000" column2="9001.000000" column3="0.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="180" sizeX="13859" sizeY="8640" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
+ <XShapes>
+ <XShape positionX="762" positionY="379" sizeX="13417" sizeY="7794" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="13418.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="379.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="180" sizeX="13859" sizeY="8640" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="13860.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="8641.000000" column3="180.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="180" sizeX="13859" sizeY="8640" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="612" positionY="378" sizeX="13567" sizeY="7944" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="762" positionY="379" sizeX="13417" sizeY="7794" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
+ <XShapes>
+ <XShape positionX="762" positionY="379" sizeX="13417" sizeY="7794" type="com.sun.star.drawing.RectangleShape" name="CID/DiagramWall=" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="e6e6e6" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="13418.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="379.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="13418.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="379.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="612" positionY="378" sizeX="13566" sizeY="7944" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
+ <XShapes>
+ <XShape positionX="762" positionY="378" sizeX="13416" sizeY="7794" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="762" positionY="378" sizeX="13416" sizeY="7794" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0:Grid=0">
+ <XShapes>
+ <XShape positionX="762" positionY="378" sizeX="13416" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="14178" positionY="8172"/>
+ <point positionX="762" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="14178" positionY="6873"/>
+ <point positionX="762" positionY="6873"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="14178" positionY="5574"/>
+ <point positionX="762" positionY="5574"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="14178" positionY="4275"/>
+ <point positionX="762" positionY="4275"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="14178" positionY="2976"/>
+ <point positionX="762" positionY="2976"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="14178" positionY="1677"/>
+ <point positionX="762" positionY="1677"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="14178" positionY="378"/>
+ <point positionX="762" positionY="378"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="13416" positionY="7794"/>
+ <point positionX="0" positionY="7794"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13416" positionY="6495"/>
+ <point positionX="0" positionY="6495"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13416" positionY="5196"/>
+ <point positionX="0" positionY="5196"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13416" positionY="3897"/>
+ <point positionX="0" positionY="3897"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13416" positionY="2598"/>
+ <point positionX="0" positionY="2598"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13416" positionY="1299"/>
+ <point positionX="0" positionY="1299"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13416" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="13416.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="762" positionY="378" sizeX="0" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" name="HandlesOnly" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="NONE">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="762" positionY="8172"/>
+ <point positionX="762" positionY="6873"/>
+ <point positionX="762" positionY="5574"/>
+ <point positionX="762" positionY="4275"/>
+ <point positionX="762" positionY="2976"/>
+ <point positionX="762" positionY="1677"/>
+ <point positionX="762" positionY="378"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="0" positionY="6495"/>
+ <point positionX="0" positionY="5196"/>
+ <point positionX="0" positionY="3897"/>
+ <point positionX="0" positionY="2598"/>
+ <point positionX="0" positionY="1299"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="0.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="13417.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="378.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="13417.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="378.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="612" positionY="378" sizeX="13566" sizeY="7944" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="762" positionY="8172" sizeX="13416" sizeY="150" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
+ <XShapes>
+ <XShape positionX="762" positionY="8172" sizeX="13416" sizeY="150" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="762" positionY="8322"/>
+ <point positionX="762" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="762" positionY="8322"/>
+ <point positionX="762" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="3445" positionY="8322"/>
+ <point positionX="3445" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="3445" positionY="8322"/>
+ <point positionX="3445" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="6128" positionY="8322"/>
+ <point positionX="6128" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="6128" positionY="8322"/>
+ <point positionX="6128" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="8812" positionY="8322"/>
+ <point positionX="8812" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="8812" positionY="8322"/>
+ <point positionX="8812" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="11495" positionY="8322"/>
+ <point positionX="11495" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="11495" positionY="8322"/>
+ <point positionX="11495" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="14178" positionY="8322"/>
+ <point positionX="14178" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="14178" positionY="8322"/>
+ <point positionX="14178" positionY="8172"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="150"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="150"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="2683" positionY="150"/>
+ <point positionX="2683" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="2683" positionY="150"/>
+ <point positionX="2683" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="5366" positionY="150"/>
+ <point positionX="5366" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="5366" positionY="150"/>
+ <point positionX="5366" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="8050" positionY="150"/>
+ <point positionX="8050" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="8050" positionY="150"/>
+ <point positionX="8050" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="10733" positionY="150"/>
+ <point positionX="10733" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="10733" positionY="150"/>
+ <point positionX="10733" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13416" positionY="150"/>
+ <point positionX="13416" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="13416" positionY="150"/>
+ <point positionX="13416" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="13416.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="150.000000" column3="8172.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="762" positionY="8172" sizeX="13416" sizeY="0" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="762" positionY="8172"/>
+ <point positionX="14178" positionY="8172"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="0"/>
+ <point positionX="13416" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="13416.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="0.000000" column3="8172.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="13417.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="151.000000" column3="8172.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="612" positionY="378" sizeX="150" sizeY="7794" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShapes>
+ <XShape positionX="612" positionY="378" sizeX="150" sizeY="7794" type="com.sun.star.drawing.PolyLineShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="612" positionY="8172"/>
+ <point positionX="762" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="8172"/>
+ <point positionX="762" positionY="8172"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="6873"/>
+ <point positionX="762" positionY="6873"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="6873"/>
+ <point positionX="762" positionY="6873"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="5574"/>
+ <point positionX="762" positionY="5574"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="5574"/>
+ <point positionX="762" positionY="5574"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="4275"/>
+ <point positionX="762" positionY="4275"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="4275"/>
+ <point positionX="762" positionY="4275"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="2976"/>
+ <point positionX="762" positionY="2976"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="2976"/>
+ <point positionX="762" positionY="2976"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="1677"/>
+ <point positionX="762" positionY="1677"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="1677"/>
+ <point positionX="762" positionY="1677"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="378"/>
+ <point positionX="762" positionY="378"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="612" positionY="378"/>
+ <point positionX="762" positionY="378"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="150" positionY="7794"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="150" positionY="7794"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="6495"/>
+ <point positionX="150" positionY="6495"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="6495"/>
+ <point positionX="150" positionY="6495"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="5196"/>
+ <point positionX="150" positionY="5196"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="5196"/>
+ <point positionX="150" positionY="5196"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="3897"/>
+ <point positionX="150" positionY="3897"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="3897"/>
+ <point positionX="150" positionY="3897"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="2598"/>
+ <point positionX="150" positionY="2598"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="2598"/>
+ <point positionX="150" positionY="2598"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="1299"/>
+ <point positionX="150" positionY="1299"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="1299"/>
+ <point positionX="150" positionY="1299"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="0"/>
+ <point positionX="150" positionY="0"/>
+ </pointSequence>
+ <pointSequence>
+ <point positionX="0" positionY="0"/>
+ <point positionX="150" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="150.000000" column2="0.000000" column3="612.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="762" positionY="378" sizeX="0" sizeY="7794" type="com.sun.star.drawing.LineShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="762" positionY="8172"/>
+ <point positionX="762" positionY="378"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="7794"/>
+ <point positionX="0" positionY="0"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="0.000000" column2="0.000000" column3="762.000000"/>
+ <Line2 column1="0.000000" column2="7794.000000" column3="378.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="151.000000" column2="0.000000" column3="612.000000"/>
+ <Line2 column1="0.000000" column2="7795.000000" column3="378.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="13567.000000" column2="0.000000" column3="612.000000"/>
+ <Line2 column1="0.000000" column2="7945.000000" column3="378.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="1209" positionY="1677" sizeX="12522" sizeY="6495" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="1209" positionY="1677" sizeX="11628" sizeY="6495" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
+ <XShapes>
+ <XShape positionX="1209" positionY="6873" sizeX="894" sizeY="1299" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="1209" positionY="8172"/>
+ <point positionX="2103" positionY="8172"/>
+ <point positionX="2103" positionY="6873"/>
+ <point positionX="1209" positionY="6873"/>
+ <point positionX="1209" positionY="8172"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="1299"/>
+ <point positionX="894" positionY="1299"/>
+ <point positionX="894" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="1299"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="894.000000" column2="0.000000" column3="1209.000000"/>
+ <Line2 column1="0.000000" column2="1299.000000" column3="6873.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="3892" positionY="5574" sizeX="895" sizeY="2598" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="3892" positionY="8172"/>
+ <point positionX="4787" positionY="8172"/>
+ <point positionX="4787" positionY="5574"/>
+ <point positionX="3892" positionY="5574"/>
+ <point positionX="3892" positionY="8172"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="2598"/>
+ <point positionX="895" positionY="2598"/>
+ <point positionX="895" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="2598"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="895.000000" column2="0.000000" column3="3892.000000"/>
+ <Line2 column1="0.000000" column2="2598.000000" column3="5574.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="6576" positionY="4275" sizeX="894" sizeY="3897" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="6576" positionY="8172"/>
+ <point positionX="7470" positionY="8172"/>
+ <point positionX="7470" positionY="4275"/>
+ <point positionX="6576" positionY="4275"/>
+ <point positionX="6576" positionY="8172"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="3897"/>
+ <point positionX="894" positionY="3897"/>
+ <point positionX="894" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="3897"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="894.000000" column2="0.000000" column3="6576.000000"/>
+ <Line2 column1="0.000000" column2="3897.000000" column3="4275.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="9259" positionY="2976" sizeX="894" sizeY="5196" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="9259" positionY="8172"/>
+ <point positionX="10153" positionY="8172"/>
+ <point positionX="10153" positionY="2976"/>
+ <point positionX="9259" positionY="2976"/>
+ <point positionX="9259" positionY="8172"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="5196"/>
+ <point positionX="894" positionY="5196"/>
+ <point positionX="894" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="5196"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="894.000000" column2="0.000000" column3="9259.000000"/>
+ <Line2 column1="0.000000" column2="5196.000000" column3="2976.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="11942" positionY="1677" sizeX="895" sizeY="6495" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=4" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="11942" positionY="8172"/>
+ <point positionX="12837" positionY="8172"/>
+ <point positionX="12837" positionY="1677"/>
+ <point positionX="11942" positionY="1677"/>
+ <point positionX="11942" positionY="8172"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="6495"/>
+ <point positionX="895" positionY="6495"/>
+ <point positionX="895" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="6495"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="895.000000" column2="0.000000" column3="11942.000000"/>
+ <Line2 column1="0.000000" column2="6495.000000" column3="1677.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="11629.000000" column2="0.000000" column3="1209.000000"/>
+ <Line2 column1="0.000000" column2="6496.000000" column3="1677.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="2103" positionY="2976" sizeX="11628" sizeY="5196" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=1">
+ <XShapes>
+ <XShape positionX="2103" positionY="5574" sizeX="895" sizeY="2598" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="2103" positionY="8172"/>
+ <point positionX="2998" positionY="8172"/>
+ <point positionX="2998" positionY="5574"/>
+ <point positionX="2103" positionY="5574"/>
+ <point positionX="2103" positionY="8172"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="2598"/>
+ <point positionX="895" positionY="2598"/>
+ <point positionX="895" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="2598"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="895.000000" column2="0.000000" column3="2103.000000"/>
+ <Line2 column1="0.000000" column2="2598.000000" column3="5574.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="4787" positionY="6873" sizeX="894" sizeY="1299" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="4787" positionY="8172"/>
+ <point positionX="5681" positionY="8172"/>
+ <point positionX="5681" positionY="6873"/>
+ <point positionX="4787" positionY="6873"/>
+ <point positionX="4787" positionY="8172"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="1299"/>
+ <point positionX="894" positionY="1299"/>
+ <point positionX="894" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="1299"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="894.000000" column2="0.000000" column3="4787.000000"/>
+ <Line2 column1="0.000000" column2="1299.000000" column3="6873.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7470" positionY="4275" sizeX="894" sizeY="3897" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="7470" positionY="8172"/>
+ <point positionX="8364" positionY="8172"/>
+ <point positionX="8364" positionY="4275"/>
+ <point positionX="7470" positionY="4275"/>
+ <point positionX="7470" positionY="8172"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="3897"/>
+ <point positionX="894" positionY="3897"/>
+ <point positionX="894" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="3897"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="894.000000" column2="0.000000" column3="7470.000000"/>
+ <Line2 column1="0.000000" column2="3897.000000" column3="4275.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="10153" positionY="2976" sizeX="895" sizeY="5196" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=3" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="10153" positionY="8172"/>
+ <point positionX="11048" positionY="8172"/>
+ <point positionX="11048" positionY="2976"/>
+ <point positionX="10153" positionY="2976"/>
+ <point positionX="10153" positionY="8172"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="5196"/>
+ <point positionX="895" positionY="5196"/>
+ <point positionX="895" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="5196"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="895.000000" column2="0.000000" column3="10153.000000"/>
+ <Line2 column1="0.000000" column2="5196.000000" column3="2976.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="12837" positionY="5574" sizeX="894" sizeY="2598" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=4" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <PolyPolygon>
+ <pointSequence>
+ <point positionX="12837" positionY="8172"/>
+ <point positionX="13731" positionY="8172"/>
+ <point positionX="13731" positionY="5574"/>
+ <point positionX="12837" positionY="5574"/>
+ <point positionX="12837" positionY="8172"/>
+ </pointSequence>
+ </PolyPolygon>
+ <Geometry>
+ <pointSequence>
+ <point positionX="0" positionY="2598"/>
+ <point positionX="894" positionY="2598"/>
+ <point positionX="894" positionY="0"/>
+ <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="2598"/>
+ </pointSequence>
+ </Geometry>
+ <Transformation>
+ <Line1 column1="894.000000" column2="0.000000" column3="12837.000000"/>
+ <Line2 column1="0.000000" column2="2598.000000" column3="5574.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="11629.000000" column2="0.000000" column3="2103.000000"/>
+ <Line2 column1="0.000000" column2="5197.000000" column3="2976.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="12523.000000" column2="0.000000" column3="1209.000000"/>
+ <Line2 column1="0.000000" column2="6496.000000" column3="1677.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="13567.000000" column2="0.000000" column3="612.000000"/>
+ <Line2 column1="0.000000" column2="7945.000000" column3="378.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="13568.000000" column2="0.000000" column3="612.000000"/>
+ <Line2 column1="0.000000" column2="7945.000000" column3="378.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="180" sizeX="12614" sizeY="8640" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="2007" positionY="8422" sizeX="10927" sizeY="398" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
+ <XShapes>
+ <XShape positionX="2007" positionY="8422" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="1" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="2007.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="4691" positionY="8422" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="2" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="4691.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="7374" positionY="8422" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="3" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="7374.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="10057" positionY="8422" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="4" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="10057.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="12741" positionY="8422" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="5" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="12741.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="10928.000000" column2="0.000000" column3="2007.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="8422.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="180" sizeX="193" sizeY="8192" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
+ <XShapes>
+ <XShape positionX="320" positionY="7974" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="0" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="7974.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="6675" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="1" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="6675.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="5376" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="2" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="5376.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="4077" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="3" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4077.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="2778" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="4" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="2778.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="1479" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="5" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="1479.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="320" positionY="180" sizeX="193" sizeY="398" type="com.sun.star.drawing.TextShape" text="6" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="1" textMinimumFrameWidth="1" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="180.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="194.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="8193.000000" column3="180.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="12615.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="8641.000000" column3="180.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="13860.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="8641.000000" column3="180.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="13860.000000" column2="0.000000" column3="320.000000"/>
+ <Line2 column1="0.000000" column2="8641.000000" column3="180.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14499" positionY="3952" sizeX="1291" sizeY="1096" type="com.sun.star.drawing.GroupShape" name="CID/D=0:Legend=">
+ <XShapes>
+ <XShape positionX="14499" positionY="3952" sizeX="1291" sizeY="1096" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="e6e6e6" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="1292.000000" column2="0.000000" column3="14499.000000"/>
+ <Line2 column1="0.000000" column2="1097.000000" column3="3952.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14615" positionY="4145" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="14615" positionY="4145" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:LegendEntry=0">
+ <XShapes>
+ <XShape positionX="14615" positionY="4145" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="14615.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14615" positionY="4145" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="004586" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="14615.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="14615.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="14615.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14615" positionY="4643" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
+ <XShapes>
+ <XShape positionX="14615" positionY="4643" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:LegendEntry=0">
+ <XShapes>
+ <XShape positionX="14615" positionY="4643" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="14615.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14615" positionY="4643" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" fontHeight="12.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="ff420e" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="14615.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="14615.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="212.000000" column2="0.000000" column3="14615.000000"/>
+ <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14926" positionY="4052" sizeX="748" sizeY="398" type="com.sun.star.drawing.TextShape" text="test1" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4800" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="749.000000" column2="0.000000" column3="14926.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4052.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ <XShape positionX="14926" positionY="4550" sizeX="748" sizeY="398" type="com.sun.star.drawing.TextShape" text="test2" fontHeight="10.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4800" textMinimumFrameHeight="100" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="ffffff" fillTransparence="0" fillTransparenceGradientName="">
+ <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+ <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
+ <FillBitmap/>
+ <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+ <LineStart/>
+ <LineEnd/>
+ <Transformation>
+ <Line1 column1="749.000000" column2="0.000000" column3="14926.000000"/>
+ <Line2 column1="0.000000" column2="399.000000" column3="4550.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+ </XShapes>
+ <Transformation>
+ <Line1 column1="1292.000000" column2="0.000000" column3="14499.000000"/>
+ <Line2 column1="0.000000" column2="1097.000000" column3="3952.000000"/>
+ <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+ </Transformation>
+ </XShape>
+</XShapes>
+
+
diff --git a/chart2/qa/extras/xshape/data/xls/tdf150832.xls b/chart2/qa/extras/xshape/data/xls/tdf150832.xls
new file mode 100644
index 000000000000..1044345619c4
--- /dev/null
+++ b/chart2/qa/extras/xshape/data/xls/tdf150832.xls
Binary files differ
diff --git a/chart2/qa/extras/xshape/data/xlsx/tdf90839-1.xlsx b/chart2/qa/extras/xshape/data/xlsx/tdf90839-1.xlsx
index 9474de35fb77..05db435f6052 100644
--- a/chart2/qa/extras/xshape/data/xlsx/tdf90839-1.xlsx
+++ b/chart2/qa/extras/xshape/data/xlsx/tdf90839-1.xlsx
Binary files differ
diff --git a/chart2/qa/extras/xshape/data/xlsx/tdf90839-2.xlsx b/chart2/qa/extras/xshape/data/xlsx/tdf90839-2.xlsx
index 9a5b35228118..d3922f7f20ed 100644
--- a/chart2/qa/extras/xshape/data/xlsx/tdf90839-2.xlsx
+++ b/chart2/qa/extras/xshape/data/xlsx/tdf90839-2.xlsx
Binary files differ
diff --git a/chart2/qa/extras/xshape/data/xlsx/tdf90839-3.xlsx b/chart2/qa/extras/xshape/data/xlsx/tdf90839-3.xlsx
index e256c3a0b4f9..5a3ee4cf49eb 100644
--- a/chart2/qa/extras/xshape/data/xlsx/tdf90839-3.xlsx
+++ b/chart2/qa/extras/xshape/data/xlsx/tdf90839-3.xlsx
Binary files differ
diff --git a/chart2/qa/unit/common_functor_test.cxx b/chart2/qa/unit/common_functor_test.cxx
index b2e404e13508..a744945e6663 100644
--- a/chart2/qa/unit/common_functor_test.cxx
+++ b/chart2/qa/unit/common_functor_test.cxx
@@ -48,7 +48,7 @@ void CommonFunctorsTest::testAnyToString()
std::vector<OUString> aOutput;
std::transform(aInput.begin(), aInput.end(),
- std::back_inserter(aOutput), chart::CommonFunctors::AnyToString());
+ std::back_inserter(aOutput), chart::CommonFunctors::ToString());
CPPUNIT_ASSERT_EQUAL(OUString("2"), aOutput[0]);
CPPUNIT_ASSERT_EQUAL(OUString("10"), aOutput[1]);
@@ -65,7 +65,7 @@ void CommonFunctorsTest::testDoubleToString()
std::vector<OUString> aOutput;
std::transform(aInput.begin(), aInput.end(),
- std::back_inserter(aOutput), chart::CommonFunctors::DoubleToOUString());
+ std::back_inserter(aOutput), chart::CommonFunctors::ToString());
CPPUNIT_ASSERT_EQUAL(OUString("2"), aOutput[0]);
CPPUNIT_ASSERT_EQUAL(OUString("10"), aOutput[1]);
diff --git a/chart2/qa/unit/data/reference/testChart.xml b/chart2/qa/unit/data/reference/testChart.xml
deleted file mode 100644
index 03ad3d95f85b..000000000000
--- a/chart2/qa/unit/data/reference/testChart.xml
+++ /dev/null
@@ -1,1216 +0,0 @@
-<?xml version="1.0"?>
-<XShapes>
- <XShape positionX="0" positionY="0" sizeX="16000" sizeY="9000" type="com.sun.star.drawing.RectangleShape" name="CID/Page=" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="16001.000000" column2="0.000000" column3="0.000000"/>
- <Line2 column1="0.000000" column2="9001.000000" column3="0.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="770" positionY="854" sizeX="13068" sizeY="7546" type="com.sun.star.drawing.GroupShape" name="CID/D=0">
- <XShapes>
- <XShape positionX="1206" positionY="1054" sizeX="12632" sizeY="6699" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="10079487" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="12633.000000" column2="0.000000" column3="1206.000000"/>
- <Line2 column1="0.000000" column2="6700.000000" column3="1054.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="770" positionY="855" sizeX="13068" sizeY="7545" type="com.sun.star.drawing.RectangleShape" name="PlotAreaIncludingAxes" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="10079487" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="13069.000000" column2="0.000000" column3="770.000000"/>
- <Line2 column1="0.000000" column2="7546.000000" column3="855.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="770" positionY="854" sizeX="13068" sizeY="7546" type="com.sun.star.drawing.GroupShape">
- <XShapes>
- <XShape positionX="1056" positionY="1052" sizeX="12782" sizeY="6850" type="com.sun.star.drawing.GroupShape">
- <XShapes>
- <XShape positionX="1206" positionY="1054" sizeX="12632" sizeY="6699" type="com.sun.star.drawing.GroupShape" name="PlotAreaExcludingAxes">
- <XShapes>
- <XShape positionX="1206" positionY="1054" sizeX="12632" sizeY="6699" type="com.sun.star.drawing.RectangleShape" name="CID/DiagramWall=" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="15132390" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="12633.000000" column2="0.000000" column3="1206.000000"/>
- <Line2 column1="0.000000" column2="6700.000000" column3="1054.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="12633.000000" column2="0.000000" column3="1206.000000"/>
- <Line2 column1="0.000000" column2="6700.000000" column3="1054.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="1056" positionY="1052" sizeX="12782" sizeY="6850" type="com.sun.star.drawing.GroupShape" name="testonly;CooContainer=XXX_CID">
- <XShapes>
- <XShape positionX="1206" positionY="1052" sizeX="12632" sizeY="6700" type="com.sun.star.drawing.GroupShape">
- <XShapes>
- <XShape positionX="1206" positionY="1052" sizeX="12632" sizeY="6700" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0:Grid=0">
- <XShapes>
- <XShape positionX="1206" positionY="1052" sizeX="12632" sizeY="6700" type="com.sun.star.drawing.PolyLineShape" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="13838" positionY="7752"/>
- <point positionX="1206" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="13838" positionY="6635"/>
- <point positionX="1206" positionY="6635"/>
- </pointSequence>
- <pointSequence>
- <point positionX="13838" positionY="5519"/>
- <point positionX="1206" positionY="5519"/>
- </pointSequence>
- <pointSequence>
- <point positionX="13838" positionY="4402"/>
- <point positionX="1206" positionY="4402"/>
- </pointSequence>
- <pointSequence>
- <point positionX="13838" positionY="3285"/>
- <point positionX="1206" positionY="3285"/>
- </pointSequence>
- <pointSequence>
- <point positionX="13838" positionY="2169"/>
- <point positionX="1206" positionY="2169"/>
- </pointSequence>
- <pointSequence>
- <point positionX="13838" positionY="1052"/>
- <point positionX="1206" positionY="1052"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="12632" positionY="6700"/>
- <point positionX="0" positionY="6700"/>
- </pointSequence>
- <pointSequence>
- <point positionX="12632" positionY="5583"/>
- <point positionX="0" positionY="5583"/>
- </pointSequence>
- <pointSequence>
- <point positionX="12632" positionY="4467"/>
- <point positionX="0" positionY="4467"/>
- </pointSequence>
- <pointSequence>
- <point positionX="12632" positionY="3350"/>
- <point positionX="0" positionY="3350"/>
- </pointSequence>
- <pointSequence>
- <point positionX="12632" positionY="2233"/>
- <point positionX="0" positionY="2233"/>
- </pointSequence>
- <pointSequence>
- <point positionX="12632" positionY="1117"/>
- <point positionX="0" positionY="1117"/>
- </pointSequence>
- <pointSequence>
- <point positionX="12632" positionY="0"/>
- <point positionX="0" positionY="0"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="12632.000000" column2="0.000000" column3="1206.000000"/>
- <Line2 column1="0.000000" column2="6700.000000" column3="1052.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="1206" positionY="1052" sizeX="0" sizeY="6700" type="com.sun.star.drawing.PolyLineShape" name="HandlesOnly" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="NONE">
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="1206" positionY="7752"/>
- <point positionX="1206" positionY="6635"/>
- <point positionX="1206" positionY="5519"/>
- <point positionX="1206" positionY="4402"/>
- <point positionX="1206" positionY="3285"/>
- <point positionX="1206" positionY="2169"/>
- <point positionX="1206" positionY="1052"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="6700"/>
- <point positionX="0" positionY="5583"/>
- <point positionX="0" positionY="4467"/>
- <point positionX="0" positionY="3350"/>
- <point positionX="0" positionY="2233"/>
- <point positionX="0" positionY="1117"/>
- <point positionX="0" positionY="0"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="0.000000" column2="0.000000" column3="1206.000000"/>
- <Line2 column1="0.000000" column2="6700.000000" column3="1052.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="12633.000000" column2="0.000000" column3="1206.000000"/>
- <Line2 column1="0.000000" column2="6701.000000" column3="1052.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="12633.000000" column2="0.000000" column3="1206.000000"/>
- <Line2 column1="0.000000" column2="6701.000000" column3="1052.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="1056" positionY="1052" sizeX="12782" sizeY="6850" type="com.sun.star.drawing.GroupShape">
- <XShapes>
- <XShape positionX="1206" positionY="7752" sizeX="12632" sizeY="150" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
- <XShapes>
- <XShape positionX="1206" positionY="7752" sizeX="12632" sizeY="150" type="com.sun.star.drawing.PolyLineShape" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="1206" positionY="7902"/>
- <point positionX="1206" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1206" positionY="7902"/>
- <point positionX="1206" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="3732" positionY="7902"/>
- <point positionX="3732" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="3732" positionY="7902"/>
- <point positionX="3732" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="6258" positionY="7902"/>
- <point positionX="6258" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="6258" positionY="7902"/>
- <point positionX="6258" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="8785" positionY="7902"/>
- <point positionX="8785" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="8785" positionY="7902"/>
- <point positionX="8785" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="11311" positionY="7902"/>
- <point positionX="11311" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="11311" positionY="7902"/>
- <point positionX="11311" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="13838" positionY="7902"/>
- <point positionX="13838" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="13838" positionY="7902"/>
- <point positionX="13838" positionY="7752"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="150"/>
- <point positionX="0" positionY="0"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="150"/>
- <point positionX="0" positionY="0"/>
- </pointSequence>
- <pointSequence>
- <point positionX="2526" positionY="150"/>
- <point positionX="2526" positionY="0"/>
- </pointSequence>
- <pointSequence>
- <point positionX="2526" positionY="150"/>
- <point positionX="2526" positionY="0"/>
- </pointSequence>
- <pointSequence>
- <point positionX="5052" positionY="150"/>
- <point positionX="5052" positionY="0"/>
- </pointSequence>
- <pointSequence>
- <point positionX="5052" positionY="150"/>
- <point positionX="5052" positionY="0"/>
- </pointSequence>
- <pointSequence>
- <point positionX="7579" positionY="150"/>
- <point positionX="7579" positionY="0"/>
- </pointSequence>
- <pointSequence>
- <point positionX="7579" positionY="150"/>
- <point positionX="7579" positionY="0"/>
- </pointSequence>
- <pointSequence>
- <point positionX="10105" positionY="150"/>
- <point positionX="10105" positionY="0"/>
- </pointSequence>
- <pointSequence>
- <point positionX="10105" positionY="150"/>
- <point positionX="10105" positionY="0"/>
- </pointSequence>
- <pointSequence>
- <point positionX="12632" positionY="150"/>
- <point positionX="12632" positionY="0"/>
- </pointSequence>
- <pointSequence>
- <point positionX="12632" positionY="150"/>
- <point positionX="12632" positionY="0"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="12632.000000" column2="0.000000" column3="1206.000000"/>
- <Line2 column1="0.000000" column2="150.000000" column3="7752.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="1206" positionY="7752" sizeX="12632" sizeY="0" type="com.sun.star.drawing.LineShape" name="MarkHandles" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="1206" positionY="7752"/>
- <point positionX="13838" positionY="7752"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="0"/>
- <point positionX="12632" positionY="0"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="12632.000000" column2="0.000000" column3="1206.000000"/>
- <Line2 column1="0.000000" column2="0.000000" column3="7752.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="12633.000000" column2="0.000000" column3="1206.000000"/>
- <Line2 column1="0.000000" column2="151.000000" column3="7752.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="1056" positionY="1052" sizeX="150" sizeY="6700" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
- <XShapes>
- <XShape positionX="1056" positionY="1052" sizeX="150" sizeY="6700" type="com.sun.star.drawing.PolyLineShape" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="1056" positionY="7752"/>
- <point positionX="1206" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="7752"/>
- <point positionX="1206" positionY="7752"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="6635"/>
- <point positionX="1206" positionY="6635"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="6635"/>
- <point positionX="1206" positionY="6635"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="5519"/>
- <point positionX="1206" positionY="5519"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="5519"/>
- <point positionX="1206" positionY="5519"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="4402"/>
- <point positionX="1206" positionY="4402"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="4402"/>
- <point positionX="1206" positionY="4402"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="3285"/>
- <point positionX="1206" positionY="3285"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="3285"/>
- <point positionX="1206" positionY="3285"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="2169"/>
- <point positionX="1206" positionY="2169"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="2169"/>
- <point positionX="1206" positionY="2169"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="1052"/>
- <point positionX="1206" positionY="1052"/>
- </pointSequence>
- <pointSequence>
- <point positionX="1056" positionY="1052"/>
- <point positionX="1206" positionY="1052"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="6700"/>
- <point positionX="150" positionY="6700"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="6700"/>
- <point positionX="150" positionY="6700"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="5583"/>
- <point positionX="150" positionY="5583"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="5583"/>
- <point positionX="150" positionY="5583"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="4467"/>
- <point positionX="150" positionY="4467"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="4467"/>
- <point positionX="150" positionY="4467"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="3350"/>
- <point positionX="150" positionY="3350"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="3350"/>
- <point positionX="150" positionY="3350"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="2233"/>
- <point positionX="150" positionY="2233"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="2233"/>
- <point positionX="150" positionY="2233"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="1117"/>
- <point positionX="150" positionY="1117"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="1117"/>
- <point positionX="150" positionY="1117"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="0"/>
- <point positionX="150" positionY="0"/>
- </pointSequence>
- <pointSequence>
- <point positionX="0" positionY="0"/>
- <point positionX="150" positionY="0"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="150.000000" column2="0.000000" column3="1056.000000"/>
- <Line2 column1="0.000000" column2="6700.000000" column3="1052.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="1206" positionY="1052" sizeX="0" sizeY="6700" type="com.sun.star.drawing.LineShape" name="MarkHandles" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="1206" positionY="7752"/>
- <point positionX="1206" positionY="1052"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="6700"/>
- <point positionX="0" positionY="0"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="0.000000" column2="0.000000" column3="1206.000000"/>
- <Line2 column1="0.000000" column2="6700.000000" column3="1052.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="151.000000" column2="0.000000" column3="1056.000000"/>
- <Line2 column1="0.000000" column2="6701.000000" column3="1052.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="12783.000000" column2="0.000000" column3="1056.000000"/>
- <Line2 column1="0.000000" column2="6851.000000" column3="1052.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="1627" positionY="2169" sizeX="11789" sizeY="5583" type="com.sun.star.drawing.GroupShape">
- <XShapes>
- <XShape positionX="1627" positionY="2169" sizeX="10947" sizeY="5583" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=0">
- <XShapes>
- <XShape positionX="11732" positionY="2169" sizeX="842" sizeY="5583" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=4" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="17798" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="11732" positionY="7752"/>
- <point positionX="12574" positionY="7752"/>
- <point positionX="12574" positionY="2169"/>
- <point positionX="11732" positionY="2169"/>
- <point positionX="11732" positionY="7752"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="5583"/>
- <point positionX="842" positionY="5583"/>
- <point positionX="842" positionY="0"/>
- <point positionX="0" positionY="0"/>
- <point positionX="0" positionY="5583"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="842.000000" column2="0.000000" column3="11732.000000"/>
- <Line2 column1="0.000000" column2="5583.000000" column3="2169.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="9206" positionY="3285" sizeX="842" sizeY="4467" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="17798" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="9206" positionY="7752"/>
- <point positionX="10048" positionY="7752"/>
- <point positionX="10048" positionY="3285"/>
- <point positionX="9206" positionY="3285"/>
- <point positionX="9206" positionY="7752"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="4467"/>
- <point positionX="842" positionY="4467"/>
- <point positionX="842" positionY="0"/>
- <point positionX="0" positionY="0"/>
- <point positionX="0" positionY="4467"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="842.000000" column2="0.000000" column3="9206.000000"/>
- <Line2 column1="0.000000" column2="4467.000000" column3="3285.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="6679" positionY="4402" sizeX="843" sizeY="3350" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="17798" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="6679" positionY="7752"/>
- <point positionX="7522" positionY="7752"/>
- <point positionX="7522" positionY="4402"/>
- <point positionX="6679" positionY="4402"/>
- <point positionX="6679" positionY="7752"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="3350"/>
- <point positionX="843" positionY="3350"/>
- <point positionX="843" positionY="0"/>
- <point positionX="0" positionY="0"/>
- <point positionX="0" positionY="3350"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="843.000000" column2="0.000000" column3="6679.000000"/>
- <Line2 column1="0.000000" column2="3350.000000" column3="4402.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="4153" positionY="5519" sizeX="842" sizeY="2233" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="17798" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="4153" positionY="7752"/>
- <point positionX="4995" positionY="7752"/>
- <point positionX="4995" positionY="5519"/>
- <point positionX="4153" positionY="5519"/>
- <point positionX="4153" positionY="7752"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="2233"/>
- <point positionX="842" positionY="2233"/>
- <point positionX="842" positionY="0"/>
- <point positionX="0" positionY="0"/>
- <point positionX="0" positionY="2233"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="842.000000" column2="0.000000" column3="4153.000000"/>
- <Line2 column1="0.000000" column2="2233.000000" column3="5519.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="1627" positionY="6635" sizeX="842" sizeY="1117" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="17798" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="1627" positionY="7752"/>
- <point positionX="2469" positionY="7752"/>
- <point positionX="2469" positionY="6635"/>
- <point positionX="1627" positionY="6635"/>
- <point positionX="1627" positionY="7752"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="1117"/>
- <point positionX="842" positionY="1117"/>
- <point positionX="842" positionY="0"/>
- <point positionX="0" positionY="0"/>
- <point positionX="0" positionY="1117"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="842.000000" column2="0.000000" column3="1627.000000"/>
- <Line2 column1="0.000000" column2="1117.000000" column3="6635.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="10948.000000" column2="0.000000" column3="1627.000000"/>
- <Line2 column1="0.000000" column2="5584.000000" column3="2169.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="2469" positionY="3285" sizeX="10947" sizeY="4467" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:CT=0:Series=1">
- <XShapes>
- <XShape positionX="12574" positionY="5519" sizeX="842" sizeY="2233" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=4" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="16728590" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="12574" positionY="7752"/>
- <point positionX="13416" positionY="7752"/>
- <point positionX="13416" positionY="5519"/>
- <point positionX="12574" positionY="5519"/>
- <point positionX="12574" positionY="7752"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="2233"/>
- <point positionX="842" positionY="2233"/>
- <point positionX="842" positionY="0"/>
- <point positionX="0" positionY="0"/>
- <point positionX="0" positionY="2233"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="842.000000" column2="0.000000" column3="12574.000000"/>
- <Line2 column1="0.000000" column2="2233.000000" column3="5519.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="10048" positionY="3285" sizeX="842" sizeY="4467" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=3" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="16728590" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="10048" positionY="7752"/>
- <point positionX="10890" positionY="7752"/>
- <point positionX="10890" positionY="3285"/>
- <point positionX="10048" positionY="3285"/>
- <point positionX="10048" positionY="7752"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="4467"/>
- <point positionX="842" positionY="4467"/>
- <point positionX="842" positionY="0"/>
- <point positionX="0" positionY="0"/>
- <point positionX="0" positionY="4467"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="842.000000" column2="0.000000" column3="10048.000000"/>
- <Line2 column1="0.000000" column2="4467.000000" column3="3285.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="7522" positionY="4402" sizeX="842" sizeY="3350" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="16728590" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="7522" positionY="7752"/>
- <point positionX="8364" positionY="7752"/>
- <point positionX="8364" positionY="4402"/>
- <point positionX="7522" positionY="4402"/>
- <point positionX="7522" positionY="7752"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="3350"/>
- <point positionX="842" positionY="3350"/>
- <point positionX="842" positionY="0"/>
- <point positionX="0" positionY="0"/>
- <point positionX="0" positionY="3350"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="842.000000" column2="0.000000" column3="7522.000000"/>
- <Line2 column1="0.000000" column2="3350.000000" column3="4402.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="4995" positionY="6635" sizeX="842" sizeY="1117" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="16728590" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="4995" positionY="7752"/>
- <point positionX="5837" positionY="7752"/>
- <point positionX="5837" positionY="6635"/>
- <point positionX="4995" positionY="6635"/>
- <point positionX="4995" positionY="7752"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="1117"/>
- <point positionX="842" positionY="1117"/>
- <point positionX="842" positionY="0"/>
- <point positionX="0" positionY="0"/>
- <point positionX="0" positionY="1117"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="842.000000" column2="0.000000" column3="4995.000000"/>
- <Line2 column1="0.000000" column2="1117.000000" column3="6635.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="2469" positionY="5519" sizeX="842" sizeY="2233" type="com.sun.star.drawing.PolyPolygonShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="16728590" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <PolyPolygon>
- <pointSequence>
- <point positionX="2469" positionY="7752"/>
- <point positionX="3311" positionY="7752"/>
- <point positionX="3311" positionY="5519"/>
- <point positionX="2469" positionY="5519"/>
- <point positionX="2469" positionY="7752"/>
- </pointSequence>
- </PolyPolygon>
- <Geometry>
- <pointSequence>
- <point positionX="0" positionY="2233"/>
- <point positionX="842" positionY="2233"/>
- <point positionX="842" positionY="0"/>
- <point positionX="0" positionY="0"/>
- <point positionX="0" positionY="2233"/>
- </pointSequence>
- </Geometry>
- <Transformation>
- <Line1 column1="842.000000" column2="0.000000" column3="2469.000000"/>
- <Line2 column1="0.000000" column2="2233.000000" column3="5519.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="10948.000000" column2="0.000000" column3="2469.000000"/>
- <Line2 column1="0.000000" column2="4468.000000" column3="3285.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="11790.000000" column2="0.000000" column3="1627.000000"/>
- <Line2 column1="0.000000" column2="5584.000000" column3="2169.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="12783.000000" column2="0.000000" column3="1056.000000"/>
- <Line2 column1="0.000000" column2="6851.000000" column3="1052.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="12783.000000" column2="0.000000" column3="1056.000000"/>
- <Line2 column1="0.000000" column2="6851.000000" column3="1052.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="770" positionY="854" sizeX="11898" sizeY="7546" type="com.sun.star.drawing.GroupShape">
- <XShapes>
- <XShape positionX="2376" positionY="8002" sizeX="10292" sizeY="398" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=0,0">
- <XShapes>
- <XShape positionX="2376" positionY="8002" sizeX="187" sizeY="398" type="com.sun.star.drawing.TextShape" text="1" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="2376.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="8002.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="4902" positionY="8002" sizeX="187" sizeY="398" type="com.sun.star.drawing.TextShape" text="2" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="4902.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="8002.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="7429" positionY="8002" sizeX="187" sizeY="398" type="com.sun.star.drawing.TextShape" text="3" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="7429.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="8002.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="9955" positionY="8002" sizeX="187" sizeY="398" type="com.sun.star.drawing.TextShape" text="4" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="9955.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="8002.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="12481" positionY="8002" sizeX="187" sizeY="398" type="com.sun.star.drawing.TextShape" text="5" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="12481.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="8002.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="10293.000000" column2="0.000000" column3="2376.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="8002.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="770" positionY="854" sizeX="187" sizeY="7098" type="com.sun.star.drawing.GroupShape" name="CID/D=0:CS=0:Axis=1,0">
- <XShapes>
- <XShape positionX="770" positionY="7554" sizeX="187" sizeY="398" type="com.sun.star.drawing.TextShape" text="0" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="770.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="7554.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="770" positionY="6437" sizeX="187" sizeY="398" type="com.sun.star.drawing.TextShape" text="1" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="770.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="6437.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="770" positionY="5321" sizeX="187" sizeY="398" type="com.sun.star.drawing.TextShape" text="2" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="770.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="5321.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="770" positionY="4204" sizeX="187" sizeY="398" type="com.sun.star.drawing.TextShape" text="3" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="770.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="4204.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="770" positionY="3087" sizeX="187" sizeY="398" type="com.sun.star.drawing.TextShape" text="4" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="770.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="3087.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="770" positionY="1971" sizeX="187" sizeY="398" type="com.sun.star.drawing.TextShape" text="5" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="770.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="1971.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="770" positionY="854" sizeX="187" sizeY="398" type="com.sun.star.drawing.TextShape" text="6" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="RIGHT" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="770.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="854.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="188.000000" column2="0.000000" column3="770.000000"/>
- <Line2 column1="0.000000" column2="7099.000000" column3="854.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="11899.000000" column2="0.000000" column3="770.000000"/>
- <Line2 column1="0.000000" column2="7547.000000" column3="854.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="13069.000000" column2="0.000000" column3="770.000000"/>
- <Line2 column1="0.000000" column2="7547.000000" column3="854.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="13069.000000" column2="0.000000" column3="770.000000"/>
- <Line2 column1="0.000000" column2="7547.000000" column3="854.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="14478" positionY="3952" sizeX="1312" sizeY="1096" type="com.sun.star.drawing.GroupShape" name="CID/D=0:Legend=">
- <XShapes>
- <XShape positionX="14478" positionY="3952" sizeX="1312" sizeY="1096" type="com.sun.star.drawing.RectangleShape" name="MarkHandles" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="15132390" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="1313.000000" column2="0.000000" column3="14478.000000"/>
- <Line2 column1="0.000000" column2="1097.000000" column3="3952.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="14594" positionY="4145" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
- <XShapes>
- <XShape positionX="14594" positionY="4145" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=0:LegendEntry=0">
- <XShapes>
- <XShape positionX="14594" positionY="4145" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="10079487" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14594.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="14594" positionY="4145" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="17798" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14594.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14594.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14594.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4145.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="14594" positionY="4643" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape">
- <XShapes>
- <XShape positionX="14594" positionY="4643" sizeX="211" sizeY="211" type="com.sun.star.drawing.GroupShape" name="CID/MultiClick/D=0:CS=0:CT=0:Series=1:LegendEntry=0">
- <XShapes>
- <XShape positionX="14594" positionY="4643" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="10079487" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14594.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="14594" positionY="4643" sizeX="211" sizeY="211" type="com.sun.star.drawing.RectangleShape" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="16728590" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14594.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14594.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="212.000000" column2="0.000000" column3="14594.000000"/>
- <Line2 column1="0.000000" column2="212.000000" column3="4643.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="14905" positionY="4052" sizeX="769" sizeY="398" type="com.sun.star.drawing.TextShape" text="test1" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4800" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="770.000000" column2="0.000000" column3="14905.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="4052.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- <XShape positionX="14905" positionY="4550" sizeX="769" sizeY="398" type="com.sun.star.drawing.TextShape" text="test2" textAutoGrowHeight="true" textAutoGrowWidth="true" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="LEFT" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="4800" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
- <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
- <FillHatch style="SINGLE" color="0" distance="20" angle="0"/>
- <FillBitmap/>
- <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
- <LineStart/>
- <LineEnd/>
- <Transformation>
- <Line1 column1="770.000000" column2="0.000000" column3="14905.000000"/>
- <Line2 column1="0.000000" column2="399.000000" column3="4550.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
- </XShapes>
- <Transformation>
- <Line1 column1="1313.000000" column2="0.000000" column3="14478.000000"/>
- <Line2 column1="0.000000" column2="1097.000000" column3="3952.000000"/>
- <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
- </Transformation>
- </XShape>
-</XShapes>
diff --git a/chart2/source/chartcore.component b/chart2/source/chartcore.component
index f58ba98ba3ac..d15c808919df 100644
--- a/chart2/source/chartcore.component
+++ b/chart2/source/chartcore.component
@@ -220,6 +220,13 @@
<service name="com.sun.star.layout.LayoutElement"/>
<service name="com.sun.star.style.CharacterProperties"/>
</implementation>
+ <implementation name="com.sun.star.comp.chart2.DataTable"
+ constructor="com_sun_star_comp_chart2_DataTable_get_implementation">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.DataTable"/>
+ <service name="com.sun.star.drawing.FillProperties"/>
+ <service name="com.sun.star.drawing.LineProperties"/>
+ </implementation>
<implementation name="com.sun.star.comp.chart2.PageBackground"
constructor="com_sun_star_comp_chart2_PageBackground_get_implementation">
<service name="com.sun.star.beans.PropertySet"/>
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index f419ba7f7942..e1f583a578ee 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -21,7 +21,8 @@
#include "AccessibleChartShape.hxx"
#include <ObjectHierarchy.hxx>
#include <ObjectIdentifier.hxx>
-#include <chartview/ExplicitValueProvider.hxx>
+#include <ChartView.hxx>
+#include <ChartController.hxx>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleEventObject.hpp>
@@ -30,22 +31,17 @@
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <sal/log.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
-#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <i18nlangtag/languagetag.hxx>
-#include <vcl/unohelp.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/window.hxx>
#include <vcl/settings.hxx>
#include <o3tl/functional.hxx>
#include <o3tl/safeint.hxx>
-#include <tools/diagnose_ex.h>
-#include <unotools/accessiblestatesethelper.hxx>
-#include <ChartModel.hxx>
+#include <comphelper/diagnose_ex.hxx>
#include <algorithm>
#include <iterator>
@@ -67,7 +63,7 @@ namespace chart
/** @param bMayHaveChildren is false per default
*/
AccessibleBase::AccessibleBase(
- const AccessibleElementInfo & rAccInfo,
+ AccessibleElementInfo aAccInfo,
bool bMayHaveChildren,
bool bAlwaysTransparent /* default: false */ ) :
impl::AccessibleBase_Base( m_aMutex ),
@@ -75,18 +71,17 @@ AccessibleBase::AccessibleBase(
m_bMayHaveChildren( bMayHaveChildren ),
m_bChildrenInitialized( false ),
m_nEventNotifierId(0),
- m_xStateSetHelper( new ::utl::AccessibleStateSetHelper() ),
- m_aAccInfo( rAccInfo ),
+ m_nStateSet( 0 ),
+ m_aAccInfo(std::move( aAccInfo )),
m_bAlwaysTransparent( bAlwaysTransparent ),
m_bStateSetInitialized( false )
{
// initialize some states
- OSL_ASSERT( m_xStateSetHelper.is() );
- m_xStateSetHelper->AddState( AccessibleStateType::ENABLED );
- m_xStateSetHelper->AddState( AccessibleStateType::SHOWING );
- m_xStateSetHelper->AddState( AccessibleStateType::VISIBLE );
- m_xStateSetHelper->AddState( AccessibleStateType::SELECTABLE );
- m_xStateSetHelper->AddState( AccessibleStateType::FOCUSABLE );
+ m_nStateSet |= AccessibleStateType::ENABLED;
+ m_nStateSet |= AccessibleStateType::SHOWING;
+ m_nStateSet |= AccessibleStateType::VISIBLE;
+ m_nStateSet |= AccessibleStateType::SELECTABLE;
+ m_nStateSet |= AccessibleStateType::FOCUSABLE;
}
AccessibleBase::~AccessibleBase()
@@ -123,7 +118,7 @@ bool AccessibleBase::NotifyEvent( EventType eEventType, const AccessibleUniqueId
AddState( AccessibleStateType::FOCUSED );
aSelected <<= AccessibleStateType::FOCUSED;
- BroadcastAccEvent( AccessibleEventId::STATE_CHANGED, aSelected, aEmpty, true );
+ BroadcastAccEvent( AccessibleEventId::STATE_CHANGED, aSelected, aEmpty );
SAL_INFO("chart2.accessibility", "Selection acquired by: " << getAccessibleName());
}
@@ -136,7 +131,7 @@ bool AccessibleBase::NotifyEvent( EventType eEventType, const AccessibleUniqueId
AddState( AccessibleStateType::FOCUSED );
aSelected <<= AccessibleStateType::FOCUSED;
- BroadcastAccEvent( AccessibleEventId::STATE_CHANGED, aEmpty, aSelected, true );
+ BroadcastAccEvent( AccessibleEventId::STATE_CHANGED, aEmpty, aSelected );
SAL_INFO("chart2.accessibility", "Selection lost by: " << getAccessibleName());
}
break;
@@ -167,18 +162,16 @@ bool AccessibleBase::NotifyEvent( EventType eEventType, const AccessibleUniqueId
return false;
}
-void AccessibleBase::AddState( sal_Int16 aState )
+void AccessibleBase::AddState( sal_Int64 aState )
{
CheckDisposeState();
- OSL_ASSERT( m_xStateSetHelper.is() );
- m_xStateSetHelper->AddState( aState );
+ m_nStateSet |= aState;
}
-void AccessibleBase::RemoveState( sal_Int16 aState )
+void AccessibleBase::RemoveState( sal_Int64 aState )
{
CheckDisposeState();
- OSL_ASSERT( m_xStateSetHelper.is() );
- m_xStateSetHelper->RemoveState( aState );
+ m_nStateSet &= ~aState;
}
bool AccessibleBase::UpdateChildren()
@@ -343,32 +336,24 @@ awt::Point AccessibleBase::GetUpperLeftOnScreen() const
void AccessibleBase::BroadcastAccEvent(
sal_Int16 nId,
const Any & rNew,
- const Any & rOld,
- bool bSendGlobally ) const
+ const Any & rOld ) const
{
ClearableMutexGuard aGuard( m_aMutex );
- if ( !m_nEventNotifierId && !bSendGlobally )
+ if ( !m_nEventNotifierId )
return;
// if we don't have a client id for the notifier, then we don't have listeners, then
// we don't need to notify anything
- //except SendGlobally for focus handling?
// the const cast is needed, because UNO parameters are never const
const AccessibleEventObject aEvent(
const_cast< uno::XWeak * >( static_cast< const uno::XWeak * >( this )),
- nId, rNew, rOld );
+ nId, rNew, rOld, -1 );
- if ( m_nEventNotifierId ) // let the notifier handle this event
- ::comphelper::AccessibleEventNotifier::addEvent( m_nEventNotifierId, aEvent );
+ // let the notifier handle this event
+ ::comphelper::AccessibleEventNotifier::addEvent( m_nEventNotifierId, aEvent );
aGuard.clear();
-
- // send event to global message queue
- if( bSendGlobally )
- {
- vcl::unohelper::NotifyAccessibleStateEventGlobally( aEvent );
- }
}
void AccessibleBase::KillAllChildren()
@@ -405,8 +390,7 @@ void AccessibleBase::SetInfo( const AccessibleElementInfo & rNewInfo )
{
KillAllChildren();
}
- BroadcastAccEvent( AccessibleEventId::INVALIDATE_ALL_CHILDREN, uno::Any(), uno::Any(),
- true /* global notification */ );
+ BroadcastAccEvent( AccessibleEventId::INVALIDATE_ALL_CHILDREN, uno::Any(), uno::Any());
}
// ________ (XComponent::dispose) ________
@@ -427,11 +411,7 @@ void SAL_CALL AccessibleBase::disposing()
// reset pointers
m_aAccInfo.m_pParent = nullptr;
- // attach new empty state set helper to member reference
- rtl::Reference<::utl::AccessibleStateSetHelper> pHelper = new ::utl::AccessibleStateSetHelper();
- pHelper->AddState(AccessibleStateType::DEFUNC);
- // release old helper and attach new one
- m_xStateSetHelper = pHelper;
+ m_nStateSet = AccessibleStateType::DEFUNC;
m_bIsDisposed = true;
@@ -453,7 +433,7 @@ Reference< XAccessibleContext > SAL_CALL AccessibleBase::getAccessibleContext()
}
// ________ AccessibleBase::XAccessibleContext ________
-sal_Int32 SAL_CALL AccessibleBase::getAccessibleChildCount()
+sal_Int64 SAL_CALL AccessibleBase::getAccessibleChildCount()
{
ClearableMutexGuard aGuard( m_aMutex );
if( ! m_bMayHaveChildren ||
@@ -472,12 +452,12 @@ sal_Int32 SAL_CALL AccessibleBase::getAccessibleChildCount()
return ImplGetAccessibleChildCount();
}
-sal_Int32 AccessibleBase::ImplGetAccessibleChildCount() const
+sal_Int64 AccessibleBase::ImplGetAccessibleChildCount() const
{
return m_aChildList.size();
}
-Reference< XAccessible > SAL_CALL AccessibleBase::getAccessibleChild( sal_Int32 i )
+Reference< XAccessible > SAL_CALL AccessibleBase::getAccessibleChild( sal_Int64 i )
{
CheckDisposeState();
Reference< XAccessible > xResult;
@@ -496,7 +476,7 @@ Reference< XAccessible > SAL_CALL AccessibleBase::getAccessibleChild( sal_Int32
return xResult;
}
-Reference< XAccessible > AccessibleBase::ImplGetAccessibleChildById( sal_Int32 i ) const
+Reference< XAccessible > AccessibleBase::ImplGetAccessibleChildById( sal_Int64 i ) const
{
Reference< XAccessible > xResult;
@@ -529,7 +509,7 @@ Reference< XAccessible > SAL_CALL AccessibleBase::getAccessibleParent()
return aResult;
}
-sal_Int32 SAL_CALL AccessibleBase::getAccessibleIndexInParent()
+sal_Int64 SAL_CALL AccessibleBase::getAccessibleIndexInParent()
{
CheckDisposeState();
@@ -549,11 +529,11 @@ Reference< XAccessibleRelationSet > SAL_CALL AccessibleBase::getAccessibleRelati
return aResult;
}
-Reference< XAccessibleStateSet > SAL_CALL AccessibleBase::getAccessibleStateSet()
+sal_Int64 SAL_CALL AccessibleBase::getAccessibleStateSet()
{
if( ! m_bStateSetInitialized )
{
- Reference< view::XSelectionSupplier > xSelSupp( GetInfo().m_xSelectionSupplier );
+ rtl::Reference< ::chart::ChartController > xSelSupp( GetInfo().m_xChartController );
if ( xSelSupp.is() )
{
ObjectIdentifier aOID( xSelSupp->getSelection() );
@@ -566,7 +546,7 @@ Reference< XAccessibleStateSet > SAL_CALL AccessibleBase::getAccessibleStateSet(
m_bStateSetInitialized = true;
}
- return m_xStateSetHelper;
+ return m_nStateSet;
}
lang::Locale SAL_CALL AccessibleBase::getLocale()
@@ -631,12 +611,11 @@ Reference< XAccessible > SAL_CALL AccessibleBase::getAccessibleAtPoint( const aw
awt::Rectangle SAL_CALL AccessibleBase::getBounds()
{
- ExplicitValueProvider *pExplicitValueProvider(
- comphelper::getFromUnoTunnel<ExplicitValueProvider>( m_aAccInfo.m_xView ));
- if( pExplicitValueProvider )
+ rtl::Reference<ChartView> pChartView = m_aAccInfo.m_xView.get();
+ if( pChartView )
{
VclPtr<vcl::Window> pWindow( VCLUnoHelper::GetWindow( m_aAccInfo.m_xWindow ));
- awt::Rectangle aLogicRect( pExplicitValueProvider->getRectangleOfObject( m_aAccInfo.m_aOID.getObjectCID() ));
+ awt::Rectangle aLogicRect( pChartView->getRectangleOfObject( m_aAccInfo.m_aOID.getObjectCID() ));
if( pWindow )
{
tools::Rectangle aRect( aLogicRect.X, aLogicRect.Y,
@@ -657,7 +636,7 @@ awt::Rectangle SAL_CALL AccessibleBase::getBounds()
aParentLocOnScreen.Y - aULOnScreen.Y );
return awt::Rectangle( aRect.Left() - aOffset.X, aRect.Top() - aOffset.Y,
- aRect.getWidth(), aRect.getHeight());
+ aRect.getOpenWidth(), aRect.getOpenHeight());
}
}
@@ -698,7 +677,7 @@ void SAL_CALL AccessibleBase::grabFocus()
{
CheckDisposeState();
- Reference< view::XSelectionSupplier > xSelSupp( GetInfo().m_xSelectionSupplier );
+ rtl::Reference< ::chart::ChartController > xSelSupp( GetInfo().m_xChartController );
if ( xSelSupp.is() )
{
xSelSupp->select( GetId().getAny() );
@@ -728,7 +707,7 @@ Color AccessibleBase::getColor( eColorType eColType )
if( eType == OBJECTTYPE_LEGEND_ENTRY )
{
// for colors get the data series/point properties
- OUString aParentParticle( ObjectIdentifier::getFullParentParticle( aObjectCID ));
+ std::u16string_view aParentParticle( ObjectIdentifier::getFullParentParticle( aObjectCID ));
aObjectCID = ObjectIdentifier::createClassifiedIdentifierForParticle( aParentParticle );
}
diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.cxx b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
index 2afd4129e171..d3b98c102f76 100644
--- a/chart2/source/controller/accessibility/AccessibleChartElement.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
@@ -18,23 +18,17 @@
*/
#include "AccessibleChartElement.hxx"
+#include <AccessibleTextHelper.hxx>
#include <CharacterProperties.hxx>
#include <ChartModel.hxx>
+#include <ChartController.hxx>
#include <ObjectIdentifier.hxx>
#include <ObjectNameProvider.hxx>
-#include <servicenames.hxx>
-#include <ChartModel.hxx>
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/chart2/XTitle.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
-
-#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -87,37 +81,21 @@ void AccessibleChartElement::InitTextEdit()
if( ! m_xTextHelper.is())
{
// get hard reference
- Reference< view::XSelectionSupplier > xSelSupp( GetInfo().m_xSelectionSupplier );
- // get factory from selection supplier (controller)
- Reference< lang::XMultiServiceFactory > xFact( xSelSupp, uno::UNO_QUERY );
- if( xFact.is())
- {
- m_xTextHelper.set(
- xFact->createInstance( CHART_ACCESSIBLE_TEXT_SERVICE_NAME ), uno::UNO_QUERY );
- }
+ rtl::Reference< ::chart::ChartController > xChartController( GetInfo().m_xChartController );
+ if( xChartController.is())
+ m_xTextHelper = xChartController->createAccessibleTextContext();
}
if( !m_xTextHelper.is())
return;
- try
- {
- Reference< lang::XInitialization > xInit( m_xTextHelper, uno::UNO_QUERY_THROW );
- Sequence< uno::Any > aArgs{ uno::Any(GetInfo().m_aOID.getObjectCID()),
- uno::Any(Reference< XAccessible >( this )),
- uno::Any(Reference< awt::XWindow >( GetInfo().m_xWindow )) };
- xInit->initialize( aArgs );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
+ m_xTextHelper->initialize( GetInfo().m_aOID.getObjectCID(), this, GetInfo().m_xWindow );
}
// Interfaces
// ________ AccessibleBase::XAccessibleContext ________
-Reference< XAccessible > AccessibleChartElement::ImplGetAccessibleChildById( sal_Int32 i ) const
+Reference< XAccessible > AccessibleChartElement::ImplGetAccessibleChildById( sal_Int64 i ) const
{
Reference< XAccessible > xResult;
@@ -129,7 +107,7 @@ Reference< XAccessible > AccessibleChartElement::ImplGetAccessibleChildById( sal
return xResult;
}
-sal_Int32 AccessibleChartElement::ImplGetAccessibleChildCount() const
+sal_Int64 AccessibleChartElement::ImplGetAccessibleChildCount() const
{
if( m_bHasText )
{
diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.hxx b/chart2/source/controller/accessibility/AccessibleChartElement.hxx
index 12982db8faa1..283efed69d80 100644
--- a/chart2/source/controller/accessibility/AccessibleChartElement.hxx
+++ b/chart2/source/controller/accessibility/AccessibleChartElement.hxx
@@ -27,6 +27,7 @@ namespace com::sun::star::awt { class XFont; }
namespace chart
{
+class AccessibleTextHelper;
/** Base class for all Chart Accessibility objects except the root node (see AccessibleChartView)
@@ -61,8 +62,8 @@ public:
// ________ AccessibleBase ________
virtual bool ImplUpdateChildren() override;
virtual css::uno::Reference< css::accessibility::XAccessible >
- ImplGetAccessibleChildById( sal_Int32 i ) const override;
- virtual sal_Int32 ImplGetAccessibleChildCount() const override;
+ ImplGetAccessibleChildById( sal_Int64 i ) const override;
+ virtual sal_Int64 ImplGetAccessibleChildCount() const override;
// ________ XAccessibleContext ________
virtual OUString SAL_CALL getAccessibleName() override;
@@ -93,7 +94,7 @@ public:
private:
bool m_bHasText;
- css::uno::Reference< css::accessibility::XAccessibleContext >
+ rtl::Reference< ::chart::AccessibleTextHelper >
m_xTextHelper;
void InitTextEdit();
diff --git a/chart2/source/controller/accessibility/AccessibleChartShape.cxx b/chart2/source/controller/accessibility/AccessibleChartShape.cxx
index 73ff2e9c0ca8..771698a84010 100644
--- a/chart2/source/controller/accessibility/AccessibleChartShape.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartShape.cxx
@@ -78,9 +78,9 @@ OUString AccessibleChartShape::getImplementationName()
}
// ________ XAccessibleContext ________
-sal_Int32 AccessibleChartShape::getAccessibleChildCount()
+sal_Int64 AccessibleChartShape::getAccessibleChildCount()
{
- sal_Int32 nCount(0);
+ sal_Int64 nCount(0);
if ( m_pAccShape.is() )
{
nCount = m_pAccShape->getAccessibleChildCount();
@@ -88,7 +88,7 @@ sal_Int32 AccessibleChartShape::getAccessibleChildCount()
return nCount;
}
-Reference< XAccessible > AccessibleChartShape::getAccessibleChild( sal_Int32 i )
+Reference< XAccessible > AccessibleChartShape::getAccessibleChild( sal_Int64 i )
{
Reference< XAccessible > xChild;
if ( m_pAccShape.is() )
diff --git a/chart2/source/controller/accessibility/AccessibleChartShape.hxx b/chart2/source/controller/accessibility/AccessibleChartShape.hxx
index 4377929fa41d..c31204ed3c8a 100644
--- a/chart2/source/controller/accessibility/AccessibleChartShape.hxx
+++ b/chart2/source/controller/accessibility/AccessibleChartShape.hxx
@@ -50,9 +50,9 @@ public:
virtual OUString SAL_CALL getImplementationName() override;
// ________ XAccessibleContext ________
- virtual sal_Int32 SAL_CALL getAccessibleChildCount() override;
+ virtual sal_Int64 SAL_CALL getAccessibleChildCount() override;
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
- getAccessibleChild( sal_Int32 i ) override;
+ getAccessibleChild( sal_Int64 i ) override;
virtual sal_Int16 SAL_CALL getAccessibleRole() override;
virtual OUString SAL_CALL getAccessibleDescription() override;
virtual OUString SAL_CALL getAccessibleName() override;
diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx
index c0dac3c22657..8f01816a6504 100644
--- a/chart2/source/controller/accessibility/AccessibleChartView.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx
@@ -18,20 +18,18 @@
*/
#include <AccessibleChartView.hxx>
-#include <chartview/ExplicitValueProvider.hxx>
#include <ObjectHierarchy.hxx>
#include <ObjectIdentifier.hxx>
#include <ResId.hxx>
#include <strings.hrc>
#include "AccessibleViewForwarder.hxx"
#include <ChartModel.hxx>
+#include <ChartView.hxx>
+#include <ChartController.hxx>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-
-#include <comphelper/servicehelper.hxx>
#include <rtl/ustring.hxx>
#include <vcl/window.hxx>
@@ -113,7 +111,7 @@ Reference< XAccessible > SAL_CALL AccessibleChartView::getAccessibleParent()
return Reference< XAccessible >( m_xParent );
}
-sal_Int32 SAL_CALL AccessibleChartView::getAccessibleIndexInParent()
+sal_Int64 SAL_CALL AccessibleChartView::getAccessibleIndexInParent()
{
// the document is always the only child of the window
return 0;
@@ -158,9 +156,11 @@ awt::Point SAL_CALL AccessibleChartView::getLocationOnScreen()
return aResult;
}
-// lang::XInitialization
-
-void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments )
+void AccessibleChartView::initialize( ChartController& rNewChartController,
+ const rtl::Reference<::chart::ChartModel>& xNewChartModel,
+ const rtl::Reference<::chart::ChartView>& xNewChartView,
+ const uno::Reference< XAccessible >& xNewParent,
+ const css::uno::Reference<css::awt::XWindow>& xNewWindow )
{
//0: view::XSelectionSupplier offers notifications for selection changes and access to the selection itself
//1: frame::XModel representing the chart model - offers access to object data
@@ -171,125 +171,178 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments
bool bOldInvalid = false;
bool bNewInvalid = false;
- Reference< view::XSelectionSupplier > xSelectionSupplier;
+ rtl::Reference< ::chart::ChartController > xChartController;
rtl::Reference<::chart::ChartModel> xChartModel;
- Reference< uno::XInterface > xChartView;
+ rtl::Reference<::chart::ChartView> xChartView;
Reference< XAccessible > xParent;
Reference< awt::XWindow > xWindow;
{
MutexGuard aGuard( m_aMutex);
- xSelectionSupplier.set( m_xSelectionSupplier );
+ xChartController = m_xChartController;
xChartModel = m_xChartModel;
- xChartView.set( m_xChartView );
+ xChartView = m_xChartView;
xParent.set( m_xParent );
xWindow.set( m_xWindow );
}
- if( !xSelectionSupplier.is() || !xChartModel.is() || !xChartView.is() )
+ if( !xChartController.is() || !xChartModel.is() || !xChartView.is() )
{
bOldInvalid = true;
}
- if( rArguments.getLength() > 1 )
+ if( xNewChartModel.get() != xChartModel.get() )
{
- Reference< frame::XModel > xNewChartModel;
- rArguments[1] >>= xNewChartModel;
- assert(!xNewChartModel || dynamic_cast<::chart::ChartModel*>(xNewChartModel.get()));
- ::chart::ChartModel* pNewChartModel = dynamic_cast<::chart::ChartModel*>(xNewChartModel.get());
- if( pNewChartModel != xChartModel.get() )
- {
- xChartModel = pNewChartModel;
- bChanged = true;
- }
+ xChartModel = xNewChartModel;
+ bChanged = true;
}
- else if( xChartModel.is() )
+
+ if( xNewChartView != xChartView )
{
+ xChartView = xNewChartView;
bChanged = true;
- xChartModel = nullptr;
}
- if( rArguments.getLength() > 2 )
+ if( xNewParent != xParent )
{
- Reference< uno::XInterface > xNewChartView;
- rArguments[2] >>= xNewChartView;
- if( xNewChartView != xChartView )
- {
- xChartView = xNewChartView;
- bChanged = true;
- }
+ xParent = xNewParent;
+ bChanged = true;
}
- else if( xChartView.is() )
+
+ if( xNewWindow != xWindow )
{
+ xWindow = xNewWindow;
bChanged = true;
- xChartView = nullptr;
}
- if( rArguments.getLength() > 3 )
+ if(xChartController != &rNewChartController)
{
- Reference< XAccessible > xNewParent;
- rArguments[3] >>= xNewParent;
- if( xNewParent != xParent )
- {
- xParent = xNewParent;
- bChanged = true;
- }
+ if (xChartController)
+ xChartController->removeSelectionChangeListener(this);
+ rNewChartController.addSelectionChangeListener(this);
+ xChartController = &rNewChartController;
+ bChanged = true;
}
- if( rArguments.getLength() > 4 )
+ if( !xChartController.is() || !xChartModel.is() || !xChartView.is() )
{
- Reference< awt::XWindow > xNewWindow;
- rArguments[4] >>= xNewWindow;
- if( xNewWindow != xWindow )
+ if(xChartController.is())
{
- xWindow.set( xNewWindow );
- bChanged = true;
+ xChartController->removeSelectionChangeListener(this);
+ xChartController.clear();
}
+ xChartModel.clear();
+ xChartView.clear();
+ xParent.clear();
+ xWindow.clear();
+
+ bNewInvalid = true;
}
- if( rArguments.hasElements() && xChartModel.is() && xChartView.is() )
{
- Reference< view::XSelectionSupplier > xNewSelectionSupplier;
- rArguments[0] >>= xNewSelectionSupplier;
- if(xSelectionSupplier!=xNewSelectionSupplier)
- {
- bChanged = true;
- if(xSelectionSupplier.is())
- xSelectionSupplier->removeSelectionChangeListener(this);
- if(xNewSelectionSupplier.is())
- xNewSelectionSupplier->addSelectionChangeListener(this);
- xSelectionSupplier = xNewSelectionSupplier;
- }
+ MutexGuard aGuard( m_aMutex);
+ m_xChartController = xChartController.get();
+ m_xChartModel = xChartModel.get();
+ m_xChartView = xChartView.get();
+ m_xParent = xParent;
+ m_xWindow = xWindow;
+ }
+
+ if( bOldInvalid && bNewInvalid )
+ bChanged = false;
+
+ if( !bChanged )
+ return;
+
+ {
+ //before notification we prepare for creation of new context
+ //the old context will be deleted after notification than
+ MutexGuard aGuard( m_aMutex);
+ if( xChartModel.is())
+ m_spObjectHierarchy =
+ std::make_shared<ObjectHierarchy>( xChartModel, m_xChartView.get().get() );
+ else
+ m_spObjectHierarchy.reset();
}
- else if( xSelectionSupplier.is() )
+
+ {
+ AccessibleElementInfo aAccInfo;
+ aAccInfo.m_aOID = ObjectIdentifier("ROOT");
+ aAccInfo.m_xChartDocument = m_xChartModel;
+ aAccInfo.m_xChartController = m_xChartController;
+ aAccInfo.m_xView = m_xChartView;
+ aAccInfo.m_xWindow = m_xWindow;
+ aAccInfo.m_pParent = nullptr;
+ aAccInfo.m_spObjectHierarchy = m_spObjectHierarchy;
+ aAccInfo.m_pSdrView = m_pSdrView;
+ VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( m_xWindow );
+ m_pViewForwarder.reset( new AccessibleViewForwarder( this, pWindow ) );
+ aAccInfo.m_pViewForwarder = m_pViewForwarder.get();
+ // broadcasts an INVALIDATE_ALL_CHILDREN event globally
+ SetInfo( aAccInfo );
+ }
+}
+
+void AccessibleChartView::initialize()
+{
+ //0: view::XSelectionSupplier offers notifications for selection changes and access to the selection itself
+ //1: frame::XModel representing the chart model - offers access to object data
+ //2: lang::XInterface representing the normal chart view - offers access to some extra object data
+
+ //all arguments are only valid until next initialization
+ bool bChanged = false;
+ bool bOldInvalid = false;
+
+ rtl::Reference< ::chart::ChartController > xChartController;
+ rtl::Reference<::chart::ChartModel> xChartModel;
+ rtl::Reference<::chart::ChartView> xChartView;
+ Reference< XAccessible > xParent;
+ Reference< awt::XWindow > xWindow;
+ {
+ MutexGuard aGuard( m_aMutex);
+ xChartController = m_xChartController;
+ xChartModel = m_xChartModel;
+ xChartView = m_xChartView;
+ xParent.set( m_xParent );
+ xWindow.set( m_xWindow );
+ }
+
+ if( !xChartController.is() || !xChartModel.is() || !xChartView.is() )
+ {
+ bOldInvalid = true;
+ }
+
+ if( xChartModel.is() )
{
bChanged = true;
- xSelectionSupplier->removeSelectionChangeListener(this);
- xSelectionSupplier = nullptr;
+ xChartModel = nullptr;
}
- if( !xSelectionSupplier.is() || !xChartModel.is() || !xChartView.is() )
+ if( xChartView.is() )
{
- if(xSelectionSupplier.is())
- xSelectionSupplier->removeSelectionChangeListener(this);
- xSelectionSupplier = nullptr;
- xChartModel.clear();
- xChartView.clear();
- xParent.clear();
- xWindow.clear();
+ bChanged = true;
+ xChartView = nullptr;
+ }
- bNewInvalid = true;
+ if( xChartController.is() )
+ {
+ bChanged = true;
+ xChartController->removeSelectionChangeListener(this);
+ xChartController = nullptr;
}
+ xParent.clear();
+ xWindow.clear();
+
{
MutexGuard aGuard( m_aMutex);
- m_xSelectionSupplier = WeakReference< view::XSelectionSupplier >(xSelectionSupplier);
+ m_xChartController = xChartController.get();
m_xChartModel = xChartModel.get();
- m_xChartView = WeakReference< uno::XInterface >(xChartView);
+ m_xChartView = xChartView.get();
m_xParent = WeakReference< XAccessible >(xParent);
m_xWindow = WeakReference< awt::XWindow >(xWindow);
}
- if( bOldInvalid && bNewInvalid )
+ if( bOldInvalid )
bChanged = false;
if( !bChanged )
@@ -301,7 +354,7 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments
MutexGuard aGuard( m_aMutex);
if( xChartModel.is())
m_spObjectHierarchy =
- std::make_shared<ObjectHierarchy>( xChartModel, comphelper::getFromUnoTunnel<ExplicitValueProvider>(m_xChartView) );
+ std::make_shared<ObjectHierarchy>( xChartModel, m_xChartView.get().get() );
else
m_spObjectHierarchy.reset();
}
@@ -310,7 +363,7 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments
AccessibleElementInfo aAccInfo;
aAccInfo.m_aOID = ObjectIdentifier("ROOT");
aAccInfo.m_xChartDocument = m_xChartModel;
- aAccInfo.m_xSelectionSupplier = m_xSelectionSupplier;
+ aAccInfo.m_xChartController = m_xChartController;
aAccInfo.m_xView = m_xChartView;
aAccInfo.m_xWindow = m_xWindow;
aAccInfo.m_pParent = nullptr;
@@ -328,16 +381,16 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments
void SAL_CALL AccessibleChartView::selectionChanged( const lang::EventObject& /*rEvent*/ )
{
- Reference< view::XSelectionSupplier > xSelectionSupplier;
+ rtl::Reference< ::chart::ChartController > xChartController;
{
MutexGuard aGuard( m_aMutex);
- xSelectionSupplier.set(m_xSelectionSupplier);
+ xChartController = m_xChartController.get();
}
- if( !xSelectionSupplier.is() )
+ if( !xChartController.is() )
return;
- ObjectIdentifier aSelectedOID( xSelectionSupplier->getSelection() );
+ ObjectIdentifier aSelectedOID( xChartController->getSelection() );
if ( m_aCurrentSelectionOID.isValid() )
{
NotifyEvent( EventType::LOST_SELECTION, m_aCurrentSelectionOID );
diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
index 2a58d9484f17..6fc26b1c82ad 100644
--- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
+++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
@@ -53,19 +53,10 @@ AccessibleTextHelper::~AccessibleTextHelper()
{
}
-// ____ XInitialization ____
-void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArguments )
+void AccessibleTextHelper::initialize( const OUString& aCID,
+ const Reference< XAccessible >& xEventSource,
+ const Reference< awt::XWindow >& xWindow )
{
- OUString aCID;
- Reference< XAccessible > xEventSource;
- Reference< awt::XWindow > xWindow;
-
- if( aArguments.getLength() >= 3 )
- {
- aArguments[0] >>= aCID;
- aArguments[1] >>= xEventSource;
- aArguments[2] >>= xWindow;
- }
OSL_ENSURE( !aCID.isEmpty(), "Empty CID" );
OSL_ENSURE( xEventSource.is(), "Empty Event Source" );
OSL_ENSURE( xWindow.is(), "Empty Window" );
@@ -74,7 +65,7 @@ void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArg
SolarMutexGuard aSolarGuard;
- m_pTextHelper.reset();
+ m_oTextHelper.reset();
VclPtr<vcl::Window> pWindow( VCLUnoHelper::GetWindow( xWindow ));
if( pWindow )
@@ -85,32 +76,32 @@ void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArg
SdrObject * pTextObj = m_pDrawViewWrapper->getNamedSdrObject( aCID );
if( pTextObj )
{
- m_pTextHelper.reset( new ::accessibility::AccessibleTextHelper(std::make_unique<SvxTextEditSource>(*pTextObj, nullptr, *pView, *pWindow->GetOutDev())) );
- m_pTextHelper->SetEventSource( xEventSource );
+ m_oTextHelper.emplace( std::make_unique<SvxTextEditSource>(*pTextObj, nullptr, *pView, *pWindow->GetOutDev()) );
+ m_oTextHelper->SetEventSource( xEventSource );
}
}
}
- OSL_ENSURE( m_pTextHelper, "Couldn't create text helper" );
+ OSL_ENSURE( m_oTextHelper, "Couldn't create text helper" );
}
// ____ XAccessibleContext ____
-::sal_Int32 SAL_CALL AccessibleTextHelper::getAccessibleChildCount()
+sal_Int64 SAL_CALL AccessibleTextHelper::getAccessibleChildCount()
{
- if( m_pTextHelper )
+ if( m_oTextHelper )
{
SolarMutexGuard aSolarGuard;
- return m_pTextHelper->GetChildCount();
+ return m_oTextHelper->GetChildCount();
}
return 0;
}
-Reference< XAccessible > SAL_CALL AccessibleTextHelper::getAccessibleChild( ::sal_Int32 i )
+Reference< XAccessible > SAL_CALL AccessibleTextHelper::getAccessibleChild( sal_Int64 i )
{
- if( m_pTextHelper )
+ if( m_oTextHelper )
{
SolarMutexGuard aSolarGuard;
- return m_pTextHelper->GetChild( i );
+ return m_oTextHelper->GetChild( i );
}
return Reference< XAccessible >();
}
@@ -121,7 +112,7 @@ Reference< XAccessible > SAL_CALL AccessibleTextHelper::getAccessibleParent()
return Reference< XAccessible >();
}
-::sal_Int32 SAL_CALL AccessibleTextHelper::getAccessibleIndexInParent()
+sal_Int64 SAL_CALL AccessibleTextHelper::getAccessibleIndexInParent()
{
OSL_FAIL( "Not implemented in this helper" );
return -1;
@@ -151,10 +142,10 @@ Reference< XAccessibleRelationSet > SAL_CALL AccessibleTextHelper::getAccessible
return Reference< XAccessibleRelationSet >();
}
-Reference< XAccessibleStateSet > SAL_CALL AccessibleTextHelper::getAccessibleStateSet()
+sal_Int64 SAL_CALL AccessibleTextHelper::getAccessibleStateSet()
{
OSL_FAIL( "Not implemented in this helper" );
- return Reference< XAccessibleStateSet >();
+ return 0;
}
lang::Locale SAL_CALL AccessibleTextHelper::getLocale()
diff --git a/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx b/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
index 31395f1181dc..dbd8ac0d51f2 100644
--- a/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
+++ b/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
@@ -45,9 +45,9 @@ tools::Rectangle AccessibleViewForwarder::GetVisibleArea() const
tools::Rectangle aVisibleArea;
if ( m_pWindow )
{
- aVisibleArea.SetPos( Point( 0, 0 ) );
- aVisibleArea.SetSize( m_pWindow->GetOutputSizePixel() );
- aVisibleArea = m_pWindow->PixelToLogic( aVisibleArea, m_aMapMode );
+ aVisibleArea = m_pWindow->PixelToLogic(
+ tools::Rectangle( Point( 0, 0 ), m_pWindow->GetOutputSizePixel() ),
+ m_aMapMode );
}
return aVisibleArea;
}
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
index 7cbef7d67e2c..995a0f92cf4d 100644
--- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
@@ -20,7 +20,6 @@
#include "AreaWrapper.hxx"
#include "Chart2ModelContact.hxx"
#include <WrappedDirectStateProperty.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -29,51 +28,18 @@
#include <UserDefinedProperties.hxx>
#include <algorithm>
+#include <utility>
using namespace ::com::sun::star;
using ::com::sun::star::beans::Property;
-using ::osl::MutexGuard;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-namespace
-{
-
-struct StaticAreaWrapperPropertyArray_Initializer
-{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
- return &aPropSeq;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::FillProperties::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-};
-
-struct StaticAreaWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticAreaWrapperPropertyArray_Initializer >
-{
-};
-
-} // anonymous namespace
-
namespace chart::wrapper
{
-AreaWrapper::AreaWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
- : m_spChart2ModelContact(spChart2ModelContact)
- , m_aEventListenerContainer(m_aMutex)
+AreaWrapper::AreaWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
+ : m_spChart2ModelContact(std::move(spChart2ModelContact))
{
}
@@ -110,23 +76,25 @@ OUString SAL_CALL AreaWrapper::getShapeType()
// ____ XComponent ____
void SAL_CALL AreaWrapper::dispose()
{
+ std::unique_lock g(m_aMutex);
Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
+ m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( xSource ) );
- MutexGuard aGuard( m_aMutex);
clearWrappedPropertySet();
}
void SAL_CALL AreaWrapper::addEventListener(
const Reference< lang::XEventListener >& xListener )
{
- m_aEventListenerContainer.addInterface( xListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, xListener );
}
void SAL_CALL AreaWrapper::removeEventListener(
const Reference< lang::XEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
// WrappedPropertySet
@@ -141,7 +109,19 @@ Reference< beans::XPropertySet > AreaWrapper::getInnerPropertySet()
const Sequence< beans::Property >& AreaWrapper::getPropertySequence()
{
- return *StaticAreaWrapperPropertyArray::get();
+ static Sequence< Property > aPropSeq = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::FillProperties::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropSeq;
}
std::vector< std::unique_ptr<WrappedProperty> > AreaWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx
index 3de57f421313..c150d5bbfcef 100644
--- a/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx
@@ -20,7 +20,7 @@
#include <WrappedPropertySet.hxx>
#include <cppuhelper/implbase.hxx>
-#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -40,7 +40,7 @@ class AreaWrapper : public ::cppu::ImplInheritanceHelper<
>
{
public:
- explicit AreaWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit AreaWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual ~AreaWrapper() override;
/// XServiceInfo declarations
@@ -72,7 +72,7 @@ protected:
private:
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
- ::comphelper::OInterfaceContainerHelper3<css::lang::XEventListener> m_aEventListenerContainer;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer;
};
} // namespace chart::wrapper
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
index db3e413ba919..ea50320e506e 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
@@ -18,6 +18,7 @@
*/
#include "AxisWrapper.hxx"
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <TitleHelper.hxx>
#include "Chart2ModelContact.hxx"
@@ -35,8 +36,6 @@
#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
#include <com/sun/star/chart/ChartAxisMarkPosition.hpp>
#include <com/sun/star/chart2/XAxis.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
-#include <com/sun/star/frame/XModel.hpp>
#include <CharacterProperties.hxx>
#include <LinePropertiesHelper.hxx>
@@ -49,7 +48,8 @@
#include "WrappedScaleTextProperties.hxx"
#include <algorithm>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
@@ -335,33 +335,23 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEVOID );
}
-struct StaticAxisWrapperPropertyArray_Initializer
-{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
- return &aPropSeq;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
- ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-};
-
-struct StaticAxisWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticAxisWrapperPropertyArray_Initializer >
+const Sequence< Property >& StaticAxisWrapperPropertyArray()
{
+ static Sequence< Property > aPropSeq = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
+ ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+ ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties );
+
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropSeq;
};
} // anonymous namespace
@@ -370,9 +360,8 @@ namespace chart::wrapper
{
AxisWrapper::AxisWrapper(
- tAxisType eType, const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact) :
- m_spChart2ModelContact( spChart2ModelContact ),
- m_aEventListenerContainer( m_aMutex ),
+ tAxisType eType, std::shared_ptr<Chart2ModelContact> spChart2ModelContact) :
+ m_spChart2ModelContact(std::move( spChart2ModelContact )),
m_eType( eType )
{
}
@@ -526,8 +515,9 @@ void AxisWrapper::getDimensionAndMainAxisBool( tAxisType eType, sal_Int32& rnDim
// ____ XComponent ____
void SAL_CALL AxisWrapper::dispose()
{
+ std::unique_lock g(m_aMutex);
Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
+ m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( xSource ) );
DisposeHelper::DisposeAndClear( m_xAxisTitle );
DisposeHelper::DisposeAndClear( m_xMajorGrid );
@@ -539,13 +529,15 @@ void SAL_CALL AxisWrapper::dispose()
void SAL_CALL AxisWrapper::addEventListener(
const Reference< lang::XEventListener >& xListener )
{
- m_aEventListenerContainer.addInterface( xListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, xListener );
}
void SAL_CALL AxisWrapper::removeEventListener(
const Reference< lang::XEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
//ReferenceSizePropertyProvider
@@ -574,7 +566,7 @@ awt::Size AxisWrapper::getCurrentSizeForReference()
Reference< chart2::XAxis > AxisWrapper::getAxis()
{
- Reference< chart2::XAxis > xAxis;
+ rtl::Reference< Axis > xAxis;
try
{
sal_Int32 nDimensionIndex = 0;
@@ -586,9 +578,8 @@ Reference< chart2::XAxis > AxisWrapper::getAxis()
if( !xAxis.is() )
{
xAxis = AxisHelper::createAxis( nDimensionIndex, bMainAxis, xDiagram, m_spChart2ModelContact->m_xContext );
- Reference< beans::XPropertySet > xProp( xAxis, uno::UNO_QUERY );
- if( xProp.is() )
- xProp->setPropertyValue("Show", uno::Any( false ) );
+ if( xAxis.is() )
+ xAxis->setPropertyValue("Show", uno::Any( false ) );
}
}
catch( const uno::Exception & )
@@ -606,7 +597,7 @@ Reference< beans::XPropertySet > AxisWrapper::getInnerPropertySet()
const Sequence< beans::Property >& AxisWrapper::getPropertySequence()
{
- return *StaticAxisWrapperPropertyArray::get();
+ return StaticAxisWrapperPropertyArray();
}
std::vector< std::unique_ptr<WrappedProperty> > AxisWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx
index b421ab331ab6..e70c85b23ff8 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx
@@ -21,7 +21,7 @@
#include <WrappedPropertySet.hxx>
#include "ReferenceSizePropertyProvider.hxx"
#include <cppuhelper/implbase.hxx>
-#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include <com/sun/star/chart/XAxis.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/lang/XComponent.hpp>
@@ -56,7 +56,7 @@ public:
SECOND_Y_AXIS
};
- AxisWrapper(tAxisType eType, const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ AxisWrapper(tAxisType eType, std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual ~AxisWrapper() override;
static void getDimensionAndMainAxisBool( tAxisType eType, sal_Int32& rnDimensionIndex, bool& rbMainAxis );
@@ -109,7 +109,7 @@ private: //methods
private: //member
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
- ::comphelper::OInterfaceContainerHelper3<css::lang::XEventListener> m_aEventListenerContainer;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer;
tAxisType m_eType;
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index aefdc29b1dce..ba286cc62623 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -19,12 +19,14 @@
#include "Chart2ModelContact.hxx"
#include <ChartModelHelper.hxx>
+#include <Legend.hxx>
#include <LegendHelper.hxx>
#include <CommonConverters.hxx>
#include <servicenames.hxx>
#include <ObjectIdentifier.hxx>
#include <chartview/ExplicitValueProvider.hxx>
#include <chartview/DrawModelWrapper.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <ChartView.hxx>
#include <DiagramHelper.hxx>
@@ -32,8 +34,8 @@
#include <ChartModel.hxx>
-#include <comphelper/servicehelper.hxx>
-#include <tools/diagnose_ex.h>
+#include <com/sun/star/chart2/XDataSeries.hpp>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
@@ -62,16 +64,11 @@ void Chart2ModelContact::setDocumentModel( ChartModel* pChartModel )
if( !pChartModel )
return;
- uno::Reference< container::XNameContainer > xDashTable( pChartModel->createInstance("com.sun.star.drawing.DashTable"), uno::UNO_QUERY );
- uno::Reference< container::XNameContainer > xGradientTable( pChartModel->createInstance("com.sun.star.drawing.GradientTable"), uno::UNO_QUERY );
- uno::Reference< container::XNameContainer > xHatchTable( pChartModel->createInstance("com.sun.star.drawing.HatchTable"), uno::UNO_QUERY );
- uno::Reference< container::XNameContainer > xBitmapTable( pChartModel->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY );
- uno::Reference< container::XNameContainer > xTransparencyGradientTable( pChartModel->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY );
- m_aTableMap["LineDashName"] = xDashTable;
- m_aTableMap["FillGradientName"] = xGradientTable;
- m_aTableMap["FillHatchName"] = xHatchTable;
- m_aTableMap["FillBitmapName"] = xBitmapTable;
- m_aTableMap["FillTransparenceGradientName"] = xTransparencyGradientTable;
+ m_aTableMap["LineDashName"].set(pChartModel->createInstance("com.sun.star.drawing.DashTable"), uno::UNO_QUERY);
+ m_aTableMap["FillGradientName"].set(pChartModel->createInstance("com.sun.star.drawing.GradientTable"), uno::UNO_QUERY);
+ m_aTableMap["FillHatchName"].set(pChartModel->createInstance("com.sun.star.drawing.HatchTable"), uno::UNO_QUERY);
+ m_aTableMap["FillBitmapName"].set(pChartModel->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY);
+ m_aTableMap["FillTransparenceGradientName"].set(pChartModel->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY);
}
void Chart2ModelContact::clear()
@@ -137,7 +134,7 @@ rtl::Reference<SvxDrawPage> Chart2ModelContact::getDrawPage() const
}
void Chart2ModelContact::getExplicitValuesForAxis(
- const Reference< XAxis > & xAxis,
+ const rtl::Reference< Axis > & xAxis,
ExplicitScaleData & rOutExplicitScale,
ExplicitIncrementData & rOutExplicitIncrement )
{
@@ -150,11 +147,11 @@ void Chart2ModelContact::getExplicitValuesForAxis(
}
sal_Int32 Chart2ModelContact::getExplicitNumberFormatKeyForAxis(
- const Reference< chart2::XAxis >& xAxis )
+ const rtl::Reference< ::chart::Axis >& xAxis )
{
- Reference< chart2::XCoordinateSystem > xCooSys(
+ rtl::Reference< BaseCoordinateSystem > xCooSys(
AxisHelper::getCoordinateSystemOfAxis(
- xAxis, ChartModelHelper::findDiagram( m_xChartModel ) ) );
+ xAxis, m_xChartModel.get()->getFirstChartDiagram() ) );
return ExplicitValueProvider::getExplicitNumberFormatKeyForAxis( xAxis, xCooSys
, m_xChartModel.get() );
@@ -193,9 +190,9 @@ awt::Rectangle Chart2ModelContact::GetDiagramRectangleIncludingTitle() const
awt::Rectangle Chart2ModelContact::GetDiagramRectangleIncludingAxes() const
{
awt::Rectangle aRect(0,0,0,0);
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( m_xChartModel );
+ rtl::Reference< Diagram > xDiagram = m_xChartModel.get()->getFirstChartDiagram();
- if( DiagramHelper::getDiagramPositioningMode( xDiagram ) == DiagramPositioningMode_INCLUDING )
+ if( xDiagram && xDiagram->getDiagramPositioningMode() == DiagramPositioningMode::Including )
aRect = DiagramHelper::getDiagramRectangleFromModel(m_xChartModel.get());
else
{
@@ -209,9 +206,9 @@ awt::Rectangle Chart2ModelContact::GetDiagramRectangleIncludingAxes() const
awt::Rectangle Chart2ModelContact::GetDiagramRectangleExcludingAxes() const
{
awt::Rectangle aRect(0,0,0,0);
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( m_xChartModel );
+ rtl::Reference< Diagram > xDiagram = m_xChartModel.get()->getFirstChartDiagram();
- if( DiagramHelper::getDiagramPositioningMode( xDiagram ) == DiagramPositioningMode_EXCLUDING )
+ if( xDiagram && xDiagram->getDiagramPositioningMode() == DiagramPositioningMode::Excluding )
aRect = DiagramHelper::getDiagramRectangleFromModel(m_xChartModel.get());
else
{
@@ -228,8 +225,8 @@ awt::Size Chart2ModelContact::GetLegendSize() const
ExplicitValueProvider* pProvider( getExplicitValueProvider() );
if( pProvider )
{
- uno::Reference< chart2::XLegend > xLegend( LegendHelper::getLegend( *m_xChartModel.get() ) );
- OUString aCID( ObjectIdentifier::createClassifiedIdentifierForObject( xLegend, m_xChartModel.get() ) );
+ rtl::Reference< Legend > xLegend = LegendHelper::getLegend( *m_xChartModel.get() );
+ OUString aCID( ObjectIdentifier::createClassifiedIdentifierForObject( xLegend, m_xChartModel ) );
aSize = ToSize( pProvider->getRectangleOfObject( aCID ) );
}
return aSize;
@@ -241,8 +238,8 @@ awt::Point Chart2ModelContact::GetLegendPosition() const
ExplicitValueProvider* pProvider( getExplicitValueProvider() );
if( pProvider )
{
- uno::Reference< chart2::XLegend > xLegend( LegendHelper::getLegend( *m_xChartModel.get() ) );
- OUString aCID( ObjectIdentifier::createClassifiedIdentifierForObject( xLegend, m_xChartModel.get() ) );
+ rtl::Reference< Legend > xLegend = LegendHelper::getLegend( *m_xChartModel.get() );
+ OUString aCID( ObjectIdentifier::createClassifiedIdentifierForObject( xLegend, m_xChartModel ) );
aPoint = ToPoint( pProvider->getRectangleOfObject( aCID ) );
}
return aPoint;
@@ -254,7 +251,7 @@ awt::Size Chart2ModelContact::GetTitleSize( const uno::Reference< css::chart2::X
ExplicitValueProvider* pProvider( getExplicitValueProvider() );
if( pProvider && xTitle.is() )
{
- OUString aCID( ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, m_xChartModel.get() ) );
+ OUString aCID( ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, m_xChartModel ) );
aSize = ToSize( pProvider->getRectangleOfObject( aCID ) );
}
return aSize;
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
index 837c09341fd3..261f2686240a 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
@@ -18,7 +18,6 @@
*/
#pragma once
-#include <cppuhelper/weakref.hxx>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
@@ -71,12 +70,12 @@ public:
case properties are 'auto'.
*/
void getExplicitValuesForAxis(
- const css::uno::Reference< css::chart2::XAxis > & xAxis,
+ const rtl::Reference< ::chart::Axis > & xAxis,
ExplicitScaleData & rOutExplicitScale,
ExplicitIncrementData & rOutExplicitIncrement );
sal_Int32 getExplicitNumberFormatKeyForAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis );
+ const rtl::Reference< ::chart::Axis >& xAxis );
static sal_Int32 getExplicitNumberFormatKeyForSeries(
const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index 3b0a56818e77..7988ef90df94 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -25,12 +25,12 @@
#include <ControllerLockGuard.hxx>
#include "Chart2ModelContact.hxx"
#include <cppuhelper/supportsservice.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart/XChartDocument.hpp>
#include <float.h>
#include <cmath>
#include <limits>
+#include <utility>
#include <osl/diagnose.h>
using namespace ::com::sun::star;
@@ -121,6 +121,11 @@ struct lcl_AllOperator : public lcl_Operator
virtual bool setsCategories( bool /*bDataInColumns*/ ) override
{
+ // Do not force creation of categories, when original has no categories
+ if (auto pDataWrapper = dynamic_cast<const ChartDataWrapper*>(m_xDataToApply.get()))
+ if (auto xChartModel = pDataWrapper->getChartModel())
+ if (auto xDiagram = xChartModel->getFirstChartDiagram())
+ return xDiagram->getCategories().is();
return true;
}
@@ -177,9 +182,9 @@ struct lcl_DataOperator : public lcl_Operator
struct lcl_RowDescriptionsOperator : public lcl_Operator
{
lcl_RowDescriptionsOperator( const Sequence< OUString >& rRowDescriptions
- , const rtl::Reference<::chart::ChartModel>& xChartDoc )
+ , rtl::Reference<::chart::ChartModel> xChartDoc )
: m_rRowDescriptions( rRowDescriptions )
- , m_xChartDoc(xChartDoc)
+ , m_xChartDoc(std::move(xChartDoc))
, m_bDataInColumns(true)
{
}
@@ -208,9 +213,9 @@ struct lcl_RowDescriptionsOperator : public lcl_Operator
struct lcl_ComplexRowDescriptionsOperator : public lcl_Operator
{
lcl_ComplexRowDescriptionsOperator( const Sequence< Sequence< OUString > >& rComplexRowDescriptions
- , const rtl::Reference<::chart::ChartModel>& xChartDoc )
+ , rtl::Reference<::chart::ChartModel> xChartDoc )
: m_rComplexRowDescriptions( rComplexRowDescriptions )
- , m_xChartDoc(xChartDoc)
+ , m_xChartDoc(std::move(xChartDoc))
, m_bDataInColumns(true)
{
}
@@ -260,9 +265,9 @@ struct lcl_AnyRowDescriptionsOperator : public lcl_Operator
struct lcl_ColumnDescriptionsOperator : public lcl_Operator
{
lcl_ColumnDescriptionsOperator( const Sequence< OUString >& rColumnDescriptions
- , const rtl::Reference<::chart::ChartModel>& xChartDoc )
+ , rtl::Reference<::chart::ChartModel> xChartDoc )
: m_rColumnDescriptions( rColumnDescriptions )
- , m_xChartDoc(xChartDoc)
+ , m_xChartDoc(std::move(xChartDoc))
, m_bDataInColumns(true)
{
}
@@ -291,9 +296,9 @@ struct lcl_ColumnDescriptionsOperator : public lcl_Operator
struct lcl_ComplexColumnDescriptionsOperator : public lcl_Operator
{
lcl_ComplexColumnDescriptionsOperator( const Sequence< Sequence< OUString > >& rComplexColumnDescriptions
- , const rtl::Reference<::chart::ChartModel>& xChartDoc )
+ , rtl::Reference<::chart::ChartModel> xChartDoc )
: m_rComplexColumnDescriptions( rComplexColumnDescriptions )
- , m_xChartDoc(xChartDoc)
+ , m_xChartDoc(std::move(xChartDoc))
, m_bDataInColumns(true)
{
}
@@ -364,19 +369,17 @@ struct lcl_DateCategoriesOperator : public lcl_Operator
}
-ChartDataWrapper::ChartDataWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
- : m_spChart2ModelContact(spChart2ModelContact)
- , m_aEventListenerContainer(m_aMutex)
+ChartDataWrapper::ChartDataWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
+ : m_spChart2ModelContact(std::move(spChart2ModelContact))
{
osl_atomic_increment( &m_refCount );
initDataAccess();
osl_atomic_decrement( &m_refCount );
}
-ChartDataWrapper::ChartDataWrapper( const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact,
+ChartDataWrapper::ChartDataWrapper( std::shared_ptr<Chart2ModelContact> spChart2ModelContact,
const Reference< XChartData >& xNewData ) :
- m_spChart2ModelContact( spChart2ModelContact ),
- m_aEventListenerContainer( m_aMutex )
+ m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
osl_atomic_increment( &m_refCount );
lcl_AllOperator aOperator( xNewData );
@@ -513,13 +516,15 @@ void SAL_CALL ChartDataWrapper::setDateCategories( const Sequence< double >& rDa
void SAL_CALL ChartDataWrapper::addChartDataChangeEventListener(
const uno::Reference< css::chart::XChartDataChangeEventListener >& aListener )
{
- m_aEventListenerContainer.addInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, aListener );
}
void SAL_CALL ChartDataWrapper::removeChartDataChangeEventListener(
const uno::Reference< css::chart::XChartDataChangeEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
double SAL_CALL ChartDataWrapper::getNotANumber()
@@ -537,20 +542,23 @@ sal_Bool SAL_CALL ChartDataWrapper::isNotANumber( double nNumber )
// ____ XComponent ____
void SAL_CALL ChartDataWrapper::dispose()
{
- m_aEventListenerContainer.disposeAndClear( lang::EventObject( static_cast< ::cppu::OWeakObject* >( this )));
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( static_cast< ::cppu::OWeakObject* >( this )));
m_xDataAccess=nullptr;
}
void SAL_CALL ChartDataWrapper::addEventListener(
const uno::Reference< lang::XEventListener > & xListener )
{
- m_aEventListenerContainer.addInterface( xListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, xListener );
}
void SAL_CALL ChartDataWrapper::removeEventListener(
const uno::Reference< lang::XEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
// ____ XEventListener ____
@@ -560,7 +568,8 @@ void SAL_CALL ChartDataWrapper::disposing( const lang::EventObject& /* Source */
void ChartDataWrapper::fireChartDataChangeEvent( css::chart::ChartDataChangeEvent& aEvent )
{
- if( ! m_aEventListenerContainer.getLength() )
+ std::unique_lock g(m_aMutex);
+ if( ! m_aEventListenerContainer.getLength(g) )
return;
uno::Reference< uno::XInterface > xSrc( static_cast< cppu::OWeakObject* >( this ));
@@ -568,7 +577,13 @@ void ChartDataWrapper::fireChartDataChangeEvent( css::chart::ChartDataChangeEven
if( xSrc.is() )
aEvent.Source = xSrc;
- m_aEventListenerContainer.notifyEach( &css::chart::XChartDataChangeEventListener::chartDataChanged, aEvent );
+ m_aEventListenerContainer.forEach( g,
+ [&aEvent](const uno::Reference<css::lang::XEventListener>& l)
+ {
+ uno::Reference<css::chart::XChartDataChangeEventListener> cl(l, uno::UNO_QUERY);
+ if (cl)
+ cl->chartDataChanged(aEvent);
+ });
}
void ChartDataWrapper::switchToInternalDataProvider()
@@ -647,7 +662,7 @@ void ChartDataWrapper::applyData( lcl_Operator& rDataOperator )
return;
uno::Reference< chart2::data::XDataSource > xSource( xDataProvider->createDataSource( aArguments ) );
- uno::Reference< chart2::XDiagram > xDia( xChartDoc->getFirstDiagram() );
+ rtl::Reference< Diagram > xDia( xChartDoc->getFirstChartDiagram() );
if( xDia.is() )
xDia->setDiagramData( xSource, aArguments );
@@ -659,7 +674,7 @@ void ChartDataWrapper::applyData( lcl_Operator& rDataOperator )
eStackMode = StackMode::ZStacked;
else if( bPercent )
eStackMode = StackMode::YStackedPercent;
- DiagramHelper::setStackMode( xDia, eStackMode );
+ xDia->setStackMode( eStackMode );
}
// notify listeners
@@ -688,6 +703,11 @@ css::uno::Sequence< OUString > SAL_CALL ChartDataWrapper::getSupportedServiceNam
};
}
+rtl::Reference<ChartModel> ChartDataWrapper::getChartModel() const
+{
+ return m_spChart2ModelContact->getDocumentModel();
+}
+
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx
index dcf7c50ade36..9a44e53b8b12 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx
@@ -18,9 +18,10 @@
*/
#pragma once
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer4.hxx>
+#include <rtl/ref.hxx>
+
#include <com/sun/star/chart2/XAnyDescriptionAccess.hpp>
#include <com/sun/star/chart/XDateCategories.hpp>
#include <com/sun/star/lang/XComponent.hpp>
@@ -29,13 +30,17 @@
#include <memory>
-namespace chart::wrapper
+namespace chart
+{
+class ChartModel;
+
+namespace wrapper
{
class Chart2ModelContact;
struct lcl_Operator;
-class ChartDataWrapper final : public cppu::BaseMutex, public
+class ChartDataWrapper final : public
::cppu::WeakImplHelper<
css::chart2::XAnyDescriptionAccess,
css::chart::XDateCategories,
@@ -44,8 +49,8 @@ class ChartDataWrapper final : public cppu::BaseMutex, public
css::lang::XComponent >
{
public:
- explicit ChartDataWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
- ChartDataWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact
+ explicit ChartDataWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
+ ChartDataWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact
, const css::uno::Reference< css::chart::XChartData >& xNewData );
virtual ~ChartDataWrapper() override;
@@ -54,6 +59,8 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+ rtl::Reference<ChartModel> getChartModel() const;
+
private:
// ____ XDateCategories ____
virtual css::uno::Sequence< double > SAL_CALL getDateCategories() override;
@@ -107,12 +114,13 @@ private:
void initDataAccess();
void applyData( lcl_Operator& rDataOperator );
+ std::mutex m_aMutex;
css::uno::Reference< css::chart2::XAnyDescriptionAccess > m_xDataAccess;
-
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
- ::comphelper::OInterfaceContainerHelper2 m_aEventListenerContainer;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer;
};
} // namespace chart::wrapper
+} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index e75bd16e8e24..51c803a1db0c 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -19,11 +19,13 @@
#include <ChartDocumentWrapper.hxx>
#include <ChartView.hxx>
+#include <ChartViewHelper.hxx>
#include <ChartTypeManager.hxx>
#include <ChartTypeTemplate.hxx>
#include <servicenames.hxx>
#include <PropertyHelper.hxx>
#include <TitleHelper.hxx>
+#include <Legend.hxx>
#include <LegendHelper.hxx>
#include <ControllerLockGuard.hxx>
#include <DisposeHelper.hxx>
@@ -35,9 +37,7 @@
#include <ChartModel.hxx>
-#include <DiagramHelper.hxx>
#include <DataSourceHelper.hxx>
-#include <ChartModelHelper.hxx>
#include <AxisHelper.hxx>
#include <ThreeDHelper.hxx>
@@ -51,7 +51,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
-#include <comphelper/servicehelper.hxx>
+#include <utility>
#include <vcl/settings.hxx>
#include <com/sun/star/drawing/ShapeCollection.hpp>
@@ -59,9 +59,8 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/util/XRefreshable.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
-#include <vector>
#include <algorithm>
#include <map>
@@ -220,30 +219,20 @@ void lcl_AddPropertiesToVector(
beans::PropertyAttribute::MAYBEDEFAULT );
}
-struct StaticChartDocumentWrapperPropertyArray_Initializer
+const Sequence< Property > & StaticChartDocumentWrapperPropertyArray()
{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
- return &aPropSeq;
- }
-
-private:
- static uno::Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
+ static Sequence< Property > aPropSeq = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
- return comphelper::containerToSequence( aProperties );
- }
-};
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticChartDocumentWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticChartDocumentWrapperPropertyArray_Initializer >
-{
-};
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropSeq;
+}
} // anonymous namespace
@@ -256,7 +245,7 @@ namespace {
class WrappedDataSourceLabelsInFirstRowProperty : public WrappedProperty
{
public:
- explicit WrappedDataSourceLabelsInFirstRowProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedDataSourceLabelsInFirstRowProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -271,9 +260,9 @@ private: //member
}
-WrappedDataSourceLabelsInFirstRowProperty::WrappedDataSourceLabelsInFirstRowProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedDataSourceLabelsInFirstRowProperty::WrappedDataSourceLabelsInFirstRowProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty("DataSourceLabelsInFirstRow",OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
m_aOuterValue = WrappedDataSourceLabelsInFirstRowProperty::getPropertyDefault( nullptr );
}
@@ -346,7 +335,7 @@ namespace {
class WrappedDataSourceLabelsInFirstColumnProperty : public WrappedProperty
{
public:
- explicit WrappedDataSourceLabelsInFirstColumnProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedDataSourceLabelsInFirstColumnProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -361,9 +350,9 @@ private: //member
}
-WrappedDataSourceLabelsInFirstColumnProperty::WrappedDataSourceLabelsInFirstColumnProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedDataSourceLabelsInFirstColumnProperty::WrappedDataSourceLabelsInFirstColumnProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty("DataSourceLabelsInFirstColumn",OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
m_aOuterValue = WrappedDataSourceLabelsInFirstColumnProperty::getPropertyDefault( nullptr );
}
@@ -436,7 +425,7 @@ namespace {
class WrappedHasLegendProperty : public WrappedProperty
{
public:
- explicit WrappedHasLegendProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedHasLegendProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -450,9 +439,9 @@ private: //member
}
-WrappedHasLegendProperty::WrappedHasLegendProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedHasLegendProperty::WrappedHasLegendProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty("HasLegend",OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
}
@@ -464,15 +453,14 @@ void WrappedHasLegendProperty::setPropertyValue( const Any& rOuterValue, const R
try
{
- Reference< chart2::XLegend > xLegend( LegendHelper::getLegend( *m_spChart2ModelContact->getDocumentModel(), m_spChart2ModelContact->m_xContext,bNewValue ));
+ rtl::Reference< Legend > xLegend = LegendHelper::getLegend( *m_spChart2ModelContact->getDocumentModel(), m_spChart2ModelContact->m_xContext,bNewValue );
if(xLegend.is())
{
- Reference< beans::XPropertySet > xLegendProp( xLegend, uno::UNO_QUERY_THROW );
bool bOldValue = true;
- Any aAOld = xLegendProp->getPropertyValue("Show");
+ Any aAOld = xLegend->getPropertyValue("Show");
aAOld >>= bOldValue;
if( bOldValue != bNewValue )
- xLegendProp->setPropertyValue("Show", uno::Any( bNewValue ));
+ xLegend->setPropertyValue("Show", uno::Any( bNewValue ));
}
}
catch (const uno::Exception&)
@@ -486,10 +474,10 @@ Any WrappedHasLegendProperty::getPropertyValue( const Reference< beans::XPropert
Any aRet;
try
{
- Reference< beans::XPropertySet > xLegendProp(
- LegendHelper::getLegend( *m_spChart2ModelContact->getDocumentModel() ), uno::UNO_QUERY );
- if( xLegendProp.is())
- aRet = xLegendProp->getPropertyValue("Show");
+ rtl::Reference< Legend > xLegend =
+ LegendHelper::getLegend( *m_spChart2ModelContact->getDocumentModel() );
+ if( xLegend.is())
+ aRet = xLegend->getPropertyValue("Show");
else
aRet <<= false;
}
@@ -513,7 +501,7 @@ namespace {
class WrappedHasMainTitleProperty : public WrappedProperty
{
public:
- explicit WrappedHasMainTitleProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedHasMainTitleProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -527,9 +515,9 @@ private: //member
}
-WrappedHasMainTitleProperty::WrappedHasMainTitleProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedHasMainTitleProperty::WrappedHasMainTitleProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty("HasMainTitle",OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
}
@@ -579,7 +567,7 @@ namespace {
class WrappedHasSubTitleProperty : public WrappedProperty
{
public:
- explicit WrappedHasSubTitleProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedHasSubTitleProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -593,9 +581,9 @@ private: //member
}
-WrappedHasSubTitleProperty::WrappedHasSubTitleProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedHasSubTitleProperty::WrappedHasSubTitleProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty("HasSubTitle",OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
}
@@ -653,6 +641,7 @@ ChartDocumentWrapper::~ChartDocumentWrapper()
}
// ____ XInterface (for new interfaces) ____
+// [-loplugin:unoaggregation]
uno::Any SAL_CALL ChartDocumentWrapper::queryInterface( const uno::Type& aType )
{
if( m_xDelegator.is())
@@ -864,8 +853,7 @@ Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::getCurrentSelection(
void SAL_CALL ChartDocumentWrapper::dispose()
{
if( m_bIsDisposed )
- throw lang::DisposedException("ChartDocumentWrapper is disposed",
- static_cast< ::cppu::OWeakObject* >( this ));
+ return;
m_bIsDisposed = true;
@@ -878,9 +866,9 @@ void SAL_CALL ChartDocumentWrapper::dispose()
DisposeHelper::DisposeAndClear( m_xChartData );
DisposeHelper::DisposeAndClear( m_xDiagram );
DisposeHelper::DisposeAndClear( m_xArea );
- m_xChartView.set( nullptr );
- m_xShapeFactory.set( nullptr );
- m_xDelegator.set( nullptr );
+ m_xChartView.clear();
+ m_xShapeFactory.clear();
+ m_xDelegator.clear();
clearWrappedPropertySet();
m_spChart2ModelContact->clear();
@@ -907,7 +895,7 @@ void SAL_CALL ChartDocumentWrapper::dispose()
void ChartDocumentWrapper::impl_resetAddIn()
{
Reference< util::XRefreshable > xAddIn( m_xAddIn );
- m_xAddIn.set( nullptr );
+ m_xAddIn.clear();
if( !xAddIn.is() )
return;
@@ -1045,11 +1033,10 @@ rtl::Reference<SvxDrawPage> ChartDocumentWrapper::impl_getDrawPage() const
namespace {
-uno::Reference< lang::XMultiServiceFactory > getShapeFactory(const uno::Reference<uno::XInterface>& xChartView)
+uno::Reference< lang::XMultiServiceFactory > getShapeFactory(const rtl::Reference<ChartView>& xChartView)
{
- auto pProvider = comphelper::getFromUnoTunnel<ExplicitValueProvider>(xChartView);
- if( pProvider )
- return pProvider->getDrawModelWrapper()->getShapeFactory();
+ if( xChartView )
+ return xChartView->getDrawModelWrapper()->getShapeFactory();
return uno::Reference< lang::XMultiServiceFactory >();
}
@@ -1189,17 +1176,17 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance(
{
// locked controllers
ControllerLockGuardUNO aCtrlLockGuard( xChartDoc );
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartDoc );
- ThreeDLookScheme e3DScheme = ThreeDHelper::detectScheme( xDiagram );
+ rtl::Reference< Diagram > xDiagram = xChartDoc->getFirstChartDiagram();
+ ThreeDLookScheme e3DScheme = xDiagram->detectScheme();
rtl::Reference< ::chart::ChartTypeManager > xTemplateManager = xChartDoc->getTypeManager();
- DiagramHelper::tTemplateWithServiceName aTemplateWithService(
- DiagramHelper::getTemplateForDiagram( xDiagram, xTemplateManager ));
+ Diagram::tTemplateWithServiceName aTemplateWithService(
+ xDiagram->getTemplate( xTemplateManager ));
if( aTemplateWithService.xChartTypeTemplate.is())
- aTemplateWithService.xChartTypeTemplate->resetStyles( xDiagram );//#i109371#
+ aTemplateWithService.xChartTypeTemplate->resetStyles2( xDiagram );//#i109371#
xTemplate->changeDiagram( xDiagram );
if( AllSettings::GetMathLayoutRTL() )
AxisHelper::setRTLAxisLayout( AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 ) );
- ThreeDHelper::setScheme( xDiagram, e3DScheme );
+ xDiagram->setScheme( e3DScheme );
}
else
{
@@ -1257,7 +1244,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance(
{
if( !m_xShapeFactory.is() && m_xChartView.is() )
{
- m_xShapeFactory = getShapeFactory( static_cast<cppu::OWeakObject*>(m_xChartView.get()) );
+ m_xShapeFactory = getShapeFactory( m_xChartView );
}
else
{
@@ -1265,7 +1252,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance(
if(pModel)
{
m_xChartView = pModel->getChartView();
- m_xShapeFactory = getShapeFactory( static_cast<cppu::OWeakObject*>(m_xChartView.get()) );
+ m_xShapeFactory = getShapeFactory( m_xChartView );
}
}
@@ -1360,21 +1347,35 @@ uno::Any SAL_CALL ChartDocumentWrapper::queryAggregation( const uno::Type& rType
void ChartDocumentWrapper::_disposing( const lang::EventObject& rSource )
{
if( rSource.Source == m_xTitle )
- m_xTitle.set( nullptr );
+ m_xTitle.clear();
else if( rSource.Source == m_xSubTitle )
- m_xSubTitle.set( nullptr );
+ m_xSubTitle.clear();
else if( rSource.Source == m_xLegend )
- m_xLegend.set( nullptr );
+ m_xLegend.clear();
else if( rSource.Source == m_xChartData )
- m_xChartData.set( nullptr );
+ m_xChartData.clear();
else if( rSource.Source == m_xDiagram )
- m_xDiagram.set( nullptr );
+ m_xDiagram.clear();
else if( rSource.Source == m_xArea )
- m_xArea.set( nullptr );
+ m_xArea.clear();
else if( rSource.Source == m_xAddIn )
- m_xAddIn.set( nullptr );
+ m_xAddIn.clear();
else if( rSource.Source == static_cast<cppu::OWeakObject*>(m_xChartView.get()) )
- m_xChartView.set( nullptr );
+ m_xChartView.clear();
+}
+
+// ____ XPropertySet ____
+void SAL_CALL ChartDocumentWrapper::setPropertyValue(const OUString& rPropertyName, const css::uno::Any& rValue)
+{
+ if (rPropertyName == u"ODFImport_UpdateView")
+ {
+ // A hack used at load time to notify the view that it needs an update
+ // See SchXMLImport::~SchXMLImport
+ if (auto xChartModel = rValue.query<css::chart2::XChartDocument>())
+ ChartViewHelper::setViewToDirtyState_UNO(xChartModel);
+ return;
+ }
+ ChartDocumentWrapper_Base::setPropertyValue(rPropertyName, rValue);
}
// WrappedPropertySet
@@ -1384,7 +1385,7 @@ Reference< beans::XPropertySet > ChartDocumentWrapper::getInnerPropertySet()
}
const Sequence< beans::Property >& ChartDocumentWrapper::getPropertySequence()
{
- return *StaticChartDocumentWrapperPropertyArray::get();
+ return StaticChartDocumentWrapperPropertyArray();
}
std::vector< std::unique_ptr<WrappedProperty> > ChartDocumentWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index e49239935c6d..ac9a53ce331f 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -19,8 +19,11 @@
#include "DataSeriesPointWrapper.hxx"
#include "Chart2ModelContact.hxx"
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <DiagramHelper.hxx>
+#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <LinePropertiesHelper.hxx>
#include <FillProperties.hxx>
#include <CharacterProperties.hxx>
@@ -37,6 +40,7 @@
#include "WrappedTextRotationProperty.hxx"
#include <unonames.hxx>
+#include <o3tl/safeint.hxx>
#include <rtl/math.hxx>
#include <algorithm>
@@ -45,6 +49,7 @@
#include <com/sun/star/chart/ChartAxisAssign.hpp>
#include <com/sun/star/chart/ChartErrorCategory.hpp>
#include <com/sun/star/chart/ChartSymbolType.hpp>
+#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/drawing/LineJoint.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
@@ -55,6 +60,7 @@
using namespace ::com::sun::star;
using namespace ::chart::wrapper;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -243,30 +249,16 @@ uno::Sequence< Property > lcl_GetPropertySequence( DataSeriesPointWrapper::eType
return comphelper::containerToSequence( aProperties );
}
-struct StaticSeriesWrapperPropertyArray_Initializer
+const Sequence< Property >& StaticSeriesWrapperPropertyArray()
{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence( DataSeriesPointWrapper::DATA_SERIES ) );
- return &aPropSeq;
- }
-};
-
-struct StaticSeriesWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticSeriesWrapperPropertyArray_Initializer >
-{
-};
-
-struct StaticPointWrapperPropertyArray_Initializer
-{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence( DataSeriesPointWrapper::DATA_POINT ) );
- return &aPropSeq;
- }
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence( DataSeriesPointWrapper::DATA_SERIES ) );
+ return aPropSeq;
};
-struct StaticPointWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticPointWrapperPropertyArray_Initializer >
+const Sequence< Property >& StaticPointWrapperPropertyArray()
{
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence( DataSeriesPointWrapper::DATA_POINT ) );
+ return aPropSeq;
};
//PROP_SERIES_ATTACHED_AXIS
@@ -303,7 +295,7 @@ Any WrappedAttachedAxisProperty::getPropertyValue( const Reference< beans::XProp
{
Any aRet;
- uno::Reference< chart2::XDataSeries > xDataSeries( xInnerPropertySet, uno::UNO_QUERY );
+ rtl::Reference< ::chart::DataSeries > xDataSeries( dynamic_cast<::chart::DataSeries*>(xInnerPropertySet.get()) );
bool bAttachedToMainAxis = ::chart::DiagramHelper::isSeriesAttachedToMainAxis( xDataSeries );
if( bAttachedToMainAxis )
aRet <<= css::chart::ChartAxisAssign::PRIMARY_Y;
@@ -314,7 +306,7 @@ Any WrappedAttachedAxisProperty::getPropertyValue( const Reference< beans::XProp
void WrappedAttachedAxisProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
{
- uno::Reference< chart2::XDataSeries > xDataSeries( xInnerPropertySet, uno::UNO_QUERY );
+ rtl::Reference< ::chart::DataSeries > xDataSeries( dynamic_cast<::chart::DataSeries*>(xInnerPropertySet.get()) );
sal_Int32 nChartAxisAssign = css::chart::ChartAxisAssign::PRIMARY_Y;
if( ! (rOuterValue >>= nChartAxisAssign) )
@@ -327,7 +319,7 @@ void WrappedAttachedAxisProperty::setPropertyValue( const Any& rOuterValue, cons
{
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
if( xDiagram.is() )
- ::chart::DiagramHelper::attachSeriesToAxis( bNewAttachedToMainAxis, xDataSeries, xDiagram, m_spChart2ModelContact->m_xContext, false );
+ xDiagram->attachSeriesToAxis( bNewAttachedToMainAxis, xDataSeries, m_spChart2ModelContact->m_xContext, false );
}
}
@@ -454,9 +446,8 @@ void WrappedLineStyleProperty::setPropertyToDefault( const Reference< beans::XPr
namespace chart::wrapper
{
-DataSeriesPointWrapper::DataSeriesPointWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
- : m_spChart2ModelContact( spChart2ModelContact )
- , m_aEventListenerContainer( m_aMutex )
+DataSeriesPointWrapper::DataSeriesPointWrapper( std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
+ : m_spChart2ModelContact( std::move(spChart2ModelContact) )
, m_eType( DATA_SERIES )
, m_nSeriesIndexInNewAPI( -1 )
, m_nPointIndex( -1 )
@@ -473,7 +464,11 @@ void SAL_CALL DataSeriesPointWrapper::initialize( const uno::Sequence< uno::Any
m_nPointIndex = -1;
if( aArguments.hasElements() )
{
- aArguments[0] >>= m_xDataSeries;
+ uno::Reference<chart2::XDataSeries> xTmp;
+ aArguments[0] >>= xTmp;
+ auto p = dynamic_cast<DataSeries*>(xTmp.get());
+ assert(p);
+ m_xDataSeries = p;
if( aArguments.getLength() >= 2 )
aArguments[1] >>= m_nPointIndex;
}
@@ -493,9 +488,8 @@ void SAL_CALL DataSeriesPointWrapper::initialize( const uno::Sequence< uno::Any
DataSeriesPointWrapper::DataSeriesPointWrapper(eType _eType,
sal_Int32 nSeriesIndexInNewAPI ,
sal_Int32 nPointIndex, //ignored for series
- const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
- : m_spChart2ModelContact( spChart2ModelContact )
- , m_aEventListenerContainer( m_aMutex )
+ std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
+ : m_spChart2ModelContact( std::move(spChart2ModelContact) )
, m_eType( _eType )
, m_nSeriesIndexInNewAPI( nSeriesIndexInNewAPI )
, m_nPointIndex( (_eType == DATA_POINT) ? nPointIndex : -1 )
@@ -510,8 +504,9 @@ DataSeriesPointWrapper::~DataSeriesPointWrapper()
// ____ XComponent ____
void SAL_CALL DataSeriesPointWrapper::dispose()
{
+ std::unique_lock g(m_aMutex);
uno::Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
+ m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( xSource ) );
m_xDataSeries.clear();
clearWrappedPropertySet();
@@ -520,13 +515,15 @@ void SAL_CALL DataSeriesPointWrapper::dispose()
void SAL_CALL DataSeriesPointWrapper::addEventListener(
const uno::Reference< lang::XEventListener >& xListener )
{
- m_aEventListenerContainer.addInterface( xListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, xListener );
}
void SAL_CALL DataSeriesPointWrapper::removeEventListener(
const uno::Reference< lang::XEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
// ____ XEventListener ____
@@ -536,24 +533,24 @@ void SAL_CALL DataSeriesPointWrapper::disposing( const lang::EventObject& /*Sour
bool DataSeriesPointWrapper::isSupportingAreaProperties()
{
- Reference< chart2::XDataSeries > xSeries( getDataSeries() );
+ rtl::Reference< DataSeries > xSeries( getDataSeries() );
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
- Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeOfSeries( xDiagram, xSeries ) );
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
+ rtl::Reference< ::chart::ChartType > xChartType( xDiagram->getChartTypeOfSeries( xSeries ) );
+ sal_Int32 nDimensionCount = xDiagram->getDimension();
return ChartTypeHelper::isSupportingAreaProperties( xChartType, nDimensionCount );
}
-Reference< chart2::XDataSeries > DataSeriesPointWrapper::getDataSeries()
+rtl::Reference< DataSeries > DataSeriesPointWrapper::getDataSeries()
{
- Reference< chart2::XDataSeries > xSeries( m_xDataSeries );
+ rtl::Reference< DataSeries > xSeries = m_xDataSeries;
if( !xSeries.is() )
{
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
- std::vector< uno::Reference< chart2::XDataSeries > > aSeriesList(
- ::chart::DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesList =
+ xDiagram->getDataSeries();
- if( m_nSeriesIndexInNewAPI >= 0 && m_nSeriesIndexInNewAPI < static_cast<sal_Int32>(aSeriesList.size()) )
+ if( m_nSeriesIndexInNewAPI >= 0 && o3tl::make_unsigned(m_nSeriesIndexInNewAPI) < aSeriesList.size() )
xSeries = aSeriesList[m_nSeriesIndexInNewAPI];
}
@@ -564,7 +561,7 @@ Reference< beans::XPropertySet > DataSeriesPointWrapper::getDataPointProperties(
{
Reference< beans::XPropertySet > xPointProp;
- Reference< chart2::XDataSeries > xSeries( getDataSeries() );
+ rtl::Reference< DataSeries > xSeries( getDataSeries() );
// may throw an IllegalArgumentException
if( xSeries.is() )
@@ -622,9 +619,10 @@ beans::PropertyState SAL_CALL DataSeriesPointWrapper::getPropertyState( const OU
{
if( rPropertyName == "FillColor")
{
- Reference< beans::XPropertySet > xSeriesProp( getDataSeries(), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xSeries = getDataSeries();
bool bVaryColorsByPoint = false;
- if( xSeriesProp.is() && (xSeriesProp->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint)
+ // "VaryColorsByPoint"
+ if( xSeries.is() && (xSeries->getFastPropertyValue(PROP_DATASERIES_VARY_COLORS_BY_POINT) >>= bVaryColorsByPoint)
&& bVaryColorsByPoint )
return beans::PropertyState_DIRECT_VALUE;
}
@@ -683,7 +681,7 @@ Any SAL_CALL DataSeriesPointWrapper::getPropertyDefault( const OUString& rProper
if( nHandle > 0 )
{
//always take the series current value as default for points
- Reference< beans::XPropertySet > xInnerPropertySet( getDataSeries(), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xInnerPropertySet = getDataSeries();
if( xInnerPropertySet.is() )
{
const WrappedProperty* pWrappedProperty = getWrappedProperty( rPropertyName );
@@ -704,16 +702,16 @@ Any SAL_CALL DataSeriesPointWrapper::getPropertyDefault( const OUString& rProper
Reference< beans::XPropertySet > DataSeriesPointWrapper::getInnerPropertySet()
{
if( m_eType == DATA_SERIES )
- return Reference< beans::XPropertySet >( getDataSeries(), uno::UNO_QUERY );
+ return getDataSeries();
return getDataPointProperties();
}
const Sequence< beans::Property >& DataSeriesPointWrapper::getPropertySequence()
{
if( m_eType == DATA_SERIES )
- return *StaticSeriesWrapperPropertyArray::get();
+ return StaticSeriesWrapperPropertyArray();
else
- return *StaticPointWrapperPropertyArray::get();
+ return StaticPointWrapperPropertyArray();
}
std::vector< std::unique_ptr<WrappedProperty> > DataSeriesPointWrapper::createWrappedProperties()
@@ -841,9 +839,10 @@ Any SAL_CALL DataSeriesPointWrapper::getPropertyValue( const OUString& rProperty
{
if( rPropertyName == "FillColor" )
{
- Reference< beans::XPropertySet > xSeriesProp( getDataSeries(), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xSeries = getDataSeries();
bool bVaryColorsByPoint = false;
- if( xSeriesProp.is() && (xSeriesProp->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint)
+ // "VaryColorsByPoint"
+ if( xSeries.is() && (xSeries->getFastPropertyValue(PROP_DATASERIES_VARY_COLORS_BY_POINT) >>= bVaryColorsByPoint)
&& bVaryColorsByPoint )
{
uno::Reference< beans::XPropertyState > xPointState( DataSeriesPointWrapper::getDataPointProperties(), uno::UNO_QUERY );
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx
index f5fbab3f332b..4c79bb25e9bb 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx
@@ -21,15 +21,16 @@
#include <WrappedPropertySet.hxx>
#include "ReferenceSizePropertyProvider.hxx"
#include <cppuhelper/implbase.hxx>
-#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-
+#include <rtl/ref.hxx>
#include <memory>
namespace com::sun::star::chart2 { class XDataSeries; }
+namespace chart { class DataSeries; }
namespace chart::wrapper
{
@@ -54,12 +55,12 @@ public:
};
//this constructor needs an initialize call afterwards
- explicit DataSeriesPointWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit DataSeriesPointWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
DataSeriesPointWrapper(eType eType
, sal_Int32 nSeriesIndexInNewAPI
, sal_Int32 nPointIndex //ignored for series
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual ~DataSeriesPointWrapper() override;
@@ -100,11 +101,11 @@ private:
virtual css::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) override;
//own methods
- css::uno::Reference< css::chart2::XDataSeries > getDataSeries();
+ rtl::Reference< ::chart::DataSeries > getDataSeries();
css::uno::Reference< css::beans::XPropertySet > getDataPointProperties();
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
- ::comphelper::OInterfaceContainerHelper3<css::lang::XEventListener> m_aEventListenerContainer;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer;
eType m_eType;
sal_Int32 m_nSeriesIndexInNewAPI;
@@ -115,7 +116,7 @@ private:
//this should only be used, if the DataSeriesPointWrapper is initialized via the XInitialize interface
//because a big change in the chartmodel may lead to a dataseriespointer that is not connected to the model anymore
//with the indices instead we can always get the new dataseries
- css::uno::Reference< css::chart2::XDataSeries > m_xDataSeries;
+ rtl::Reference< ::chart::DataSeries > m_xDataSeries;
};
} // namespace chart::wrapper
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index d9deba9857d4..2917b989f040 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -20,14 +20,18 @@
#include "DiagramWrapper.hxx"
#include <servicenames_charttypes.hxx>
#include "DataSeriesPointWrapper.hxx"
+#include <DataSeriesProperties.hxx>
#include "AxisWrapper.hxx"
#include "Chart2ModelContact.hxx"
#include "WallFloorWrapper.hxx"
#include "MinMaxLineWrapper.hxx"
#include "UpDownBarWrapper.hxx"
+#include <Diagram.hxx>
#include <DiagramHelper.hxx>
#include <DataSourceHelper.hxx>
#include <ChartModelHelper.hxx>
+#include <ChartType.hxx>
+#include <DataSeries.hxx>
#include <WrappedIgnoreProperty.hxx>
#include "WrappedAxisAndGridExistenceProperties.hxx"
#include "WrappedStatisticProperties.hxx"
@@ -50,10 +54,9 @@
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart2/RelativeSize.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/PieChartSubType.hpp>
#include <com/sun/star/chart/ChartSolidType.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <LinePropertiesHelper.hxx>
#include <FillProperties.hxx>
@@ -64,17 +67,19 @@
#include <map>
#include <com/sun/star/lang/XServiceName.hpp>
#include <com/sun/star/util/XRefreshable.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <o3tl/string_view.hxx>
+#include <utility>
using namespace ::com::sun::star;
using namespace ::chart::wrapper;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::beans::Property;
using ::com::sun::star::chart::XAxis;
-using ::osl::MutexGuard;
namespace
{
@@ -98,6 +103,7 @@ enum
PROP_DIAGRAM_SORT_BY_X_VALUES,
PROP_DIAGRAM_STARTING_ANGLE,
+ PROP_DIAGRAM_OF_PIE_TYPE,
PROP_DIAGRAM_RIGHT_ANGLED_AXES,
PROP_DIAGRAM_PERSPECTIVE,
@@ -134,9 +140,6 @@ enum
PROP_DIAGRAM_HAS_SECOND_Y_AXIS_TITLE,
PROP_DIAGRAM_AUTOMATIC_SIZE,
- PROP_DIAGRAM_DATATABLEHBORDER,
- PROP_DIAGRAM_DATATABLEVBORDER,
- PROP_DIAGRAM_DATATABLEOUTLINE,
PROP_DIAGRAM_EXTERNALDATA
};
@@ -227,6 +230,11 @@ void lcl_AddPropertiesToVector(
cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT );
+ rOutProperties.emplace_back( "SubPieType",
+ PROP_DIAGRAM_OF_PIE_TYPE,
+ cppu::UnoType<chart2::PieChartSubType>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT );
//new for 3D charts
rOutProperties.emplace_back( "RightAngledAxes",
@@ -378,21 +386,7 @@ void lcl_AddPropertiesToVector(
cppu::UnoType<bool>::get(),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( "DataTableHBorder",
- PROP_DIAGRAM_DATATABLEHBORDER,
- cppu::UnoType<bool>::get(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( "DataTableVBorder",
- PROP_DIAGRAM_DATATABLEVBORDER,
- cppu::UnoType<bool>::get(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( "DataTableOutline",
- PROP_DIAGRAM_DATATABLEOUTLINE,
- cppu::UnoType<bool>::get(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
+
rOutProperties.emplace_back( "ExternalData",
PROP_DIAGRAM_EXTERNALDATA,
cppu::UnoType<OUString>::get(),
@@ -400,45 +394,35 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEVOID );
}
-struct StaticDiagramWrapperPropertyArray_Initializer
-{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
- return &aPropSeq;
- }
-
-private:
- static uno::Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::FillProperties::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- ::chart::SceneProperties::AddPropertiesToVector( aProperties );
- WrappedStatisticProperties::addProperties( aProperties );
- WrappedSymbolProperties::addProperties( aProperties );
- WrappedDataCaptionProperties::addProperties( aProperties );
- WrappedSplineProperties::addProperties( aProperties );
- WrappedStockProperties::addProperties( aProperties );
- WrappedAutomaticPositionProperties::addProperties( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-};
-
-struct StaticDiagramWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticDiagramWrapperPropertyArray_Initializer >
+const Sequence< Property >& StaticDiagramWrapperPropertyArray()
{
+ static Sequence< Property > aPropSeq = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::FillProperties::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+ ::chart::SceneProperties::AddPropertiesToVector( aProperties );
+ WrappedStatisticProperties::addProperties( aProperties );
+ WrappedSymbolProperties::addProperties( aProperties );
+ WrappedDataCaptionProperties::addProperties( aProperties );
+ WrappedSplineProperties::addProperties( aProperties );
+ WrappedStockProperties::addProperties( aProperties );
+ WrappedAutomaticPositionProperties::addProperties( aProperties );
+
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropSeq;
};
-bool lcl_isXYChart( const Reference< chart2::XDiagram >& rDiagram )
+bool lcl_isXYChart( const rtl::Reference< ::chart::Diagram >& xDiagram )
{
bool bRet = false;
- Reference< chart2::XChartType > xChartType( ::chart::DiagramHelper::getChartTypeByIndex( rDiagram, 0 ) );
+ rtl::Reference< ::chart::ChartType > xChartType( xDiagram->getChartTypeByIndex( 0 ) );
if( xChartType.is() )
{
OUString aChartType( xChartType->getChartType() );
@@ -450,7 +434,7 @@ bool lcl_isXYChart( const Reference< chart2::XDiagram >& rDiagram )
sal_Int32 lcl_getNewAPIIndexForOldAPIIndex(
sal_Int32 nOldAPIIndex
- , const Reference< chart2::XDiagram >& xDiagram )
+ , const rtl::Reference< ::chart::Diagram >& xDiagram )
{
sal_Int32 nNewAPIIndex = nOldAPIIndex;
@@ -460,29 +444,38 @@ sal_Int32 lcl_getNewAPIIndexForOldAPIIndex(
nNewAPIIndex -= 1;
}
- std::vector< uno::Reference< chart2::XDataSeries > > aSeriesList(
- ::chart::DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< ::chart::DataSeries > > aSeriesList =
+ xDiagram->getDataSeries();
if( nNewAPIIndex >= static_cast<sal_Int32>(aSeriesList.size()) )
nNewAPIIndex = -1;
return nNewAPIIndex;
}
-OUString lcl_getDiagramType( const OUString & rTemplateServiceName )
+OUString lcl_getDiagramType( std::u16string_view rTemplateServiceName )
{
- static const OUStringLiteral aPrefix(u"com.sun.star.chart2.template.");
+ static constexpr OUString aPrefix(u"com.sun.star.chart2.template."_ustr);
- if( rTemplateServiceName.match( aPrefix ))
+ if( o3tl::starts_with(rTemplateServiceName, aPrefix) )
{
- const OUString aName( rTemplateServiceName.copy( aPrefix.getLength()));
+ const std::u16string_view aName( rTemplateServiceName.substr( aPrefix.getLength()));
// "Area" "StackedArea" "PercentStackedArea" "ThreeDArea"
// "StackedThreeDArea" "PercentStackedThreeDArea"
- if( aName.indexOf( "Area" ) != -1 )
+ if( aName.find( u"Area" ) != std::u16string_view::npos )
return "com.sun.star.chart.AreaDiagram";
+ // Handle bar-of-pie and pie-of-pie before simple pie
+ // "BarOfPie"
+ if( aName.find( u"BarOfPie" ) != std::u16string_view::npos )
+ return "com.sun.star.chart.BarOfPieDiagram";
+
+ // "PieOfPie"
+ if( aName.find( u"PieOfPie" ) != std::u16string_view::npos )
+ return "com.sun.star.chart.PieOfPieDiagram";
+
// "Pie" "PieAllExploded" "ThreeDPie" "ThreeDPieAllExploded"
- if( aName.indexOf( "Pie" ) != -1 )
+ if( aName.find( u"Pie" ) != std::u16string_view::npos )
return "com.sun.star.chart.PieDiagram";
// "Column" "StackedColumn" "PercentStackedColumn" "ThreeDColumnDeep"
@@ -491,33 +484,33 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName )
// "PercentStackedBar" "ThreeDBarDeep" "ThreeDBarFlat"
// "StackedThreeDBarFlat" "PercentStackedThreeDBarFlat" "ColumnWithLine"
// "StackedColumnWithLine"
- if( aName.indexOf( "Column" ) != -1 || aName.indexOf( "Bar" ) != -1 )
+ if( aName.find( u"Column" ) != std::u16string_view::npos || aName.find( u"Bar" ) != std::u16string_view::npos )
return "com.sun.star.chart.BarDiagram";
// "Donut" "DonutAllExploded" "ThreeDDonut" "ThreeDDonutAllExploded"
- if( aName.indexOf( "Donut" ) != -1 )
+ if( aName.find( u"Donut" ) != std::u16string_view::npos )
return "com.sun.star.chart.DonutDiagram";
// "ScatterLineSymbol" "ScatterLine" "ScatterSymbol" "ThreeDScatter"
- if( aName.indexOf( "Scatter" ) != -1 )
+ if( aName.find( u"Scatter" ) != std::u16string_view::npos )
return "com.sun.star.chart.XYDiagram";
// "FilledNet" "StackedFilledNet" "PercentStackedFilledNet"
- if( aName.indexOf( "FilledNet" ) != -1 )
+ if( aName.find( u"FilledNet" ) != std::u16string_view::npos )
return "com.sun.star.chart.FilledNetDiagram";
// "Net" "NetSymbol" "NetLine" "StackedNet" "StackedNetSymbol"
// "StackedNetLine" "PercentStackedNet" "PercentStackedNetSymbol"
// "PercentStackedNetLine"
- if( aName.indexOf( "Net" ) != -1 )
+ if( aName.find( u"Net" ) != std::u16string_view::npos )
return "com.sun.star.chart.NetDiagram";
// "StockLowHighClose" "StockOpenLowHighClose" "StockVolumeLowHighClose"
// "StockVolumeOpenLowHighClose"
- if( aName.indexOf( "Stock" ) != -1 )
+ if( aName.find( u"Stock" ) != std::u16string_view::npos )
return "com.sun.star.chart.StockDiagram";
- if( aName.indexOf( "Bubble" ) != -1 )
+ if( aName.find( u"Bubble" ) != std::u16string_view::npos )
return "com.sun.star.chart.BubbleDiagram";
// Note: this must be checked after Bar, Net and Scatter
@@ -526,7 +519,7 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName )
// "PercentStackedLine" "LineSymbol" "StackedLineSymbol"
// "PercentStackedLineSymbol" "ThreeDLine" "StackedThreeDLine"
// "PercentStackedThreeDLine" "ThreeDLineDeep"
- if( aName.indexOf( "Line" ) != -1 || aName.indexOf( "Symbol" ) != -1 )
+ if( aName.find( u"Line" ) != std::u16string_view::npos || aName.find( u"Symbol" ) != std::u16string_view::npos )
return "com.sun.star.chart.LineDiagram";
OSL_FAIL( "unknown template" );
@@ -572,9 +565,8 @@ OUString lcl_getOldChartTypeName( const OUString & rNewChartTypeName )
namespace chart::wrapper
{
-DiagramWrapper::DiagramWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
- : m_spChart2ModelContact(spChart2ModelContact)
- , m_aEventListenerContainer(m_aMutex)
+DiagramWrapper::DiagramWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
+ : m_spChart2ModelContact(std::move(spChart2ModelContact))
{
}
@@ -603,26 +595,29 @@ OUString SAL_CALL DiagramWrapper::getDiagramType()
}
rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = xChartDoc->getTypeManager();
- DiagramHelper::tTemplateWithServiceName aTemplateAndService =
- DiagramHelper::getTemplateForDiagram( xDiagram, xChartTypeManager );
+ Diagram::tTemplateWithServiceName aTemplateAndService =
+ xDiagram->getTemplate( xChartTypeManager );
aRet = lcl_getDiagramType( aTemplateAndService.sServiceName );
}
- if( aRet.isEmpty())
+ if( !aRet.isEmpty())
+ return aRet;
+
+ // none of the standard templates matched
+ // use first chart type
+ if (xDiagram)
{
- // none of the standard templates matched
- // use first chart type
- Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) );
+ rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeByIndex( 0 ) );
if( xChartType.is() )
{
aRet = xChartType->getChartType();
if( !aRet.isEmpty() )
aRet = lcl_getOldChartTypeName( aRet );
}
- if( aRet.isEmpty())
- aRet = "com.sun.star.chart.BarDiagram";
}
+ if( aRet.isEmpty())
+ aRet = "com.sun.star.chart.BarDiagram";
return aRet;
}
@@ -1066,9 +1061,8 @@ void SAL_CALL DiagramWrapper::setDefaultIllumination()
// ____ XComponent ____
void SAL_CALL DiagramWrapper::dispose()
{
- m_aEventListenerContainer.disposeAndClear( lang::EventObject( static_cast< ::cppu::OWeakObject* >( this )));
-
- MutexGuard aGuard( m_aMutex);
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( static_cast< ::cppu::OWeakObject* >( this )));
DisposeHelper::DisposeAndClear( m_xXAxis );
DisposeHelper::DisposeAndClear( m_xYAxis );
@@ -1087,13 +1081,15 @@ void SAL_CALL DiagramWrapper::dispose()
void SAL_CALL DiagramWrapper::addEventListener(
const Reference< lang::XEventListener >& xListener )
{
- m_aEventListenerContainer.addInterface( xListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, xListener );
}
void SAL_CALL DiagramWrapper::removeEventListener(
const Reference< lang::XEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
namespace {
@@ -1102,7 +1098,7 @@ namespace {
class WrappedDataRowSourceProperty : public WrappedProperty
{
public:
- explicit WrappedDataRowSourceProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedDataRowSourceProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -1117,9 +1113,9 @@ private: //member
}
-WrappedDataRowSourceProperty::WrappedDataRowSourceProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedDataRowSourceProperty::WrappedDataRowSourceProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty("DataRowSource",OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
m_aOuterValue = WrappedDataRowSourceProperty::getPropertyDefault( nullptr );
}
@@ -1195,7 +1191,7 @@ namespace {
class WrappedStackingProperty : public WrappedProperty
{
public:
- WrappedStackingProperty(StackMode eStackMode, const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ WrappedStackingProperty(StackMode eStackMode, std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -1214,9 +1210,9 @@ std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
}
-WrappedStackingProperty::WrappedStackingProperty(StackMode eStackMode, const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedStackingProperty::WrappedStackingProperty(StackMode eStackMode, std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty(OUString(),OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
, m_eStackMode( eStackMode )
{
switch( m_eStackMode )
@@ -1240,8 +1236,8 @@ bool WrappedStackingProperty::detectInnerValue( StackMode& eStackMode ) const
{
bool bHasDetectableInnerValue = false;
bool bIsAmbiguous = false;
- eStackMode = DiagramHelper::getStackMode( m_spChart2ModelContact->getDiagram()
- , bHasDetectableInnerValue, bIsAmbiguous );
+ rtl::Reference<Diagram> xDiagram = m_spChart2ModelContact->getDiagram();
+ eStackMode = xDiagram ? xDiagram->getStackMode( bHasDetectableInnerValue, bIsAmbiguous ) : StackMode::NONE;
return bHasDetectableInnerValue;
}
@@ -1269,7 +1265,7 @@ void WrappedStackingProperty::setPropertyValue( const Any& rOuterValue, const Re
if( xDiagram.is() )
{
StackMode eNewStackMode = bNewValue ? m_eStackMode : StackMode::NONE;
- DiagramHelper::setStackMode( xDiagram, eNewStackMode );
+ xDiagram->setStackMode( eNewStackMode );
}
}
@@ -1297,7 +1293,7 @@ namespace {
class WrappedDim3DProperty : public WrappedProperty
{
public:
- explicit WrappedDim3DProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedDim3DProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -1312,9 +1308,9 @@ private: //member
}
-WrappedDim3DProperty::WrappedDim3DProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedDim3DProperty::WrappedDim3DProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty("Dim3D",OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
m_aOuterValue = WrappedDim3DProperty::getPropertyDefault( nullptr );
}
@@ -1331,9 +1327,9 @@ void WrappedDim3DProperty::setPropertyValue( const Any& rOuterValue, const Refer
if( !xDiagram.is() )
return;
- bool bOld3D = DiagramHelper::getDimension( xDiagram ) == 3;
+ bool bOld3D = xDiagram->getDimension() == 3;
if( bOld3D != bNew3D )
- DiagramHelper::setDimension( xDiagram, bNew3D ? 3 : 2 );
+ xDiagram->setDimension( bNew3D ? 3 : 2 );
}
Any WrappedDim3DProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
@@ -1341,7 +1337,7 @@ Any WrappedDim3DProperty::getPropertyValue( const Reference< beans::XPropertySet
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
if( xDiagram.is() )
{
- bool b3D = DiagramHelper::getDimension( xDiagram ) == 3;
+ bool b3D = xDiagram->getDimension() == 3;
m_aOuterValue <<= b3D;
}
return m_aOuterValue;
@@ -1360,7 +1356,7 @@ namespace {
class WrappedVerticalProperty : public WrappedProperty
{
public:
- explicit WrappedVerticalProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedVerticalProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -1375,9 +1371,9 @@ private: //member
}
-WrappedVerticalProperty::WrappedVerticalProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedVerticalProperty::WrappedVerticalProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty("Vertical",OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
m_aOuterValue = WrappedVerticalProperty::getPropertyDefault( nullptr );
}
@@ -1396,9 +1392,9 @@ void WrappedVerticalProperty::setPropertyValue( const Any& rOuterValue, const Re
bool bFound = false;
bool bAmbiguous = false;
- bool bOldVertical = DiagramHelper::getVertical( xDiagram, bFound, bAmbiguous );
+ bool bOldVertical = xDiagram->getVertical( bFound, bAmbiguous );
if( bFound && ( bOldVertical != bNewVertical || bAmbiguous ) )
- DiagramHelper::setVertical( xDiagram, bNewVertical );
+ xDiagram->setVertical( bNewVertical );
}
Any WrappedVerticalProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
@@ -1408,7 +1404,7 @@ Any WrappedVerticalProperty::getPropertyValue( const Reference< beans::XProperty
{
bool bFound = false;
bool bAmbiguous = false;
- bool bVertical = DiagramHelper::getVertical( xDiagram, bFound, bAmbiguous );
+ bool bVertical = xDiagram->getVertical( bFound, bAmbiguous );
if( bFound )
m_aOuterValue <<= bVertical;
}
@@ -1428,7 +1424,7 @@ namespace {
class WrappedNumberOfLinesProperty : public WrappedProperty
{
public:
- explicit WrappedNumberOfLinesProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedNumberOfLinesProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -1446,9 +1442,9 @@ private: //member
}
-WrappedNumberOfLinesProperty::WrappedNumberOfLinesProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedNumberOfLinesProperty::WrappedNumberOfLinesProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty("NumberOfLines",OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
, m_aOuterValue( getPropertyDefault(nullptr) )
{
}
@@ -1461,13 +1457,13 @@ bool WrappedNumberOfLinesProperty::detectInnerValue( uno::Any& rInnerValue ) con
rtl::Reference< ChartModel > xChartDoc( m_spChart2ModelContact->getDocumentModel() );
if( xDiagram.is() && xChartDoc.is() )
{
- std::vector< uno::Reference< chart2::XDataSeries > > aSeriesVector(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector =
+ xDiagram->getDataSeries();
if( !aSeriesVector.empty() )
{
rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = xChartDoc->getTypeManager();
- DiagramHelper::tTemplateWithServiceName aTemplateAndService =
- DiagramHelper::getTemplateForDiagram( xDiagram, xChartTypeManager );
+ Diagram::tTemplateWithServiceName aTemplateAndService =
+ xDiagram->getTemplate( xChartTypeManager );
if( aTemplateAndService.sServiceName == "com.sun.star.chart2.template.ColumnWithLine" )
{
try
@@ -1498,13 +1494,15 @@ void WrappedNumberOfLinesProperty::setPropertyValue( const Any& rOuterValue, con
rtl::Reference< ChartModel > xChartDoc( m_spChart2ModelContact->getDocumentModel() );
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
- sal_Int32 nDimension = ::chart::DiagramHelper::getDimension( xDiagram );
- if( !(xChartDoc.is() && xDiagram.is() && nDimension == 2) )
+ if( !xChartDoc || !xDiagram )
+ return;
+ sal_Int32 nDimension = xDiagram->getDimension();
+ if( nDimension != 2 )
return;
rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = xChartDoc->getTypeManager();
- DiagramHelper::tTemplateWithServiceName aTemplateAndService =
- DiagramHelper::getTemplateForDiagram( xDiagram, xChartTypeManager );
+ Diagram::tTemplateWithServiceName aTemplateAndService =
+ xDiagram->getTemplate( xChartTypeManager );
rtl::Reference< ChartTypeTemplate > xTemplate;
if( aTemplateAndService.sServiceName == "com.sun.star.chart2.template.ColumnWithLine" )
@@ -1575,7 +1573,7 @@ namespace {
class WrappedAttributedDataPointsProperty : public WrappedProperty
{
public:
- explicit WrappedAttributedDataPointsProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedAttributedDataPointsProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -1590,9 +1588,9 @@ private: //member
}
-WrappedAttributedDataPointsProperty::WrappedAttributedDataPointsProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedAttributedDataPointsProperty::WrappedAttributedDataPointsProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty("AttributedDataPoints",OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
m_aOuterValue = WrappedAttributedDataPointsProperty::getPropertyDefault( nullptr );
}
@@ -1610,25 +1608,21 @@ void WrappedAttributedDataPointsProperty::setPropertyValue( const Any& rOuterVal
if( !xDiagram )
return;
- std::vector< Reference< chart2::XDataSeries > > aSeriesVector(
- ::chart::DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector =
+ xDiagram->getDataSeries();
sal_Int32 i = 0;
for (auto const& series : aSeriesVector)
{
- Reference< beans::XPropertySet > xProp(series, uno::UNO_QUERY);
- if( xProp.is())
+ uno::Any aVal;
+ if( i < aNewValue.getLength() )
+ aVal <<= aNewValue[i];
+ else
{
- uno::Any aVal;
- if( i < aNewValue.getLength() )
- aVal <<= aNewValue[i];
- else
- {
- //set empty sequence
- uno::Sequence< sal_Int32 > aSeq;
- aVal <<= aSeq;
- }
- xProp->setPropertyValue( "AttributedDataPoints", aVal );
+ //set empty sequence
+ uno::Sequence< sal_Int32 > aSeq;
+ aVal <<= aSeq;
}
+ series->setFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS, aVal ); // "AttributedDataPoints"
++i;
}
}
@@ -1639,23 +1633,19 @@ Any WrappedAttributedDataPointsProperty::getPropertyValue( const Reference< bean
if( xDiagram )
{
- std::vector< Reference< chart2::XDataSeries > > aSeriesVector(
- ::chart::DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector =
+ xDiagram->getDataSeries();
uno::Sequence< uno::Sequence< sal_Int32 > > aResult( aSeriesVector.size() );
auto aResultRange = asNonConstRange(aResult);
sal_Int32 i = 0;
for (auto const& series : aSeriesVector)
{
- Reference< beans::XPropertySet > xProp(series, uno::UNO_QUERY);
- if( xProp.is())
- {
- uno::Any aVal(
- xProp->getPropertyValue("AttributedDataPoints"));
- uno::Sequence< sal_Int32 > aSeq;
- if( aVal >>= aSeq )
- aResultRange[ i ] = aSeq;
- }
+ uno::Any aVal(
+ series->getFastPropertyValue(PROP_DATASERIES_ATTRIBUTED_DATA_POINTS)); // "AttributedDataPoints"
+ uno::Sequence< sal_Int32 > aSeq;
+ if( aVal >>= aSeq )
+ aResultRange[ i ] = aSeq;
++i;
}
m_aOuterValue <<= aResult;
@@ -1677,7 +1667,7 @@ namespace {
class WrappedSolidTypeProperty : public WrappedProperty
{
public:
- explicit WrappedSolidTypeProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedSolidTypeProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -1692,9 +1682,9 @@ private: //member
}
-WrappedSolidTypeProperty::WrappedSolidTypeProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedSolidTypeProperty::WrappedSolidTypeProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty( "SolidType", OUString() )
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
m_aOuterValue = WrappedSolidTypeProperty::getPropertyDefault( nullptr );
}
@@ -1713,9 +1703,9 @@ void WrappedSolidTypeProperty::setPropertyValue( const Any& rOuterValue, const R
bool bFound = false;
bool bAmbiguous = false;
- sal_Int32 nOldSolidType = DiagramHelper::getGeometry3D( xDiagram, bFound, bAmbiguous );
+ sal_Int32 nOldSolidType = xDiagram->getGeometry3D( bFound, bAmbiguous );
if( bFound && ( nOldSolidType != nNewSolidType || bAmbiguous ) )
- DiagramHelper::setGeometry3D( xDiagram, nNewSolidType );
+ xDiagram->setGeometry3D( nNewSolidType );
}
Any WrappedSolidTypeProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
@@ -1725,7 +1715,7 @@ Any WrappedSolidTypeProperty::getPropertyValue( const Reference< beans::XPropert
{
bool bFound = false;
bool bAmbiguous = false;
- sal_Int32 nGeometry = DiagramHelper::getGeometry3D( xDiagram, bFound, bAmbiguous );
+ sal_Int32 nGeometry = xDiagram->getGeometry3D( bFound, bAmbiguous );
if( bFound )
m_aOuterValue <<= nGeometry;
}
@@ -1807,7 +1797,7 @@ namespace {
class WrappedIncludeHiddenCellsProperty : public WrappedProperty
{
public:
- explicit WrappedIncludeHiddenCellsProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedIncludeHiddenCellsProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
virtual Any getPropertyValue(const Reference<beans::XPropertySet>& xInnerPropertySet) const override;
@@ -1818,9 +1808,9 @@ private: //member
}
-WrappedIncludeHiddenCellsProperty::WrappedIncludeHiddenCellsProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedIncludeHiddenCellsProperty::WrappedIncludeHiddenCellsProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty("IncludeHiddenCells","IncludeHiddenCells")
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
}
@@ -1859,7 +1849,7 @@ Reference< beans::XPropertySet > DiagramWrapper::getInnerPropertySet()
const Sequence< beans::Property >& DiagramWrapper::getPropertySequence()
{
- return *StaticDiagramWrapperPropertyArray::get();
+ return StaticDiagramWrapperPropertyArray();
}
std::vector< std::unique_ptr<WrappedProperty> > DiagramWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx
index bef53a739386..3a3a8383de05 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx
@@ -20,7 +20,7 @@
#include <WrappedPropertySet.hxx>
-#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include <com/sun/star/chart/XDiagramPositioning.hpp>
#include <com/sun/star/chart2/XDiagramProvider.hpp>
#include <com/sun/star/chart/XDiagram.hpp>
@@ -63,7 +63,7 @@ class DiagramWrapper : public cppu::ImplInheritanceHelper<
>
{
public:
- explicit DiagramWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit DiagramWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual ~DiagramWrapper() override;
/// XServiceInfo declarations
@@ -186,7 +186,7 @@ protected:
private:
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
- ::comphelper::OInterfaceContainerHelper3<css::lang::XEventListener> m_aEventListenerContainer;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer;
css::uno::Reference<
css::chart::XAxis > m_xXAxis;
diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
index 0cf33baa5848..5f75aa686a69 100644
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
@@ -30,51 +30,20 @@
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <algorithm>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
using ::com::sun::star::beans::Property;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-namespace
-{
-
-struct StaticGridWrapperPropertyArray_Initializer
-{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
- return &aPropSeq;
- }
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-};
-
-struct StaticGridWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticGridWrapperPropertyArray_Initializer >
-{
-};
-
-} // anonymous namespace
-
namespace chart::wrapper
{
-GridWrapper::GridWrapper(tGridType eType, const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
- : m_spChart2ModelContact(spChart2ModelContact)
- , m_aEventListenerContainer(m_aMutex)
+GridWrapper::GridWrapper(tGridType eType, std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
+ : m_spChart2ModelContact(std::move(spChart2ModelContact))
, m_eType(eType)
{
}
@@ -107,8 +76,9 @@ void GridWrapper::getDimensionAndSubGridBool( tGridType eType, sal_Int32& rnDime
// ____ XComponent ____
void SAL_CALL GridWrapper::dispose()
{
+ std::unique_lock g(m_aMutex);
Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
+ m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( xSource ) );
clearWrappedPropertySet();
}
@@ -116,13 +86,15 @@ void SAL_CALL GridWrapper::dispose()
void SAL_CALL GridWrapper::addEventListener(
const Reference< lang::XEventListener >& xListener )
{
- m_aEventListenerContainer.addInterface( xListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, xListener );
}
void SAL_CALL GridWrapper::removeEventListener(
const Reference< lang::XEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
// WrappedPropertySet
@@ -133,14 +105,14 @@ Reference< beans::XPropertySet > GridWrapper::getInnerPropertySet()
try
{
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
- uno::Reference< XCoordinateSystem > xCooSys( AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 /*nCooSysIndex*/ ) );
+ rtl::Reference< BaseCoordinateSystem > xCooSys( AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 /*nCooSysIndex*/ ) );
sal_Int32 nDimensionIndex = 1;
bool bSubGrid = false;
getDimensionAndSubGridBool( m_eType, nDimensionIndex, bSubGrid );
sal_Int32 nSubGridIndex = bSubGrid ? 0 : -1;
- xRet.set( AxisHelper::getGridProperties( xCooSys , nDimensionIndex, MAIN_AXIS_INDEX, nSubGridIndex ) );
+ xRet = AxisHelper::getGridProperties( xCooSys , nDimensionIndex, MAIN_AXIS_INDEX, nSubGridIndex );
}
catch( const uno::Exception & )
{
@@ -151,7 +123,18 @@ Reference< beans::XPropertySet > GridWrapper::getInnerPropertySet()
const Sequence< beans::Property >& GridWrapper::getPropertySequence()
{
- return *StaticGridWrapperPropertyArray::get();
+ static Sequence< Property > aPropSeq = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropSeq;
}
std::vector< std::unique_ptr<WrappedProperty> > GridWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.hxx b/chart2/source/controller/chartapiwrapper/GridWrapper.hxx
index 0a16368e9ccf..c978f3bb8d83 100644
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.hxx
@@ -20,7 +20,7 @@
#include <WrappedPropertySet.hxx>
#include <cppuhelper/implbase.hxx>
-#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -48,7 +48,7 @@ public:
Z_MINOR_GRID
};
- GridWrapper(tGridType eType, const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ GridWrapper(tGridType eType, std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual ~GridWrapper() override;
static void getDimensionAndSubGridBool( tGridType eType, sal_Int32& rnDimensionIndex, bool& rbSubGrid );
@@ -71,7 +71,7 @@ protected:
private:
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
- ::comphelper::OInterfaceContainerHelper3<css::lang::XEventListener> m_aEventListenerContainer;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer;
tGridType m_eType;
};
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
index ca5a25005152..9ec8f02819ef 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
@@ -26,7 +26,6 @@
#include <com/sun/star/chart2/LegendPosition.hpp>
#include <com/sun/star/chart/ChartLegendExpansion.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
#include <CharacterProperties.hxx>
#include <LinePropertiesHelper.hxx>
@@ -39,10 +38,10 @@
#include "WrappedScaleTextProperties.hxx"
#include <algorithm>
+#include <utility>
using namespace ::com::sun::star;
using ::com::sun::star::beans::Property;
-using ::osl::MutexGuard;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -225,35 +224,25 @@ void lcl_AddPropertiesToVector(
beans::PropertyAttribute::MAYBEDEFAULT );
}
-struct StaticLegendWrapperPropertyArray_Initializer
-{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
- return &aPropSeq;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
- ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::FillProperties::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- ::chart::wrapper::WrappedAutomaticPositionProperties::addProperties( aProperties );
- ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-};
-
-struct StaticLegendWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticLegendWrapperPropertyArray_Initializer >
+const Sequence< Property >& StaticLegendWrapperPropertyArray()
{
+ static Sequence< Property > aPropSeq = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
+ ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::FillProperties::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+ ::chart::wrapper::WrappedAutomaticPositionProperties::addProperties( aProperties );
+ ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties );
+
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropSeq;
};
} // anonymous namespace
@@ -261,9 +250,8 @@ struct StaticLegendWrapperPropertyArray : public rtl::StaticAggregate< Sequence<
namespace chart::wrapper
{
-LegendWrapper::LegendWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
- : m_spChart2ModelContact(spChart2ModelContact)
- , m_aEventListenerContainer(m_aMutex)
+LegendWrapper::LegendWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
+ : m_spChart2ModelContact(std::move(spChart2ModelContact))
{
}
@@ -322,23 +310,25 @@ OUString SAL_CALL LegendWrapper::getShapeType()
// ____ XComponent ____
void SAL_CALL LegendWrapper::dispose()
{
+ std::unique_lock g(m_aMutex);
Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
+ m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( xSource ) );
- MutexGuard aGuard( m_aMutex);
clearWrappedPropertySet();
}
void SAL_CALL LegendWrapper::addEventListener(
const Reference< lang::XEventListener >& xListener )
{
- m_aEventListenerContainer.addInterface( xListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, xListener );
}
void SAL_CALL LegendWrapper::removeEventListener(
const Reference< lang::XEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
//ReferenceSizePropertyProvider
@@ -379,7 +369,7 @@ Reference< beans::XPropertySet > LegendWrapper::getInnerPropertySet()
const Sequence< beans::Property >& LegendWrapper::getPropertySequence()
{
- return *StaticLegendWrapperPropertyArray::get();
+ return StaticLegendWrapperPropertyArray();
}
std::vector< std::unique_ptr<WrappedProperty> > LegendWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx
index 128c5fbcf970..5b4deac2a1f9 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx
@@ -21,7 +21,7 @@
#include <WrappedPropertySet.hxx>
#include "ReferenceSizePropertyProvider.hxx"
#include <cppuhelper/implbase.hxx>
-#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -42,7 +42,7 @@ class LegendWrapper : public ::cppu::ImplInheritanceHelper<
, public ReferenceSizePropertyProvider
{
public:
- explicit LegendWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit LegendWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual ~LegendWrapper() override;
/// XServiceInfo declarations
@@ -79,7 +79,7 @@ protected:
private:
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
- ::comphelper::OInterfaceContainerHelper3<css::lang::XEventListener> m_aEventListenerContainer;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer;
};
} // namespace chart::wrapper
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
index 516a96b2a042..d0cb5eab6552 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
@@ -19,21 +19,19 @@
#include "MinMaxLineWrapper.hxx"
#include "Chart2ModelContact.hxx"
-#include <DiagramHelper.hxx>
+#include <ChartType.hxx>
#include <servicenames_charttypes.hxx>
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <com/sun/star/chart2/XChartType.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/drawing/LineJoint.hpp>
#include <comphelper/sequence.hxx>
-
+#include <DataSeries.hxx>
#include <LinePropertiesHelper.hxx>
#include <UserDefinedProperties.hxx>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
using ::com::sun::star::beans::Property;
using ::com::sun::star::uno::Reference;
@@ -43,72 +41,34 @@ using ::com::sun::star::uno::Any;
namespace
{
-struct StaticMinMaxLineWrapperDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- ::chart::LinePropertiesHelper::AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-};
-
-struct StaticMinMaxLineWrapperDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticMinMaxLineWrapperDefaults_Initializer >
-{
-};
-
-struct StaticMinMaxLineWrapperPropertyArray_Initializer
+Sequence< Property >& StaticMinMaxLineWrapperPropertyArray()
{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
- return &aPropSeq;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
-
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-};
+ static Sequence< Property > aPropSeq = []()
+ {
+ std::vector< css::beans::Property > aProperties;
-struct StaticMinMaxLineWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticMinMaxLineWrapperPropertyArray_Initializer >
-{
-};
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-struct StaticMinMaxLineWrapperInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( *StaticMinMaxLineWrapperPropertyArray::get() );
- return &aPropHelper;
- }
-};
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticMinMaxLineWrapperInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticMinMaxLineWrapperInfoHelper_Initializer >
-{
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropSeq;
};
-struct StaticMinMaxLineWrapperInfo_Initializer
+::cppu::OPropertyArrayHelper& StaticMinMaxLineWrapperInfoHelper()
{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticMinMaxLineWrapperInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
+ static ::cppu::OPropertyArrayHelper aPropHelper( StaticMinMaxLineWrapperPropertyArray() );
+ return aPropHelper;
};
-struct StaticMinMaxLineWrapperInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticMinMaxLineWrapperInfo_Initializer >
+uno::Reference< beans::XPropertySetInfo >& StaticMinMaxLineWrapperInfo()
{
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo( StaticMinMaxLineWrapperInfoHelper() ) );
+ return xPropertySetInfo;
};
} // anonymous namespace
@@ -116,9 +76,8 @@ struct StaticMinMaxLineWrapperInfo : public rtl::StaticAggregate< uno::Reference
namespace chart::wrapper
{
-MinMaxLineWrapper::MinMaxLineWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
- : m_spChart2ModelContact( spChart2ModelContact )
- , m_aEventListenerContainer( m_aMutex )
+MinMaxLineWrapper::MinMaxLineWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
+ : m_spChart2ModelContact(std::move( spChart2ModelContact ))
, m_aWrappedLineJointProperty( "LineJoint", uno::Any( drawing::LineJoint_NONE ))
{
}
@@ -130,58 +89,53 @@ MinMaxLineWrapper::~MinMaxLineWrapper()
// ____ XComponent ____
void SAL_CALL MinMaxLineWrapper::dispose()
{
+ std::unique_lock g(m_aMutex);
Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
+ m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( xSource ) );
}
void SAL_CALL MinMaxLineWrapper::addEventListener(
const Reference< lang::XEventListener >& xListener )
{
- m_aEventListenerContainer.addInterface( xListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, xListener );
}
void SAL_CALL MinMaxLineWrapper::removeEventListener(
const Reference< lang::XEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
//XPropertySet
uno::Reference< beans::XPropertySetInfo > SAL_CALL MinMaxLineWrapper::getPropertySetInfo()
{
- return *StaticMinMaxLineWrapperInfo::get();
+ return StaticMinMaxLineWrapperInfo();
}
void SAL_CALL MinMaxLineWrapper::setPropertyValue( const OUString& rPropertyName, const uno::Any& rValue )
{
- Reference< beans::XPropertySet > xPropSet;
-
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
- const Sequence< Reference< chart2::XChartType > > aTypes(
- ::chart::DiagramHelper::getChartTypesFromDiagram( xDiagram ) );
- for( Reference< chart2::XChartType > const & xType : aTypes )
+ const std::vector< rtl::Reference< ChartType > > & aTypes = xDiagram->getChartTypes();
+ for( rtl::Reference< ChartType > const & xType : aTypes )
{
if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
{
- Reference< chart2::XDataSeriesContainer > xSeriesContainer(xType,uno::UNO_QUERY);
- if( xSeriesContainer.is() )
+ const std::vector< rtl::Reference< DataSeries > > & aSeriesSeq( xType->getDataSeries2() );
+ if(!aSeriesSeq.empty())
{
- Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesContainer->getDataSeries() );
- if(aSeriesSeq.hasElements())
+ if(aSeriesSeq[0].is())
{
- xPropSet.set(aSeriesSeq[0],uno::UNO_QUERY);
- if(xPropSet.is())
- {
- if( rPropertyName == "LineColor" )
- xPropSet->setPropertyValue( "Color", rValue );
- else if( rPropertyName == "LineTransparence" )
- xPropSet->setPropertyValue( "Transparency", rValue );
- else if( rPropertyName == m_aWrappedLineJointProperty.getOuterName() )
- m_aWrappedLineJointProperty.setPropertyValue( rValue, xPropSet );
- else
- xPropSet->setPropertyValue( rPropertyName, rValue );
- return;
- }
+ if( rPropertyName == "LineColor" )
+ aSeriesSeq[0]->setPropertyValue( "Color", rValue );
+ else if( rPropertyName == "LineTransparence" )
+ aSeriesSeq[0]->setPropertyValue( "Transparency", rValue );
+ else if( rPropertyName == m_aWrappedLineJointProperty.getOuterName() )
+ m_aWrappedLineJointProperty.setPropertyValue( rValue, aSeriesSeq[0] );
+ else
+ aSeriesSeq[0]->setPropertyValue( rPropertyName, rValue );
+ return;
}
}
}
@@ -191,24 +145,19 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( const OUString& rProperty
{
Any aRet;
- Reference< beans::XPropertySet > xPropSet;
+ rtl::Reference< DataSeries > xPropSet;
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
- const Sequence< Reference< chart2::XChartType > > aTypes(
- ::chart::DiagramHelper::getChartTypesFromDiagram( xDiagram ) );
- for( Reference< chart2::XChartType > const & xType : aTypes )
+ const std::vector< rtl::Reference< ChartType > > aTypes = xDiagram->getChartTypes();
+ for( rtl::Reference< ChartType > const & xType : aTypes )
{
if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
{
- Reference< chart2::XDataSeriesContainer > xSeriesContainer(xType,uno::UNO_QUERY);
- if( xSeriesContainer.is() )
+ const std::vector< rtl::Reference< DataSeries > > & aSeriesSeq( xType->getDataSeries2() );
+ if(!aSeriesSeq.empty())
{
- Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesContainer->getDataSeries() );
- if(aSeriesSeq.hasElements())
- {
- xPropSet.set(aSeriesSeq[0],uno::UNO_QUERY);
- break;
- }
+ xPropSet = aSeriesSeq[0];
+ break;
}
}
}
@@ -332,9 +281,14 @@ void SAL_CALL MinMaxLineWrapper::setPropertyToDefault( const OUString& rProperty
uno::Any SAL_CALL MinMaxLineWrapper::getPropertyDefault( const OUString& rPropertyName )
{
- const tPropertyValueMap& rStaticDefaults = *StaticMinMaxLineWrapperDefaults::get();
- tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( StaticMinMaxLineWrapperInfoHelper::get()->getHandleByName( rPropertyName ) ) );
- if( aFound == rStaticDefaults.end() )
+ static const ::chart::tPropertyValueMap aStaticDefaults = []
+ {
+ ::chart::tPropertyValueMap aTmp;
+ ::chart::LinePropertiesHelper::AddDefaultsToMap( aTmp );
+ return aTmp;
+ }();
+ tPropertyValueMap::const_iterator aFound( aStaticDefaults.find( StaticMinMaxLineWrapperInfoHelper().getHandleByName( rPropertyName ) ) );
+ if( aFound == aStaticDefaults.end() )
return uno::Any();
return (*aFound).second;
}
@@ -343,7 +297,7 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyDefault( const OUString& rProper
//getPropertyStates() already declared in XPropertyState
void SAL_CALL MinMaxLineWrapper::setAllPropertiesToDefault( )
{
- const Sequence< beans::Property >& rPropSeq = *StaticMinMaxLineWrapperPropertyArray::get();
+ const Sequence< beans::Property >& rPropSeq = StaticMinMaxLineWrapperPropertyArray();
for(beans::Property const & prop : rPropSeq)
{
setPropertyToDefault( prop.Name );
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
index 33cabe1743e2..337ca8bdebd7 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
@@ -19,9 +19,8 @@
#pragma once
#include <WrappedIgnoreProperty.hxx>
-#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/interfacecontainer4.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertyStates.hpp>
@@ -37,8 +36,7 @@ namespace chart::wrapper
class Chart2ModelContact;
-class MinMaxLineWrapper : public cppu::BaseMutex
- , public ::cppu::WeakImplHelper
+class MinMaxLineWrapper : public ::cppu::WeakImplHelper
< css::lang::XComponent
, css::lang::XServiceInfo
, css::beans::XPropertySet
@@ -48,7 +46,7 @@ class MinMaxLineWrapper : public cppu::BaseMutex
>
{
public:
- explicit MinMaxLineWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit MinMaxLineWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual ~MinMaxLineWrapper() override;
/// XServiceInfo declarations
@@ -93,8 +91,9 @@ public:
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults( const css::uno::Sequence< OUString >& aPropertyNames ) override;
private: //member
+ std::mutex m_aMutex;
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
- ::comphelper::OInterfaceContainerHelper3<css::lang::XEventListener> m_aEventListenerContainer;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer;
WrappedIgnoreProperty m_aWrappedLineJointProperty;
};
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index 074a37778e65..129798d3706f 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -26,7 +26,6 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/chart2/XTitle.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <CharacterProperties.hxx>
#include <LinePropertiesHelper.hxx>
@@ -40,10 +39,10 @@
#include <algorithm>
#include <rtl/ustrbuf.hxx>
#include <cppuhelper/propshlp.hxx>
+#include <utility>
using namespace ::com::sun::star;
using ::com::sun::star::beans::Property;
-using ::osl::MutexGuard;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -75,12 +74,12 @@ WrappedTitleStringProperty::WrappedTitleStringProperty( const Reference< uno::XC
void WrappedTitleStringProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
{
- Reference< chart2::XTitle > xTitle(xInnerPropertySet,uno::UNO_QUERY);
- if(xTitle.is())
+ Title* pTitle = dynamic_cast<Title*>(xInnerPropertySet.get());
+ if(pTitle)
{
OUString aString;
rOuterValue >>= aString;
- TitleHelper::setCompleteString( aString, xTitle, m_xContext );
+ TitleHelper::setCompleteString( aString, pTitle, m_xContext );
}
}
Any WrappedTitleStringProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
@@ -107,6 +106,51 @@ Any WrappedTitleStringProperty::getPropertyDefault( const Reference< beans::XPro
namespace {
+ class WrappedTitleFormStringsProperty : public WrappedProperty
+ {
+ public:
+ explicit WrappedTitleFormStringsProperty();
+
+ virtual void setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const override;
+ virtual Any getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const override;
+ virtual Any getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const override;
+ };
+
+}
+
+WrappedTitleFormStringsProperty::WrappedTitleFormStringsProperty()
+ : ::chart::WrappedProperty( "FormattedStrings", OUString() )
+{
+}
+
+void WrappedTitleFormStringsProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
+{
+ Title* pTitle = dynamic_cast<Title*>(xInnerPropertySet.get());
+ if (pTitle)
+ {
+ Sequence< Reference< chart2::XFormattedString >> xFormattedStrings;
+ rOuterValue >>= xFormattedStrings;
+ TitleHelper::setFormattedString(pTitle, xFormattedStrings);
+ }
+}
+Any WrappedTitleFormStringsProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
+{
+ Any aRet(getPropertyDefault(Reference< beans::XPropertyState >(xInnerPropertySet, uno::UNO_QUERY)));
+ Reference< chart2::XTitle > xTitle(xInnerPropertySet, uno::UNO_QUERY);
+ if (xTitle.is())
+ {
+ const Sequence< Reference< chart2::XFormattedString > > aStrings(xTitle->getText());
+ aRet <<= aStrings;
+ }
+ return aRet;
+}
+Any WrappedTitleFormStringsProperty::getPropertyDefault( const Reference< beans::XPropertyState >& /*xInnerPropertyState*/ ) const
+{
+ return uno::Any(Sequence< Reference< chart2::XFormattedString > >()); //default title is an empty Sequence of XFormattedStrings
+}
+
+namespace {
+
class WrappedStackedTextProperty : public WrappedProperty
{
public:
@@ -128,6 +172,8 @@ namespace
enum
{
PROP_TITLE_STRING,
+ PROP_TITLE_FORMATTED_STRINGS,
+ PROP_TITLE_VISIBLE,
PROP_TITLE_TEXT_ROTATION,
PROP_TITLE_TEXT_STACKED
};
@@ -141,6 +187,18 @@ void lcl_AddPropertiesToVector(
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEVOID );
+ rOutProperties.emplace_back( "FormattedStrings",
+ PROP_TITLE_FORMATTED_STRINGS,
+ cppu::UnoType< Sequence< Reference< chart2::XFormattedString >>>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEVOID );
+
+ rOutProperties.emplace_back( "Visible",
+ PROP_TITLE_VISIBLE,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEVOID );
+
rOutProperties.emplace_back( "TextRotation",
PROP_TITLE_TEXT_ROTATION,
cppu::UnoType<sal_Int32>::get(),
@@ -153,36 +211,27 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT );
}
-struct StaticTitleWrapperPropertyArray_Initializer
+const Sequence< Property > & StaticTitleWrapperPropertyArray()
{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
- return &aPropSeq;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
- ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::FillProperties::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- ::chart::wrapper::WrappedAutomaticPositionProperties::addProperties( aProperties );
- ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
+ static Sequence< Property > aPropSeq = []()
+ {
+ std::vector< beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
+ ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::FillProperties::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+ ::chart::wrapper::WrappedAutomaticPositionProperties::addProperties( aProperties );
+ ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties );
+
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropSeq;
};
-struct StaticTitleWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticTitleWrapperPropertyArray_Initializer >
-{
-};
} // anonymous namespace
@@ -190,9 +239,8 @@ namespace chart::wrapper
{
TitleWrapper::TitleWrapper( ::chart::TitleHelper::eTitleType eTitleType,
- const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact ) :
- m_spChart2ModelContact( spChart2ModelContact ),
- m_aEventListenerContainer( m_aMutex ),
+ std::shared_ptr<Chart2ModelContact> spChart2ModelContact ) :
+ m_spChart2ModelContact(std::move( spChart2ModelContact )),
m_eTitleType(eTitleType)
{
ControllerLockGuardUNO aCtrlLockGuard( m_spChart2ModelContact->getDocumentModel() );
@@ -244,38 +292,25 @@ OUString SAL_CALL TitleWrapper::getShapeType()
// ____ XComponent ____
void SAL_CALL TitleWrapper::dispose()
{
+ std::unique_lock g(m_aMutex);
Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
+ m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( xSource ) );
- MutexGuard aGuard( m_aMutex);
clearWrappedPropertySet();
}
void SAL_CALL TitleWrapper::addEventListener(
const Reference< lang::XEventListener >& xListener )
{
- m_aEventListenerContainer.addInterface( xListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, xListener );
}
void SAL_CALL TitleWrapper::removeEventListener(
const Reference< lang::XEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
-}
-
-Reference< beans::XPropertySet > TitleWrapper::getFirstCharacterPropertySet()
-{
- Reference< beans::XPropertySet > xProp;
-
- Reference< chart2::XTitle > xTitle( getTitleObject() );
- if( xTitle.is())
- {
- Sequence< Reference< chart2::XFormattedString > > aStrings( xTitle->getText());
- if( aStrings.hasElements() )
- xProp.set( aStrings[0], uno::UNO_QUERY );
- }
-
- return xProp;
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
void TitleWrapper::getFastCharacterPropertyValue( sal_Int32 nHandle, Any& rValue )
@@ -283,7 +318,7 @@ void TitleWrapper::getFastCharacterPropertyValue( sal_Int32 nHandle, Any& rValue
OSL_ASSERT( FAST_PROPERTY_ID_START_CHAR_PROP <= nHandle &&
nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP );
- Reference< beans::XPropertySet > xProp = getFirstCharacterPropertySet();
+ Reference< beans::XPropertySet > xProp = getInnerPropertySet();
Reference< beans::XFastPropertySet > xFastProp( xProp, uno::UNO_QUERY );
if(xProp.is())
{
@@ -323,6 +358,16 @@ void TitleWrapper::setFastCharacterPropertyValue(
else if( xFastPropertySet.is() )
xFastPropertySet->setFastPropertyValue( nHandle, rValue );
}
+
+ Reference< beans::XPropertySet > xInnerProp = getInnerPropertySet();
+ Reference< beans::XFastPropertySet > xFastInnerProp( xInnerProp, uno::UNO_QUERY );
+ if (xInnerProp.is())
+ {
+ if (pWrappedProperty)
+ pWrappedProperty->setPropertyValue(rValue, xInnerProp);
+ else if (xFastInnerProp.is())
+ xFastInnerProp->setFastPropertyValue(nHandle, rValue);
+ }
}
// WrappedPropertySet
@@ -356,7 +401,7 @@ beans::PropertyState SAL_CALL TitleWrapper::getPropertyState( const OUString& rP
sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName );
if( CharacterProperties::IsCharacterPropertyHandle( nHandle ) )
{
- Reference< beans::XPropertyState > xPropState( getFirstCharacterPropertySet(), uno::UNO_QUERY );
+ Reference< beans::XPropertyState > xPropState( getInnerPropertySet(), uno::UNO_QUERY);
if( xPropState.is() )
{
const WrappedProperty* pWrappedProperty = getWrappedProperty( rPropertyName );
@@ -389,7 +434,7 @@ Any SAL_CALL TitleWrapper::getPropertyDefault( const OUString& rPropertyName )
sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName );
if( CharacterProperties::IsCharacterPropertyHandle( nHandle ) )
{
- Reference< beans::XPropertyState > xPropState( getFirstCharacterPropertySet(), uno::UNO_QUERY );
+ Reference< beans::XPropertyState > xPropState( getInnerPropertySet(), uno::UNO_QUERY );
if( xPropState.is() )
{
const WrappedProperty* pWrappedProperty = getWrappedProperty( rPropertyName );
@@ -410,7 +455,7 @@ void SAL_CALL TitleWrapper::addPropertyChangeListener( const OUString& rProperty
sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName );
if( CharacterProperties::IsCharacterPropertyHandle( nHandle ) )
{
- Reference< beans::XPropertySet > xPropSet = getFirstCharacterPropertySet();
+ Reference< beans::XPropertySet > xPropSet = getInnerPropertySet();
if( xPropSet.is() )
xPropSet->addPropertyChangeListener( rPropertyName, xListener );
}
@@ -422,7 +467,7 @@ void SAL_CALL TitleWrapper::removePropertyChangeListener( const OUString& rPrope
sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName );
if( CharacterProperties::IsCharacterPropertyHandle( nHandle ) )
{
- Reference< beans::XPropertySet > xPropSet = getFirstCharacterPropertySet();
+ Reference< beans::XPropertySet > xPropSet = getInnerPropertySet();
if( xPropSet.is() )
xPropSet->removePropertyChangeListener( rPropertyName, xListener );
}
@@ -469,7 +514,7 @@ Reference< beans::XPropertySet > TitleWrapper::getInnerPropertySet()
const Sequence< beans::Property >& TitleWrapper::getPropertySequence()
{
- return *StaticTitleWrapperPropertyArray::get();
+ return StaticTitleWrapperPropertyArray();
}
std::vector< std::unique_ptr<WrappedProperty> > TitleWrapper::createWrappedProperties()
@@ -477,6 +522,7 @@ std::vector< std::unique_ptr<WrappedProperty> > TitleWrapper::createWrappedPrope
std::vector< std::unique_ptr<WrappedProperty> > aWrappedProperties;
aWrappedProperties.emplace_back( new WrappedTitleStringProperty( m_spChart2ModelContact->m_xContext ) );
+ aWrappedProperties.emplace_back( new WrappedTitleFormStringsProperty() );
aWrappedProperties.emplace_back( new WrappedTextRotationProperty( true ) );
aWrappedProperties.emplace_back( new WrappedStackedTextProperty() );
WrappedCharacterHeightProperty::addWrappedProperties( aWrappedProperties, this );
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
index 5cc3ed477d01..aecf5f304231 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
@@ -22,7 +22,7 @@
#include "ReferenceSizePropertyProvider.hxx"
#include <TitleHelper.hxx>
#include <cppuhelper/implbase.hxx>
-#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -45,7 +45,7 @@ class TitleWrapper final : public ::cppu::ImplInheritanceHelper<
{
public:
TitleWrapper( ::chart::TitleHelper::eTitleType eTitleType,
- const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact );
+ std::shared_ptr<Chart2ModelContact> spChart2ModelContact );
virtual ~TitleWrapper() override;
/// XServiceInfo declarations
@@ -100,7 +100,7 @@ private:
css::uno::Reference< css::chart2::XTitle > getTitleObject();
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
- ::comphelper::OInterfaceContainerHelper3<css::lang::XEventListener> m_aEventListenerContainer;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer;
::chart::TitleHelper::eTitleType m_eTitleType;
};
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index 2922f91c466b..c63090d81ac8 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -19,20 +19,19 @@
#include "UpDownBarWrapper.hxx"
#include "Chart2ModelContact.hxx"
-#include <DiagramHelper.hxx>
+#include <ChartType.hxx>
#include <servicenames_charttypes.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/propshlp.hxx>
-#include <com/sun/star/chart2/XChartType.hpp>
#include <comphelper/sequence.hxx>
#include <LinePropertiesHelper.hxx>
#include <FillProperties.hxx>
#include <UserDefinedProperties.hxx>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
using ::com::sun::star::beans::Property;
using ::com::sun::star::uno::Reference;
@@ -42,79 +41,28 @@ using ::com::sun::star::uno::Any;
namespace
{
-struct StaticUpDownBarWrapperPropertyArray_Initializer
+const Sequence< Property > & StaticUpDownBarWrapperPropertyArray()
{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
- return &aPropSeq;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
-
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::FillProperties::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-};
-
-struct StaticUpDownBarWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticUpDownBarWrapperPropertyArray_Initializer >
-{
-};
-
-struct StaticUpDownBarWrapperInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( *StaticUpDownBarWrapperPropertyArray::get() );
- return &aPropHelper;
- }
-};
+ static Sequence< Property > aPropSeq = []()
+ {
+ std::vector< css::beans::Property > aProperties;
-struct StaticUpDownBarWrapperInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticUpDownBarWrapperInfoHelper_Initializer >
-{
-};
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::FillProperties::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-struct StaticUpDownBarWrapperInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticUpDownBarWrapperInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticUpDownBarWrapperInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticUpDownBarWrapperInfo_Initializer >
-{
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropSeq;
};
-struct StaticUpDownBarWrapperDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::LinePropertiesHelper::AddDefaultsToMap( rOutMap );
- ::chart::FillProperties::AddDefaultsToMap( rOutMap );
- }
-};
-
-struct StaticUpDownBarWrapperDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticUpDownBarWrapperDefaults_Initializer >
+::cppu::OPropertyArrayHelper& StaticUpDownBarWrapperInfoHelper()
{
+ static ::cppu::OPropertyArrayHelper aPropHelper( StaticUpDownBarWrapperPropertyArray() );
+ return aPropHelper;
};
} // anonymous namespace
@@ -123,9 +71,8 @@ namespace chart::wrapper
{
UpDownBarWrapper::UpDownBarWrapper(
- bool bUp, const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
- : m_spChart2ModelContact( spChart2ModelContact )
- , m_aEventListenerContainer( m_aMutex )
+ bool bUp, std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
+ : m_spChart2ModelContact(std::move( spChart2ModelContact ))
, m_aPropertySetName( bUp ? OUString( "WhiteDay" ) : OUString( "BlackDay" ))
{
}
@@ -137,42 +84,44 @@ UpDownBarWrapper::~UpDownBarWrapper()
// ____ XComponent ____
void SAL_CALL UpDownBarWrapper::dispose()
{
+ std::unique_lock g(m_aMutex);
Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
+ m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( xSource ) );
}
void SAL_CALL UpDownBarWrapper::addEventListener(
const Reference< lang::XEventListener >& xListener )
{
- m_aEventListenerContainer.addInterface( xListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, xListener );
}
void SAL_CALL UpDownBarWrapper::removeEventListener(
const Reference< lang::XEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
//XPropertySet
uno::Reference< beans::XPropertySetInfo > SAL_CALL UpDownBarWrapper::getPropertySetInfo()
{
- return *StaticUpDownBarWrapperInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticUpDownBarWrapperInfoHelper() ) );
+ return xPropertySetInfo;
}
+
void SAL_CALL UpDownBarWrapper::setPropertyValue( const OUString& rPropertyName, const uno::Any& rValue )
{
Reference< beans::XPropertySet > xPropSet;
- const Sequence< Reference< chart2::XChartType > > aTypes(
- ::chart::DiagramHelper::getChartTypesFromDiagram( m_spChart2ModelContact->getDiagram() ) );
- for( Reference< chart2::XChartType > const & xType : aTypes )
+ const std::vector< rtl::Reference< ChartType > > aTypes =
+ m_spChart2ModelContact->getDiagram()->getChartTypes();
+ for( rtl::Reference< ChartType > const & xType : aTypes )
{
if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
{
- Reference< beans::XPropertySet > xTypeProps( xType, uno::UNO_QUERY );
- if(xTypeProps.is())
- {
- xTypeProps->getPropertyValue( m_aPropertySetName ) >>= xPropSet;
- }
+ xType->getPropertyValue( m_aPropertySetName ) >>= xPropSet;
}
}
if(xPropSet.is())
@@ -184,17 +133,13 @@ uno::Any SAL_CALL UpDownBarWrapper::getPropertyValue( const OUString& rPropertyN
Reference< beans::XPropertySet > xPropSet;
- const Sequence< Reference< chart2::XChartType > > aTypes(
- ::chart::DiagramHelper::getChartTypesFromDiagram( m_spChart2ModelContact->getDiagram() ) );
- for( Reference< chart2::XChartType > const & xType : aTypes )
+ const std::vector< rtl::Reference< ChartType > > aTypes =
+ m_spChart2ModelContact->getDiagram()->getChartTypes();
+ for( rtl::Reference<ChartType > const & xType : aTypes )
{
if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
{
- Reference< beans::XPropertySet > xTypeProps( xType, uno::UNO_QUERY );
- if(xTypeProps.is())
- {
- xTypeProps->getPropertyValue( m_aPropertySetName ) >>= xPropSet;
- }
+ xType->getPropertyValue( m_aPropertySetName ) >>= xPropSet;
}
}
if(xPropSet.is())
@@ -299,9 +244,15 @@ void SAL_CALL UpDownBarWrapper::setPropertyToDefault( const OUString& rPropertyN
uno::Any SAL_CALL UpDownBarWrapper::getPropertyDefault( const OUString& rPropertyName )
{
- const tPropertyValueMap& rStaticDefaults = *StaticUpDownBarWrapperDefaults::get();
- tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( StaticUpDownBarWrapperInfoHelper::get()->getHandleByName( rPropertyName ) ) );
- if( aFound == rStaticDefaults.end() )
+ static const ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ ::chart::tPropertyValueMap aTmp;
+ ::chart::LinePropertiesHelper::AddDefaultsToMap( aTmp );
+ ::chart::FillProperties::AddDefaultsToMap( aTmp );
+ return aTmp;
+ }();
+ tPropertyValueMap::const_iterator aFound( aStaticDefaults.find( StaticUpDownBarWrapperInfoHelper().getHandleByName( rPropertyName ) ) );
+ if( aFound == aStaticDefaults.end() )
return uno::Any();
return (*aFound).second;
}
@@ -310,7 +261,7 @@ uno::Any SAL_CALL UpDownBarWrapper::getPropertyDefault( const OUString& rPropert
//getPropertyStates() already declared in XPropertyState
void SAL_CALL UpDownBarWrapper::setAllPropertiesToDefault( )
{
- const Sequence< beans::Property >& rPropSeq = *StaticUpDownBarWrapperPropertyArray::get();
+ const Sequence< beans::Property >& rPropSeq = StaticUpDownBarWrapperPropertyArray();
for(beans::Property const & prop : rPropSeq)
{
setPropertyToDefault( prop.Name );
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
index 63e1c44db4d8..517a2406fe2c 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
@@ -18,9 +18,8 @@
*/
#pragma once
-#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/interfacecontainer4.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertyStates.hpp>
@@ -36,8 +35,7 @@ namespace chart::wrapper
class Chart2ModelContact;
-class UpDownBarWrapper : public cppu::BaseMutex
- , public ::cppu::WeakImplHelper
+class UpDownBarWrapper : public ::cppu::WeakImplHelper
< css::lang::XComponent
, css::lang::XServiceInfo
, css::beans::XPropertySet
@@ -47,7 +45,7 @@ class UpDownBarWrapper : public cppu::BaseMutex
>
{
public:
- UpDownBarWrapper(bool bUp, const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ UpDownBarWrapper(bool bUp, std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual ~UpDownBarWrapper() override;
/// XServiceInfo declarations
@@ -94,8 +92,9 @@ public:
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults( const css::uno::Sequence< OUString >& aPropertyNames ) override;
private: //member
+ std::mutex m_aMutex;
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
- ::comphelper::OInterfaceContainerHelper3<css::lang::XEventListener> m_aEventListenerContainer;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer;
OUString m_aPropertySetName;
};
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
index 711f68201727..9c8a6f61afb0 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
@@ -21,7 +21,6 @@
#include "Chart2ModelContact.hxx"
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <com/sun/star/chart2/XDiagram.hpp>
#include <FillProperties.hxx>
#include <LinePropertiesHelper.hxx>
@@ -29,54 +28,20 @@
#include <WrappedDirectStateProperty.hxx>
#include <algorithm>
+#include <utility>
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
using ::com::sun::star::beans::Property;
-using ::osl::MutexGuard;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-namespace
-{
-
-struct StaticWallFloorWrapperPropertyArray_Initializer
-{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
- return &aPropSeq;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- ::chart::FillProperties::AddPropertiesToVector( aProperties );
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-};
-
-struct StaticWallFloorWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticWallFloorWrapperPropertyArray_Initializer >
-{
-};
-
-} // anonymous namespace
-
namespace chart::wrapper
{
WallFloorWrapper::WallFloorWrapper( bool bWall,
- const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact ) :
- m_spChart2ModelContact( spChart2ModelContact ),
- m_aEventListenerContainer( m_aMutex ),
+ std::shared_ptr<Chart2ModelContact> spChart2ModelContact ) :
+ m_spChart2ModelContact(std::move( spChart2ModelContact )),
m_bWall( bWall )
{
@@ -89,23 +54,25 @@ WallFloorWrapper::~WallFloorWrapper()
// ____ XComponent ____
void SAL_CALL WallFloorWrapper::dispose()
{
+ std::unique_lock g(m_aMutex);
Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
+ m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( xSource ) );
- MutexGuard aGuard( m_aMutex);
clearWrappedPropertySet();
}
void SAL_CALL WallFloorWrapper::addEventListener(
const Reference< lang::XEventListener >& xListener )
{
- m_aEventListenerContainer.addInterface( xListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, xListener );
}
void SAL_CALL WallFloorWrapper::removeEventListener(
const Reference< lang::XEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
// WrappedPropertySet
@@ -127,7 +94,19 @@ Reference< beans::XPropertySet > WallFloorWrapper::getInnerPropertySet()
const Sequence< beans::Property >& WallFloorWrapper::getPropertySequence()
{
- return *StaticWallFloorWrapperPropertyArray::get();
+ static Sequence< Property > aPropSeq = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ ::chart::FillProperties::AddPropertiesToVector( aProperties );
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropSeq;
}
std::vector< std::unique_ptr<WrappedProperty> > WallFloorWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx
index 3df4a9f1af0b..4a85bd8d5b37 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx
@@ -20,7 +20,7 @@
#include <WrappedPropertySet.hxx>
#include <cppuhelper/implbase.hxx>
-#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -38,7 +38,7 @@ class WallFloorWrapper : public ::cppu::ImplInheritanceHelper<
>
{
public:
- WallFloorWrapper(bool bWall, const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ WallFloorWrapper(bool bWall, std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual ~WallFloorWrapper() override;
/// XServiceInfo declarations
@@ -59,7 +59,7 @@ protected:
private:
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
- ::comphelper::OInterfaceContainerHelper3<css::lang::XEventListener> m_aEventListenerContainer;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer;
bool m_bWall;
};
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
index 2bfb5ed42211..b88468c9941e 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
index 4895e1c40b9d..2b047ebfaf82 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
@@ -23,13 +23,12 @@
#include "WrappedAxisAndGridExistenceProperties.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/chart2/XAxis.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <WrappedProperty.hxx>
#include "Chart2ModelContact.hxx"
#include <TitleHelper.hxx>
-#include <ChartView.hxx>
+#include <utility>
#include <osl/diagnose.h>
using namespace ::com::sun::star;
@@ -45,7 +44,7 @@ class WrappedAxisAndGridExistenceProperty : public WrappedProperty
{
public:
WrappedAxisAndGridExistenceProperty( bool bAxis, bool bMain, sal_Int32 nDimensionIndex
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact );
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact );
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -81,9 +80,9 @@ void WrappedAxisAndGridExistenceProperties::addWrappedProperties( std::vector< s
}
WrappedAxisAndGridExistenceProperty::WrappedAxisAndGridExistenceProperty( bool bAxis, bool bMain, sal_Int32 nDimensionIndex
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact )
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact )
: WrappedProperty(OUString(),OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
, m_bAxis( bAxis )
, m_bMain( bMain )
, m_nDimensionIndex( nDimensionIndex )
@@ -205,7 +204,7 @@ class WrappedAxisTitleExistenceProperty : public WrappedProperty
{
public:
WrappedAxisTitleExistenceProperty( sal_Int32 nTitleIndex
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact );
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact );
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -231,9 +230,9 @@ void WrappedAxisTitleExistenceProperties::addWrappedProperties( std::vector< std
}
WrappedAxisTitleExistenceProperty::WrappedAxisTitleExistenceProperty(sal_Int32 nTitleIndex
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty(OUString(),OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
, m_eTitleType( TitleHelper::Y_AXIS_TITLE )
{
switch( nTitleIndex )
@@ -288,7 +287,7 @@ Any WrappedAxisTitleExistenceProperty::getPropertyValue( const Reference< beans:
{
bool bHasTitle = false;
- Reference< chart2::XTitle > xTitle( TitleHelper::getTitle( m_eTitleType, m_spChart2ModelContact->getDocumentModel() ) );
+ rtl::Reference< Title > xTitle( TitleHelper::getTitle( m_eTitleType, m_spChart2ModelContact->getDocumentModel() ) );
if( xTitle.is() && !TitleHelper::getCompleteString( xTitle ).isEmpty() )
bHasTitle = true;
@@ -311,7 +310,7 @@ class WrappedAxisLabelExistenceProperty : public WrappedProperty
{
public:
WrappedAxisLabelExistenceProperty( bool bMain, sal_Int32 nDimensionIndex
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact );
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact );
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -338,9 +337,9 @@ void WrappedAxisLabelExistenceProperties::addWrappedProperties( std::vector< std
}
WrappedAxisLabelExistenceProperty::WrappedAxisLabelExistenceProperty(bool bMain, sal_Int32 nDimensionIndex
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty(OUString(),OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
, m_bMain( bMain )
, m_nDimensionIndex( nDimensionIndex )
{
@@ -372,11 +371,11 @@ void WrappedAxisLabelExistenceProperty::setPropertyValue( const Any& rOuterValue
return;
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
- Reference< beans::XPropertySet > xProp( AxisHelper::getAxis( m_nDimensionIndex, m_bMain, xDiagram ), uno::UNO_QUERY );
+ rtl::Reference< Axis > xProp = AxisHelper::getAxis( m_nDimensionIndex, m_bMain, xDiagram );
if( !xProp.is() && bNewValue )
{
//create axis if needed
- xProp.set( AxisHelper::createAxis( m_nDimensionIndex, m_bMain, xDiagram, m_spChart2ModelContact->m_xContext ), uno::UNO_QUERY );
+ xProp = AxisHelper::createAxis( m_nDimensionIndex, m_bMain, xDiagram, m_spChart2ModelContact->m_xContext );
if( xProp.is() )
xProp->setPropertyValue( "Show", uno::Any( false ) );
}
@@ -388,7 +387,7 @@ Any WrappedAxisLabelExistenceProperty::getPropertyValue( const Reference< beans:
{
Any aRet;
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
- Reference< beans::XPropertySet > xProp( AxisHelper::getAxis( m_nDimensionIndex, m_bMain, xDiagram ), uno::UNO_QUERY );
+ rtl::Reference< Axis > xProp = AxisHelper::getAxis( m_nDimensionIndex, m_bMain, xDiagram );
if( xProp.is() )
aRet = xProp->getPropertyValue( "DisplayLabels" );
else
diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx
index 7eee90a2c209..be9457d0ffd7 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx
@@ -45,7 +45,7 @@ protected:
virtual css::uno::Any convertInnerToOuterValue( const css::uno::Any& rInnerValue ) const override;
virtual css::uno::Any convertOuterToInnerValue( const css::uno::Any& rOuterValue ) const override;
-protected:
+private:
ReferenceSizePropertyProvider* m_pRefSizePropProvider;
};
diff --git a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx
index c0f100d335a7..079d25f63bb4 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx
@@ -17,10 +17,15 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <cstddef>
+
#include "WrappedGapwidthProperty.hxx"
#include "Chart2ModelContact.hxx"
-#include <DiagramHelper.hxx>
+#include <ChartType.hxx>
#include <tools/long.hxx>
+#include <utility>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
@@ -35,15 +40,15 @@ const sal_Int32 DEFAULT_OVERLAP = 0;
WrappedBarPositionProperty_Base::WrappedBarPositionProperty_Base(
const OUString& rOuterName
- , const OUString& rInnerSequencePropertyName
+ , OUString aInnerSequencePropertyName
, sal_Int32 nDefaultValue
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact )
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact )
: WrappedDefaultProperty( rOuterName, OUString(), uno::Any( nDefaultValue ) )
, m_nDimensionIndex(0)
, m_nAxisIndex(0)
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
, m_nDefaultValue( nDefaultValue )
- , m_InnerSequencePropertyName( rInnerSequencePropertyName )
+ , m_InnerSequencePropertyName(std::move( aInnerSequencePropertyName ))
{
}
@@ -72,29 +77,25 @@ void WrappedBarPositionProperty_Base::setPropertyValue( const Any& rOuterValue,
if( m_nDimensionIndex!=1 )
return;
- const Sequence< Reference< chart2::XChartType > > aChartTypeList( DiagramHelper::getChartTypesFromDiagram( xDiagram ) );
- for( Reference< chart2::XChartType > const & chartType : aChartTypeList )
+ const std::vector< rtl::Reference< ChartType > > aChartTypeList( xDiagram->getChartTypes() );
+ for( rtl::Reference< ChartType > const & chartType : aChartTypeList )
{
try
{
- Reference< beans::XPropertySet > xProp( chartType, uno::UNO_QUERY );
- if( xProp.is() )
+ Sequence< sal_Int32 > aBarPositionSequence;
+ chartType->getPropertyValue( m_InnerSequencePropertyName ) >>= aBarPositionSequence;
+
+ tools::Long nOldLength = aBarPositionSequence.getLength();
+ if( nOldLength <= m_nAxisIndex )
+ aBarPositionSequence.realloc( m_nAxisIndex+1 );
+ auto pBarPositionSequence = aBarPositionSequence.getArray();
+ for( sal_Int32 i=nOldLength; i<m_nAxisIndex; i++ )
{
- Sequence< sal_Int32 > aBarPositionSequence;
- xProp->getPropertyValue( m_InnerSequencePropertyName ) >>= aBarPositionSequence;
-
- tools::Long nOldLength = aBarPositionSequence.getLength();
- if( nOldLength <= m_nAxisIndex )
- aBarPositionSequence.realloc( m_nAxisIndex+1 );
- auto pBarPositionSequence = aBarPositionSequence.getArray();
- for( sal_Int32 i=nOldLength; i<m_nAxisIndex; i++ )
- {
- pBarPositionSequence[i] = m_nDefaultValue;
- }
- pBarPositionSequence[m_nAxisIndex] = nNewValue;
-
- xProp->setPropertyValue( m_InnerSequencePropertyName, uno::Any( aBarPositionSequence ) );
+ pBarPositionSequence[i] = m_nDefaultValue;
}
+ pBarPositionSequence[m_nAxisIndex] = nNewValue;
+
+ chartType->setPropertyValue( m_InnerSequencePropertyName, uno::Any( aBarPositionSequence ) );
}
catch( uno::Exception& e )
{
@@ -115,21 +116,17 @@ Any WrappedBarPositionProperty_Base::getPropertyValue( const Reference< beans::X
if( m_nDimensionIndex==1 )
{
- Sequence< Reference< chart2::XChartType > > aChartTypeList( DiagramHelper::getChartTypesFromDiagram( xDiagram ) );
- for( sal_Int32 nN = 0; nN < aChartTypeList.getLength() && !bInnerValueDetected; nN++ )
+ std::vector< rtl::Reference< ChartType > > aChartTypeList = xDiagram->getChartTypes();
+ for( std::size_t nN = 0; nN < aChartTypeList.size() && !bInnerValueDetected; nN++ )
{
try
{
- Reference< beans::XPropertySet > xProp( aChartTypeList[nN], uno::UNO_QUERY );
- if( xProp.is() )
+ Sequence< sal_Int32 > aBarPositionSequence;
+ aChartTypeList[nN]->getPropertyValue( m_InnerSequencePropertyName ) >>= aBarPositionSequence;
+ if( m_nAxisIndex < aBarPositionSequence.getLength() )
{
- Sequence< sal_Int32 > aBarPositionSequence;
- xProp->getPropertyValue( m_InnerSequencePropertyName ) >>= aBarPositionSequence;
- if( m_nAxisIndex < aBarPositionSequence.getLength() )
- {
- nInnerValue = aBarPositionSequence[m_nAxisIndex];
- bInnerValueDetected = true;
- }
+ nInnerValue = aBarPositionSequence[m_nAxisIndex];
+ bInnerValueDetected = true;
}
}
catch( uno::Exception& e )
diff --git a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx
index 550b0ce6ad9d..6ac43e9f7635 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx
@@ -32,9 +32,9 @@ class WrappedBarPositionProperty_Base : public WrappedDefaultProperty
public:
WrappedBarPositionProperty_Base(
const OUString& rOuterName
- , const OUString& rInnerSequencePropertyName
+ , OUString aInnerSequencePropertyName
, sal_Int32 nDefaultValue
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact );
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact );
virtual ~WrappedBarPositionProperty_Base() override;
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -43,7 +43,7 @@ public:
void setDimensionAndAxisIndex( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex );
-protected:
+private:
sal_Int32 m_nDimensionIndex;
sal_Int32 m_nAxisIndex;
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
index 1ce277c321ba..0598b4fd377f 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
@@ -19,9 +19,10 @@
#include "WrappedNumberFormatProperty.hxx"
#include "Chart2ModelContact.hxx"
-#include <com/sun/star/chart2/XAxis.hpp>
+#include <Axis.hxx>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <unonames.hxx>
+#include <utility>
#include <osl/diagnose.h>
using namespace ::com::sun::star;
@@ -31,9 +32,9 @@ using ::com::sun::star::uno::Any;
namespace chart::wrapper
{
-WrappedNumberFormatProperty::WrappedNumberFormatProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedNumberFormatProperty::WrappedNumberFormatProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedDirectStateProperty( CHART_UNONAME_NUMFMT, CHART_UNONAME_NUMFMT )
- , m_spChart2ModelContact(spChart2ModelContact)
+ , m_spChart2ModelContact(std::move(spChart2ModelContact))
{
}
@@ -67,7 +68,8 @@ Any WrappedNumberFormatProperty::getPropertyValue( const Reference< beans::XProp
nKey = Chart2ModelContact::getExplicitNumberFormatKeyForSeries( xSeries );
else
{
- Reference< chart2::XAxis > xAxis( xInnerPropertySet, uno::UNO_QUERY );
+ rtl::Reference< Axis > xAxis = dynamic_cast<Axis*>(xInnerPropertySet.get());
+ assert(xAxis || !xInnerPropertySet);
nKey = m_spChart2ModelContact->getExplicitNumberFormatKeyForAxis( xAxis );
}
aRet <<= nKey;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx
index fa4042ceaedf..cf2f706c61c7 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx
@@ -31,7 +31,7 @@ namespace chart::wrapper
class WrappedNumberFormatProperty : public WrappedDirectStateProperty
{
public:
- explicit WrappedNumberFormatProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedNumberFormatProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual ~WrappedNumberFormatProperty() override;
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
index 27e07256e51d..0edbf16bc9fb 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
@@ -20,11 +20,13 @@
#include "WrappedScaleProperty.hxx"
#include "Chart2ModelContact.hxx"
#include <CommonConverters.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/XAxis.hpp>
#include <com/sun/star/chart/ChartAxisType.hpp>
#include <chartview/ExplicitScaleValues.hxx>
+#include <utility>
#include <osl/diagnose.h>
using namespace ::com::sun::star;
@@ -38,9 +40,9 @@ namespace chart::wrapper
{
WrappedScaleProperty::WrappedScaleProperty(tScaleProperty eScaleProperty
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedProperty(OUString(),OUString())
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
, m_eScaleProperty( eScaleProperty )
{
switch( m_eScaleProperty )
@@ -348,7 +350,7 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
{
Any aRet( m_aOuterValue );
- Reference< chart2::XAxis > xAxis( xInnerPropertySet, uno::UNO_QUERY );
+ rtl::Reference< Axis > xAxis = dynamic_cast<Axis*>(xInnerPropertySet.get());
OSL_ENSURE(xAxis.is(),"need an XAxis");
if(!xAxis.is())
return aRet;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx
index 64e8071b5345..eca52953552d 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx
@@ -51,7 +51,7 @@ public:
, SCALE_PROP_REVERSEDIRECTION
};
- WrappedScaleProperty(tScaleProperty eScaleProperty, const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ WrappedScaleProperty(tScaleProperty eScaleProperty, std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual ~WrappedScaleProperty() override;
static void addWrappedProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList, const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact );
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
index 8551915d9c88..6e11fbe021a2 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
@@ -25,7 +25,8 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
@@ -40,7 +41,7 @@ namespace {
class WrappedScaleTextProperty : public WrappedProperty
{
public:
- explicit WrappedScaleTextProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ explicit WrappedScaleTextProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual void setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const override;
virtual Any getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const override;
@@ -52,15 +53,15 @@ private:
}
-WrappedScaleTextProperty::WrappedScaleTextProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedScaleTextProperty::WrappedScaleTextProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: ::chart::WrappedProperty( "ScaleText" , OUString() )
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
}
void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
{
- static constexpr OUStringLiteral aRefSizeName = u"ReferencePageSize";
+ static constexpr OUString aRefSizeName = u"ReferencePageSize"_ustr;
if( !xInnerPropertySet.is() )
return;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
index 2430dcba7ac6..5c22750dc17b 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
@@ -19,8 +19,8 @@
#include "WrappedSceneProperty.hxx"
#include "Chart2ModelContact.hxx"
-#include <DiagramHelper.hxx>
#include <BaseGFXHelper.hxx>
+#include <utility>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
@@ -36,9 +36,9 @@ void WrappedSceneProperty::addWrappedProperties( std::vector< std::unique_ptr<Wr
}
WrappedD3DTransformMatrixProperty::WrappedD3DTransformMatrixProperty(
- const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact )
+ std::shared_ptr<Chart2ModelContact> spChart2ModelContact )
: WrappedProperty("D3DTransformMatrix","D3DTransformMatrix")
- , m_spChart2ModelContact( spChart2ModelContact )
+ , m_spChart2ModelContact(std::move( spChart2ModelContact ))
{
}
@@ -48,7 +48,7 @@ WrappedD3DTransformMatrixProperty::~WrappedD3DTransformMatrixProperty()
void WrappedD3DTransformMatrixProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
{
- if( DiagramHelper::isPieOrDonutChart( m_spChart2ModelContact->getDiagram() ) )
+ if( m_spChart2ModelContact->getDiagram()->isPieOrDonutChart() )
{
drawing::HomogenMatrix aHM;
if( rOuterValue >>= aHM )
@@ -73,7 +73,7 @@ void WrappedD3DTransformMatrixProperty::setPropertyValue( const Any& rOuterValue
Any WrappedD3DTransformMatrixProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
{
- if( DiagramHelper::isPieOrDonutChart( m_spChart2ModelContact->getDiagram() ) )
+ if( m_spChart2ModelContact->getDiagram()->isPieOrDonutChart() )
{
uno::Any aAMatrix( WrappedProperty::getPropertyValue( xInnerPropertySet ) );
drawing::HomogenMatrix aHM;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx
index 7e6679016537..31ef35abc566 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx
@@ -39,7 +39,7 @@ class WrappedD3DTransformMatrixProperty : public WrappedProperty
{
public:
explicit WrappedD3DTransformMatrixProperty(
- const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
+ std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
virtual ~WrappedD3DTransformMatrixProperty() override;
virtual void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx
index 88fa72696c03..5b073ca80152 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <utility>
+
#include "WrappedSeriesAreaOrLineProperty.hxx"
#include "DataSeriesPointWrapper.hxx"
@@ -25,13 +27,13 @@ namespace chart::wrapper
WrappedSeriesAreaOrLineProperty::WrappedSeriesAreaOrLineProperty(
const OUString& rOuterName
- , const OUString& rInnerAreaTypeName
- , const OUString& rInnerLineTypeName
+ , OUString aInnerAreaTypeName
+ , OUString aInnerLineTypeName
, DataSeriesPointWrapper* pDataSeriesPointWrapper )
: WrappedProperty( rOuterName, OUString() )
, m_pDataSeriesPointWrapper( pDataSeriesPointWrapper )
- , m_aInnerAreaTypeName( rInnerAreaTypeName )
- , m_aInnerLineTypeName( rInnerLineTypeName )
+ , m_aInnerAreaTypeName(std::move( aInnerAreaTypeName ))
+ , m_aInnerLineTypeName(std::move( aInnerLineTypeName ))
{
}
WrappedSeriesAreaOrLineProperty::~WrappedSeriesAreaOrLineProperty()
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx
index ba77b6939f34..f3561e7361d4 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx
@@ -28,7 +28,7 @@ class WrappedSeriesAreaOrLineProperty : public WrappedProperty
{
public:
WrappedSeriesAreaOrLineProperty( const OUString& rOuterName
- , const OUString& rInnerAreaTypeName, const OUString& rInnerLineTypeName
+ , OUString aInnerAreaTypeName, OUString aInnerLineTypeName
, DataSeriesPointWrapper* pDataSeriesPointWrapper );
virtual ~WrappedSeriesAreaOrLineProperty() override;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
index 88dc862ea2d9..8b0b54db3d7a 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
@@ -20,9 +20,10 @@
#include <WrappedProperty.hxx>
#include "Chart2ModelContact.hxx"
-#include <DiagramHelper.hxx>
+#include <DataSeries.hxx>
#include <memory>
+#include <utility>
#include <vector>
namespace com::sun::star::chart2 { class XDataSeries; }
@@ -46,10 +47,10 @@ public:
virtual void setValueToSeries( const css::uno::Reference< css::beans::XPropertySet >& xSeriesPropertySet, const PROPERTYTYPE & aNewValue ) const =0;
explicit WrappedSeriesOrDiagramProperty( const OUString& rName, const css::uno::Any& rDefaulValue
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact
, tSeriesOrDiagramPropertyType ePropertyType )
: WrappedProperty(rName,OUString())
- , m_spChart2ModelContact(spChart2ModelContact)
+ , m_spChart2ModelContact(std::move(spChart2ModelContact))
, m_aOuterValue(rDefaulValue)
, m_aDefaultValue(rDefaulValue)
, m_ePropertyType( ePropertyType )
@@ -58,30 +59,31 @@ public:
bool detectInnerValue( PROPERTYTYPE& rValue, bool& rHasAmbiguousValue ) const
{
- bool bHasDetectableInnerValue = false;
rHasAmbiguousValue = false;
- if( m_ePropertyType == DIAGRAM &&
- m_spChart2ModelContact )
+ if( m_ePropertyType != DIAGRAM || !m_spChart2ModelContact )
+ return false;
+ bool bHasDetectableInnerValue = false;
+ rtl::Reference<Diagram> xDiagram = m_spChart2ModelContact->getDiagram();
+ if (!xDiagram)
+ return false;
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector =
+ xDiagram->getDataSeries();
+ for (auto const& series : aSeriesVector)
{
- std::vector< css::uno::Reference< css::chart2::XDataSeries > > aSeriesVector(
- ::chart::DiagramHelper::getDataSeriesFromDiagram( m_spChart2ModelContact->getDiagram() ) );
- for (auto const& series : aSeriesVector)
+ PROPERTYTYPE aCurValue = getValueFromSeries( series );
+ if( !bHasDetectableInnerValue )
+ rValue = aCurValue;
+ else
{
- PROPERTYTYPE aCurValue = getValueFromSeries( css::uno::Reference< css::beans::XPropertySet >::query(series) );
- if( !bHasDetectableInnerValue )
- rValue = aCurValue;
- else
+ if( rValue != aCurValue )
{
- if( rValue != aCurValue )
- {
- rHasAmbiguousValue = true;
- break;
- }
- else
- rValue = aCurValue;
+ rHasAmbiguousValue = true;
+ break;
}
- bHasDetectableInnerValue = true;
+ else
+ rValue = aCurValue;
}
+ bHasDetectableInnerValue = true;
}
return bHasDetectableInnerValue;
}
@@ -90,15 +92,11 @@ public:
if( m_ePropertyType == DIAGRAM &&
m_spChart2ModelContact )
{
- std::vector< css::uno::Reference< css::chart2::XDataSeries > > aSeriesVector(
- ::chart::DiagramHelper::getDataSeriesFromDiagram( m_spChart2ModelContact->getDiagram() ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector =
+ m_spChart2ModelContact->getDiagram()->getDataSeries();
for (auto const& series : aSeriesVector)
{
- css::uno::Reference< css::beans::XPropertySet > xSeriesPropertySet(series, css::uno::UNO_QUERY);
- if( xSeriesPropertySet.is() )
- {
- setValueToSeries( xSeriesPropertySet, aNewValue );
- }
+ setValueToSeries( series, aNewValue );
}
}
}
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
index 6d088a50bd81..53ce90fa24f9 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
@@ -20,7 +20,7 @@
#include "WrappedSplineProperties.hxx"
#include "Chart2ModelContact.hxx"
#include <FastPropertyIdRanges.hxx>
-#include <DiagramHelper.hxx>
+#include <ChartType.hxx>
#include <WrappedProperty.hxx>
#include <unonames.hxx>
@@ -29,10 +29,10 @@
#include <com/sun/star/chart2/CurveStyle.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <utility>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
-using ::com::sun::star::uno::Sequence;
using ::com::sun::star::beans::Property;
namespace chart::wrapper
@@ -47,32 +47,30 @@ template< typename PROPERTYTYPE >
class WrappedSplineProperty : public WrappedProperty
{
public:
- explicit WrappedSplineProperty( const OUString& rOuterName, const OUString& rInnerName
+ explicit WrappedSplineProperty( const OUString& rOuterName, OUString aInnerName
, const css::uno::Any& rDefaulValue
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact )
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact )
: WrappedProperty(rOuterName,OUString())
- , m_spChart2ModelContact(spChart2ModelContact)
+ , m_spChart2ModelContact(std::move(spChart2ModelContact))
, m_aOuterValue(rDefaulValue)
, m_aDefaultValue(rDefaulValue)
- , m_aOwnInnerName(rInnerName)
+ , m_aOwnInnerName(std::move(aInnerName))
{
}
bool detectInnerValue( PROPERTYTYPE& rValue, bool& rHasAmbiguousValue ) const
{
- bool bHasDetectableInnerValue = false;
rHasAmbiguousValue = false;
- Sequence< css::uno::Reference< css::chart2::XChartType > > aChartTypes(
- ::chart::DiagramHelper::getChartTypesFromDiagram( m_spChart2ModelContact->getDiagram() ) );
- for( sal_Int32 nN = aChartTypes.getLength(); nN--; )
+ rtl::Reference<Diagram> xDiagram = m_spChart2ModelContact->getDiagram();
+ if (!xDiagram)
+ return false;
+ bool bHasDetectableInnerValue = false;
+ std::vector< rtl::Reference< ChartType > > aChartTypes = xDiagram->getChartTypes();
+ for( sal_Int32 nN = aChartTypes.size(); nN--; )
{
try
{
- uno::Reference<beans::XPropertySet> xChartTypePropertySet(aChartTypes[nN], uno::UNO_QUERY);
- if (!xChartTypePropertySet.is())
- continue;
-
- Any aSingleValue = convertInnerToOuterValue( xChartTypePropertySet->getPropertyValue(m_aOwnInnerName) );
+ Any aSingleValue = convertInnerToOuterValue( aChartTypes[nN]->getPropertyValue(m_aOwnInnerName) );
PROPERTYTYPE aCurValue = PROPERTYTYPE();
aSingleValue >>= aCurValue;
if( !bHasDetectableInnerValue )
@@ -114,17 +112,13 @@ public:
if( !(bHasAmbiguousValue || aNewValue != aOldValue) )
return;
- Sequence< css::uno::Reference< css::chart2::XChartType > > aChartTypes(
- ::chart::DiagramHelper::getChartTypesFromDiagram( m_spChart2ModelContact->getDiagram() ) );
- for( sal_Int32 nN = aChartTypes.getLength(); nN--; )
+ std::vector< rtl::Reference< ChartType > > aChartTypes =
+ m_spChart2ModelContact->getDiagram()->getChartTypes();
+ for( sal_Int32 nN = aChartTypes.size(); nN--; )
{
try
{
- css::uno::Reference< css::beans::XPropertySet > xChartTypePropertySet( aChartTypes[nN], css::uno::UNO_QUERY );
- if( xChartTypePropertySet.is() )
- {
- xChartTypePropertySet->setPropertyValue(m_aOwnInnerName,convertOuterToInnerValue(uno::Any(aNewValue)));
- }
+ aChartTypes[nN]->setPropertyValue(m_aOwnInnerName,convertOuterToInnerValue(uno::Any(aNewValue)));
}
catch( uno::Exception & ex )
{
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index bc83ba60df87..e5278bb5da49 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -21,6 +21,7 @@
#include "WrappedSeriesOrDiagramProperty.hxx"
#include <FastPropertyIdRanges.hxx>
#include <RegressionCurveHelper.hxx>
+#include <RegressionCurveModel.hxx>
#include <ErrorBar.hxx>
#include <StatisticsHelper.hxx>
#include <unonames.hxx>
@@ -31,7 +32,6 @@
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <com/sun/star/chart/ChartErrorIndicatorType.hpp>
#include <com/sun/star/chart/ChartRegressionCurveType.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <utility>
@@ -144,8 +144,7 @@ void lcl_ConvertRangeFromXML(
lcl_getDataProviderFromContact( spChart2ModelContact ), uno::UNO_QUERY );
if( xConverter.is())
{
- OUString aResult = xConverter->convertRangeFromXML( rInOutRange );
- rInOutRange = aResult;
+ rInOutRange = xConverter->convertRangeFromXML( rInOutRange );
}
}
}
@@ -160,8 +159,7 @@ void lcl_ConvertRangeToXML(
lcl_getDataProviderFromContact( spChart2ModelContact ), uno::UNO_QUERY );
if( xConverter.is())
{
- OUString aResult = xConverter->convertRangeToXML( rInOutRange );
- rInOutRange = aResult;
+ rInOutRange = xConverter->convertRangeToXML( rInOutRange );
}
}
}
@@ -840,9 +838,10 @@ css::chart::ChartRegressionCurveType WrappedRegressionCurvesProperty::getValueFr
void WrappedRegressionCurvesProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const css::chart::ChartRegressionCurveType& aNewValue ) const
{
uno::Reference< chart2::XRegressionCurveContainer > xRegressionCurveContainer( xSeriesPropertySet, uno::UNO_QUERY );
- uno::Reference< chart2::XRegressionCurve > xRegressionCurve( xSeriesPropertySet, uno::UNO_QUERY );
-
- if( xRegressionCurveContainer.is() && xRegressionCurve.is() )
+ if (!xRegressionCurveContainer)
+ return;
+ rtl::Reference< ::chart::RegressionCurveModel> xRegressionCurve = RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegressionCurveContainer );
+ if( xRegressionCurve.is() )
{
SvxChartRegress eNewRegressionType = lcl_getRegressionType( aNewValue );
@@ -906,7 +905,7 @@ Reference< beans::XPropertySet > WrappedStatisticPropertySetProperty::getValueFr
{
case PROPERTY_SET_TYPE_REGRESSION:
if( xRegCnt.is() )
- xResult.set( RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCnt ), uno::UNO_QUERY );
+ xResult = RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCnt );
break;
case PROPERTY_SET_TYPE_ERROR_BAR:
if( xSeriesPropertySet.is())
@@ -914,7 +913,7 @@ Reference< beans::XPropertySet > WrappedStatisticPropertySetProperty::getValueFr
break;
case PROPERTY_SET_TYPE_MEAN_VALUE:
if( xRegCnt.is() )
- xResult.set( RegressionCurveHelper::getMeanValueLine( xRegCnt ), uno::UNO_QUERY );
+ xResult = RegressionCurveHelper::getMeanValueLine( xRegCnt );
break;
}
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
index 3a8068ec984a..093321843018 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
@@ -20,15 +20,14 @@
#include "WrappedStockProperties.hxx"
#include "Chart2ModelContact.hxx"
#include <FastPropertyIdRanges.hxx>
-#include <DiagramHelper.hxx>
+#include <DataSeries.hxx>
#include <ControllerLockGuard.hxx>
#include <WrappedProperty.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <ChartTypeManager.hxx>
#include <ChartTypeTemplate.hxx>
+#include <utility>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
@@ -43,14 +42,14 @@ class WrappedStockProperty : public WrappedProperty
{
public:
explicit WrappedStockProperty( const OUString& rOuterName
- , const css::uno::Any& rDefaulValue
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact );
+ , css::uno::Any aDefaultValue
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact );
void setPropertyValue( const css::uno::Any& rOuterValue, const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
css::uno::Any getPropertyDefault( const css::uno::Reference< css::beans::XPropertyState >& xInnerPropertyState ) const override;
- virtual uno::Reference< chart2::XChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const = 0;
+ virtual rtl::Reference< ::chart::ChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ::chart::ChartTypeManager >& xFactory ) const = 0;
protected:
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
@@ -61,11 +60,11 @@ protected:
}
WrappedStockProperty::WrappedStockProperty( const OUString& rOuterName
- , const css::uno::Any& rDefaulValue
- , const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact )
+ , css::uno::Any aDefaultValue
+ , std::shared_ptr<Chart2ModelContact> spChart2ModelContact )
: WrappedProperty(rOuterName,OUString())
- , m_spChart2ModelContact(spChart2ModelContact)
- , m_aDefaultValue(rDefaulValue)
+ , m_spChart2ModelContact(std::move(spChart2ModelContact))
+ , m_aDefaultValue(std::move(aDefaultValue))
{
}
@@ -79,15 +78,17 @@ void WrappedStockProperty::setPropertyValue( const css::uno::Any& rOuterValue, c
rtl::Reference< ChartModel > xChartDoc( m_spChart2ModelContact->getDocumentModel() );
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
- sal_Int32 nDimension = ::chart::DiagramHelper::getDimension( xDiagram );
- if( !(xChartDoc.is() && xDiagram.is() && nDimension==2) )
+ if( !xChartDoc || !xDiagram )
+ return;
+ sal_Int32 nDimension = xDiagram->getDimension();
+ if( nDimension != 2 )
return;
rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = xChartDoc->getTypeManager();
- DiagramHelper::tTemplateWithServiceName aTemplateAndService =
- DiagramHelper::getTemplateForDiagram( xDiagram, xChartTypeManager );
+ Diagram::tTemplateWithServiceName aTemplateAndService =
+ xDiagram->getTemplate( xChartTypeManager );
- uno::Reference< chart2::XChartTypeTemplate > xTemplate =
+ rtl::Reference< ::chart::ChartTypeTemplate > xTemplate =
getNewTemplate( bNewValue, aTemplateAndService.sServiceName, xChartTypeManager );
if(!xTemplate.is())
@@ -119,7 +120,7 @@ public:
css::uno::Any getPropertyValue( const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
- uno::Reference< chart2::XChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const override;
+ rtl::Reference< ::chart::ChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ::chart::ChartTypeManager >& xFactory ) const override;
};
}
@@ -135,13 +136,13 @@ css::uno::Any WrappedVolumeProperty::getPropertyValue( const css::uno::Reference
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
if( xDiagram.is() && xChartDoc.is() )
{
- std::vector< uno::Reference< chart2::XDataSeries > > aSeriesVector(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector =
+ xDiagram->getDataSeries();
if( !aSeriesVector.empty() )
{
rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = xChartDoc->getTypeManager();
- DiagramHelper::tTemplateWithServiceName aTemplateAndService =
- DiagramHelper::getTemplateForDiagram( xDiagram, xChartTypeManager );
+ Diagram::tTemplateWithServiceName aTemplateAndService =
+ xDiagram->getTemplate( xChartTypeManager );
if( aTemplateAndService.sServiceName == "com.sun.star.chart2.template.StockVolumeLowHighClose"
|| aTemplateAndService.sServiceName == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" )
@@ -155,9 +156,9 @@ css::uno::Any WrappedVolumeProperty::getPropertyValue( const css::uno::Reference
return m_aOuterValue;
}
-uno::Reference< chart2::XChartTypeTemplate > WrappedVolumeProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const
+rtl::Reference< ::chart::ChartTypeTemplate > WrappedVolumeProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ::chart::ChartTypeManager >& xFactory ) const
{
- uno::Reference< chart2::XChartTypeTemplate > xTemplate;
+ rtl::Reference< ::chart::ChartTypeTemplate > xTemplate;
if(!xFactory.is())
return xTemplate;
@@ -165,16 +166,16 @@ uno::Reference< chart2::XChartTypeTemplate > WrappedVolumeProperty::getNewTempla
if( bNewValue ) //add volume
{
if( rCurrentTemplate == "com.sun.star.chart2.template.StockLowHighClose" )
- xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeLowHighClose" ), uno::UNO_QUERY );
+ xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeLowHighClose" );
else if( rCurrentTemplate == "com.sun.star.chart2.template.StockOpenLowHighClose" )
- xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ), uno::UNO_QUERY );
+ xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" );
}
else //remove volume
{
if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeLowHighClose" )
- xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockLowHighClose" ), uno::UNO_QUERY );
+ xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockLowHighClose" );
else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" )
- xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockOpenLowHighClose" ), uno::UNO_QUERY );
+ xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockOpenLowHighClose" );
}
return xTemplate;
}
@@ -188,7 +189,7 @@ public:
css::uno::Any getPropertyValue( const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override;
- uno::Reference< chart2::XChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const override;
+ rtl::Reference< ::chart::ChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ChartTypeManager >& xFactory ) const override;
};
}
@@ -204,13 +205,13 @@ css::uno::Any WrappedUpDownProperty::getPropertyValue( const css::uno::Reference
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
if( xDiagram.is() && xChartDoc.is() )
{
- std::vector< uno::Reference< chart2::XDataSeries > > aSeriesVector(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector =
+ xDiagram->getDataSeries();
if( !aSeriesVector.empty() )
{
rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = xChartDoc->getTypeManager();
- DiagramHelper::tTemplateWithServiceName aTemplateAndService =
- DiagramHelper::getTemplateForDiagram( xDiagram, xChartTypeManager );
+ Diagram::tTemplateWithServiceName aTemplateAndService =
+ xDiagram->getTemplate( xChartTypeManager );
if( aTemplateAndService.sServiceName == "com.sun.star.chart2.template.StockOpenLowHighClose"
|| aTemplateAndService.sServiceName == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" )
@@ -223,22 +224,22 @@ css::uno::Any WrappedUpDownProperty::getPropertyValue( const css::uno::Reference
}
return m_aOuterValue;
}
-uno::Reference< chart2::XChartTypeTemplate > WrappedUpDownProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const
+rtl::Reference< ::chart::ChartTypeTemplate > WrappedUpDownProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ChartTypeManager >& xFactory ) const
{
- uno::Reference< chart2::XChartTypeTemplate > xTemplate;
+ rtl::Reference< ::chart::ChartTypeTemplate > xTemplate;
if( bNewValue ) //add open series
{
if( rCurrentTemplate == "com.sun.star.chart2.template.StockLowHighClose" )
- xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockOpenLowHighClose" ), uno::UNO_QUERY );
+ xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockOpenLowHighClose" );
else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeLowHighClose" )
- xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ), uno::UNO_QUERY );
+ xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" );
}
else //remove open series
{
if( rCurrentTemplate == "com.sun.star.chart2.template.StockOpenLowHighClose" )
- xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockLowHighClose" ), uno::UNO_QUERY );
+ xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockLowHighClose" );
else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" )
- xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeLowHighClose" ), uno::UNO_QUERY );
+ xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeLowHighClose" );
}
return xTemplate;
}
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 484861b68338..79c45ea1d888 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -20,6 +20,7 @@
#include "WrappedSymbolProperties.hxx"
#include "WrappedSeriesOrDiagramProperty.hxx"
#include <FastPropertyIdRanges.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart2/SymbolStyle.hpp>
@@ -31,7 +32,7 @@
#include <vcl/GraphicLoader.hxx>
#include <vcl/graph.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
@@ -285,8 +286,8 @@ beans::PropertyState WrappedSymbolTypeProperty::getPropertyState( const Referenc
m_spChart2ModelContact)
{
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
- Reference< chart2::XDataSeries > xSeries( xInnerPropertyState, uno::UNO_QUERY );
- Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeOfSeries( xDiagram, xSeries ) );
+ rtl::Reference< ::chart::DataSeries > xSeries( dynamic_cast<DataSeries*>(xInnerPropertyState.get()) );
+ rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeOfSeries( xSeries ) );
if( ChartTypeHelper::isSupportingSymbolProperties( xChartType, 2 ) )
return beans::PropertyState_DIRECT_VALUE;
}
diff --git a/chart2/source/controller/chartcontroller.component b/chart2/source/controller/chartcontroller.component
index 01201cbb2494..ef8e748242e8 100644
--- a/chart2/source/controller/chartcontroller.component
+++ b/chart2/source/controller/chartcontroller.component
@@ -23,11 +23,6 @@
constructor="com_sun_star_comp_chart_ElementSelectorToolbarController_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
- <implementation name="com.sun.star.comp.chart2.ChartController"
- constructor="com_sun_star_comp_chart2_ChartController_get_implementation">
- <service name="com.sun.star.chart2.ChartController"/>
- <service name="com.sun.star.frame.Controller"/>
- </implementation>
<implementation name="com.sun.star.comp.chart2.ChartDocumentWrapper"
constructor="com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation">
<service name="com.sun.star.beans.PropertySet"/>
diff --git a/chart2/source/controller/dialogs/ChartResourceGroups.cxx b/chart2/source/controller/dialogs/ChartResourceGroups.cxx
index 19534aa1e0b0..e1550d2766c7 100644
--- a/chart2/source/controller/dialogs/ChartResourceGroups.cxx
+++ b/chart2/source/controller/dialogs/ChartResourceGroups.cxx
@@ -205,22 +205,22 @@ SplineResourceGroup::SplineResourceGroup(weld::Builder* pBuilder, weld::Window*
m_xLB_LineType->connect_changed(LINK(this, SplineResourceGroup, LineTypeChangeHdl));
}
-SplinePropertiesDialog& SplineResourceGroup::getSplinePropertiesDialog()
+std::shared_ptr<SplinePropertiesDialog> SplineResourceGroup::getSplinePropertiesDialog()
{
if (!m_xSplinePropertiesDialog)
{
m_xSplinePropertiesDialog.reset(new SplinePropertiesDialog(m_pParent));
}
- return *m_xSplinePropertiesDialog;
+ return m_xSplinePropertiesDialog;
}
-SteppedPropertiesDialog& SplineResourceGroup::getSteppedPropertiesDialog()
+std::shared_ptr<SteppedPropertiesDialog> SplineResourceGroup::getSteppedPropertiesDialog()
{
if (!m_xSteppedPropertiesDialog)
{
m_xSteppedPropertiesDialog.reset(new SteppedPropertiesDialog(m_pParent));
}
- return *m_xSteppedPropertiesDialog;
+ return m_xSteppedPropertiesDialog;
}
void SplineResourceGroup::showControls(bool bShow)
@@ -245,7 +245,7 @@ void SplineResourceGroup::fillControls(const ChartTypeParameter& rParameter)
m_xPB_DetailsDialog->connect_clicked(
LINK(this, SplineResourceGroup, SplineDetailsDialogHdl));
m_xPB_DetailsDialog->set_tooltip_text(SchResId(STR_DLG_SMOOTH_LINE_PROPERTIES));
- getSplinePropertiesDialog().fillControls(rParameter);
+ getSplinePropertiesDialog()->fillControls(rParameter);
break;
case CurveStyle_STEP_START:
case CurveStyle_STEP_END:
@@ -256,7 +256,7 @@ void SplineResourceGroup::fillControls(const ChartTypeParameter& rParameter)
m_xPB_DetailsDialog->connect_clicked(
LINK(this, SplineResourceGroup, SteppedDetailsDialogHdl));
m_xPB_DetailsDialog->set_tooltip_text(SchResId(STR_DLG_STEPPED_LINE_PROPERTIES));
- getSteppedPropertiesDialog().fillControls(rParameter);
+ getSteppedPropertiesDialog()->fillControls(rParameter);
break;
default:
m_xLB_LineType->set_active(-1);
@@ -268,10 +268,10 @@ void SplineResourceGroup::fillParameter(ChartTypeParameter& rParameter)
switch (m_xLB_LineType->get_active())
{
case POS_LINETYPE_SMOOTH:
- getSplinePropertiesDialog().fillParameter(rParameter, true);
+ getSplinePropertiesDialog()->fillParameter(rParameter, true);
break;
case POS_LINETYPE_STEPPED:
- getSteppedPropertiesDialog().fillParameter(rParameter, true);
+ getSteppedPropertiesDialog()->fillParameter(rParameter, true);
break;
default: // includes POS_LINETYPE_STRAIGHT
rParameter.eCurveStyle = CurveStyle_LINES;
@@ -288,43 +288,65 @@ IMPL_LINK_NOARG(SplineResourceGroup, LineTypeChangeHdl, weld::ComboBox&, void)
IMPL_LINK_NOARG(SplineResourceGroup, SplineDetailsDialogHdl, weld::Button&, void)
{
ChartTypeParameter aOldParameter;
- getSplinePropertiesDialog().fillParameter(aOldParameter,
- m_xLB_LineType->get_active() == POS_LINETYPE_SMOOTH);
+ std::shared_ptr<SplinePropertiesDialog> xDlg = getSplinePropertiesDialog();
+ xDlg->fillParameter(aOldParameter, m_xLB_LineType->get_active() == POS_LINETYPE_SMOOTH);
const sal_Int32 iOldLineTypePos = m_xLB_LineType->get_active();
m_xLB_LineType->set_active(POS_LINETYPE_SMOOTH);
- if (getSplinePropertiesDialog().run() == RET_OK)
- {
- if (m_pChangeListener)
- m_pChangeListener->stateChanged();
- }
- else
- {
- //restore old state:
- m_xLB_LineType->set_active(iOldLineTypePos);
- getSplinePropertiesDialog().fillControls(aOldParameter);
- }
+ weld::GenericDialogController::runAsync(xDlg, [this, xDlg, aOldParameter,
+ iOldLineTypePos](sal_Int32 nResult) {
+ m_xSplinePropertiesDialog = nullptr;
+ auto xNewDlg = getSplinePropertiesDialog();
+
+ if (nResult == RET_OK)
+ {
+ ChartTypeParameter aNewParameter;
+ xDlg->fillParameter(aNewParameter, m_xLB_LineType->get_active() == POS_LINETYPE_SMOOTH);
+ xNewDlg->fillControls(aNewParameter);
+
+ if (m_pChangeListener)
+ m_pChangeListener->stateChanged();
+ }
+ else
+ {
+ //restore old state:
+ m_xLB_LineType->set_active(iOldLineTypePos);
+ xNewDlg->fillControls(aOldParameter);
+ }
+ });
}
IMPL_LINK_NOARG(SplineResourceGroup, SteppedDetailsDialogHdl, weld::Button&, void)
{
ChartTypeParameter aOldParameter;
- getSteppedPropertiesDialog().fillParameter(aOldParameter, m_xLB_LineType->get_active()
- == POS_LINETYPE_STEPPED);
+ std::shared_ptr<SteppedPropertiesDialog> xDlg = getSteppedPropertiesDialog();
+ xDlg->fillParameter(aOldParameter, m_xLB_LineType->get_active() == POS_LINETYPE_STEPPED);
const sal_Int32 iOldLineTypePos = m_xLB_LineType->get_active();
m_xLB_LineType->set_active(POS_LINETYPE_STEPPED);
- if (getSteppedPropertiesDialog().run() == RET_OK)
- {
- if (m_pChangeListener)
- m_pChangeListener->stateChanged();
- }
- else
- {
- //restore old state:
- m_xLB_LineType->set_active(iOldLineTypePos);
- getSteppedPropertiesDialog().fillControls(aOldParameter);
- }
+
+ weld::GenericDialogController::runAsync(
+ xDlg, [this, xDlg, aOldParameter, iOldLineTypePos](sal_Int32 nResult) {
+ m_xSteppedPropertiesDialog = nullptr;
+ auto xNewDlg = getSteppedPropertiesDialog();
+
+ if (nResult == RET_OK)
+ {
+ ChartTypeParameter aNewParameter;
+ xDlg->fillParameter(aNewParameter,
+ m_xLB_LineType->get_active() == POS_LINETYPE_STEPPED);
+ xNewDlg->fillControls(aNewParameter);
+
+ if (m_pChangeListener)
+ m_pChangeListener->stateChanged();
+ }
+ else
+ {
+ //restore old state:
+ m_xLB_LineType->set_active(iOldLineTypePos);
+ xDlg->fillControls(aOldParameter);
+ }
+ });
}
GeometryResourceGroup::GeometryResourceGroup(weld::Builder* pBuilder)
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 06d2dd952892..35284fbb6bfc 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -24,7 +24,7 @@
#include <strings.hrc>
#include <bitmaps.hlst>
#include <ChartModelHelper.hxx>
-#include <DiagramHelper.hxx>
+#include <DataSeries.hxx>
#include <Diagram.hxx>
#include <ControllerLockGuard.hxx>
#include <AxisHelper.hxx>
@@ -33,14 +33,12 @@
#include <ChartModel.hxx>
#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <svtools/valueset.hxx>
#include <vcl/image.hxx>
#include <vcl/settings.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
@@ -309,22 +307,23 @@ void ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParame
, const rtl::Reference<::chart::ChartModel>& xChartModel )
{
rtl::Reference< ::chart::ChartTypeManager > xTemplateManager = xChartModel->getTypeManager();
- uno::Reference< XChartTypeTemplate > xTemplate( getCurrentTemplate( rParameter, xTemplateManager ) );
+ rtl::Reference< ::chart::ChartTypeTemplate > xTemplate( getCurrentTemplate( rParameter, xTemplateManager ) );
if(!xTemplate.is())
return;
// locked controllers
ControllerLockGuardUNO aCtrlLockGuard( xChartModel );
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartModel );
- DiagramHelper::tTemplateWithServiceName aTemplateWithService(
- DiagramHelper::getTemplateForDiagram( xDiagram, xTemplateManager ));
+ rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
+ Diagram::tTemplateWithServiceName aTemplateWithService;
+ if (xDiagram)
+ aTemplateWithService = xDiagram->getTemplate( xTemplateManager );
if( aTemplateWithService.xChartTypeTemplate.is())
- aTemplateWithService.xChartTypeTemplate->resetStyles( xDiagram );
+ aTemplateWithService.xChartTypeTemplate->resetStyles2( xDiagram );
xTemplate->changeDiagram( xDiagram );
if( AllSettings::GetMathLayoutRTL() )
AxisHelper::setRTLAxisLayout( AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 ) );
if( rParameter.b3DLook )
- ThreeDHelper::setScheme( xDiagram, rParameter.eThreeDLookScheme );
+ xDiagram->setScheme( rParameter.eThreeDLookScheme );
if (xDiagram.is())
{
@@ -567,6 +566,8 @@ const tTemplateServiceChartTypeParameterMap& PieChartDialogController::getTempla
{"com.sun.star.chart2.template.PieAllExploded" , ChartTypeParameter(2,false,false)},
{"com.sun.star.chart2.template.Donut" , ChartTypeParameter(3,false,false)},
{"com.sun.star.chart2.template.DonutAllExploded" , ChartTypeParameter(4,false,false)},
+ {"com.sun.star.chart2.template.BarOfPie" , ChartTypeParameter(5,false,false)},
+ {"com.sun.star.chart2.template.PieOfPie" , ChartTypeParameter(6,false,false)},
{"com.sun.star.chart2.template.ThreeDPie" , ChartTypeParameter(1,false,true)},
{"com.sun.star.chart2.template.ThreeDPieAllExploded" , ChartTypeParameter(2,false,true)},
{"com.sun.star.chart2.template.ThreeDDonut" , ChartTypeParameter(3,false,true)},
@@ -590,11 +591,15 @@ void PieChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const Ch
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_CIRCLES_2D_EXPLODED));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_DONUT_2D));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_DONUT_2D_EXPLODED));
+ rSubTypeList.InsertItem(5, Image(StockImage::Yes, BMP_BAR_OF_PIE));
+ rSubTypeList.InsertItem(6, Image(StockImage::Yes, BMP_PIE_OF_PIE));
}
rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) );
rSubTypeList.SetItemText( 2, SchResId( STR_PIE_EXPLODED ) );
rSubTypeList.SetItemText( 3, SchResId( STR_DONUT ) );
rSubTypeList.SetItemText( 4, SchResId( STR_DONUT_EXPLODED ) );
+ rSubTypeList.SetItemText( 5, SchResId( STR_BAR_OF_PIE ) );
+ rSubTypeList.SetItemText( 6, SchResId( STR_PIE_OF_PIE ) );
}
bool PieChartDialogController::shouldShow_3DLookControl() const
@@ -1156,7 +1161,7 @@ void CombiColumnLineChartDialogController::fillExtraControls(
if (!m_xMF_NumberOfLines)
return;
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartModel );
+ rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
if(!xDiagram.is())
return;
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index ebe1941010ad..30182b95eeb8 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -22,6 +22,7 @@
#include "DataBrowser.hxx"
#include "DataBrowserModel.hxx"
#include <strings.hrc>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <DiagramHelper.hxx>
#include <CommonConverters.hxx>
@@ -31,6 +32,7 @@
#include <bitmaps.hlst>
#include <helpids.h>
#include <ChartModel.hxx>
+#include <ChartType.hxx>
#include <vcl/weld.hxx>
#include <vcl/settings.hxx>
@@ -41,8 +43,6 @@
#include <svl/numformat.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/container/XIndexReplace.hpp>
#include <algorithm>
@@ -170,7 +170,7 @@ public:
void SetColor( const Color & rCol );
void SetPos();
void SetWidth( sal_Int32 nWidth );
- void SetChartType( const Reference< chart2::XChartType > & xChartType,
+ void SetChartType( const rtl::Reference< ::chart::ChartType > & xChartType,
bool bSwapXAndYAxis );
void SetSeriesName( const OUString & rName );
void SetRange( sal_Int32 nStartCol, sal_Int32 nEndCol );
@@ -222,7 +222,7 @@ private:
DECL_LINK( SeriesNameEdited, SeriesHeaderEdit&, void );
static OUString GetChartTypeImage(
- const Reference< chart2::XChartType > & xChartType,
+ const rtl::Reference< ::chart::ChartType > & xChartType,
bool bSwapXAndYAxis
);
@@ -291,20 +291,15 @@ void SeriesHeader::SetPos()
// series name edit field
m_spSeriesName->set_margin_start(2);
- aSize.setWidth(nSymbolHeight);
- aSize.setHeight(12);
- aSize = m_xDevice->LogicToPixel(aSize, MapMode(MapUnit::MapAppFont));
- aSize.setWidth(m_nWidth - aSize.Width() - 2);
- m_spSeriesName->set_size_request(aSize.Width(), aSize.Height());
+ sal_Int32 nHeightPx = m_xDevice->LogicToPixel(Size(0, 12), MapMode(MapUnit::MapAppFont)).Height();
+ m_spSeriesName->set_size_request(m_nWidth - aSize.Width() - 2, nHeightPx);
// color bar
- aSize.setHeight(3);
- aSize = m_xDevice->LogicToPixel(aSize, MapMode(MapUnit::MapAppFont));
- aSize.setWidth(m_nWidth);
- m_spColorBar->set_size_request(aSize.Width(), aSize.Height());
+ nHeightPx = m_xDevice->LogicToPixel(Size(0, 3), MapMode(MapUnit::MapAppFont)).Height();
+ m_spColorBar->set_size_request(m_nWidth, nHeightPx);
ScopedVclPtr<VirtualDevice> xVirDev(m_spColorBar->create_virtual_device());
- xVirDev->SetOutputSizePixel(aSize);
+ xVirDev->SetOutputSizePixel(Size(m_nWidth, nHeightPx));
xVirDev->SetFillColor(m_aColor);
xVirDev->SetLineColor(m_aColor);
xVirDev->DrawRect(tools::Rectangle(Point(0, 0), aSize));
@@ -323,7 +318,7 @@ void SeriesHeader::SetPixelWidth( sal_Int32 nWidth )
}
void SeriesHeader::SetChartType(
- const Reference< chart2::XChartType > & xChartType,
+ const rtl::Reference< ChartType > & xChartType,
bool bSwapXAndYAxis
)
{
@@ -381,7 +376,7 @@ bool SeriesHeader::HasFocus() const
}
OUString SeriesHeader::GetChartTypeImage(
- const Reference< chart2::XChartType > & xChartType,
+ const rtl::Reference< ChartType > & xChartType,
bool bSwapXAndYAxis
)
{
@@ -620,7 +615,7 @@ void DataBrowser::RenewTable()
GetDataWindow().LogicToPixel( Size( 42, 0 )).getWidth() ));
OUString aDefaultSeriesName(SchResId(STR_COLUMN_LABEL));
- replaceParamterInString( aDefaultSeriesName, "%COLUMNNUMBER", OUString::number( 24 ) );
+ replaceParamterInString( aDefaultSeriesName, u"%COLUMNNUMBER", OUString::number( 24 ) );
sal_Int32 nColumnWidth = GetDataWindow().GetTextWidth( aDefaultSeriesName )
+ GetDataWindow().LogicToPixel(Point(8 + impl::SeriesHeader::GetRelativeAppFontXPosForNameField(), 0), MapMode(MapUnit::MapAppFont)).X();
sal_Int32 nColumnCount = m_apDataBrowserModel->getColumnCount();
@@ -644,19 +639,17 @@ void DataBrowser::RenewTable()
for (auto const& elemHeader : aHeaders)
{
auto spHeader = std::make_shared<impl::SeriesHeader>( m_pColumnsWin, m_pColorsWin );
- Reference< beans::XPropertySet > xSeriesProp( elemHeader.m_xDataSeries, uno::UNO_QUERY );
Color nColor;
// @todo: Set "DraftColor", i.e. interpolated colors for gradients, bitmaps, etc.
- if( xSeriesProp.is() &&
- ( xSeriesProp->getPropertyValue( "Color" ) >>= nColor ))
+ if( elemHeader.m_xDataSeries.is() &&
+ ( elemHeader.m_xDataSeries->getPropertyValue( "Color" ) >>= nColor ))
spHeader->SetColor( nColor );
spHeader->SetChartType( elemHeader.m_xChartType, elemHeader.m_bSwapXAndYAxis );
spHeader->SetSeriesName(
- DataSeriesHelper::getDataSeriesLabel(
- elemHeader.m_xDataSeries,
- (elemHeader.m_xChartType.is() ?
+ elemHeader.m_xDataSeries->getLabelForRole(
+ elemHeader.m_xChartType.is() ?
elemHeader.m_xChartType->getRoleOfSequenceForSeriesLabel() :
- OUString("values-y"))));
+ OUString("values-y")));
// index is 1-based, as 0 is for the column that contains the row-numbers
spHeader->SetRange( elemHeader.m_nStartColumn + 1, elemHeader.m_nEndColumn + 1 );
spHeader->SetGetFocusHdl( aFocusLink );
@@ -832,12 +825,11 @@ void DataBrowser::CellModified()
}
void DataBrowser::SetDataFromModel(
- const rtl::Reference<::chart::ChartModel> & xChartDoc,
- const Reference< uno::XComponentContext > & xContext )
+ const rtl::Reference<::chart::ChartModel> & xChartDoc )
{
m_xChartDoc = xChartDoc;
- m_apDataBrowserModel.reset( new DataBrowserModel( m_xChartDoc, xContext ));
+ m_apDataBrowserModel.reset( new DataBrowserModel( m_xChartDoc ));
m_spNumberFormatterWrapper =
std::make_shared<NumberFormatterWrapper>(m_xChartDoc);
@@ -1272,18 +1264,16 @@ void DataBrowser::RenewSeriesHeaders()
for (auto const& elemHeader : aHeaders)
{
auto spHeader = std::make_shared<impl::SeriesHeader>( m_pColumnsWin, m_pColorsWin );
- Reference< beans::XPropertySet > xSeriesProp(elemHeader.m_xDataSeries, uno::UNO_QUERY);
Color nColor;
- if( xSeriesProp.is() &&
- ( xSeriesProp->getPropertyValue( "Color" ) >>= nColor ))
+ if( elemHeader.m_xDataSeries.is() &&
+ ( elemHeader.m_xDataSeries->getPropertyValue( "Color" ) >>= nColor ))
spHeader->SetColor( nColor );
spHeader->SetChartType( elemHeader.m_xChartType, elemHeader.m_bSwapXAndYAxis );
spHeader->SetSeriesName(
- DataSeriesHelper::getDataSeriesLabel(
- elemHeader.m_xDataSeries,
- (elemHeader.m_xChartType.is() ?
+ elemHeader.m_xDataSeries->getLabelForRole(
+ elemHeader.m_xChartType.is() ?
elemHeader.m_xChartType->getRoleOfSequenceForSeriesLabel() :
- OUString( "values-y"))));
+ OUString( "values-y")));
spHeader->SetRange( elemHeader.m_nStartColumn + 1, elemHeader.m_nEndColumn + 1 );
spHeader->SetGetFocusHdl( aFocusLink );
spHeader->SetEditChangedHdl( aSeriesHeaderChangedLink );
@@ -1360,18 +1350,17 @@ IMPL_LINK( DataBrowser, SeriesHeaderGotFocus, impl::SeriesHeaderEdit&, rEdit, vo
IMPL_LINK( DataBrowser, SeriesHeaderChanged, impl::SeriesHeaderEdit&, rEdit, void )
{
- Reference< chart2::XDataSeries > xSeries(
- m_apDataBrowserModel->getDataSeriesByColumn( rEdit.getStartColumn() - 1 ));
- Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY );
- if( !xSource.is())
+ rtl::Reference< DataSeries > xSeries =
+ m_apDataBrowserModel->getDataSeriesByColumn( rEdit.getStartColumn() - 1 );
+ if( !xSeries.is())
return;
- Reference< chart2::XChartType > xChartType(
+ rtl::Reference< ChartType > xChartType(
m_apDataBrowserModel->getHeaderForSeries( xSeries ).m_xChartType );
if( xChartType.is())
{
- Reference< chart2::data::XLabeledDataSequence > xLabeledSeq(
- DataSeriesHelper::getDataSequenceByRole( xSource, xChartType->getRoleOfSequenceForSeriesLabel()));
+ uno::Reference< chart2::data::XLabeledDataSequence > xLabeledSeq =
+ DataSeriesHelper::getDataSequenceByRole( xSeries, xChartType->getRoleOfSequenceForSeriesLabel());
if( xLabeledSeq.is())
{
Reference< container::XIndexReplace > xIndexReplace( xLabeledSeq->getLabel(), uno::UNO_QUERY );
diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx
index ec85160e4437..c1d6a72e6cf8 100644
--- a/chart2/source/controller/dialogs/DataBrowser.hxx
+++ b/chart2/source/controller/dialogs/DataBrowser.hxx
@@ -98,8 +98,7 @@ public:
void SetReadOnly( bool bNewState );
bool IsReadOnly() const { return m_bIsReadOnly;}
- void SetDataFromModel( const rtl::Reference<::chart::ChartModel> & xChartDoc,
- const css::uno::Reference< css::uno::XComponentContext > & xContext );
+ void SetDataFromModel( const rtl::Reference<::chart::ChartModel> & xChartDoc );
// predicates to determine what actions are possible at the current cursor
// position. This depends on the implementation of the according mutators
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index c73781770549..938da978dd07 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -20,37 +20,34 @@
#include "DataBrowserModel.hxx"
#include "DialogModel.hxx"
#include <ChartModelHelper.hxx>
+#include <ChartType.hxx>
#include <ChartTypeManager.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <ControllerLockGuard.hxx>
#include <StatisticsHelper.hxx>
#include <ChartTypeHelper.hxx>
-#include <ChartTypeTemplate.hxx>
#include <chartview/ExplicitValueProvider.hxx>
#include <ExplicitCategoriesProvider.hxx>
#include <BaseCoordinateSystem.hxx>
-
#include <ChartModel.hxx>
#include <unonames.hxx>
#include <com/sun/star/container/XIndexReplace.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/XInternalDataProvider.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
-#include <com/sun/star/util/XModifiable.hpp>
#include <o3tl/safeint.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <comphelper/property.hxx>
#include <algorithm>
+#include <cstddef>
#include <limits>
+#include <utility>
using namespace ::com::sun::star;
@@ -99,7 +96,7 @@ void lcl_copyDataSequenceProperties(
}
bool lcl_SequenceOfSeriesIsShared(
- const Reference< chart2::XDataSeries > & xSeries,
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
const Reference< chart2::data::XDataSequence > & xValues )
{
bool bResult = false;
@@ -109,9 +106,8 @@ bool lcl_SequenceOfSeriesIsShared(
{
OUString aValuesRole( lcl_getRole( xValues ));
OUString aValuesRep( xValues->getSourceRangeRepresentation());
- Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY_THROW );
- const Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSeq( xSource->getDataSequences());
- for( Reference< chart2::data::XLabeledDataSequence > const & labeledDataSeq : aLSeq )
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aLSeq( xSeries->getDataSequences2());
+ for( uno::Reference< chart2::data::XLabeledDataSequence > const & labeledDataSeq : aLSeq )
if (labeledDataSeq.is() && DataSeriesHelper::getRole(labeledDataSeq) == aValuesRole)
{
// getValues().is(), because lcl_getRole checked that already
@@ -127,24 +123,22 @@ bool lcl_SequenceOfSeriesIsShared(
return bResult;
}
-typedef std::vector< Reference< chart2::data::XLabeledDataSequence > > lcl_tSharedSeqVec;
+typedef std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > lcl_tSharedSeqVec;
-lcl_tSharedSeqVec lcl_getSharedSequences( const Sequence< Reference< chart2::XDataSeries > > & rSeries )
+lcl_tSharedSeqVec lcl_getSharedSequences( const std::vector< rtl::Reference< DataSeries > > & rSeries )
{
// @todo: if only some series share a sequence, those have to be duplicated
// and made unshared for all series
lcl_tSharedSeqVec aResult;
// if we have only one series, we don't want any shared sequences
- if( rSeries.getLength() <= 1 )
+ if( rSeries.size() <= 1 )
return aResult;
- Reference< chart2::data::XDataSource > xSource( rSeries[0], uno::UNO_QUERY );
- const Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSeq( xSource->getDataSequences());
- for( Reference< chart2::data::XLabeledDataSequence > const & labeledDataSeq : aLSeq )
+ for( uno::Reference< chart2::data::XLabeledDataSequence > const & labeledDataSeq : rSeries[0]->getDataSequences2() )
{
Reference< chart2::data::XDataSequence > xValues( labeledDataSeq->getValues());
bool bShared = true;
- for( sal_Int32 nSeriesIdx=1; nSeriesIdx<rSeries.getLength(); ++nSeriesIdx )
+ for( std::size_t nSeriesIdx=1; nSeriesIdx<rSeries.size(); ++nSeriesIdx )
{
bShared = lcl_SequenceOfSeriesIsShared( rSeries[nSeriesIdx], xValues );
if( !bShared )
@@ -193,10 +187,10 @@ private:
struct lcl_RolesOfLSeqMatch
{
- explicit lcl_RolesOfLSeqMatch( const Reference< chart2::data::XLabeledDataSequence > & xLSeq ) :
+ explicit lcl_RolesOfLSeqMatch( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq ) :
m_aRole(DataSeriesHelper::getRole(xLSeq)) {}
- bool operator() ( const Reference< chart2::data::XLabeledDataSequence > & xLSeq )
+ bool operator() ( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq )
{
return DataSeriesHelper::getRole(xLSeq) == m_aRole;
}
@@ -204,16 +198,16 @@ private:
OUString m_aRole;
};
-bool lcl_ShowCategoriesAsDataLabel( const Reference< chart2::XDiagram > & xDiagram )
+bool lcl_ShowCategoriesAsDataLabel( const rtl::Reference< ::chart::Diagram > & xDiagram )
{
- return !DiagramHelper::isCategoryDiagram(xDiagram);
+ return !xDiagram->isCategory();
}
} // anonymous namespace
struct DataBrowserModel::tDataColumn
{
- uno::Reference<chart2::XDataSeries> m_xDataSeries;
+ rtl::Reference<DataSeries> m_xDataSeries;
OUString m_aUIRoleName;
uno::Reference<chart2::data::XLabeledDataSequence> m_xLabeledDataSequence;
eCellType m_eCellType;
@@ -223,14 +217,14 @@ struct DataBrowserModel::tDataColumn
tDataColumn() : m_eCellType( TEXT ), m_nNumberFormatKey( 0 ) {}
// "full" CTOR
tDataColumn(
- const uno::Reference<chart2::XDataSeries> & xDataSeries,
- const OUString& aUIRoleName,
- const uno::Reference<chart2::data::XLabeledDataSequence>& xLabeledDataSequence,
+ rtl::Reference<DataSeries> xDataSeries,
+ OUString aUIRoleName,
+ uno::Reference<chart2::data::XLabeledDataSequence> xLabeledDataSequence,
eCellType aCellType,
sal_Int32 nNumberFormatKey ) :
- m_xDataSeries( xDataSeries ),
- m_aUIRoleName( aUIRoleName ),
- m_xLabeledDataSequence( xLabeledDataSequence ),
+ m_xDataSeries(std::move( xDataSeries )),
+ m_aUIRoleName(std::move( aUIRoleName )),
+ m_xLabeledDataSequence(std::move( xLabeledDataSequence )),
m_eCellType( aCellType ),
m_nNumberFormatKey( nNumberFormatKey )
{}
@@ -250,10 +244,9 @@ struct DataBrowserModel::implColumnLess
};
DataBrowserModel::DataBrowserModel(
- const rtl::Reference<::chart::ChartModel> & xChartDoc,
- const Reference< uno::XComponentContext > & xContext ) :
+ const rtl::Reference<::chart::ChartModel> & xChartDoc ) :
m_xChartDocument( xChartDoc ),
- m_apDialogModel( new DialogModel( xChartDoc, xContext ))
+ m_apDialogModel( new DialogModel( xChartDoc ))
{
updateFromModel();
}
@@ -266,15 +259,15 @@ namespace
struct lcl_DataSeriesOfHeaderMatches
{
explicit lcl_DataSeriesOfHeaderMatches(
- const Reference< chart2::XDataSeries > & xSeriesToCompareWith ) :
- m_xSeries( xSeriesToCompareWith )
+ rtl::Reference< ::chart::DataSeries > xSeriesToCompareWith ) :
+ m_xSeries(std::move( xSeriesToCompareWith ))
{}
bool operator() ( const ::chart::DataBrowserModel::tDataHeader & rHeader )
{
return (m_xSeries == rHeader.m_xDataSeries);
}
private:
- Reference< chart2::XDataSeries > m_xSeries;
+ rtl::Reference< ::chart::DataSeries > m_xSeries;
};
}
@@ -292,18 +285,18 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
nAfterColumnIndex = getCategoryColumnCount()-1;
sal_Int32 nStartCol = 0;
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram(m_xChartDocument);
- Reference<chart2::XChartType> xChartType;
- Reference<chart2::XDataSeries> xSeries;
+ rtl::Reference< Diagram > xDiagram = m_xChartDocument->getFirstChartDiagram();
+ rtl::Reference<ChartType> xChartType;
+ rtl::Reference<DataSeries> xSeries;
if (o3tl::make_unsigned(nAfterColumnIndex) < m_aColumns.size())
// Get the data series at specific column position (if available).
- xSeries.set( m_aColumns[nAfterColumnIndex].m_xDataSeries );
+ xSeries = m_aColumns[nAfterColumnIndex].m_xDataSeries;
sal_Int32 nSeriesNumberFormat = 0;
if( xSeries.is())
{
// Use the chart type of the currently selected data series.
- xChartType.set( DiagramHelper::getChartTypeOfSeries( xDiagram, xSeries ));
+ xChartType = xDiagram->getChartTypeOfSeries( xSeries );
// Find the corresponding header and determine the last column of this
// data series.
@@ -314,14 +307,13 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
nStartCol = aIt->m_nEndColumn;
// Get the number format too.
- Reference< beans::XPropertySet > xSeriesProps( xSeries, uno::UNO_QUERY );
- if( xSeriesProps.is() )
- xSeriesProps->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nSeriesNumberFormat;
+ if( xSeries.is() )
+ xSeries->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nSeriesNumberFormat;
}
else
{
// No data series at specified column position. Use the first chart type.
- xChartType.set( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ));
+ xChartType = xDiagram->getChartTypeByIndex( 0 );
nStartCol = nAfterColumnIndex;
}
@@ -330,68 +322,59 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
// Get shared sequences of current series. Normally multiple data series
// only share "values-x" sequences. (TODO: simplify this logic).
- Reference< chart2::XDataSeriesContainer > xSeriesCnt( xChartType, uno::UNO_QUERY );
- lcl_tSharedSeqVec aSharedSequences;
- if( xSeriesCnt.is())
- aSharedSequences = lcl_getSharedSequences( xSeriesCnt->getDataSeries());
+ lcl_tSharedSeqVec aSharedSequences = lcl_getSharedSequences( xChartType->getDataSeries2());
- Reference<chart2::XDataSeries> xNewSeries =
+ rtl::Reference<::chart::DataSeries> xNewSeries =
m_apDialogModel->insertSeriesAfter(xSeries, xChartType, true);
if (!xNewSeries.is())
// Failed to insert new data series to the model. Bail out.
return;
- Reference< chart2::data::XDataSource > xSource( xNewSeries, uno::UNO_QUERY );
- if (xSource.is())
+ const std::vector<uno::Reference<chart2::data::XLabeledDataSequence> > & aLSequences = xNewSeries->getDataSequences2();
+ sal_Int32 nSeqIdx = 0;
+ sal_Int32 nSeqSize = aLSequences.size();
+ for (sal_Int32 nIndex = nStartCol; nSeqIdx < nSeqSize; ++nSeqIdx)
{
- Sequence<Reference<chart2::data::XLabeledDataSequence> > aLSequences = xSource->getDataSequences();
- sal_Int32 nSeqIdx = 0;
- sal_Int32 nSeqSize = aLSequences.getLength();
- for (sal_Int32 nIndex = nStartCol; nSeqIdx < nSeqSize; ++nSeqIdx)
- {
- lcl_tSharedSeqVec::const_iterator aSharedIt(
- std::find_if( aSharedSequences.begin(), aSharedSequences.end(),
- lcl_RolesOfLSeqMatch( aLSequences[nSeqIdx] )));
+ lcl_tSharedSeqVec::const_iterator aSharedIt(
+ std::find_if( aSharedSequences.begin(), aSharedSequences.end(),
+ lcl_RolesOfLSeqMatch( aLSequences[nSeqIdx] )));
- if( aSharedIt != aSharedSequences.end())
- {
- // Shared sequence. Most likely "values-x" sequence. Copy it from existing sequence.
- aLSequences[nSeqIdx]->setValues( (*aSharedIt)->getValues());
- aLSequences[nSeqIdx]->setLabel( (*aSharedIt)->getLabel());
- }
- else
- {
- // Insert a new column in the internal data for the new sequence.
- xDataProvider->insertSequence( nIndex - 1 );
-
- // values
- Reference< chart2::data::XDataSequence > xNewSeq(
- xDataProvider->createDataSequenceByRangeRepresentation(
- OUString::number( nIndex )));
- lcl_copyDataSequenceProperties(
- aLSequences[nSeqIdx]->getValues(), xNewSeq );
- aLSequences[nSeqIdx]->setValues( xNewSeq );
-
- // labels
- Reference< chart2::data::XDataSequence > xNewLabelSeq(
- xDataProvider->createDataSequenceByRangeRepresentation(
- "label " +
- OUString::number( nIndex )));
- lcl_copyDataSequenceProperties(
- aLSequences[nSeqIdx]->getLabel(), xNewLabelSeq );
- aLSequences[nSeqIdx]->setLabel( xNewLabelSeq );
- ++nIndex;
- }
+ if( aSharedIt != aSharedSequences.end())
+ {
+ // Shared sequence. Most likely "values-x" sequence. Copy it from existing sequence.
+ aLSequences[nSeqIdx]->setValues( (*aSharedIt)->getValues());
+ aLSequences[nSeqIdx]->setLabel( (*aSharedIt)->getLabel());
+ }
+ else
+ {
+ // Insert a new column in the internal data for the new sequence.
+ xDataProvider->insertSequence( nIndex - 1 );
+
+ // values
+ Reference< chart2::data::XDataSequence > xNewSeq(
+ xDataProvider->createDataSequenceByRangeRepresentation(
+ OUString::number( nIndex )));
+ lcl_copyDataSequenceProperties(
+ aLSequences[nSeqIdx]->getValues(), xNewSeq );
+ aLSequences[nSeqIdx]->setValues( xNewSeq );
+
+ // labels
+ Reference< chart2::data::XDataSequence > xNewLabelSeq(
+ xDataProvider->createDataSequenceByRangeRepresentation(
+ "label " +
+ OUString::number( nIndex )));
+ lcl_copyDataSequenceProperties(
+ aLSequences[nSeqIdx]->getLabel(), xNewLabelSeq );
+ aLSequences[nSeqIdx]->setLabel( xNewLabelSeq );
+ ++nIndex;
}
}
if( nSeriesNumberFormat != 0 )
{
//give the new series the same number format as the former series especially for bubble charts thus the bubble size values can be edited with same format immediately
- Reference< beans::XPropertySet > xNewSeriesProps( xNewSeries, uno::UNO_QUERY );
- if( xNewSeriesProps.is() )
- xNewSeriesProps->setPropertyValue(CHART_UNONAME_NUMFMT , uno::Any(nSeriesNumberFormat));
+ xNewSeries->setPropertyValue(CHART_UNONAME_NUMFMT , uno::Any(nSeriesNumberFormat));
}
updateFromModel();
@@ -450,7 +433,7 @@ void DataBrowserModel::removeDataSeriesOrComplexCategoryLevel( sal_Int32 nAtColu
return;
}
- const Reference<chart2::XDataSeries>& xSeries = m_aColumns[nAtColumnIndex].m_xDataSeries;
+ const rtl::Reference<DataSeries>& xSeries = m_aColumns[nAtColumnIndex].m_xDataSeries;
m_apDialogModel->deleteSeries(xSeries, getHeaderForSeries(xSeries).m_xChartType);
@@ -458,16 +441,14 @@ void DataBrowserModel::removeDataSeriesOrComplexCategoryLevel( sal_Int32 nAtColu
//but do not delete sequences that are still in use by the remaining series
Reference< chart2::XInternalDataProvider > xDataProvider( m_apDialogModel->getDataProvider(), uno::UNO_QUERY );
- Reference< chart2::data::XDataSource > xSourceOfDeleted( xSeries, uno::UNO_QUERY );
- if (!xDataProvider.is() || !xSourceOfDeleted.is())
+ if (!xDataProvider.is() || !xSeries.is())
{
// Something went wrong. Bail out.
updateFromModel();
return;
}
- Reference<chart2::XDataSeriesContainer> xSeriesCnt(
- getHeaderForSeries(xSeries).m_xChartType, uno::UNO_QUERY);
+ rtl::Reference<ChartType> xSeriesCnt(getHeaderForSeries(xSeries).m_xChartType);
if (!xSeriesCnt.is())
{
// Unexpected happened. Bail out.
@@ -477,13 +458,13 @@ void DataBrowserModel::removeDataSeriesOrComplexCategoryLevel( sal_Int32 nAtColu
// Collect all the remaining data sequences in the same chart type. The
// deleted data series is already gone by this point.
- std::vector<Reference<chart2::data::XLabeledDataSequence> > aAllDataSeqs =
- DataSeriesHelper::getAllDataSequences(xSeriesCnt->getDataSeries());
+ std::vector<uno::Reference<chart2::data::XLabeledDataSequence> > aAllDataSeqs =
+ DataSeriesHelper::getAllDataSequences(xSeriesCnt->getDataSeries2());
// Check if the sequences to be deleted are still referenced by any of
// the other data series. If not, mark them for deletion.
std::vector<sal_Int32> aSequenceIndexesToDelete;
- const Sequence<Reference<chart2::data::XLabeledDataSequence> > aSequencesOfDeleted = xSourceOfDeleted->getDataSequences();
+ const std::vector<uno::Reference<chart2::data::XLabeledDataSequence> > & aSequencesOfDeleted = xSeries->getDataSequences2();
for (auto const & labeledDataSeq : aSequencesOfDeleted)
{
// if not used by the remaining series this sequence can be deleted
@@ -511,7 +492,7 @@ void DataBrowserModel::swapDataSeries( sal_Int32 nFirstColumnIndex )
OSL_ASSERT(m_apDialogModel);
if( o3tl::make_unsigned( nFirstColumnIndex ) < m_aColumns.size() - 1 )
{
- Reference< chart2::XDataSeries > xSeries( m_aColumns[nFirstColumnIndex].m_xDataSeries );
+ rtl::Reference< DataSeries > xSeries( m_aColumns[nFirstColumnIndex].m_xDataSeries );
if( xSeries.is())
{
m_apDialogModel->moveSeries( xSeries, DialogModel::MoveDirection::Down );
@@ -557,15 +538,17 @@ void DataBrowserModel::removeDataPointForAllSeries( sal_Int32 nAtIndex )
DataBrowserModel::tDataHeader DataBrowserModel::getHeaderForSeries(
const Reference< chart2::XDataSeries > & xSeries ) const
{
+ rtl::Reference<DataSeries> pSeries = dynamic_cast<DataSeries*>(xSeries.get());
+ assert(!xSeries || pSeries);
for (auto const& elemHeader : m_aHeaders)
{
- if( elemHeader.m_xDataSeries == xSeries )
+ if( elemHeader.m_xDataSeries == pSeries )
return elemHeader;
}
return tDataHeader();
}
-Reference< chart2::XDataSeries >
+rtl::Reference< DataSeries >
DataBrowserModel::getDataSeriesByColumn( sal_Int32 nColumn ) const
{
tDataColumnVector::size_type nIndex( nColumn );
@@ -765,14 +748,14 @@ void DataBrowserModel::updateFromModel()
m_aColumns.clear();
m_aHeaders.clear();
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( m_xChartDocument ));
+ rtl::Reference< Diagram > xDiagram( m_xChartDocument->getFirstChartDiagram());
if( !xDiagram.is())
return;
// set template at DialogModel
rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = m_xChartDocument->getTypeManager();
- DiagramHelper::tTemplateWithServiceName aTemplateAndService =
- DiagramHelper::getTemplateForDiagram( xDiagram, xChartTypeManager );
+ Diagram::tTemplateWithServiceName aTemplateAndService =
+ xDiagram->getTemplate( xChartTypeManager );
if( aTemplateAndService.xChartTypeTemplate.is())
m_apDialogModel->setTemplate( aTemplateAndService.xChartTypeTemplate );
@@ -781,8 +764,8 @@ void DataBrowserModel::updateFromModel()
{
ExplicitCategoriesProvider aExplicitCategoriesProvider( ChartModelHelper::getFirstCoordinateSystem(m_xChartDocument), *m_xChartDocument );
- const Sequence< Reference< chart2::data::XLabeledDataSequence> >& rSplitCategoriesList( aExplicitCategoriesProvider.getSplitCategoriesList() );
- sal_Int32 nLevelCount = rSplitCategoriesList.getLength();
+ const std::vector< Reference< chart2::data::XLabeledDataSequence> >& rSplitCategoriesList = aExplicitCategoriesProvider.getSplitCategoriesList();
+ sal_Int32 nLevelCount = rSplitCategoriesList.size();
for( sal_Int32 nL = 0; nL<nLevelCount; nL++ )
{
Reference< chart2::data::XLabeledDataSequence > xCategories( rSplitCategoriesList[nL] );
@@ -790,7 +773,7 @@ void DataBrowserModel::updateFromModel()
continue;
tDataColumn aCategories;
- aCategories.m_xLabeledDataSequence.set( xCategories );
+ aCategories.m_xLabeledDataSequence = xCategories;
if( lcl_ShowCategoriesAsDataLabel( xDiagram ))
aCategories.m_aUIRoleName = DialogModel::GetRoleDataLabel();
else
@@ -806,101 +789,97 @@ void DataBrowserModel::updateFromModel()
const std::vector< rtl::Reference< BaseCoordinateSystem > > aCooSysSeq( xDiagram->getBaseCoordinateSystems());
for( rtl::Reference< BaseCoordinateSystem > const & coords : aCooSysSeq )
{
- const Sequence< Reference< chart2::XChartType > > aChartTypes( coords->getChartTypes());
+ const std::vector< rtl::Reference< ChartType > > aChartTypes( coords->getChartTypes2());
sal_Int32 nXAxisNumberFormat = DataSeriesHelper::getNumberFormatKeyFromAxis( nullptr, coords, 0, 0 );
- for( sal_Int32 nCTIdx=0; nCTIdx<aChartTypes.getLength(); ++nCTIdx )
+ for( auto const & CT: aChartTypes )
{
- Reference< chart2::XDataSeriesContainer > xSeriesCnt( aChartTypes[nCTIdx], uno::UNO_QUERY );
- if( xSeriesCnt.is())
- {
- OUString aRoleForDataLabelNumberFormat = ChartTypeHelper::getRoleOfSequenceForDataLabelNumberFormatDetection( aChartTypes[nCTIdx] );
+ rtl::Reference< ChartType > xSeriesCnt( CT );
+ OUString aRoleForDataLabelNumberFormat = ChartTypeHelper::getRoleOfSequenceForDataLabelNumberFormatDetection( CT );
- const Sequence< Reference< chart2::XDataSeries > > aSeries( xSeriesCnt->getDataSeries());
- lcl_tSharedSeqVec aSharedSequences( lcl_getSharedSequences( aSeries ));
- for (auto const& sharedSequence : aSharedSequences)
- {
- tDataColumn aSharedSequence;
- aSharedSequence.m_xLabeledDataSequence = sharedSequence;
- aSharedSequence.m_aUIRoleName = lcl_getUIRoleName(sharedSequence);
- aSharedSequence.m_eCellType = NUMBER;
- // as the sequences are shared it should be ok to take the first series
- // @todo: dimension index 0 for x-values used here. This is just a guess.
- // Also, the axis index is 0, as there is usually only one x-axis
- aSharedSequence.m_nNumberFormatKey = nXAxisNumberFormat;
- m_aColumns.push_back( aSharedSequence );
- ++nHeaderStart;
- }
- for( Reference< chart2::XDataSeries > const & dataSeries : aSeries )
+ const std::vector< rtl::Reference< DataSeries > > & aSeries( xSeriesCnt->getDataSeries2());
+ lcl_tSharedSeqVec aSharedSequences( lcl_getSharedSequences( aSeries ));
+ for (auto const& sharedSequence : aSharedSequences)
+ {
+ tDataColumn aSharedSequence;
+ aSharedSequence.m_xLabeledDataSequence = sharedSequence;
+ aSharedSequence.m_aUIRoleName = lcl_getUIRoleName(sharedSequence);
+ aSharedSequence.m_eCellType = NUMBER;
+ // as the sequences are shared it should be ok to take the first series
+ // @todo: dimension index 0 for x-values used here. This is just a guess.
+ // Also, the axis index is 0, as there is usually only one x-axis
+ aSharedSequence.m_nNumberFormatKey = nXAxisNumberFormat;
+ m_aColumns.push_back( aSharedSequence );
+ ++nHeaderStart;
+ }
+ for( rtl::Reference< DataSeries > const & dataSeries : aSeries )
+ {
+ tDataColumnVector::size_type nStartColIndex = m_aColumns.size();
+ rtl::Reference< DataSeries > xSeries( dataSeries );
+ if( xSeries.is())
{
- tDataColumnVector::size_type nStartColIndex = m_aColumns.size();
- Reference< chart2::XDataSeries > xSeries( dataSeries );
- Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY );
- if( xSource.is())
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aLSeqs( xSeries->getDataSequences2());
+ if( aLSeqs.empty() )
+ continue;
+ nHeaderEnd = nHeaderStart;
+
+ // @todo: dimension index 1 for y-values used here. This is just a guess
+ sal_Int32 nYAxisNumberFormatKey =
+ DataSeriesHelper::getNumberFormatKeyFromAxis(
+ dataSeries, coords, 1 );
+
+ sal_Int32 nSeqIdx=0;
+ for( ; nSeqIdx<static_cast<sal_Int32>(aLSeqs.size()); ++nSeqIdx )
{
- Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSeqs( xSource->getDataSequences());
- if( !aLSeqs.hasElements() )
- continue;
- nHeaderEnd = nHeaderStart;
-
- // @todo: dimension index 1 for y-values used here. This is just a guess
- sal_Int32 nYAxisNumberFormatKey =
- DataSeriesHelper::getNumberFormatKeyFromAxis(
- dataSeries, coords, 1 );
-
- sal_Int32 nSeqIdx=0;
- for( ; nSeqIdx<aLSeqs.getLength(); ++nSeqIdx )
+ sal_Int32 nSequenceNumberFormatKey = nYAxisNumberFormatKey;
+ OUString aRole = DataSeriesHelper::getRole(aLSeqs[nSeqIdx]);
+
+ if( aRole == aRoleForDataLabelNumberFormat )
{
- sal_Int32 nSequenceNumberFormatKey = nYAxisNumberFormatKey;
- OUString aRole = DataSeriesHelper::getRole(aLSeqs[nSeqIdx]);
-
- if( aRole == aRoleForDataLabelNumberFormat )
- {
- nSequenceNumberFormatKey = ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel(
- Reference< beans::XPropertySet >( xSeries, uno::UNO_QUERY ));
- }
- else if( aRole == "values-x" )
- nSequenceNumberFormatKey = nXAxisNumberFormat;
-
- if( std::none_of( aSharedSequences.begin(), aSharedSequences.end(),
- lcl_RepresentationsOfLSeqMatch( aLSeqs[nSeqIdx] )) )
- {
- // no shared sequence
- m_aColumns.emplace_back(
- dataSeries,
- lcl_getUIRoleName( aLSeqs[nSeqIdx] ),
- aLSeqs[nSeqIdx],
- NUMBER,
- nSequenceNumberFormatKey );
- ++nHeaderEnd;
- }
- // else skip
+ nSequenceNumberFormatKey = ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel(
+ xSeries);
}
- bool bSwapXAndYAxis = false;
- try
+ else if( aRole == "values-x" )
+ nSequenceNumberFormatKey = nXAxisNumberFormat;
+
+ if( std::none_of( aSharedSequences.begin(), aSharedSequences.end(),
+ lcl_RepresentationsOfLSeqMatch( aLSeqs[nSeqIdx] )) )
{
- coords->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXAndYAxis;
+ // no shared sequence
+ m_aColumns.emplace_back(
+ dataSeries,
+ lcl_getUIRoleName( aLSeqs[nSeqIdx] ),
+ aLSeqs[nSeqIdx],
+ NUMBER,
+ nSequenceNumberFormatKey );
+ ++nHeaderEnd;
}
- catch( const beans::UnknownPropertyException & ) {}
+ // else skip
+ }
+ bool bSwapXAndYAxis = false;
+ try
+ {
+ coords->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXAndYAxis;
+ }
+ catch( const beans::UnknownPropertyException & ) {}
- // add ranges for error bars if present for a series
- if( StatisticsHelper::usesErrorBarRanges( dataSeries ))
- addErrorBarRanges( dataSeries, nYAxisNumberFormatKey, nSeqIdx, nHeaderEnd, true );
+ // add ranges for error bars if present for a series
+ if( StatisticsHelper::usesErrorBarRanges( dataSeries ))
+ addErrorBarRanges( dataSeries, nYAxisNumberFormatKey, nSeqIdx, nHeaderEnd, true );
- if( StatisticsHelper::usesErrorBarRanges( dataSeries, /* bYError = */ false ))
- addErrorBarRanges( dataSeries, nYAxisNumberFormatKey, nSeqIdx, nHeaderEnd, false );
+ if( StatisticsHelper::usesErrorBarRanges( dataSeries, /* bYError = */ false ))
+ addErrorBarRanges( dataSeries, nYAxisNumberFormatKey, nSeqIdx, nHeaderEnd, false );
- m_aHeaders.emplace_back(
- dataSeries,
- aChartTypes[nCTIdx],
- bSwapXAndYAxis,
- nHeaderStart,
- nHeaderEnd - 1 );
+ m_aHeaders.emplace_back(
+ dataSeries,
+ CT,
+ bSwapXAndYAxis,
+ nHeaderStart,
+ nHeaderEnd - 1 );
- nHeaderStart = nHeaderEnd;
+ nHeaderStart = nHeaderEnd;
- std::sort( m_aColumns.begin() + nStartColIndex, m_aColumns.end(), implColumnLess() );
- }
+ std::sort( m_aColumns.begin() + nStartColIndex, m_aColumns.end(), implColumnLess() );
}
}
}
@@ -908,35 +887,35 @@ void DataBrowserModel::updateFromModel()
}
void DataBrowserModel::addErrorBarRanges(
- const Reference< chart2::XDataSeries > & xDataSeries,
+ const rtl::Reference< DataSeries > & xDataSeries,
sal_Int32 nNumberFormatKey,
sal_Int32 & rInOutSequenceIndex,
sal_Int32 & rInOutHeaderEnd, bool bYError )
{
try
{
- std::vector< Reference< chart2::data::XLabeledDataSequence > > aSequences;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSequences;
Reference< chart2::data::XDataSource > xErrorSource(
StatisticsHelper::getErrorBars( xDataSeries, bYError ), uno::UNO_QUERY );
- Reference< chart2::data::XLabeledDataSequence > xErrorLSequence(
+ uno::Reference< chart2::data::XLabeledDataSequence > xErrorLSequence =
StatisticsHelper::getErrorLabeledDataSequenceFromDataSource(
xErrorSource,
/* bPositiveValue = */ true,
- bYError ));
+ bYError );
if( xErrorLSequence.is())
aSequences.push_back( xErrorLSequence );
- xErrorLSequence.set(
+ xErrorLSequence =
StatisticsHelper::getErrorLabeledDataSequenceFromDataSource(
xErrorSource,
/* bPositiveValue = */ false,
- bYError ));
+ bYError );
if( xErrorLSequence.is())
aSequences.push_back( xErrorLSequence );
- for (Reference<chart2::data::XLabeledDataSequence> const & rDataSequence : aSequences)
+ for (uno::Reference<chart2::data::XLabeledDataSequence> const & rDataSequence : aSequences)
{
m_aColumns.emplace_back(xDataSeries, lcl_getUIRoleName(rDataSequence),
rDataSequence, NUMBER, nNumberFormatKey);
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.hxx b/chart2/source/controller/dialogs/DataBrowserModel.hxx
index d7c7be071f66..e3254851d002 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.hxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.hxx
@@ -18,10 +18,14 @@
*/
#pragma once
+#include <DataSeries.hxx>
+#include <ChartType.hxx>
+
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ref.hxx>
#include <memory>
+#include <utility>
#include <vector>
namespace com::sun::star::chart2 { class XChartDocument; }
@@ -37,13 +41,14 @@ namespace chart
class DialogModel;
class ChartModel;
+class ChartType;
+class DataSeries;
class DataBrowserModel final
{
public:
explicit DataBrowserModel(
- const rtl::Reference<::chart::ChartModel> & xChartDoc,
- const css::uno::Reference< css::uno::XComponentContext > & xContext );
+ const rtl::Reference<::chart::ChartModel> & xChartDoc );
~DataBrowserModel();
/** Inserts a new data series after the data series to which the data column
@@ -98,8 +103,8 @@ public:
struct tDataHeader
{
- css::uno::Reference< css::chart2::XDataSeries > m_xDataSeries;
- css::uno::Reference< css::chart2::XChartType > m_xChartType;
+ rtl::Reference< ::chart::DataSeries > m_xDataSeries;
+ rtl::Reference< ::chart::ChartType > m_xChartType;
bool m_bSwapXAndYAxis;
sal_Int32 m_nStartColumn;
sal_Int32 m_nEndColumn;
@@ -112,13 +117,13 @@ public:
{}
// "full" CTOR
tDataHeader(
- css::uno::Reference< css::chart2::XDataSeries > const & xDataSeries,
- css::uno::Reference< css::chart2::XChartType > const &xChartType,
+ rtl::Reference< ::chart::DataSeries > xDataSeries,
+ rtl::Reference< ::chart::ChartType > xChartType,
bool bSwapXAndYAxis,
sal_Int32 nStartColumn,
sal_Int32 nEndColumn ) :
- m_xDataSeries( xDataSeries ),
- m_xChartType( xChartType ),
+ m_xDataSeries(std::move( xDataSeries )),
+ m_xChartType(std::move( xChartType )),
m_bSwapXAndYAxis( bSwapXAndYAxis ),
m_nStartColumn( nStartColumn ),
m_nEndColumn( nEndColumn )
@@ -132,7 +137,7 @@ public:
tDataHeader getHeaderForSeries(
const css::uno::Reference< css::chart2::XDataSeries > &xSeries ) const;
- css::uno::Reference< css::chart2::XDataSeries >
+ rtl::Reference< ::chart::DataSeries >
getDataSeriesByColumn( sal_Int32 nColumn ) const;
private:
@@ -141,7 +146,7 @@ private:
void removeComplexCategoryLevel( sal_Int32 nAtColumnIndex );
void addErrorBarRanges(
- const css::uno::Reference<css::chart2::XDataSeries > & xDataSeries,
+ const rtl::Reference<::chart::DataSeries > & xDataSeries,
sal_Int32 nNumberFormatKey,
sal_Int32 & rInOutSequenceIndex,
sal_Int32 & rInOutHeaderEnd, bool bYError );
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 73b438acef92..4c888e8ed5b6 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -19,33 +19,31 @@
#include "DialogModel.hxx"
#include <RangeSelectionHelper.hxx>
+#include <DataInterpreter.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <DataSourceHelper.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
#include <strings.hrc>
#include <ResId.hxx>
#include <ControllerLockGuard.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <ChartTypeTemplate.hxx>
#include <ThreeDHelper.hxx>
#include <ChartModel.hxx>
#include <BaseCoordinateSystem.hxx>
+#include <LabeledDataSequence.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
-#include <com/sun/star/chart2/data/XDataSink.hpp>
-#include <comphelper/sequence.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <rtl/ustring.hxx>
#include <utility>
#include <algorithm>
+#include <cstddef>
#include <iterator>
#include <numeric>
@@ -57,16 +55,8 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-constexpr OUStringLiteral lcl_aLabelRole( u"label" );
+constexpr OUString lcl_aLabelRole( u"label"_ustr );
-struct lcl_ChartTypeToSeriesCnt
-{
- Reference< XDataSeriesContainer > operator() (
- const Reference< XChartType > & xChartType )
- {
- return Reference< XDataSeriesContainer >::query( xChartType );
- }
-};
OUString lcl_ConvertRole( const OUString & rRoleString )
{
@@ -128,53 +118,6 @@ lcl_tRoleIndexMap lcl_createRoleIndexMap()
return aMap;
}
-struct lcl_DataSeriesContainerAppend
-{
- typedef Reference< XDataSeriesContainer > value_type;
- typedef std::vector< ::chart::DialogModel::tSeriesWithChartTypeByName > tContainerType;
-
- explicit lcl_DataSeriesContainerAppend( tContainerType * rCnt )
- : m_rDestCnt( rCnt )
- {}
-
- lcl_DataSeriesContainerAppend & operator= ( const value_type & xVal )
- {
- try
- {
- if( xVal.is())
- {
- const Sequence< Reference< XDataSeries > > aSeq( xVal->getDataSeries());
- OUString aRole( "values-y" );
- Reference< XChartType > xCT( xVal, uno::UNO_QUERY );
- if( xCT.is())
- aRole = xCT->getRoleOfSequenceForSeriesLabel();
- for( Reference< XDataSeries > const & dataSeries : aSeq )
- {
- m_rDestCnt->push_back(
- ::chart::DialogModel::tSeriesWithChartTypeByName(
- ::chart::DataSeriesHelper::getDataSeriesLabel( dataSeries, aRole ),
- std::make_pair( dataSeries, xCT )));
- }
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
- return *this;
- }
-
- // Implement output operator requirements as required by std::copy (and
- // implement prefix increment in terms of postfix increment to avoid unused
- // member function warnings for the latter in the common case where
- // std::copy would not actually need it):
- lcl_DataSeriesContainerAppend & operator* () { return *this; }
- lcl_DataSeriesContainerAppend & operator++ () { return operator++(0); }
- lcl_DataSeriesContainerAppend & operator++ (int) { return *this; }
-
-private:
- tContainerType * m_rDestCnt;
-};
struct lcl_RolesWithRangeAppend
{
@@ -182,9 +125,9 @@ struct lcl_RolesWithRangeAppend
typedef ::chart::DialogModel::tRolesWithRanges tContainerType;
explicit lcl_RolesWithRangeAppend( tContainerType * rCnt,
- const OUString & aLabelRole )
+ OUString aLabelRole )
: m_rDestCnt( rCnt ),
- m_aRoleForLabelSeq( aLabelRole )
+ m_aRoleForLabelSeq(std::move( aLabelRole ))
{}
lcl_RolesWithRangeAppend & operator= ( const value_type & xVal )
@@ -240,13 +183,6 @@ private:
namespace std
{
- template<> struct iterator_traits<lcl_DataSeriesContainerAppend>
- {
- typedef std::output_iterator_tag iterator_category;
- typedef Reference< XDataSeriesContainer > value_type;
- typedef value_type& reference;
- };
-
template<> struct iterator_traits<lcl_RolesWithRangeAppend>
{
typedef std::output_iterator_tag iterator_category;
@@ -288,52 +224,43 @@ Sequence< OUString > lcl_CopyExcludingValuesFirst(
return aOutput;
}
-Reference< XDataSeries > lcl_CreateNewSeries(
- const Reference< uno::XComponentContext > & xContext,
- const Reference< XChartType > & xChartType,
+rtl::Reference< ::chart::DataSeries > lcl_CreateNewSeries(
+ const rtl::Reference< ::chart::ChartType > & xChartType,
sal_Int32 nNewSeriesIndex,
sal_Int32 nTotalNumberOfSeriesInCTGroup,
- const Reference< XDiagram > & xDiagram,
- const Reference< XChartTypeTemplate > & xTemplate,
+ const rtl::Reference< ::chart::Diagram > & xDiagram,
+ const rtl::Reference< ::chart::ChartTypeTemplate > & xTemplate,
bool bCreateDataCachedSequences )
{
// create plain series
- Reference< XDataSeries > xResult(
- xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.chart2.DataSeries" ,
- xContext ), uno::UNO_QUERY );
+ rtl::Reference< ::chart::DataSeries > xResult = new ::chart::DataSeries();
if( xTemplate.is())
{
- Reference< beans::XPropertySet > xResultProp( xResult, uno::UNO_QUERY );
- if( xResultProp.is())
- {
- // @deprecated: correct default color should be found by view
- // without setting it as hard attribute
- Reference< XColorScheme > xColorScheme( xDiagram->getDefaultColorScheme());
- if( xColorScheme.is())
- xResultProp->setPropertyValue( "Color" , uno::Any( xColorScheme->getColorByIndex( nNewSeriesIndex )));
- }
- sal_Int32 nGroupIndex=0;
+ // @deprecated: correct default color should be found by view
+ // without setting it as hard attribute
+ Reference< XColorScheme > xColorScheme( xDiagram->getDefaultColorScheme());
+ if( xColorScheme.is())
+ xResult->setPropertyValue( "Color" , uno::Any( xColorScheme->getColorByIndex( nNewSeriesIndex )));
+ std::size_t nGroupIndex=0;
if( xChartType.is())
{
- Sequence< Reference< XChartType > > aCTs(
- ::chart::DiagramHelper::getChartTypesFromDiagram( xDiagram ));
- for( ; nGroupIndex<aCTs.getLength(); ++nGroupIndex)
+ std::vector< rtl::Reference< ::chart::ChartType > > aCTs =
+ xDiagram->getChartTypes();
+ for( ; nGroupIndex < aCTs.size(); ++nGroupIndex)
if( aCTs[nGroupIndex] == xChartType )
break;
- if( nGroupIndex == aCTs.getLength())
+ if( nGroupIndex == aCTs.size())
nGroupIndex = 0;
}
- xTemplate->applyStyle( xResult, nGroupIndex, nNewSeriesIndex, nTotalNumberOfSeriesInCTGroup );
+ xTemplate->applyStyle2( xResult, nGroupIndex, nNewSeriesIndex, nTotalNumberOfSeriesInCTGroup );
}
if( bCreateDataCachedSequences )
{
// set chart type specific roles
- Reference< data::XDataSink > xSink( xResult, uno::UNO_QUERY );
- if( xChartType.is() && xSink.is())
+ if( xChartType.is() )
{
- std::vector< Reference< data::XLabeledDataSequence > > aNewSequences;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aNewSequences;
const OUString aRoleOfSeqForSeriesLabel = xChartType->getRoleOfSequenceForSeriesLabel();
const OUString aLabel(::chart::SchResId(STR_DATA_UNNAMED_SERIES));
Sequence< OUString > aPossibleRoles( xChartType->getSupportedMandatoryRoles());
@@ -342,7 +269,7 @@ Reference< XDataSeries > lcl_CreateNewSeries(
//special handling for candlestick type
if( xTemplate.is())
{
- Reference< XDataInterpreter > xInterpreter( xTemplate->getDataInterpreter());
+ rtl::Reference< ::chart::DataInterpreter > xInterpreter( xTemplate->getDataInterpreter2());
if( xInterpreter.is())
{
sal_Int32 nStockVariant;
@@ -386,7 +313,7 @@ Reference< XDataSeries > lcl_CreateNewSeries(
aNewSequences.push_back( ::chart::DataSourceHelper::createLabeledDataSequence( xSeq ));
}
- xSink->setData( comphelper::containerToSequence( aNewSequences ));
+ xResult->setData( aNewSequences );
}
}
@@ -416,10 +343,8 @@ DialogModelTimeBasedInfo::DialogModelTimeBasedInfo():
}
DialogModel::DialogModel(
- const rtl::Reference<::chart::ChartModel> & xChartDocument,
- const Reference< uno::XComponentContext > & xContext ) :
- m_xChartDocument( xChartDocument ),
- m_xContext( xContext ),
+ rtl::Reference<::chart::ChartModel> xChartDocument ) :
+ m_xChartDocument(std::move( xChartDocument )),
m_aTimerTriggeredControllerLock( m_xChartDocument )
{
}
@@ -461,10 +386,10 @@ Reference< data::XDataProvider > DialogModel::getDataProvider() const
return xResult;
}
-std::vector< Reference< XDataSeriesContainer > >
+std::vector< rtl::Reference< ChartType > >
DialogModel::getAllDataSeriesContainers() const
{
- std::vector< Reference< XDataSeriesContainer > > aResult;
+ std::vector< rtl::Reference< ChartType > > aResult;
try
{
@@ -477,11 +402,9 @@ std::vector< Reference< XDataSeriesContainer > >
xDiagram->getBaseCoordinateSystems());
for( rtl::Reference< BaseCoordinateSystem > const & coords : aCooSysSeq )
{
- const Sequence< Reference< XChartType > > aChartTypeSeq( coords->getChartTypes());
- std::transform(
- aChartTypeSeq.begin(), aChartTypeSeq.end(),
- std::back_inserter( aResult ),
- lcl_ChartTypeToSeriesCnt() );
+
+ for (const auto & rxChartType : coords->getChartTypes2())
+ aResult.push_back(rxChartType);
}
}
}
@@ -497,11 +420,29 @@ std::vector< DialogModel::tSeriesWithChartTypeByName >
DialogModel::getAllDataSeriesWithLabel() const
{
std::vector< tSeriesWithChartTypeByName > aResult;
- std::vector< Reference< XDataSeriesContainer > > aContainers(
+ std::vector< rtl::Reference< ChartType > > aContainers(
getAllDataSeriesContainers());
- std::copy( aContainers.begin(), aContainers.end(),
- lcl_DataSeriesContainerAppend( &aResult ));
+ for (const auto & rxChartType : aContainers )
+ {
+ try
+ {
+ const std::vector< rtl::Reference< DataSeries > > & aSeq = rxChartType->getDataSeries2();
+ OUString aRole = rxChartType->getRoleOfSequenceForSeriesLabel();
+ for( rtl::Reference< DataSeries > const & dataSeries : aSeq )
+ {
+ aResult.push_back(
+ ::chart::DialogModel::tSeriesWithChartTypeByName(
+ dataSeries->getLabelForRole( aRole ),
+ std::make_pair( dataSeries, rxChartType )));
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+ }
+
return aResult;
}
@@ -526,15 +467,13 @@ void addMissingRoles(DialogModel::tRolesWithRanges& rResult, const uno::Sequence
* @param xNewSeries new data series to insert.
*/
void addNewSeriesToContainer(
- const Reference<XChartType>& xChartType,
- const Reference<XDataSeries>& xSeries,
- const Reference<XDataSeries>& xNewSeries )
+ const rtl::Reference<ChartType>& xChartType,
+ const rtl::Reference<DataSeries>& xSeries,
+ const rtl::Reference<DataSeries>& xNewSeries )
{
- Reference<XDataSeriesContainer> xSeriesCnt(xChartType, uno::UNO_QUERY_THROW);
- auto aSeries = comphelper::sequenceToContainer<std::vector<Reference<XDataSeries> >>(xSeriesCnt->getDataSeries());
+ auto aSeries = xChartType->getDataSeries2();
- std::vector<Reference<XDataSeries> >::iterator aIt =
- std::find( aSeries.begin(), aSeries.end(), xSeries);
+ auto aIt = std::find( aSeries.begin(), aSeries.end(), xSeries);
if( aIt == aSeries.end())
// if we have no series we insert at the first position.
@@ -544,7 +483,7 @@ void addNewSeriesToContainer(
++aIt;
aSeries.insert(aIt, xNewSeries);
- xSeriesCnt->setDataSeries(comphelper::containerToSequence(aSeries));
+ xChartType->setDataSeries(aSeries);
}
}
@@ -552,7 +491,7 @@ void addNewSeriesToContainer(
DialogModel::tRolesWithRanges DialogModel::getRolesWithRanges(
const Reference< XDataSeries > & xSeries,
const OUString & aRoleOfSequenceForLabel,
- const Reference< chart2::XChartType > & xChartType )
+ const rtl::Reference< ::chart::ChartType > & xChartType )
{
DialogModel::tRolesWithRanges aResult;
try
@@ -584,54 +523,54 @@ DialogModel::tRolesWithRanges DialogModel::getRolesWithRanges(
}
void DialogModel::moveSeries(
- const Reference< XDataSeries > & xSeries,
+ const rtl::Reference< DataSeries > & xSeries,
MoveDirection eDirection )
{
m_aTimerTriggeredControllerLock.startTimer();
ControllerLockGuardUNO aLockedControllers( m_xChartDocument );
- Reference< XDiagram > xDiagram( m_xChartDocument->getFirstDiagram());
- DiagramHelper::moveSeries( xDiagram, xSeries, eDirection==MoveDirection::Down );
+ rtl::Reference< Diagram > xDiagram( m_xChartDocument->getFirstChartDiagram());
+ xDiagram->moveSeries( xSeries, eDirection==MoveDirection::Down );
}
-Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter(
- const Reference< XDataSeries > & xSeries,
- const Reference< XChartType > & xChartType,
+rtl::Reference< ::chart::DataSeries > DialogModel::insertSeriesAfter(
+ const Reference< XDataSeries > & xUnoSeries,
+ const rtl::Reference< ::chart::ChartType > & xChartType,
bool bCreateDataCachedSequences /* = false */ )
{
m_aTimerTriggeredControllerLock.startTimer();
ControllerLockGuardUNO aLockedControllers( m_xChartDocument );
- Reference< XDataSeries > xNewSeries;
+ rtl::Reference< ::chart::DataSeries > xNewSeries;
+ rtl::Reference<DataSeries> xSeries = dynamic_cast<DataSeries*>(xUnoSeries.get());
+ assert(xSeries || !xUnoSeries);
try
{
- Reference< chart2::XDiagram > xDiagram( m_xChartDocument->getFirstDiagram() );
- ThreeDLookScheme e3DScheme = ThreeDHelper::detectScheme( xDiagram );
+ rtl::Reference< Diagram > xDiagram( m_xChartDocument->getFirstChartDiagram() );
+ ThreeDLookScheme e3DScheme = xDiagram->detectScheme();
sal_Int32 nSeriesInChartType = 0;
const sal_Int32 nTotalSeries = countSeries();
if( xChartType.is())
{
- Reference< XDataSeriesContainer > xCnt( xChartType, uno::UNO_QUERY_THROW );
- nSeriesInChartType = xCnt->getDataSeries().getLength();
+ nSeriesInChartType = xChartType->getDataSeries().getLength();
}
// create new series
- xNewSeries.set(
+ xNewSeries =
lcl_CreateNewSeries(
- m_xContext,
xChartType,
nTotalSeries, // new series' index
nSeriesInChartType,
xDiagram,
m_xTemplate,
- bCreateDataCachedSequences ));
+ bCreateDataCachedSequences );
// add new series to container
if( xNewSeries.is())
addNewSeriesToContainer(xChartType, xSeries, xNewSeries);
- ThreeDHelper::setScheme( xDiagram, e3DScheme );
+ xDiagram->setScheme( e3DScheme );
}
catch( const uno::Exception & )
{
@@ -641,8 +580,8 @@ Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter(
}
void DialogModel::deleteSeries(
- const Reference< XDataSeries > & xSeries,
- const Reference< XChartType > & xChartType )
+ const rtl::Reference< DataSeries > & xSeries,
+ const rtl::Reference< ChartType > & xChartType )
{
m_aTimerTriggeredControllerLock.startTimer();
ControllerLockGuardUNO aLockedControllers( m_xChartDocument );
@@ -650,15 +589,16 @@ void DialogModel::deleteSeries(
DataSeriesHelper::deleteSeries( xSeries, xChartType );
}
-Reference< data::XLabeledDataSequence > DialogModel::getCategories() const
+uno::Reference< chart2::data::XLabeledDataSequence > DialogModel::getCategories() const
{
- Reference< data::XLabeledDataSequence > xResult;
+ uno::Reference< chart2::data::XLabeledDataSequence > xResult;
try
{
if( m_xChartDocument.is())
{
- Reference< chart2::XDiagram > xDiagram( m_xChartDocument->getFirstDiagram());
- xResult.set( DiagramHelper::getCategoriesFromDiagram( xDiagram ));
+ rtl::Reference< Diagram > xDiagram( m_xChartDocument->getFirstChartDiagram());
+ if (xDiagram.is())
+ xResult = xDiagram->getCategories();
}
}
catch( const uno::Exception & )
@@ -673,31 +613,38 @@ void DialogModel::setCategories( const Reference< chart2::data::XLabeledDataSequ
if( !m_xChartDocument.is())
return;
- Reference< chart2::XDiagram > xDiagram( m_xChartDocument->getFirstDiagram());
+ rtl::Reference< Diagram > xDiagram( m_xChartDocument->getFirstChartDiagram());
if( !xDiagram.is())
return;
// categories
bool bSupportsCategories = true;
- Reference< XChartType > xFirstChartType( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) );
+ rtl::Reference< ChartType > xFirstChartType( xDiagram->getChartTypeByIndex( 0 ) );
if( xFirstChartType.is() )
{
sal_Int32 nAxisType = ChartTypeHelper::getAxisType( xFirstChartType, 0 ); // x-axis
bSupportsCategories = (nAxisType == AxisType::CATEGORY);
}
- DiagramHelper::setCategoriesToDiagram( xCategories, xDiagram, true, bSupportsCategories );
+ xDiagram->setCategories( xCategories, true, bSupportsCategories );
}
OUString DialogModel::getCategoriesRange() const
{
- Reference< data::XLabeledDataSequence > xLSeq( getCategories());
OUString aRange;
- if( xLSeq.is())
+ try
{
- Reference< data::XDataSequence > xSeq( xLSeq->getValues());
- if( xSeq.is())
- aRange = xSeq->getSourceRangeRepresentation();
+ uno::Reference< chart2::data::XLabeledDataSequence > xLSeq( getCategories());
+ if( xLSeq.is())
+ {
+ Reference< data::XDataSequence > xSeq( xLSeq->getValues());
+ if( xSeq.is())
+ aRange = xSeq->getSourceRangeRepresentation();
+ }
+ }
+ catch (const lang::DisposedException&)
+ {
+ TOOLS_WARN_EXCEPTION( "chart2", "unexpected exception caught" );
}
return aRange;
}
@@ -705,8 +652,8 @@ OUString DialogModel::getCategoriesRange() const
bool DialogModel::isCategoryDiagram() const
{
bool bRet = false;
- if( m_xChartDocument.is())
- bRet = DiagramHelper::isCategoryDiagram( m_xChartDocument->getFirstDiagram() );
+ if( m_xChartDocument.is() && m_xChartDocument->getFirstChartDiagram())
+ bRet = m_xChartDocument->getFirstChartDiagram()->isCategory();
return bRet;
}
@@ -763,22 +710,22 @@ void DialogModel::setData(
Reference< chart2::data::XDataSource > xDataSource(
xDataProvider->createDataSource( rArguments ) );
- Reference< chart2::XDataInterpreter > xInterpreter(
- m_xTemplate->getDataInterpreter());
+ rtl::Reference< ::chart::DataInterpreter > xInterpreter(
+ m_xTemplate->getDataInterpreter2());
if( xInterpreter.is())
{
- Reference< chart2::XDiagram > xDiagram( m_xChartDocument->getFirstDiagram() );
- ThreeDLookScheme e3DScheme = ThreeDHelper::detectScheme( xDiagram );
+ rtl::Reference< Diagram > xDiagram( m_xChartDocument->getFirstChartDiagram() );
+ ThreeDLookScheme e3DScheme = xDiagram->detectScheme();
- std::vector< Reference< XDataSeries > > aSeriesToReUse(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
+ std::vector< rtl::Reference< DataSeries > > aSeriesToReUse =
+ xDiagram->getDataSeries();
applyInterpretedData(
xInterpreter->interpretDataSource(
xDataSource, rArguments,
- comphelper::containerToSequence( aSeriesToReUse )),
+ aSeriesToReUse ),
aSeriesToReUse);
- ThreeDHelper::setScheme( xDiagram, e3DScheme );
+ xDiagram->setScheme( e3DScheme );
}
}
catch( const uno::Exception & )
@@ -819,13 +766,13 @@ sal_Int32 DialogModel::GetRoleIndexForSorting( const OUString & rInternalRoleStr
void DialogModel::applyInterpretedData(
const InterpretedData & rNewData,
- const std::vector< Reference< XDataSeries > > & rSeriesToReUse )
+ const std::vector< rtl::Reference< DataSeries > > & rSeriesToReUse )
{
if( ! m_xChartDocument.is())
return;
m_aTimerTriggeredControllerLock.startTimer();
- Reference< XDiagram > xDiagram( m_xChartDocument->getFirstDiagram());
+ rtl::Reference< Diagram > xDiagram( m_xChartDocument->getFirstChartDiagram());
if( !xDiagram.is())
return;
@@ -835,43 +782,40 @@ void DialogModel::applyInterpretedData(
sal_Int32 nGroup = 0;
sal_Int32 nSeriesCounter = 0;
sal_Int32 nNewSeriesIndex = static_cast< sal_Int32 >( rSeriesToReUse.size());
- const sal_Int32 nOuterSize=rNewData.Series.getLength();
+ const sal_Int32 nOuterSize=rNewData.Series.size();
for(; nGroup < nOuterSize; ++nGroup)
{
- Sequence< Reference< XDataSeries > > aSeries( rNewData.Series[ nGroup ] );
- const sal_Int32 nSeriesInGroup = aSeries.getLength();
+ const std::vector< rtl::Reference< DataSeries > > & aSeries( rNewData.Series[ nGroup ] );
+ const sal_Int32 nSeriesInGroup = aSeries.size();
for( sal_Int32 nSeries=0; nSeries<nSeriesInGroup; ++nSeries, ++nSeriesCounter )
{
if( std::find( rSeriesToReUse.begin(), rSeriesToReUse.end(), aSeries[nSeries] )
== rSeriesToReUse.end())
{
- Reference< beans::XPropertySet > xSeriesProp( aSeries[nSeries], uno::UNO_QUERY );
- if( xSeriesProp.is())
+ if( aSeries[nSeries].is())
{
// @deprecated: correct default color should be found by view
// without setting it as hard attribute
Reference< XColorScheme > xColorScheme( xDiagram->getDefaultColorScheme());
if( xColorScheme.is())
- xSeriesProp->setPropertyValue( "Color" ,
+ aSeries[nSeries]->setPropertyValue( "Color" ,
uno::Any( xColorScheme->getColorByIndex( nSeriesCounter )));
}
- m_xTemplate->applyStyle( aSeries[nSeries], nGroup, nNewSeriesIndex++, nSeriesInGroup );
+ m_xTemplate->applyStyle2( aSeries[nSeries], nGroup, nNewSeriesIndex++, nSeriesInGroup );
}
}
}
}
// data series
- std::vector< Reference< XDataSeriesContainer > > aSeriesCnt( getAllDataSeriesContainers());
- auto aNewSeries(
- comphelper::sequenceToContainer<std::vector< Sequence< Reference< XDataSeries > > >>( rNewData.Series ));
+ std::vector< rtl::Reference< ChartType > > aSeriesCnt = getAllDataSeriesContainers();
- OSL_ASSERT( aSeriesCnt.size() == aNewSeries.size());
+ OSL_ASSERT( aSeriesCnt.size() == rNewData.Series.size());
- std::vector< Sequence< Reference< XDataSeries > > >::const_iterator aSrcIt( aNewSeries.begin());
- std::vector< Reference< XDataSeriesContainer > >::iterator aDestIt( aSeriesCnt.begin());
- for(; aSrcIt != aNewSeries.end() && aDestIt != aSeriesCnt.end();
+ auto aSrcIt = rNewData.Series.begin();
+ auto aDestIt = aSeriesCnt.begin();
+ for(; aSrcIt != rNewData.Series.end() && aDestIt != aSeriesCnt.end();
++aSrcIt, ++aDestIt )
{
try
@@ -890,16 +834,13 @@ void DialogModel::applyInterpretedData(
sal_Int32 DialogModel::countSeries() const
{
- std::vector< Reference< XDataSeriesContainer > > aCnt( getAllDataSeriesContainers());
+ std::vector< rtl::Reference< ChartType > > aCnt( getAllDataSeriesContainers());
return std::accumulate( aCnt.begin(), aCnt.end(), 0, lcl_addSeriesNumber());
}
ChartModel& DialogModel::getModel() const
{
- uno::Reference< frame::XModel > xModel = getChartModel();
- ChartModel* pModel = dynamic_cast<ChartModel*>(xModel.get());
- assert(pModel);
- return *pModel;
+ return *m_xChartDocument;
}
} // namespace chart
diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx
index 2bd8d55faf00..24b74d6fab3a 100644
--- a/chart2/source/controller/dialogs/DialogModel.hxx
+++ b/chart2/source/controller/dialogs/DialogModel.hxx
@@ -21,6 +21,7 @@
#include <TimerTriggeredControllerLock.hxx>
#include <rtl/ustring.hxx>
#include <rtl/ref.hxx>
+#include <ChartTypeTemplate.hxx>
#include <map>
#include <memory>
@@ -37,8 +38,6 @@ namespace com::sun::star::chart2 {
class XDataSeriesContainer;
class XDataSeries;
class XChartType;
- class XChartTypeTemplate;
- struct InterpretedData;
namespace data {
class XDataProvider;
class XLabeledDataSequence;
@@ -47,9 +46,11 @@ namespace com::sun::star::chart2 {
namespace chart
{
-
+class ChartType;
+class DataSeries;
+struct InterpretedData;
+class LabeledDataSequence;
class RangeSelectionHelper;
-class ChartTypeTemplate;
struct DialogModelTimeBasedInfo
{
@@ -63,15 +64,13 @@ struct DialogModelTimeBasedInfo
class DialogModel
{
public:
- explicit DialogModel(
- const rtl::Reference<::chart::ChartModel> & xChartDocument,
- const css::uno::Reference< css::uno::XComponentContext > & xContext );
+ explicit DialogModel( rtl::Reference<::chart::ChartModel> xChartDocument );
~DialogModel();
typedef std::pair<
OUString,
- std::pair< css::uno::Reference< css::chart2::XDataSeries >,
- css::uno::Reference< css::chart2::XChartType > > >
+ std::pair< rtl::Reference< ::chart::DataSeries >,
+ rtl::Reference< ::chart::ChartType > > >
tSeriesWithChartTypeByName;
typedef std::map< OUString, OUString >
@@ -89,7 +88,7 @@ public:
css::uno::Reference< css::chart2::data::XDataProvider >
getDataProvider() const;
- std::vector< css::uno::Reference< css::chart2::XDataSeriesContainer > >
+ std::vector< rtl::Reference< ::chart::ChartType > >
getAllDataSeriesContainers() const;
std::vector< tSeriesWithChartTypeByName >
@@ -98,26 +97,26 @@ public:
static tRolesWithRanges getRolesWithRanges(
const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
const OUString & aRoleOfSequenceForLabel,
- const css::uno::Reference< css::chart2::XChartType > & xChartType );
+ const rtl::Reference< ::chart::ChartType > & xChartType );
enum class MoveDirection
{
Down, Up
};
- void moveSeries( const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
+ void moveSeries( const rtl::Reference< DataSeries > & xSeries,
MoveDirection eDirection );
/// @return the newly inserted series
- css::uno::Reference<
- css::chart2::XDataSeries > insertSeriesAfter(
+ rtl::Reference<
+ ::chart::DataSeries > insertSeriesAfter(
const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const css::uno::Reference< css::chart2::XChartType > & xChartType,
+ const rtl::Reference< ::chart::ChartType > & xChartType,
bool bCreateDataCachedSequences = false );
void deleteSeries(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const css::uno::Reference< css::chart2::XChartType > & xChartType );
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
+ const rtl::Reference< ::chart::ChartType > & xChartType );
css::uno::Reference< css::chart2::data::XLabeledDataSequence >
getCategories() const;
@@ -155,11 +154,7 @@ private:
rtl::Reference<::chart::ChartModel>
m_xChartDocument;
- css::uno::Reference< css::chart2::XChartTypeTemplate >
- m_xTemplate;
-
- css::uno::Reference< css::uno::XComponentContext >
- m_xContext;
+ rtl::Reference< ::chart::ChartTypeTemplate > m_xTemplate;
mutable std::shared_ptr< RangeSelectionHelper >
m_spRangeSelectionHelper;
@@ -168,8 +163,8 @@ private:
private:
void applyInterpretedData(
- const css::chart2::InterpretedData & rNewData,
- const std::vector< css::uno::Reference< css::chart2::XDataSeries > > & rSeriesToReUse );
+ const InterpretedData & rNewData,
+ const std::vector< rtl::Reference< ::chart::DataSeries > > & rSeriesToReUse );
sal_Int32 countSeries() const;
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 201671e87bcf..f06c7af5e777 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -24,11 +24,12 @@
#include <ObjectNameProvider.hxx>
#include <ResId.hxx>
#include <strings.hrc>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <ChartModel.hxx>
-#include <ChartModelHelper.hxx>
-#include <DiagramHelper.hxx>
+#include <ChartType.hxx>
#include <Diagram.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <TitleHelper.hxx>
#include <ExplicitCategoriesProvider.hxx>
@@ -36,16 +37,16 @@
#include <NumberFormatterWrapper.hxx>
#include <RegressionCurveHelper.hxx>
#include <BaseCoordinateSystem.hxx>
+#include <RegressionCurveModel.hxx>
#include <rtl/math.hxx>
#include <rtl/ustring.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <unotools/localedatawrapper.hxx>
-#include <com/sun/star/chart2/XTitle.hpp>
#include <com/sun/star/chart2/MovingAverageType.hpp>
-#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <o3tl/string_view.hxx>
namespace chart
{
@@ -58,26 +59,26 @@ using ::com::sun::star::uno::Any;
namespace
{
-OUString lcl_getDataSeriesName( const OUString& rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel )
+OUString lcl_getDataSeriesName( std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel )
{
OUString aRet;
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
- Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rObjectCID , xChartModel );
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rObjectCID , xChartModel );
if( xDiagram.is() && xSeries.is() )
{
- Reference< XChartType > xChartType( DiagramHelper::getChartTypeOfSeries( xDiagram, xSeries ) );
+ rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeOfSeries( xSeries ) );
if( xChartType.is() )
{
- aRet = ::chart::DataSeriesHelper::getDataSeriesLabel(
- xSeries, xChartType->getRoleOfSequenceForSeriesLabel() ) ;
+ aRet = xSeries->getLabelForRole(
+ xChartType->getRoleOfSequenceForSeriesLabel() ) ;
}
}
return aRet;
}
-OUString lcl_getFullSeriesName( const OUString& rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel )
+OUString lcl_getFullSeriesName( std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel )
{
OUString aRet(SchResId(STR_TIP_DATASERIES));
OUString aWildcard( "%SERIESNAME" );
@@ -95,19 +96,17 @@ void lcl_addText( OUString& rOut, std::u16string_view rSeparator, std::u16string
rOut+=rNext;
}
-OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal_Int32 nPointIndex,
- const Reference< XCoordinateSystem >& xCooSys,
+OUString lcl_getDataPointValueText( const rtl::Reference< DataSeries >& xSeries, sal_Int32 nPointIndex,
+ const rtl::Reference< BaseCoordinateSystem >& xCooSys,
const Reference< frame::XModel >& xChartModel )
{
OUString aRet;
- Reference<data::XDataSource> xDataSource(
- uno::Reference<data::XDataSource>( xSeries, uno::UNO_QUERY ) );
- if(!xDataSource.is())
+ if(!xSeries.is())
return aRet;
- Sequence< Reference< data::XLabeledDataSequence > > aDataSequences( xDataSource->getDataSequences() );
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aDataSequences = xSeries->getDataSequences2();
OUString aX, aY, aY_Min, aY_Max, aY_First, aY_Last, a_Size;
double fValue = 0;
@@ -117,18 +116,20 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal
Color nLabelColor;//dummy
bool bColorChanged;//dummy
- for(sal_Int32 nN = aDataSequences.getLength();nN--;)
+ for(sal_Int32 nN = aDataSequences.size();nN--;)
{
uno::Reference<data::XDataSequence> xDataSequence( aDataSequences[nN]->getValues());
if( !xDataSequence.is() )
continue;
- Sequence< Any > aData( xDataSequence->getData() );
- if( nPointIndex >= aData.getLength() )
- continue;
- uno::Reference<beans::XPropertySet> xProp(xDataSequence, uno::UNO_QUERY );
- if( xProp.is())
+
+ try
{
- try
+ Sequence< Any > aData( xDataSequence->getData() );
+
+ if( nPointIndex >= aData.getLength() )
+ continue;
+ uno::Reference<beans::XPropertySet> xProp(xDataSequence, uno::UNO_QUERY );
+ if( xProp.is())
{
uno::Any aARole = xProp->getPropertyValue( "Role" );
OUString aRole;
@@ -177,10 +178,14 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal
a_Size = aNumberFormatterWrapper.getFormattedString( nNumberFormatKey, fValue, nLabelColor, bColorChanged );
}
}
- catch( const uno::Exception& )
- {
- TOOLS_WARN_EXCEPTION("chart2", "" );
- }
+ }
+ catch (const lang::DisposedException&)
+ {
+ TOOLS_WARN_EXCEPTION( "chart2", "unexpected exception caught" );
+ }
+ catch( const uno::Exception& )
+ {
+ TOOLS_WARN_EXCEPTION("chart2", "" );
}
}
@@ -312,24 +317,27 @@ OUString ObjectNameProvider::getName( ObjectType eObjectType, bool bPlural )
case OBJECTTYPE_DATA_CURVE_EQUATION:
aRet=SchResId(STR_OBJECT_CURVE_EQUATION);
break;
+ case OBJECTTYPE_DATA_TABLE:
+ aRet=SchResId(STR_DATA_TABLE);
+ break;
default: //OBJECTTYPE_UNKNOWN
;
}
return aRet;
}
-OUString ObjectNameProvider::getAxisName( const OUString& rObjectCID
+OUString ObjectNameProvider::getAxisName( std::u16string_view rObjectCID
, const rtl::Reference<::chart::ChartModel>& xChartModel )
{
OUString aRet;
- Reference< XAxis > xAxis(
- ObjectIdentifier::getObjectPropertySet( rObjectCID , xChartModel ), uno::UNO_QUERY );
+ rtl::Reference< ::chart::Axis > xAxis =
+ dynamic_cast<::chart::Axis*>(ObjectIdentifier::getObjectPropertySet( rObjectCID , xChartModel ).get());
sal_Int32 nCooSysIndex = 0;
sal_Int32 nDimensionIndex = 0;
sal_Int32 nAxisIndex = 0;
- AxisHelper::getIndicesForAxis( xAxis, ChartModelHelper::findDiagram( xChartModel ), nCooSysIndex, nDimensionIndex, nAxisIndex );
+ AxisHelper::getIndicesForAxis( xAxis, xChartModel->getFirstChartDiagram(), nCooSysIndex, nDimensionIndex, nAxisIndex );
switch(nDimensionIndex)
{
@@ -394,14 +402,14 @@ OUString ObjectNameProvider::getTitleNameByType( TitleHelper::eTitleType eType )
return aRet;
}
-OUString ObjectNameProvider::getTitleName( const OUString& rObjectCID
+OUString ObjectNameProvider::getTitleName( std::u16string_view rObjectCID
, const rtl::Reference<::chart::ChartModel>& xChartModel )
{
OUString aRet;
- Reference< XTitle > xTitle(
- ObjectIdentifier::getObjectPropertySet( rObjectCID , xChartModel ), uno::UNO_QUERY );
- if( xTitle.is() )
+ rtl::Reference<Title> xTitle =
+ dynamic_cast<Title*>(ObjectIdentifier::getObjectPropertySet( rObjectCID , xChartModel ).get());
+ if( xTitle )
{
TitleHelper::eTitleType eType;
if( TitleHelper::getTitleType( eType, xTitle, xChartModel ) )
@@ -413,7 +421,7 @@ OUString ObjectNameProvider::getTitleName( const OUString& rObjectCID
return aRet;
}
-OUString ObjectNameProvider::getGridName( const OUString& rObjectCID
+OUString ObjectNameProvider::getGridName( std::u16string_view rObjectCID
, const rtl::Reference<::chart::ChartModel>& xChartModel )
{
OUString aRet;
@@ -421,8 +429,8 @@ OUString ObjectNameProvider::getGridName( const OUString& rObjectCID
sal_Int32 nCooSysIndex = -1;
sal_Int32 nDimensionIndex = -1;
sal_Int32 nAxisIndex = -1;
- Reference< XAxis > xAxis( ObjectIdentifier::getAxisForCID( rObjectCID , xChartModel ) );
- AxisHelper::getIndicesForAxis( xAxis, ChartModelHelper::findDiagram( xChartModel )
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( rObjectCID , xChartModel );
+ AxisHelper::getIndicesForAxis( xAxis, xChartModel->getFirstChartDiagram()
, nCooSysIndex , nDimensionIndex, nAxisIndex );
bool bMainGrid = (ObjectIdentifier::getObjectType( rObjectCID ) == OBJECTTYPE_GRID);
@@ -466,7 +474,7 @@ OUString ObjectNameProvider::getGridName( const OUString& rObjectCID
return aRet;
}
-OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel, bool bVerbose )
+OUString ObjectNameProvider::getHelpText( std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel, bool bVerbose )
{
OUString aRet;
ObjectType eObjectType( ObjectIdentifier::getObjectType(rObjectCID) );
@@ -498,11 +506,11 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const rtl:
else
aRet=SchResId(STR_TIP_DATAPOINT);
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
- Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rObjectCID , xChartModel );
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rObjectCID , xChartModel );
if( xDiagram.is() && xSeries.is() )
{
- sal_Int32 nPointIndex( ObjectIdentifier::getParticleID(rObjectCID).toInt32() );
+ sal_Int32 nPointIndex = o3tl::toInt32(ObjectIdentifier::getParticleID(rObjectCID));
//replace data point index
OUString aWildcard( "%POINTNUMBER" );
@@ -517,8 +525,8 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const rtl:
nIndex = aRet.indexOf( aWildcard );
if( nIndex != -1 )
{
- std::vector< Reference< chart2::XDataSeries > > aSeriesVector(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector =
+ xDiagram->getDataSeries();
sal_Int32 nSeriesIndex = -1;
for( nSeriesIndex=aSeriesVector.size();nSeriesIndex--;)
{
@@ -551,13 +559,12 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const rtl:
if( bVerbose )
{
aRet = SchResId( STR_OBJECT_CURVE_WITH_PARAMETERS );
- Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( rObjectCID , xChartModel ));
- Reference< chart2::XRegressionCurveContainer > xCurveCnt( xSeries, uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( rObjectCID , xChartModel ));
- if( xCurveCnt.is())
+ if( xSeries.is())
{
sal_Int32 nCurveIndex = ObjectIdentifier::getIndexFromParticleOrCID( rObjectCID );
- Reference< chart2::XRegressionCurve > xCurve( RegressionCurveHelper::getRegressionCurveAtIndex(xCurveCnt, nCurveIndex) );
+ rtl::Reference< RegressionCurveModel > xCurve = RegressionCurveHelper::getRegressionCurveAtIndex(xSeries, nCurveIndex);
if( xCurve.is())
{
try
@@ -573,60 +580,55 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const rtl:
const OUString& aNumDecimalSep = rLocaleDataWrapper.getNumDecimalSep();
sal_Unicode cDecSeparator = aNumDecimalSep[0];
- uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY );
- if ( xProperties.is())
+ xCurve->getPropertyValue( "PolynomialDegree") >>= aDegree;
+ xCurve->getPropertyValue( "MovingAveragePeriod") >>= aPeriod;
+ xCurve->getPropertyValue( "MovingAverageType") >>= aMovingType;
+ xCurve->getPropertyValue( "ForceIntercept") >>= bForceIntercept;
+ if (bForceIntercept)
+ xCurve->getPropertyValue( "InterceptValue") >>= aInterceptValue;
+ uno::Reference< beans::XPropertySet > xEqProp( xCurve->getEquationProperties());
+ if( xEqProp.is())
{
- xProperties->getPropertyValue( "PolynomialDegree") >>= aDegree;
- xProperties->getPropertyValue( "MovingAveragePeriod") >>= aPeriod;
- xProperties->getPropertyValue( "MovingAverageType") >>= aMovingType;
- xProperties->getPropertyValue( "ForceIntercept") >>= bForceIntercept;
- if (bForceIntercept)
- xProperties->getPropertyValue( "InterceptValue") >>= aInterceptValue;
- uno::Reference< beans::XPropertySet > xEqProp( xCurve->getEquationProperties());
- if( xEqProp.is())
- {
- if ( !(xEqProp->getPropertyValue( "XName") >>= aXName) )
- aXName = "x";
- if ( !(xEqProp->getPropertyValue( "YName") >>= aYName) )
- aYName = "f(x)";
- }
+ if ( !(xEqProp->getPropertyValue( "XName") >>= aXName) )
+ aXName = "x";
+ if ( !(xEqProp->getPropertyValue( "YName") >>= aYName) )
+ aYName = "f(x)";
}
- xCalculator->setRegressionProperties(aDegree, bForceIntercept, aInterceptValue, 2, aMovingType);
+ xCalculator->setRegressionProperties(aDegree, bForceIntercept, aInterceptValue, aPeriod, aMovingType);
xCalculator->setXYNames ( aXName, aYName );
RegressionCurveHelper::initializeCurveCalculator( xCalculator, xSeries, xChartModel );
// change text for Moving Average
- OUString aWildcard( "%PERIOD" );
- sal_Int32 nIndex = xCalculator->getRepresentation().indexOf( aWildcard );
- if( nIndex != -1 )
- { // replace period
- aRet = xCalculator->getRepresentation();
- aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), OUString::number(aPeriod) );
+ if ( RegressionCurveHelper::getRegressionType( xCurve ) == SvxChartRegress::MovingAverage )
+ {
+ aRet = xCalculator->getRepresentation();
}
-
- // replace formula
- aWildcard = "%FORMULA";
- nIndex = aRet.indexOf( aWildcard );
- if( nIndex != -1 )
+ else
{
- OUString aFormula ( xCalculator->getRepresentation() );
- if ( cDecSeparator != '.' )
+ // replace formula
+ OUString aWildcard = "%FORMULA";
+ sal_Int32 nIndex = aRet.indexOf( aWildcard );
+ if( nIndex != -1 )
{
- aFormula = aFormula.replace( '.', cDecSeparator );
+ OUString aFormula ( xCalculator->getRepresentation() );
+ if ( cDecSeparator != '.' )
+ {
+ aFormula = aFormula.replace( '.', cDecSeparator );
+ }
+ aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), aFormula );
}
- aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), aFormula );
- }
- // replace r^2
- aWildcard = "%RSQUARED";
- nIndex = aRet.indexOf( aWildcard );
- if( nIndex != -1 )
- {
- double fR( xCalculator->getCorrelationCoefficient());
- aRet = aRet.replaceAt(
- nIndex, aWildcard.getLength(),
- ::rtl::math::doubleToUString(
- fR*fR, rtl_math_StringFormat_G, 4, cDecSeparator, true ));
+ // replace r^2
+ aWildcard = "%RSQUARED";
+ nIndex = aRet.indexOf( aWildcard );
+ if( nIndex != -1 )
+ {
+ double fR( xCalculator->getCorrelationCoefficient());
+ aRet = aRet.replaceAt(
+ nIndex, aWildcard.getLength(),
+ ::rtl::math::doubleToUString(
+ fR*fR, rtl_math_StringFormat_G, 4, cDecSeparator, true ));
+ }
}
}
catch( const uno::Exception & )
@@ -638,14 +640,13 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const rtl:
}
else
{
- Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID(rObjectCID , xChartModel));
- Reference< chart2::XRegressionCurveContainer > xCurveCnt( xSeries, uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID(rObjectCID , xChartModel));
aRet += getName(eObjectType);
- if( xCurveCnt.is())
+ if( xSeries.is())
{
sal_Int32 nCurveIndex = ObjectIdentifier::getIndexFromParticleOrCID( rObjectCID );
- Reference< chart2::XRegressionCurve > xCurve( RegressionCurveHelper::getRegressionCurveAtIndex(xCurveCnt, nCurveIndex) );
+ rtl::Reference< RegressionCurveModel > xCurve( RegressionCurveHelper::getRegressionCurveAtIndex(xSeries, nCurveIndex) );
if( xCurve.is())
{
aRet += " (" + RegressionCurveHelper::getRegressionCurveName(xCurve) + " )";
@@ -658,11 +659,10 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const rtl:
if( bVerbose )
{
aRet = SchResId(STR_OBJECT_AVERAGE_LINE_WITH_PARAMETERS);
- Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( rObjectCID , xChartModel ));
- Reference< chart2::XRegressionCurveContainer > xCurveCnt( xSeries, uno::UNO_QUERY );
- if( xCurveCnt.is())
+ rtl::Reference< DataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( rObjectCID , xChartModel ));
+ if( xSeries.is())
{
- Reference< chart2::XRegressionCurve > xCurve( RegressionCurveHelper::getMeanValueLine( xCurveCnt ));
+ rtl::Reference< RegressionCurveModel > xCurve( RegressionCurveHelper::getMeanValueLine( xSeries ));
if( xCurve.is())
{
try
@@ -718,7 +718,7 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const rtl:
return aRet;
}
-OUString ObjectNameProvider::getSelectedObjectText( const OUString & rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartDocument )
+OUString ObjectNameProvider::getSelectedObjectText( std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartDocument )
{
OUString aRet;
ObjectType eObjectType( ObjectIdentifier::getObjectType(rObjectCID) );
@@ -727,30 +727,30 @@ OUString ObjectNameProvider::getSelectedObjectText( const OUString & rObjectCID,
{
aRet = SchResId( STR_STATUS_DATAPOINT_MARKED );
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartDocument ) );
- Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rObjectCID , xChartDocument );
+ rtl::Reference< Diagram > xDiagram( xChartDocument->getFirstChartDiagram() );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rObjectCID , xChartDocument );
if( xDiagram.is() && xSeries.is() )
{
- sal_Int32 nPointIndex( ObjectIdentifier::getParticleID(rObjectCID).toInt32() );
+ sal_Int32 nPointIndex = o3tl::toInt32( ObjectIdentifier::getParticleID(rObjectCID) );
// replace data point index
- replaceParamterInString( aRet, "%POINTNUMBER", OUString::number( nPointIndex + 1 ));
+ replaceParamterInString( aRet, u"%POINTNUMBER", OUString::number( nPointIndex + 1 ));
// replace data series index
{
- std::vector< Reference< chart2::XDataSeries > > aSeriesVector(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector(
+ xDiagram->getDataSeries() );
sal_Int32 nSeriesIndex = -1;
for( nSeriesIndex=aSeriesVector.size();nSeriesIndex--;)
{
if( aSeriesVector[nSeriesIndex] == xSeries )
break;
}
- replaceParamterInString( aRet, "%SERIESNUMBER", OUString::number( nSeriesIndex + 1 ) );
+ replaceParamterInString( aRet, u"%SERIESNUMBER", OUString::number( nSeriesIndex + 1 ) );
}
// replace point value
- replaceParamterInString( aRet, "%POINTVALUES", lcl_getDataPointValueText(
+ replaceParamterInString( aRet, u"%POINTVALUES", lcl_getDataPointValueText(
xSeries, nPointIndex, DataSeriesHelper::getCoordinateSystemOfSeries(xSeries, xDiagram), xChartDocument ) );
}
}
@@ -762,7 +762,7 @@ OUString ObjectNameProvider::getSelectedObjectText( const OUString & rObjectCID,
if( !aHelpText.isEmpty())
{
aRet = SchResId( STR_STATUS_OBJECT_MARKED );
- replaceParamterInString( aRet, "%OBJECTNAME", aHelpText );
+ replaceParamterInString( aRet, u"%OBJECTNAME", aHelpText );
}
}
@@ -770,7 +770,7 @@ OUString ObjectNameProvider::getSelectedObjectText( const OUString & rObjectCID,
}
OUString ObjectNameProvider::getNameForCID(
- const OUString& rObjectCID,
+ std::u16string_view rObjectCID,
const rtl::Reference<::chart::ChartModel>& xChartDocument )
{
ObjectType eType( ObjectIdentifier::getObjectType( rObjectCID ));
@@ -809,15 +809,14 @@ OUString ObjectNameProvider::getNameForCID(
}
else if (eType == OBJECTTYPE_DATA_CURVE || eType == OBJECTTYPE_DATA_CURVE_EQUATION)
{
- Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( rObjectCID , xChartDocument ));
- Reference< chart2::XRegressionCurveContainer > xCurveCnt( xSeries, uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( rObjectCID , xChartDocument ));
aRet += " " + getName(eType);
- if( xCurveCnt.is())
+ if( xSeries.is())
{
sal_Int32 nCurveIndex = ObjectIdentifier::getIndexFromParticleOrCID( rObjectCID );
- Reference< chart2::XRegressionCurve > xCurve( RegressionCurveHelper::getRegressionCurveAtIndex(xCurveCnt, nCurveIndex) );
+ rtl::Reference< RegressionCurveModel > xCurve( RegressionCurveHelper::getRegressionCurveAtIndex(xSeries, nCurveIndex) );
if( xCurve.is())
{
aRet += " (" + RegressionCurveHelper::getRegressionCurveName(xCurve) + ")";
@@ -839,15 +838,15 @@ OUString ObjectNameProvider::getNameForCID(
OUString ObjectNameProvider::getName_ObjectForSeries(
ObjectType eObjectType,
- const OUString& rSeriesCID,
+ std::u16string_view rSeriesCID,
const rtl::Reference<::chart::ChartModel>& xChartDocument )
{
- Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rSeriesCID , xChartDocument );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rSeriesCID , xChartDocument );
if( xSeries.is() )
{
OUString aRet = SchResId(STR_OBJECT_FOR_SERIES);
- replaceParamterInString( aRet, "%OBJECTNAME", getName( eObjectType ) );
- replaceParamterInString( aRet, "%SERIESNAME", lcl_getDataSeriesName( rSeriesCID, xChartDocument ) );
+ replaceParamterInString( aRet, u"%OBJECTNAME", getName( eObjectType ) );
+ replaceParamterInString( aRet, u"%SERIESNAME", lcl_getDataSeriesName( rSeriesCID, xChartDocument ) );
return aRet;
}
else
@@ -857,7 +856,7 @@ OUString ObjectNameProvider::getName_ObjectForSeries(
OUString ObjectNameProvider::getName_ObjectForAllSeries( ObjectType eObjectType )
{
OUString aRet = SchResId(STR_OBJECT_FOR_ALL_SERIES);
- replaceParamterInString( aRet, "%OBJECTNAME", getName( eObjectType, true /*bPlural*/ ) );
+ replaceParamterInString( aRet, u"%OBJECTNAME", getName( eObjectType, true /*bPlural*/ ) );
return aRet;
}
diff --git a/chart2/source/controller/dialogs/RangeSelectionHelper.cxx b/chart2/source/controller/dialogs/RangeSelectionHelper.cxx
index 5cbc07f76078..00e9a3cc8a8c 100644
--- a/chart2/source/controller/dialogs/RangeSelectionHelper.cxx
+++ b/chart2/source/controller/dialogs/RangeSelectionHelper.cxx
@@ -20,10 +20,10 @@
#include <RangeSelectionHelper.hxx>
#include <RangeSelectionListener.hxx>
#include <com/sun/star/awt/XTopWindow.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <ChartModel.hxx>
+#include <utility>
using namespace ::com::sun::star;
@@ -34,8 +34,8 @@ namespace chart
{
RangeSelectionHelper::RangeSelectionHelper(
- const rtl::Reference<::chart::ChartModel> & xChartDocument ) :
- m_xChartDocument( xChartDocument )
+ rtl::Reference<::chart::ChartModel> xChartDocument ) :
+ m_xChartDocument(std::move( xChartDocument ))
{}
RangeSelectionHelper::~RangeSelectionHelper()
diff --git a/chart2/source/controller/dialogs/RangeSelectionListener.cxx b/chart2/source/controller/dialogs/RangeSelectionListener.cxx
index 473ad909f8f5..e4974ab30de0 100644
--- a/chart2/source/controller/dialogs/RangeSelectionListener.cxx
+++ b/chart2/source/controller/dialogs/RangeSelectionListener.cxx
@@ -19,20 +19,19 @@
#include <RangeSelectionListener.hxx>
#include <ChartModel.hxx>
+#include <utility>
using namespace ::com::sun::star;
-using ::com::sun::star::uno::Reference;
-
namespace chart
{
RangeSelectionListener::RangeSelectionListener(
RangeSelectionListenerParent & rParent,
- const OUString & rInitialRange,
+ OUString aInitialRange,
const rtl::Reference<::chart::ChartModel>& xModelToLockController ) :
m_rParent( rParent ),
- m_aRange( rInitialRange ),
+ m_aRange(std::move( aInitialRange )),
m_aControllerLockGuard( xModelToLockController )
{}
diff --git a/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx b/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
index 33fe0ff6955f..cee4af1fb013 100644
--- a/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
+++ b/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
@@ -17,18 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <com/sun/star/frame/XModel.hpp>
#include <TimerTriggeredControllerLock.hxx>
#include <ControllerLockGuard.hxx>
#include <ChartModel.hxx>
+#include <utility>
namespace chart
{
using namespace ::com::sun::star;
TimerTriggeredControllerLock::TimerTriggeredControllerLock(
- const rtl::Reference<::chart::ChartModel>& xModel)
- : m_xModel(xModel)
+ rtl::Reference<::chart::ChartModel> xModel)
+ : m_xModel(std::move(xModel))
, m_aTimer("chart2 TimerTriggeredControllerLock")
{
m_aTimer.SetTimeout(4 * EDIT_UPDATEDATA_TIMEOUT);
diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx b/chart2/source/controller/dialogs/TitleDialogData.cxx
index 7f48d90a0b24..75d59bbb43b4 100644
--- a/chart2/source/controller/dialogs/TitleDialogData.cxx
+++ b/chart2/source/controller/dialogs/TitleDialogData.cxx
@@ -19,11 +19,8 @@
#include <sal/config.h>
-#include <com/sun/star/frame/XModel.hpp>
-
#include <TitleDialogData.hxx>
#include <TitleHelper.hxx>
-#include <ChartModelHelper.hxx>
#include <Diagram.hxx>
#include <AxisHelper.hxx>
#include <ChartModel.hxx>
@@ -31,9 +28,8 @@
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
-TitleDialogData::TitleDialogData( std::unique_ptr<ReferenceSizeProvider> pRefSizeProvider )
+TitleDialogData::TitleDialogData( std::optional<ReferenceSizeProvider> pRefSizeProvider )
: aPossibilityList{ true, true, true, true, true, true, true }
, aExistenceList{ false, false, false, false, false, false, false }
, aTextList(7)
@@ -43,7 +39,7 @@ TitleDialogData::TitleDialogData( std::unique_ptr<ReferenceSizeProvider> pRefSiz
void TitleDialogData::readFromModel( const rtl::Reference<::chart::ChartModel>& xChartModel )
{
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram(xChartModel);
+ rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
//get possibilities
uno::Sequence< sal_Bool > aAxisPossibilityList;
@@ -59,11 +55,11 @@ void TitleDialogData::readFromModel( const rtl::Reference<::chart::ChartModel>&
auto pTextList = aTextList.getArray();
//find out which title exists and get their text
//main title:
- for( sal_Int32 nTitleIndex = static_cast< sal_Int32 >( TitleHelper::TITLE_BEGIN);
- nTitleIndex < static_cast< sal_Int32 >( TitleHelper::NORMAL_TITLE_END );
+ for( auto nTitleIndex = +TitleHelper::TITLE_BEGIN;
+ nTitleIndex < +TitleHelper::NORMAL_TITLE_END;
nTitleIndex++)
{
- uno::Reference< XTitle > xTitle = TitleHelper::getTitle(
+ rtl::Reference< Title > xTitle = TitleHelper::getTitle(
static_cast< TitleHelper::eTitleType >( nTitleIndex ), xChartModel );
pExistenceList[nTitleIndex] = xTitle.is();
pTextList[nTitleIndex]=TitleHelper::getCompleteString( xTitle );
@@ -73,11 +69,11 @@ void TitleDialogData::readFromModel( const rtl::Reference<::chart::ChartModel>&
bool TitleDialogData::writeDifferenceToModel(
const rtl::Reference<::chart::ChartModel>& xChartModel
, const uno::Reference< uno::XComponentContext >& xContext
- , TitleDialogData* pOldState )
+ , const TitleDialogData* pOldState )
{
bool bChanged = false;
- for( sal_Int32 nN = static_cast< sal_Int32 >( TitleHelper::TITLE_BEGIN );
- nN < static_cast< sal_Int32 >( TitleHelper::NORMAL_TITLE_END );
+ for( auto nN = +TitleHelper::TITLE_BEGIN;
+ nN < +TitleHelper::NORMAL_TITLE_END;
nN++)
{
if( !pOldState || ( pOldState->aExistenceList[nN] != aExistenceList[nN] ) )
@@ -86,7 +82,7 @@ bool TitleDialogData::writeDifferenceToModel(
{
TitleHelper::createTitle(
static_cast< TitleHelper::eTitleType >( nN ), aTextList[nN], xChartModel, xContext,
- apReferenceSizeProvider.get() );
+ apReferenceSizeProvider.has_value() ? &*apReferenceSizeProvider : nullptr );
bChanged = true;
}
else
@@ -98,11 +94,11 @@ bool TitleDialogData::writeDifferenceToModel(
else if( !pOldState || ( pOldState->aTextList[nN] != aTextList[nN] ) )
{
//change content
- uno::Reference< XTitle > xTitle(
+ rtl::Reference< Title > xTitle(
TitleHelper::getTitle( static_cast< TitleHelper::eTitleType >( nN ), xChartModel ) );
if(xTitle.is())
{
- TitleHelper::setCompleteString( aTextList[nN], xTitle, xContext );
+ TitleHelper::setCompleteString( aTextList[nN], xTitle, xContext, nullptr, true );
bChanged = true;
}
}
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx
index 59ca6be0c99a..a1f52f5169a5 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx
@@ -19,19 +19,18 @@
#include <dlg_ChartType.hxx>
#include "tp_ChartType.hxx"
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <ChartModel.hxx>
+#include <utility>
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
ChartTypeDialog::ChartTypeDialog(weld::Window* pParent,
- const rtl::Reference<::chart::ChartModel>& xChartModel)
+ rtl::Reference<::chart::ChartModel> xChartModel)
: GenericDialogController(pParent, "modules/schart/ui/charttypedialog.ui", "ChartTypeDialog")
- , m_xChartModel(xChartModel)
- , m_xContentArea(m_xDialog->weld_content_area())
+ , m_xChartModel(std::move(xChartModel))
+ , m_xContentArea(m_xBuilder->weld_container("content"))
{
m_xChartTypeTabPage = std::make_unique<ChartTypeTabPage>(
m_xContentArea.get(), this, m_xChartModel, false /*don't show title description*/);
diff --git a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
index 873edbc48ada..0e95cd75c48e 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
@@ -23,7 +23,6 @@
#include <servicenames.hxx>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
-#include <com/sun/star/frame/XModel.hpp>
namespace com::sun::star::awt { class XWindow; }
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index e186633c869f..12d22805790f 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -29,6 +29,7 @@
#include "tp_DataSource.hxx"
#include <ChartTypeTemplateProvider.hxx>
#include <ChartTypeTemplate.hxx>
+#include <utility>
#include "DialogModel.hxx"
using namespace css;
@@ -46,15 +47,15 @@ namespace chart
#define STATE_LAST STATE_OBJECTS
CreationWizard::CreationWizard(weld::Window* pParent, const rtl::Reference<::chart::ChartModel>& xChartModel,
- const uno::Reference<uno::XComponentContext>& xContext)
+ uno::Reference<uno::XComponentContext> xContext)
: vcl::RoadmapWizardMachine(pParent)
, m_xChartModel(xChartModel,uno::UNO_QUERY)
- , m_xComponentContext(xContext)
+ , m_xComponentContext(std::move(xContext))
, m_pTemplateProvider(nullptr)
, m_aTimerTriggeredControllerLock(xChartModel)
, m_bCanTravel(true)
{
- m_pDialogModel.reset(new DialogModel(m_xChartModel, m_xComponentContext));
+ m_pDialogModel.reset(new DialogModel(m_xChartModel));
defaultButton(WizardButtonFlags::FINISH);
setTitleBase(SchResId(STR_DLG_CHART_WIZARD));
@@ -94,7 +95,7 @@ std::unique_ptr<BuilderPage> CreationWizard::createPage(WizardState nState)
{
std::unique_ptr<vcl::OWizardPage> xRet;
- OString sIdent(OString::number(nState));
+ OUString sIdent(OUString::number(nState));
weld::Container* pPageContainer = m_xAssistant->append_page(sIdent);
switch( nState )
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index 973b8fa74027..3a1fa1386f7a 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -22,22 +22,25 @@
#include <ChartModel.hxx>
#include <servicenames.hxx>
#include <TimerTriggeredControllerLock.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
+#include <vcl/weldutils.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/Desktop.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sfx2/viewsh.hxx>
+
namespace chart
{
using namespace ::com::sun::star;
-CreationWizardUnoDlg::CreationWizardUnoDlg(const uno::Reference<uno::XComponentContext>& xContext)
+CreationWizardUnoDlg::CreationWizardUnoDlg(uno::Reference<uno::XComponentContext> xContext)
: OComponentHelper(m_aMutex)
- , m_xCC(xContext)
+ , m_xCC(std::move(xContext))
, m_bUnlockControllersOnExecute(false)
{
uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(m_xCC);
@@ -166,10 +169,18 @@ void CreationWizardUnoDlg::createDialogOnDemand()
m_xParentWindow = xFrame->getContainerWindow();
}
}
+
+ weld::Window* pParent(Application::GetFrameWeld(m_xParentWindow));
+ if (!pParent)
+ {
+ if (weld::TransportAsXWindow* pTunnel = dynamic_cast<weld::TransportAsXWindow*>(m_xParentWindow.get()))
+ pParent = dynamic_cast<weld::Window*>(pTunnel->getWidget());
+ }
+
uno::Reference< XComponent > xKeepAlive( this );
if( m_xChartModel.is() )
{
- m_xDialog = std::make_shared<CreationWizard>(Application::GetFrameWeld(m_xParentWindow), m_xChartModel, m_xCC);
+ m_xDialog = std::make_shared<CreationWizard>(pParent, m_xChartModel, m_xCC);
}
}
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index 1e442a102f09..ee120df76fe7 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -20,11 +20,9 @@
#include <dlg_DataEditor.hxx>
#include "DataBrowser.hxx"
#include <ChartModel.hxx>
-#include <comphelper/stl_types.hxx>
#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/frame/XStorable.hpp>
+#include <utility>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
@@ -33,11 +31,11 @@ namespace chart
{
DataEditor::DataEditor(weld::Window* pParent,
- const rtl::Reference<::chart::ChartModel> & xChartDoc,
+ rtl::Reference<::chart::ChartModel> xChartDoc,
const Reference< uno::XComponentContext > & xContext)
: GenericDialogController(pParent, "modules/schart/ui/chartdatadialog.ui", "ChartDataDialog")
, m_bReadOnly(false)
- , m_xChartDoc(xChartDoc)
+ , m_xChartDoc(std::move(xChartDoc))
, m_xContext(xContext)
, m_xTbxData(m_xBuilder->weld_toolbar("toolbar"))
, m_xCloseBtn(m_xBuilder->weld_button("close"))
@@ -58,7 +56,7 @@ DataEditor::DataEditor(weld::Window* pParent,
m_xBrwData->SetCursorMovedHdl( LINK( this, DataEditor, BrowserCursorMovedHdl ));
- m_xBrwData->SetDataFromModel( m_xChartDoc, m_xContext );
+ m_xBrwData->SetDataFromModel( m_xChartDoc );
m_xBrwData->GrabFocus();
bool bReadOnly = true;
@@ -75,7 +73,7 @@ DataEditor::~DataEditor()
}
// react on click (or keypress) on toolbar icon
-IMPL_LINK(DataEditor, ToolboxHdl, const OString&, rId, void)
+IMPL_LINK(DataEditor, ToolboxHdl, const OUString&, rId, void)
{
if (rId == "InsertRow")
m_xBrwData->InsertRow();
@@ -113,8 +111,8 @@ IMPL_LINK_NOARG(DataEditor, BrowserCursorMovedHdl, DataBrowser*, void)
m_xTbxData->set_item_sensitive("MoveLeftColumn", bIsDataValid && m_xBrwData->MayMoveLeftColumns() );
m_xTbxData->set_item_sensitive("MoveRightColumn", bIsDataValid && m_xBrwData->MayMoveRightColumns() );
- m_xTbxData->set_item_sensitive("MoveUpRow", bIsDataValid && m_xBrwData->MayMoveDownRows() );
- m_xTbxData->set_item_sensitive("MoveDownRow", bIsDataValid && m_xBrwData->MayMoveUpRows() );
+ m_xTbxData->set_item_sensitive("MoveDownRow", bIsDataValid && m_xBrwData->MayMoveDownRows() );
+ m_xTbxData->set_item_sensitive("MoveUpRow", bIsDataValid && m_xBrwData->MayMoveUpRows() );
}
// disable all modifying controls
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx
index 7c804ba8a235..25b0367f8885 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx
@@ -18,13 +18,11 @@
*/
#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <dlg_DataSource.hxx>
#include <ChartTypeTemplateProvider.hxx>
-#include <ChartTypeManager.hxx>
#include <ChartTypeTemplate.hxx>
-#include <DiagramHelper.hxx>
+#include <Diagram.hxx>
#include "DialogModel.hxx"
#include <ChartModel.hxx>
@@ -32,11 +30,8 @@
#include "tp_DataSource.hxx"
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
using namespace ::chart;
-using ::com::sun::star::uno::Reference;
-
namespace chart
{
@@ -63,13 +58,11 @@ DocumentChartTypeTemplateProvider::DocumentChartTypeTemplateProvider(
if( !xDoc.is())
return;
- Reference< chart2::XDiagram > xDia( xDoc->getFirstDiagram());
+ rtl::Reference< Diagram > xDia( xDoc->getFirstChartDiagram());
if( xDia.is())
{
- DiagramHelper::tTemplateWithServiceName aResult(
- DiagramHelper::getTemplateForDiagram(
- xDia,
- xDoc->getTypeManager() ));
+ Diagram::tTemplateWithServiceName aResult(
+ xDia->getTemplate( xDoc->getTypeManager() ));
m_xTemplate = aResult.xChartTypeTemplate;
}
}
@@ -82,12 +75,11 @@ rtl::Reference< ::chart::ChartTypeTemplate > DocumentChartTypeTemplateProvider::
sal_uInt16 DataSourceDialog::m_nLastPageId = 0;
DataSourceDialog::DataSourceDialog(weld::Window * pParent,
- const rtl::Reference<::chart::ChartModel> & xChartDocument,
- const Reference< uno::XComponentContext > & xContext)
+ const rtl::Reference<::chart::ChartModel> & xChartDocument)
: GenericDialogController(pParent, "modules/schart/ui/datarangedialog.ui",
"DataRangeDialog")
, m_apDocTemplateProvider(new DocumentChartTypeTemplateProvider(xChartDocument))
- , m_apDialogModel(new DialogModel(xChartDocument, xContext))
+ , m_apDialogModel(new DialogModel(xChartDocument))
, m_bRangeChooserTabIsValid(true)
, m_bDataSourceTabIsValid(true)
, m_bTogglingEnabled(true)
@@ -130,7 +122,7 @@ short DataSourceDialog::run()
return nResult;
}
-IMPL_LINK(DataSourceDialog, ActivatePageHdl, const OString&, rPage, void)
+IMPL_LINK(DataSourceDialog, ActivatePageHdl, const OUString&, rPage, void)
{
if (rPage == "range")
m_xRangeChooserTabPage->Activate();
@@ -139,7 +131,7 @@ IMPL_LINK(DataSourceDialog, ActivatePageHdl, const OString&, rPage, void)
}
// allow/disallow user to leave page
-IMPL_LINK_NOARG(DataSourceDialog, DeactivatePageHdl, const OString&, bool)
+IMPL_LINK_NOARG(DataSourceDialog, DeactivatePageHdl, const OUString&, bool)
{
return m_bTogglingEnabled;
}
diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
index f20571e22f55..6a79bac4a414 100644
--- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
@@ -37,8 +37,8 @@ SchAxisDlg::SchAxisDlg(weld::Window* pWindow,
OUString("modules/schart/ui/insertaxisdlg.ui") :
OUString("modules/schart/ui/insertgriddlg.ui"),
bAxisDlg ?
- OString("InsertAxisDialog") :
- OString("InsertGridDialog"))
+ OUString("InsertAxisDialog") :
+ OUString("InsertGridDialog"))
, m_xCbPrimaryX(m_xBuilder->weld_check_button("primaryX"))
, m_xCbPrimaryY(m_xBuilder->weld_check_button("primaryY"))
, m_xCbPrimaryZ(m_xBuilder->weld_check_button("primaryZ"))
diff --git a/chart2/source/controller/dialogs/dlg_InsertDataTable.cxx b/chart2/source/controller/dialogs/dlg_InsertDataTable.cxx
new file mode 100644
index 000000000000..4b5e928db057
--- /dev/null
+++ b/chart2/source/controller/dialogs/dlg_InsertDataTable.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 <dlg_InsertDataTable.hxx>
+
+namespace chart
+{
+InsertDataTableDialog::InsertDataTableDialog(weld::Window* pWindow)
+ : GenericDialogController(pWindow, "modules/schart/ui/dlg_InsertDataTable.ui",
+ "InsertDataTableDialog")
+ , m_aDataTablePropertiesResources(*m_xBuilder)
+ , m_xCbShowDataTable(m_xBuilder->weld_check_button("showDataTable"))
+{
+ m_xCbShowDataTable->connect_toggled(LINK(this, InsertDataTableDialog, ShowDataTableToggle));
+ init(m_aData);
+}
+
+IMPL_LINK_NOARG(InsertDataTableDialog, ShowDataTableToggle, weld::Toggleable&, void)
+{
+ changeEnabled();
+}
+
+void InsertDataTableDialog::changeEnabled()
+{
+ bool bEnable = m_xCbShowDataTable->get_active();
+ m_aDataTablePropertiesResources.setChecksSensitive(bEnable);
+ m_aData.mbShow = bEnable;
+}
+
+void InsertDataTableDialog::init(DataTableDialogData const& rData)
+{
+ m_aData = rData;
+ m_aDataTablePropertiesResources.setHorizontalBorder(m_aData.mbHorizontalBorders);
+ m_aDataTablePropertiesResources.setVerticalBorder(m_aData.mbVerticalBorders);
+ m_aDataTablePropertiesResources.setOutline(m_aData.mbOutline);
+ m_aDataTablePropertiesResources.setKeys(m_aData.mbKeys);
+ m_xCbShowDataTable->set_active(m_aData.mbShow);
+ changeEnabled();
+}
+
+DataTableDialogData& InsertDataTableDialog::getDataTableDialogData()
+{
+ m_aData.mbShow = m_xCbShowDataTable->get_active();
+
+ m_aData.mbHorizontalBorders = m_aDataTablePropertiesResources.getHorizontalBorder();
+ m_aData.mbVerticalBorders = m_aDataTablePropertiesResources.getVerticalBorder();
+ m_aData.mbOutline = m_aDataTablePropertiesResources.getOutline();
+ m_aData.mbKeys = m_aDataTablePropertiesResources.getKeys();
+
+ return m_aData;
+}
+
+} //namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
index ceec42d736e8..8ed2c1d7d650 100644
--- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
@@ -21,18 +21,15 @@
#include <res_ErrorBar.hxx>
#include <chartview/ExplicitScaleValues.hxx>
#include <chartview/ExplicitValueProvider.hxx>
-#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
+#include <ChartView.hxx>
#include <ObjectIdentifier.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <ObjectNameProvider.hxx>
+#include <DataSeries.hxx>
-#include <com/sun/star/frame/XModel.hpp>
-#include <comphelper/servicehelper.hxx>
-
-using ::com::sun::star::uno::Reference;
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
@@ -67,18 +64,17 @@ void InsertErrorBarsDialog::SetAxisMinorStepWidthForErrorBarDecimals( double fMi
double InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals(
const rtl::Reference<::chart::ChartModel>& xChartModel,
- const Reference< uno::XInterface >& xChartView,
- const OUString& rSelectedObjectCID )
+ const rtl::Reference<::chart::ChartView>& xChartView,
+ std::u16string_view rSelectedObjectCID )
{
double fStepWidth = 0.001;
- ExplicitValueProvider* pExplicitValueProvider( comphelper::getFromUnoTunnel<ExplicitValueProvider>(xChartView) );
+ ExplicitValueProvider* pExplicitValueProvider( xChartView.get() );
if( pExplicitValueProvider )
{
- Reference< XAxis > xAxis;
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
- Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rSelectedObjectCID, xChartModel );
- xAxis = DiagramHelper::getAttachedAxis( xSeries, xDiagram );
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rSelectedObjectCID, xChartModel );
+ rtl::Reference< Axis > xAxis = xDiagram->getAttachedAxis( xSeries );
if(!xAxis.is())
xAxis = AxisHelper::getAxis( 1/*nDimensionIndex*/, true/*bMainAxis*/, xDiagram );
if(xAxis.is())
diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
index 7750588ccaa7..f5cfe8e3bda4 100644
--- a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
+++ b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
@@ -31,12 +31,13 @@ using namespace ::com::sun::star;
NumberFormatDialog::NumberFormatDialog(weld::Window* pParent, const SfxItemSet& rSet)
: SfxSingleTabDialogController(pParent, &rSet, "cui/ui/formatnumberdialog.ui", "FormatNumberDialog")
+ , m_xContent( m_xBuilder->weld_container("content") )
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT );
if (fnCreatePage)
{
- std::unique_ptr<SfxTabPage> xTabPage = (*fnCreatePage)(get_content_area(), this, &rSet);
+ std::unique_ptr<SfxTabPage> xTabPage = (*fnCreatePage)(m_xContent.get(), this, &rSet);
xTabPage->PageCreated(rSet);
SetTabPage(std::move(xTabPage));
}
diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.hxx b/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
index 56d5acd20867..be02edeb6257 100644
--- a/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
+++ b/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
@@ -23,6 +23,7 @@
namespace weld
{
class Window;
+class Container;
}
class SfxItemSet;
class SfxItemPool;
@@ -31,6 +32,8 @@ namespace chart
{
class NumberFormatDialog : public SfxSingleTabDialogController
{
+ std::unique_ptr<weld::Container> m_xContent;
+
public:
NumberFormatDialog(weld::Window* pParent, const SfxItemSet& rSet);
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 84740d9bf708..e885fdaef32e 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <cstddef>
+
#include <dlg_ObjectProperties.hxx>
#include <strings.hrc>
#include "tp_AxisLabel.hxx"
@@ -31,14 +35,18 @@
#include "tp_TitleRotation.hxx"
#include "tp_PolarOptions.hxx"
#include "tp_DataPointOption.hxx"
+#include "tp_DataTable.hxx"
#include <ResId.hxx>
#include <ViewElementListProvider.hxx>
#include <ChartModelHelper.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <ObjectNameProvider.hxx>
+#include <DataSeries.hxx>
#include <DiagramHelper.hxx>
#include <Diagram.hxx>
#include <NumberFormatterWrapper.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <ExplicitCategoriesProvider.hxx>
#include <ChartModel.hxx>
@@ -64,7 +72,8 @@
#include <svx/numinf.hxx>
#include <svl/cjkoptions.hxx>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
namespace com::sun::star::chart2 { class XChartType; }
namespace com::sun::star::chart2 { class XDataSeries; }
@@ -79,8 +88,8 @@ using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Exception;
using ::com::sun::star::beans::XPropertySet;
-ObjectPropertiesDialogParameter::ObjectPropertiesDialogParameter( const OUString& rObjectCID )
- : m_aObjectCID( rObjectCID )
+ObjectPropertiesDialogParameter::ObjectPropertiesDialogParameter( OUString aObjectCID )
+ : m_aObjectCID(std::move( aObjectCID ))
, m_eObjectType( ObjectIdentifier::getObjectType( m_aObjectCID ) )
, m_bAffectsMultipleObjects(false)
, m_bHasGeometryProperties(false)
@@ -103,8 +112,8 @@ ObjectPropertiesDialogParameter::ObjectPropertiesDialogParameter( const OUString
, m_bComplexCategoriesAxis( false )
, m_nNbPoints( 0 )
{
- OUString aParticleID = ObjectIdentifier::getParticleID( m_aObjectCID );
- m_bAffectsMultipleObjects = (aParticleID == "ALLELEMENTS");
+ std::u16string_view aParticleID = ObjectIdentifier::getParticleID( m_aObjectCID );
+ m_bAffectsMultipleObjects = (aParticleID == u"ALLELEMENTS");
}
ObjectPropertiesDialogParameter::~ObjectPropertiesDialogParameter()
{
@@ -113,10 +122,12 @@ ObjectPropertiesDialogParameter::~ObjectPropertiesDialogParameter()
void ObjectPropertiesDialogParameter::init( const rtl::Reference<::chart::ChartModel>& xChartModel )
{
m_xChartDocument = xChartModel;
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartModel );
- uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aObjectCID, xChartModel );
- uno::Reference< XChartType > xChartType = ChartModelHelper::getChartTypeOfSeries( xChartModel, xSeries );
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
+ rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aObjectCID, xChartModel );
+ rtl::Reference< ChartType > xChartType = ChartModelHelper::getChartTypeOfSeries( xChartModel, xSeries );
+ sal_Int32 nDimensionCount = 0;
+ if (xDiagram)
+ nDimensionCount = xDiagram->getDimension();
bool bHasSeriesProperties = (m_eObjectType==OBJECTTYPE_DATA_SERIES);
bool bHasDataPointproperties = (m_eObjectType==OBJECTTYPE_DATA_POINT);
@@ -153,7 +164,7 @@ void ObjectPropertiesDialogParameter::init( const rtl::Reference<::chart::ChartM
if( m_bHasScaleProperties )
{
- uno::Reference< XAxis > xAxis( ObjectIdentifier::getAxisForCID( m_aObjectCID, xChartModel ) );
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( m_aObjectCID, xChartModel );
if( xAxis.is() )
{
//no scale page for series axis
@@ -211,14 +222,12 @@ void ObjectPropertiesDialogParameter::init( const rtl::Reference<::chart::ChartM
if( m_eObjectType == OBJECTTYPE_DATA_CURVE )
{
- uno::Reference< data::XDataSource > xSource( xSeries, uno::UNO_QUERY );
- Sequence< Reference< data::XLabeledDataSequence > > aDataSeqs( xSource->getDataSequences());
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aDataSeqs( xSeries->getDataSequences2());
Sequence< double > aXValues, aYValues;
bool bXValuesFound = false, bYValuesFound = false;
m_nNbPoints = 0;
- sal_Int32 i = 0;
- for( i=0;
- ! (bXValuesFound && bYValuesFound) && i<aDataSeqs.getLength();
+ for( std::size_t i=0;
+ ! (bXValuesFound && bYValuesFound) && i<aDataSeqs.size();
++i )
{
try
@@ -251,7 +260,7 @@ void ObjectPropertiesDialogParameter::init( const rtl::Reference<::chart::ChartM
//first category (index 0) matches with real number 1.0
aXValues.realloc( aYValues.getLength() );
auto pXValues = aXValues.getArray();
- for( i=0; i<aXValues.getLength(); ++i )
+ for( sal_Int32 i=0; i<aXValues.getLength(); ++i )
pXValues[i] = i+1;
bXValuesFound = true;
}
@@ -309,10 +318,10 @@ void ObjectPropertiesDialogParameter::init( const rtl::Reference<::chart::ChartM
const sal_uInt16 nNoArrowNoShadowDlg = 1101;
void SchAttribTabDlg::setSymbolInformation( SfxItemSet&& rSymbolShapeProperties,
- std::unique_ptr<Graphic> pAutoSymbolGraphic )
+ std::optional<Graphic> oAutoSymbolGraphic )
{
m_oSymbolShapeProperties.emplace(std::move(rSymbolShapeProperties));
- m_pAutoSymbolGraphic = std::move(pAutoSymbolGraphic);
+ m_oAutoSymbolGraphic = std::move(oAutoSymbolGraphic);
}
void SchAttribTabDlg::SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth )
@@ -452,6 +461,13 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent,
case OBJECTTYPE_UNKNOWN:
// nothing
break;
+ case OBJECTTYPE_DATA_TABLE:
+ AddTabPage("datatable", SchResId(STR_DATA_TABLE), DataTableTabPage::Create);
+ AddTabPage("border", SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE);
+ AddTabPage("area", SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA);
+ AddTabPage("fontname", SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME);
+ AddTabPage("effects", SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS);
+ break;
case OBJECTTYPE_DATA_CURVE_EQUATION:
AddTabPage("border", SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE);
AddTabPage("area", SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA);
@@ -459,7 +475,7 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent,
AddTabPage("fontname", SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME);
AddTabPage("effects", SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS);
AddTabPage("numberformat", SchResId(STR_PAGE_NUMBERS), RID_SVXPAGE_NUMBERFORMAT);
- if (SvtCTLOptions().IsCTLFontEnabled())
+ if (SvtCTLOptions::IsCTLFontEnabled())
{
/* When rotation is supported for equation text boxes, use
SchAlignmentTabPage::Create here. The special
@@ -481,7 +497,7 @@ SchAttribTabDlg::~SchAttribTabDlg()
{
}
-void SchAttribTabDlg::PageCreated(const OString& rId, SfxTabPage &rPage)
+void SchAttribTabDlg::PageCreated(const OUString& rId, SfxTabPage &rPage)
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
if (rId == "border")
@@ -497,8 +513,8 @@ void SchAttribTabDlg::PageCreated(const OString& rId, SfxTabPage &rPage)
aSet.Put(OfaPtrItem(SID_OBJECT_LIST,m_pViewElementListProvider->GetSymbolList()));
if( m_oSymbolShapeProperties )
aSet.Put(SfxTabDialogItem(SID_ATTR_SET, *m_oSymbolShapeProperties));
- if( m_pAutoSymbolGraphic )
- aSet.Put(SvxGraphicItem(*m_pAutoSymbolGraphic));
+ if( m_oAutoSymbolGraphic )
+ aSet.Put(SvxGraphicItem(*m_oAutoSymbolGraphic));
}
rPage.PageCreated(aSet);
}
@@ -568,7 +584,7 @@ void SchAttribTabDlg::PageCreated(const OString& rId, SfxTabPage &rPage)
}
else if (rId == "numberformat")
{
- aSet.Put (SvxNumberInfoItem( m_pNumberFormatter, static_cast<sal_uInt16>(SID_ATTR_NUMBERFORMAT_INFO)));
+ aSet.Put (SvxNumberInfoItem( m_pNumberFormatter, SID_ATTR_NUMBERFORMAT_INFO));
rPage.PageCreated(aSet);
}
else if (rId == "xerrorbar")
diff --git a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx
index f5fc702a2a76..b742e8a22eda 100644
--- a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx
+++ b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx
@@ -41,7 +41,7 @@ ShapeFontDialog::ShapeFontDialog(weld::Window* pParent, const SfxItemSet* pAttr,
AddTabPage("position", RID_SVXPAGE_CHAR_POSITION );
}
-void ShapeFontDialog::PageCreated(const OString& rId, SfxTabPage& rPage)
+void ShapeFontDialog::PageCreated(const OUString& rId, SfxTabPage& rPage)
{
SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
if (rId == "font")
diff --git a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
index e5b422ceaf16..4c72d4d8126b 100644
--- a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
+++ b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
@@ -47,7 +47,7 @@ ShapeParagraphDialog::ShapeParagraphDialog(weld::Window* pParent,
AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR);
}
-void ShapeParagraphDialog::PageCreated(const OString& rId, SfxTabPage& rPage)
+void ShapeParagraphDialog::PageCreated(const OUString& rId, SfxTabPage& rPage)
{
if (rId == "labelTP_TABULATOR")
{
diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx
index 09fc4923bdd9..08a783df5e45 100644
--- a/chart2/source/controller/dialogs/dlg_View3D.cxx
+++ b/chart2/source/controller/dialogs/dlg_View3D.cxx
@@ -26,15 +26,11 @@
#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
#include <Diagram.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
-#include <com/sun/star/frame/XModel.hpp>
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
sal_uInt16 View3DDialog::m_nLastPageId = 0;
@@ -43,7 +39,7 @@ View3DDialog::View3DDialog(weld::Window* pParent, const rtl::Reference<::chart::
, m_aControllerLocker(xChartModel)
, m_xTabControl(m_xBuilder->weld_notebook("tabcontrol"))
{
- rtl::Reference< Diagram > xSceneProperties = ChartModelHelper::findDiagram( xChartModel );
+ rtl::Reference< Diagram > xSceneProperties = xChartModel->getFirstChartDiagram();
m_xTabControl->append_page("geometry", SchResId(STR_PAGE_PERSPECTIVE));
m_xGeometry.reset(new ThreeD_SceneGeometry_TabPage(m_xTabControl->get_page("geometry"), xSceneProperties, m_aControllerLocker));
@@ -60,7 +56,7 @@ View3DDialog::View3DDialog(weld::Window* pParent, const rtl::Reference<::chart::
m_xTabControl->set_current_page(m_nLastPageId);
}
-IMPL_LINK(View3DDialog, ActivatePageHdl, const OString&, rPage, void)
+IMPL_LINK(View3DDialog, ActivatePageHdl, const OUString&, rPage, void)
{
if (rPage == "appearance")
m_xAppearance->ActivatePage();
diff --git a/chart2/source/controller/dialogs/res_BarGeometry.cxx b/chart2/source/controller/dialogs/res_BarGeometry.cxx
index 182d391aac33..81d933b208bc 100644
--- a/chart2/source/controller/dialogs/res_BarGeometry.cxx
+++ b/chart2/source/controller/dialogs/res_BarGeometry.cxx
@@ -27,10 +27,9 @@ BarGeometryResources::BarGeometryResources(weld::Builder* pBuilder)
: m_xFT_Geometry(pBuilder->weld_label("shapeft"))
, m_xLB_Geometry(pBuilder->weld_tree_view("shape"))
{
- for (size_t i = 0; i < SAL_N_ELEMENTS(CHART_TYPE); ++i)
+ for (size_t i = 0; i < std::size(CHART_TYPE); ++i)
m_xLB_Geometry->append_text(SchResId(CHART_TYPE[i]));
- m_xLB_Geometry->set_size_request(-1,
- m_xLB_Geometry->get_height_rows(SAL_N_ELEMENTS(CHART_TYPE)));
+ m_xLB_Geometry->set_size_request(-1, m_xLB_Geometry->get_height_rows(std::size(CHART_TYPE)));
}
void BarGeometryResources::connect_changed(const Link<weld::TreeView&, void>& rLink)
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index 6bba918d6937..c3d755cf92d6 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -46,41 +46,36 @@ namespace
const std::u16string_view our_aLBEntryMap[] = {u" ", u", ", u"; ", u"\n", u". "};
-bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, sal_uInt16 nValueWhich, sal_uInt16 nSourceFormatWhich, sal_uInt32& rnFormatKeyOut, bool& rbSourceFormatOut, bool& rbSourceFormatMixedStateOut )
+bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, TypedWhichId<SfxUInt32Item> nValueWhich, TypedWhichId<SfxBoolItem> nSourceFormatWhich, sal_uInt32& rnFormatKeyOut, bool& rbSourceFormatOut, bool& rbSourceFormatMixedStateOut )
{
bool bSet = false;
- const SfxPoolItem *pItem1 = nullptr;
- if( rSet.GetItemState( nValueWhich, true, &pItem1 ) == SfxItemState::SET )
+ if( const SfxUInt32Item* pNumItem = rSet.GetItemIfSet( nValueWhich ) )
{
- const SfxUInt32Item * pNumItem = dynamic_cast< const SfxUInt32Item * >( pItem1 );
- if( pNumItem )
- {
- rnFormatKeyOut = pNumItem->GetValue();
- bSet = true;
- }
+ rnFormatKeyOut = pNumItem->GetValue();
+ bSet = true;
}
rbSourceFormatMixedStateOut=true;
- const SfxPoolItem *pItem2 = nullptr;
- if( rSet.GetItemState( nSourceFormatWhich, true, &pItem2 ) == SfxItemState::SET )
+ if( const SfxBoolItem * pBoolItem = rSet.GetItemIfSet( nSourceFormatWhich ) )
{
- const SfxBoolItem * pBoolItem = dynamic_cast< const SfxBoolItem * >( pItem2 );
- if( pBoolItem )
- {
- rbSourceFormatOut = pBoolItem->GetValue();
- rbSourceFormatMixedStateOut=false;
- }
+ rbSourceFormatOut = pBoolItem->GetValue();
+ rbSourceFormatMixedStateOut=false;
}
return bSet;
}
-void lcl_setBoolItemToCheckBox(const SfxItemSet& rInAttrs, sal_uInt16 nWhichId, weld::CheckButton& rCheckbox)
+void lcl_setBoolItemToCheckBox(const SfxItemSet& rInAttrs, TypedWhichId<SfxBoolItem> nWhichId, weld::CheckButton& rCheckbox, weld::TriStateEnabled& rTriState)
{
- const SfxPoolItem *pPoolItem = nullptr;
- if( rInAttrs.GetItemState(nWhichId, true, &pPoolItem) == SfxItemState::SET )
- rCheckbox.set_active(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
+ if( const SfxBoolItem* pPoolItem = rInAttrs.GetItemIfSet(nWhichId) )
+ {
+ rCheckbox.set_active(pPoolItem->GetValue());
+ rTriState.bTriStateEnabled = false;
+ }
else
+ {
rCheckbox.set_state(TRISTATE_INDET);
+ rTriState.bTriStateEnabled = true;
+ }
}
}//end anonymous namespace
@@ -112,7 +107,7 @@ DataLabelResources::DataLabelResources(weld::Builder* pBuilder, weld::Window* pP
, m_xFT_Dial(pBuilder->weld_label("CT_LABEL_DIAL"))
, m_xNF_Degrees(pBuilder->weld_metric_spin_button("NF_LABEL_DEGREES", FieldUnit::DEGREE))
, m_xBxTextDirection(pBuilder->weld_widget("boxTXT_DIRECTION"))
- , m_xLB_TextDirection(new TextDirectionListBox(pBuilder->weld_combo_box("LB_LABEL_TEXTDIR")))
+ , m_aLB_TextDirection(pBuilder->weld_combo_box("LB_LABEL_TEXTDIR"))
, m_xDC_Dial(new svx::DialControl)
, m_xDC_DialWin(new weld::CustomWeld(*pBuilder, "CT_DIAL", *m_xDC_Dial))
, m_xCBCustomLeaderLines(pBuilder->weld_check_button("CB_CUSTOM_LEADER_LINES"))
@@ -126,9 +121,8 @@ DataLabelResources::DataLabelResources(weld::Builder* pBuilder, weld::Window* pP
std::vector< sal_Int32 > aAvailablePlacementList;
- const SfxPoolItem *pPoolItem = nullptr;
- if( rInAttrs.GetItemState(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, true, &pPoolItem) == SfxItemState::SET )
- aAvailablePlacementList = static_cast<const SfxIntegerListItem*>(pPoolItem)->GetList();
+ if( const SfxIntegerListItem* pPlacementsItem = rInAttrs.GetItemIfSet(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS) )
+ aAvailablePlacementList = pPlacementsItem->GetList();
m_xLB_LabelPlacement->clear();
for( size_t nN=0; nN<aAvailablePlacementList.size(); ++nN )
@@ -154,9 +148,9 @@ DataLabelResources::DataLabelResources(weld::Builder* pBuilder, weld::Window* pP
m_bNumberFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, m_nNumberFormatForValue, m_bSourceFormatForValue, m_bSourceFormatMixedState );
m_bPercentFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_nNumberFormatForPercent, m_bSourceFormatForPercent , m_bPercentSourceMixedState);
- if( rInAttrs.GetItemState(SCHATTR_DATADESCR_NO_PERCENTVALUE, true, &pPoolItem) == SfxItemState::SET )
+ if( const SfxBoolItem* pNoPercentValueItem = rInAttrs.GetItemIfSet(SCHATTR_DATADESCR_NO_PERCENTVALUE) )
{
- bool bForbidPercentValue = rInAttrs.Get( SCHATTR_DATADESCR_NO_PERCENTVALUE ).GetValue();
+ bool bForbidPercentValue = pNoPercentValueItem->GetValue();
if( bForbidPercentValue )
m_xCBPercent->set_sensitive(false);
}
@@ -182,12 +176,18 @@ IMPL_LINK(DataLabelResources, NumberFormatDialogHdl, weld::Button&, rButton, voi
}
if (&rButton == m_xPB_NumberFormatForValue.get() && !m_xCBNumber->get_active())
+ {
m_xCBNumber->set_active(true);
+ m_aNumberState.bTriStateEnabled = false;
+ }
else if (&rButton == m_xPB_NumberFormatForPercent.get() && !m_xCBPercent->get_active())
+ {
m_xCBPercent->set_active(true);
+ m_aPercentState.bTriStateEnabled = false;
+ }
SfxItemSet aNumberSet = NumberFormatDialog::CreateEmptyItemSetForNumberFormatDialog( *m_pPool );
- aNumberSet.Put (SvxNumberInfoItem( m_pNumberFormatter, static_cast<sal_uInt16>(SID_ATTR_NUMBERFORMAT_INFO)));
+ aNumberSet.Put (SvxNumberInfoItem( m_pNumberFormatter, SID_ATTR_NUMBERFORMAT_INFO));
bool bPercent = (&rButton == m_xPB_NumberFormatForPercent.get());
@@ -221,8 +221,22 @@ IMPL_LINK(DataLabelResources, NumberFormatDialogHdl, weld::Button&, rButton, voi
}
}
-IMPL_LINK_NOARG(DataLabelResources, CheckHdl, weld::Toggleable&, void)
+IMPL_LINK(DataLabelResources, CheckHdl, weld::Toggleable&, rToggle, void)
{
+ if (&rToggle == m_xCBNumber.get())
+ m_aNumberState.ButtonToggled(rToggle);
+ else if (&rToggle == m_xCBPercent.get())
+ m_aPercentState.ButtonToggled(rToggle);
+ else if (&rToggle == m_xCBCategory.get())
+ m_aCategoryState.ButtonToggled(rToggle);
+ else if (&rToggle == m_xCBSymbol.get())
+ m_aSymbolState.ButtonToggled(rToggle);
+ else if (&rToggle == m_xCBDataSeries.get())
+ m_aDataSeriesState.ButtonToggled(rToggle);
+ else if (&rToggle == m_xCBWrapText.get())
+ m_aWrapTextState.ButtonToggled(rToggle);
+ else if (&rToggle == m_xCBCustomLeaderLines.get())
+ m_aCustomLeaderLinesState.ButtonToggled(rToggle);
EnableControls();
}
@@ -305,8 +319,8 @@ void DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const
rOutAttrs->Put( SfxInt32Item( SCHATTR_DATADESCR_PLACEMENT, nValue ) );
}
- if (m_xLB_TextDirection->get_active() != -1)
- rOutAttrs->Put( SvxFrameDirectionItem( m_xLB_TextDirection->get_active_id(), EE_PARA_WRITINGDIR ) );
+ if (m_aLB_TextDirection.get_active() != -1)
+ rOutAttrs->Put( SvxFrameDirectionItem( m_aLB_TextDirection.get_active_id(), EE_PARA_WRITINGDIR ) );
if( m_xDC_Dial->IsVisible() )
{
@@ -320,30 +334,29 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs)
// default state
m_xCBSymbol->set_sensitive( false );
- lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_NUMBER, *m_xCBNumber );
- lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_PERCENTAGE, *m_xCBPercent );
- lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_CATEGORY, *m_xCBCategory );
- lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_SYMBOL, *m_xCBSymbol );
- lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_DATA_SERIES_NAME, *m_xCBDataSeries );
- lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_WRAP_TEXT, *m_xCBWrapText );
- lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_CUSTOM_LEADER_LINES, *m_xCBCustomLeaderLines );
+ lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_NUMBER, *m_xCBNumber, m_aNumberState );
+ lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_PERCENTAGE, *m_xCBPercent, m_aPercentState );
+ lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_CATEGORY, *m_xCBCategory, m_aCategoryState );
+ lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_SYMBOL, *m_xCBSymbol, m_aSymbolState );
+ lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_DATA_SERIES_NAME, *m_xCBDataSeries, m_aDataSeriesState );
+ lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_WRAP_TEXT, *m_xCBWrapText, m_aWrapTextState );
+ lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_CUSTOM_LEADER_LINES, *m_xCBCustomLeaderLines, m_aCustomLeaderLinesState );
m_bNumberFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, m_nNumberFormatForValue, m_bSourceFormatForValue, m_bSourceFormatMixedState );
m_bPercentFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_nNumberFormatForPercent, m_bSourceFormatForPercent , m_bPercentSourceMixedState);
- const SfxPoolItem *pPoolItem = nullptr;
- if( rInAttrs.GetItemState(SCHATTR_DATADESCR_SEPARATOR, true, &pPoolItem) == SfxItemState::SET )
- for(size_t i=0; i < SAL_N_ELEMENTS(our_aLBEntryMap); ++i )
+ if( const SfxStringItem* pSeparatorItem = rInAttrs.GetItemIfSet(SCHATTR_DATADESCR_SEPARATOR) )
+ for(size_t i=0; i < std::size(our_aLBEntryMap); ++i )
{
- if( our_aLBEntryMap[i] == static_cast<const SfxStringItem*>(pPoolItem)->GetValue())
+ if( our_aLBEntryMap[i] == pSeparatorItem->GetValue())
m_xLB_Separator->set_active( i );
}
else
m_xLB_Separator->set_active( 0 );
- if( rInAttrs.GetItemState(SCHATTR_DATADESCR_PLACEMENT, true, &pPoolItem) == SfxItemState::SET )
+ if( const SfxInt32Item* pPlacementItem = rInAttrs.GetItemIfSet(SCHATTR_DATADESCR_PLACEMENT) )
{
- sal_Int32 nPlacement = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
+ sal_Int32 nPlacement = pPlacementItem->GetValue();
std::map< sal_Int32, sal_uInt16 >::const_iterator aIt( m_aPlacementToListBoxMap.find(nPlacement) );
if(aIt!=m_aPlacementToListBoxMap.end())
{
@@ -356,12 +369,12 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs)
else
m_xLB_LabelPlacement->set_active(-1);
- if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
- m_xLB_TextDirection->set_active_id( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() );
+ if( const SvxFrameDirectionItem* pDirectionItem = rInAttrs.GetItemIfSet(EE_PARA_WRITINGDIR) )
+ m_aLB_TextDirection.set_active_id( pDirectionItem->GetValue() );
- if( rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SdrAngleItem* pAngleItem = rInAttrs.GetItemIfSet( SCHATTR_TEXT_DEGREES ) )
{
- Degree100 nDegrees = static_cast< const SdrAngleItem * >( pPoolItem )->GetValue();
+ Degree100 nDegrees = pAngleItem->GetValue();
m_xDC_Dial->SetRotation( nDegrees );
}
else
diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx b/chart2/source/controller/dialogs/res_DataLabel.hxx
index 56115b2a779c..66a062d2ca24 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.hxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.hxx
@@ -20,11 +20,11 @@
#include <svl/itemset.hxx>
#include <svx/dialcontrol.hxx>
+#include <TextDirectionListBox.hxx>
#include <map>
class SvNumberFormatter;
-namespace chart { class TextDirectionListBox; }
namespace chart
{
@@ -58,6 +58,14 @@ private:
weld::Window* m_pWindow;
SfxItemPool* m_pPool;
+ weld::TriStateEnabled m_aNumberState;
+ weld::TriStateEnabled m_aPercentState;
+ weld::TriStateEnabled m_aCategoryState;
+ weld::TriStateEnabled m_aSymbolState;
+ weld::TriStateEnabled m_aDataSeriesState;
+ weld::TriStateEnabled m_aWrapTextState;
+ weld::TriStateEnabled m_aCustomLeaderLinesState;
+
std::unique_ptr<weld::CheckButton> m_xCBNumber;
std::unique_ptr<weld::Button> m_xPB_NumberFormatForValue;
std::unique_ptr<weld::CheckButton> m_xCBPercent;
@@ -77,7 +85,7 @@ private:
std::unique_ptr<weld::Widget> m_xBxTextDirection;
- std::unique_ptr<TextDirectionListBox> m_xLB_TextDirection;
+ TextDirectionListBox m_aLB_TextDirection;
std::unique_ptr<svx::DialControl> m_xDC_Dial;
std::unique_ptr<weld::CustomWeld> m_xDC_DialWin;
diff --git a/chart2/source/controller/dialogs/res_DataTableProperties.cxx b/chart2/source/controller/dialogs/res_DataTableProperties.cxx
new file mode 100644
index 000000000000..327298e312d9
--- /dev/null
+++ b/chart2/source/controller/dialogs/res_DataTableProperties.cxx
@@ -0,0 +1,111 @@
+/* -*- 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 <res_DataTableProperties.hxx>
+
+#include <chartview/ChartSfxItemIds.hxx>
+#include <svl/eitem.hxx>
+
+using namespace css;
+
+namespace chart
+{
+DataTablePropertiesResources::DataTablePropertiesResources(weld::Builder& rBuilder)
+ : m_xCbHorizontalBorder(rBuilder.weld_check_button("horizontalBorderCB"))
+ , m_xCbVerticalBorder(rBuilder.weld_check_button("verticalBorderCB"))
+ , m_xCbOutilne(rBuilder.weld_check_button("outlineCB"))
+ , m_xCbKeys(rBuilder.weld_check_button("keysCB"))
+{
+}
+
+void DataTablePropertiesResources::setChecksSensitive(bool bSensitive)
+{
+ m_xCbHorizontalBorder->set_sensitive(bSensitive);
+ m_xCbVerticalBorder->set_sensitive(bSensitive);
+ m_xCbOutilne->set_sensitive(bSensitive);
+ m_xCbKeys->set_sensitive(bSensitive);
+}
+
+void DataTablePropertiesResources::initFromItemSet(const SfxItemSet& rInAttrs)
+{
+ const SfxPoolItem* pPoolItem = nullptr;
+ SfxItemState aState;
+
+ aState = rInAttrs.GetItemState(SCHATTR_DATA_TABLE_HORIZONTAL_BORDER, false, &pPoolItem);
+ if (aState == SfxItemState::INVALID)
+ {
+ m_xCbHorizontalBorder->set_state(TRISTATE_INDET);
+ }
+ else
+ {
+ if (aState == SfxItemState::SET)
+ m_xCbHorizontalBorder->set_active(
+ static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
+ }
+
+ aState = rInAttrs.GetItemState(SCHATTR_DATA_TABLE_VERTICAL_BORDER, false, &pPoolItem);
+ if (aState == SfxItemState::INVALID)
+ {
+ m_xCbVerticalBorder->set_state(TRISTATE_INDET);
+ }
+ else
+ {
+ if (aState == SfxItemState::SET)
+ m_xCbVerticalBorder->set_active(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
+ }
+
+ aState = rInAttrs.GetItemState(SCHATTR_DATA_TABLE_OUTLINE, false, &pPoolItem);
+ if (aState == SfxItemState::INVALID)
+ {
+ m_xCbOutilne->set_state(TRISTATE_INDET);
+ }
+ else
+ {
+ if (aState == SfxItemState::SET)
+ m_xCbOutilne->set_active(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
+ }
+
+ aState = rInAttrs.GetItemState(SCHATTR_DATA_TABLE_KEYS, false, &pPoolItem);
+ if (aState == SfxItemState::INVALID)
+ {
+ m_xCbKeys->set_state(TRISTATE_INDET);
+ }
+ else
+ {
+ if (aState == SfxItemState::SET)
+ m_xCbKeys->set_active(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
+ }
+}
+
+bool DataTablePropertiesResources::writeToItemSet(SfxItemSet& rOutAttrs) const
+{
+ if (m_xCbHorizontalBorder->get_state() != TRISTATE_INDET)
+ {
+ rOutAttrs.Put(
+ SfxBoolItem(SCHATTR_DATA_TABLE_HORIZONTAL_BORDER, m_xCbHorizontalBorder->get_active()));
+ }
+ if (m_xCbVerticalBorder->get_state() != TRISTATE_INDET)
+ {
+ rOutAttrs.Put(
+ SfxBoolItem(SCHATTR_DATA_TABLE_VERTICAL_BORDER, m_xCbVerticalBorder->get_active()));
+ }
+ if (m_xCbOutilne->get_state() != TRISTATE_INDET)
+ {
+ rOutAttrs.Put(SfxBoolItem(SCHATTR_DATA_TABLE_OUTLINE, m_xCbOutilne->get_active()));
+ }
+ if (m_xCbKeys->get_state() != TRISTATE_INDET)
+ {
+ rOutAttrs.Put(SfxBoolItem(SCHATTR_DATA_TABLE_KEYS, m_xCbKeys->get_active()));
+ }
+ return true;
+}
+
+} //namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index 1e5078a301fc..ae8e7cd28e2e 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -22,12 +22,11 @@
#include <RangeSelectionHelper.hxx>
#include <helpids.h>
#include <chartview/ChartSfxItemIds.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <vcl/weld.hxx>
#include <ChartModel.hxx>
#include <rtl/math.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <osl/diagnose.h>
#include <svl/stritem.hxx>
@@ -476,7 +475,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
// category
m_eErrorKind = SvxChartKindError::NONE;
SfxItemState aState = rInAttrs.GetItemState( SCHATTR_STAT_KIND_ERROR, true, &pPoolItem );
- m_bErrorKindUnique = ( aState != SfxItemState::DONTCARE );
+ m_bErrorKindUnique = ( aState != SfxItemState::INVALID );
if( aState == SfxItemState::SET )
m_eErrorKind = static_cast<const SvxChartKindErrorItem*>(pPoolItem)->GetValue();
@@ -516,16 +515,14 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
}
// parameters
- aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTPLUS, true, &pPoolItem );
- if( aState == SfxItemState::SET )
+ if( const SvxDoubleItem* pDoubleItem = rInAttrs.GetItemIfSet( SCHATTR_STAT_CONSTPLUS ) )
{
- m_fPlusValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
+ m_fPlusValue = pDoubleItem->GetValue();
}
- aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTMINUS, true, &pPoolItem );
- if( aState == SfxItemState::SET )
+ if( const SvxDoubleItem* pStatItem = rInAttrs.GetItemIfSet( SCHATTR_STAT_CONSTMINUS ) )
{
- m_fMinusValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
+ m_fMinusValue = pStatItem->GetValue();
if( m_eErrorKind != SvxChartKindError::Range &&
m_fPlusValue == m_fMinusValue )
@@ -534,7 +531,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
// indicator
aState = rInAttrs.GetItemState( SCHATTR_STAT_INDICATE, true, &pPoolItem );
- m_bIndicatorUnique = ( aState != SfxItemState::DONTCARE );
+ m_bIndicatorUnique = ( aState != SfxItemState::INVALID );
if( aState == SfxItemState::SET)
m_eIndicate = static_cast<const SvxChartIndicateItem *>(pPoolItem)->GetValue();
@@ -563,7 +560,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
// ranges
aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_POS, true, &pPoolItem );
- m_bRangePosUnique = ( aState != SfxItemState::DONTCARE );
+ m_bRangePosUnique = ( aState != SfxItemState::INVALID );
if( aState == SfxItemState::SET )
{
OUString sRangePositive = static_cast< const SfxStringItem * >( pPoolItem )->GetValue();
@@ -571,7 +568,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
}
aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_NEG, true, &pPoolItem );
- m_bRangeNegUnique = ( aState != SfxItemState::DONTCARE );
+ m_bRangeNegUnique = ( aState != SfxItemState::INVALID );
if( aState == SfxItemState::SET )
{
OUString sRangeNegative = static_cast< const SfxStringItem * >( pPoolItem )->GetValue();
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index aac0a11368a1..92cb4399e563 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -18,7 +18,7 @@
*/
#include <res_LegendPosition.hxx>
-#include <ChartModelHelper.hxx>
+#include <Legend.hxx>
#include <LegendHelper.hxx>
#include <ChartModel.hxx>
#include <Diagram.hxx>
@@ -30,7 +30,8 @@
#include <chartview/ChartSfxItemIds.hxx>
#include <svl/intitem.hxx>
#include <svl/eitem.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <utility>
#include <vcl/weld.hxx>
namespace chart
@@ -49,8 +50,8 @@ LegendPositionResources::LegendPositionResources(weld::Builder& rBuilder)
}
LegendPositionResources::LegendPositionResources(weld::Builder& rBuilder,
- const uno::Reference< uno::XComponentContext >& xCC)
- : m_xCC(xCC)
+ uno::Reference< uno::XComponentContext > xCC)
+ : m_xCC(std::move(xCC))
, m_xCbxShow(rBuilder.weld_check_button("show"))
, m_xRbtLeft(rBuilder.weld_radio_button("left"))
, m_xRbtRight(rBuilder.weld_radio_button("right"))
@@ -77,20 +78,20 @@ void LegendPositionResources::writeToResources( const rtl::Reference<::chart::Ch
{
try
{
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartModel );
- uno::Reference< beans::XPropertySet > xProp( xDiagram->getLegend(), uno::UNO_QUERY );
- if( xProp.is() )
+ rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
+ rtl::Reference< Legend > xLegend = xDiagram->getLegend2();
+ if( xLegend.is() )
{
//show
bool bShowLegend = false;
- xProp->getPropertyValue( "Show" ) >>= bShowLegend;
+ xLegend->getPropertyValue( "Show" ) >>= bShowLegend;
if (m_xCbxShow)
m_xCbxShow->set_active( bShowLegend );
- PositionEnableHdl(*m_xCbxShow);
+ PositionEnable();
//position
chart2::LegendPosition ePos;
- xProp->getPropertyValue( "AnchorPosition" ) >>= ePos;
+ xLegend->getPropertyValue( "AnchorPosition" ) >>= ePos;
switch( ePos )
{
case chart2::LegendPosition_LINE_START:
@@ -121,7 +122,7 @@ void LegendPositionResources::writeToModel( const rtl::Reference<::chart::ChartM
{
bool bShowLegend = m_xCbxShow && m_xCbxShow->get_active();
ChartModel& rModel = *xChartModel;
- uno::Reference< beans::XPropertySet > xProp(LegendHelper::getLegend(rModel, m_xCC, bShowLegend), uno::UNO_QUERY);
+ rtl::Reference< Legend > xProp = LegendHelper::getLegend(rModel, m_xCC, bShowLegend);
if( xProp.is() )
{
//show
@@ -161,6 +162,11 @@ void LegendPositionResources::writeToModel( const rtl::Reference<::chart::ChartM
IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl, weld::Toggleable&, void)
{
+ PositionEnable();
+}
+
+void LegendPositionResources::PositionEnable()
+{
bool bEnable = !m_xCbxShow || m_xCbxShow->get_active();
m_xRbtLeft->set_sensitive( bEnable );
@@ -173,10 +179,9 @@ IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl, weld::Toggleable&, v
void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs )
{
- const SfxPoolItem* pPoolItem = nullptr;
- if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SfxInt32Item* pPosItem = rInAttrs.GetItemIfSet( SCHATTR_LEGEND_POS ) )
{
- chart2::LegendPosition nLegendPosition = static_cast<chart2::LegendPosition>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue());
+ chart2::LegendPosition nLegendPosition = static_cast<chart2::LegendPosition>(pPosItem->GetValue());
switch( nLegendPosition )
{
case chart2::LegendPosition_LINE_START:
@@ -196,10 +201,10 @@ void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs )
}
}
- if( m_xCbxShow && rInAttrs.GetItemState( SCHATTR_LEGEND_SHOW, true, &pPoolItem ) == SfxItemState::SET )
+ const SfxBoolItem* pShowItem;
+ if( m_xCbxShow && (pShowItem = rInAttrs.GetItemIfSet( SCHATTR_LEGEND_SHOW )) )
{
- bool bShow = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
- m_xCbxShow->set_active(bShow);
+ m_xCbxShow->set_active(pShowItem->GetValue());
}
}
diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx
index ca1fe7bcfb83..3cbba1e59a28 100644
--- a/chart2/source/controller/dialogs/res_Trendline.cxx
+++ b/chart2/source/controller/dialogs/res_Trendline.cxx
@@ -126,29 +126,27 @@ IMPL_LINK_NOARG(TrendlineResources, SelectTrendLine, weld::Toggleable&, void)
void TrendlineResources::Reset( const SfxItemSet& rInAttrs )
{
- const SfxPoolItem *pPoolItem = nullptr;
-
- if( rInAttrs.GetItemState( SCHATTR_REGRESSION_CURVE_NAME, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SfxStringItem* pCurveNameItem = rInAttrs.GetItemIfSet( SCHATTR_REGRESSION_CURVE_NAME ) )
{
- OUString aName = static_cast< const SfxStringItem* >(pPoolItem)->GetValue();
+ OUString aName = pCurveNameItem->GetValue();
m_xEE_Name->set_text(aName);
}
else
{
m_xEE_Name->set_text("");
}
- if( rInAttrs.GetItemState( SCHATTR_REGRESSION_XNAME, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SfxStringItem* pRegressionXNameItem = rInAttrs.GetItemIfSet( SCHATTR_REGRESSION_XNAME ) )
{
- OUString aName = static_cast< const SfxStringItem* >(pPoolItem)->GetValue();
+ OUString aName = pRegressionXNameItem->GetValue();
m_xEE_XName->set_text(aName);
}
else
{
m_xEE_XName->set_text("x");
}
- if( rInAttrs.GetItemState( SCHATTR_REGRESSION_YNAME, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SfxStringItem* pRegressionYNameItem = rInAttrs.GetItemIfSet( SCHATTR_REGRESSION_YNAME ) )
{
- OUString aName = static_cast< const SfxStringItem* >(pPoolItem)->GetValue();
+ OUString aName = pRegressionYNameItem->GetValue();
m_xEE_YName->set_text(aName);
}
else
@@ -156,8 +154,9 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs )
m_xEE_YName->set_text("f(x)");
}
+ const SfxPoolItem* pPoolItem = nullptr;
SfxItemState aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_TYPE, true, &pPoolItem );
- m_bTrendLineUnique = ( aState != SfxItemState::DONTCARE );
+ m_bTrendLineUnique = ( aState != SfxItemState::INVALID );
if( aState == SfxItemState::SET )
{
const SvxChartRegressItem * pItem = dynamic_cast< const SvxChartRegressItem * >( pPoolItem );
@@ -167,9 +166,9 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs )
}
}
- if( rInAttrs.GetItemState( SCHATTR_REGRESSION_DEGREE, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SfxInt32Item* pDegreeItem = rInAttrs.GetItemIfSet( SCHATTR_REGRESSION_DEGREE ) )
{
- sal_Int32 nDegree = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
+ sal_Int32 nDegree = pDegreeItem->GetValue();
m_xNF_Degree->set_value( nDegree );
}
else
@@ -179,9 +178,9 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs )
m_xNF_Degree->save_value();
- if( rInAttrs.GetItemState( SCHATTR_REGRESSION_PERIOD, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SfxInt32Item* pPeriodItem = rInAttrs.GetItemIfSet( SCHATTR_REGRESSION_PERIOD ) )
{
- sal_Int32 nPeriod = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
+ sal_Int32 nPeriod = pPeriodItem->GetValue();
m_xNF_Period->set_value( nPeriod );
}
else
@@ -192,28 +191,28 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs )
m_xNF_Period->save_value();
double nValue = 0.0;
- if( rInAttrs.GetItemState( SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SvxDoubleItem* pForwardItem = rInAttrs.GetItemIfSet( SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD ) )
{
- nValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue() ;
+ nValue = pForwardItem->GetValue() ;
}
lcl_setValue(*m_xFmtFld_ExtrapolateForward, nValue);
nValue = 0.0;
- if( rInAttrs.GetItemState( SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SvxDoubleItem* pBackwardItem = rInAttrs.GetItemIfSet( SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD ) )
{
- nValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue() ;
+ nValue = pBackwardItem->GetValue() ;
}
lcl_setValue(*m_xFmtFld_ExtrapolateBackward, nValue);
nValue = 0.0;
- if( rInAttrs.GetItemState( SCHATTR_REGRESSION_INTERCEPT_VALUE, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SvxDoubleItem* pValueItem = rInAttrs.GetItemIfSet( SCHATTR_REGRESSION_INTERCEPT_VALUE ) )
{
- nValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue() ;
+ nValue = pValueItem->GetValue() ;
}
lcl_setValue(*m_xFmtFld_InterceptValue, nValue);
aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SET_INTERCEPT, true, &pPoolItem );
- if( aState == SfxItemState::DONTCARE )
+ if( aState == SfxItemState::INVALID )
{
m_xCB_SetIntercept->set_state(TRISTATE_INDET);
}
@@ -224,7 +223,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs )
}
aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SHOW_EQUATION, true, &pPoolItem );
- if( aState == SfxItemState::DONTCARE )
+ if( aState == SfxItemState::INVALID )
{
m_xCB_ShowEquation->set_state(TRISTATE_INDET);
}
@@ -235,7 +234,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs )
}
aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SHOW_COEFF, true, &pPoolItem );
- if( aState == SfxItemState::DONTCARE )
+ if( aState == SfxItemState::INVALID )
{
m_xCB_ShowCorrelationCoeff->set_state(TRISTATE_INDET);
}
@@ -245,9 +244,9 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs )
m_xCB_ShowCorrelationCoeff->set_active( static_cast< const SfxBoolItem * >( pPoolItem )->GetValue());
}
- if( rInAttrs.GetItemState( SCHATTR_REGRESSION_MOVING_TYPE, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SfxInt32Item* pMovingTypeItem = rInAttrs.GetItemIfSet( SCHATTR_REGRESSION_MOVING_TYPE ) )
{
- sal_Int32 nMovingType = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
+ sal_Int32 nMovingType = pMovingTypeItem->GetValue();
if (nMovingType == MovingAverageType::Prior)
m_xCB_RegressionMovingType->set_active(0);
else if (nMovingType == MovingAverageType::Central)
@@ -373,10 +372,8 @@ void TrendlineResources::UpdateControlStates()
m_xFmtFld_InterceptValue->set_sensitive( bInterceptAvailable );
if( bMovingAverage )
{
- m_xCB_ShowEquation->set_state(TRISTATE_FALSE);
m_xCB_ShowCorrelationCoeff->set_state(TRISTATE_FALSE);
}
- m_xCB_ShowEquation->set_sensitive( !bMovingAverage );
m_xCB_ShowCorrelationCoeff->set_sensitive( !bMovingAverage );
m_xCB_RegressionMovingType->set_sensitive(bMovingAverage);
m_xNF_Period->set_sensitive(bMovingAverage);
@@ -429,8 +426,6 @@ void TrendlineResources::SetNbPoints( sal_Int32 nNbPoints )
IMPL_LINK_NOARG(TrendlineResources, ShowEquation, weld::Toggleable&, void)
{
- m_xEE_XName->set_sensitive(m_xCB_ShowEquation->get_active());
- m_xEE_YName->set_sensitive(m_xCB_ShowEquation->get_active());
UpdateControlStates();
}
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
index 40dd7b9cd493..adeb27a02501 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
@@ -18,16 +18,13 @@
*/
#include "tp_3D_SceneAppearance.hxx"
-#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
#include <ThreeDHelper.hxx>
#include <ControllerLockGuard.hxx>
#include <Diagram.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/drawing/ShadeMode.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -55,10 +52,10 @@ lcl_ModelProperties lcl_getPropertiesFromModel( rtl::Reference<::chart::ChartMod
lcl_ModelProperties aProps;
try
{
- rtl::Reference< ::chart::Diagram > xDiagram( ::chart::ChartModelHelper::findDiagram( xModel ) );
+ rtl::Reference< ::chart::Diagram > xDiagram( xModel->getFirstChartDiagram() );
xDiagram->getPropertyValue( "D3DSceneShadeMode" ) >>= aProps.m_aShadeMode;
::chart::ThreeDHelper::getRoundedEdgesAndObjectLines( xDiagram, aProps.m_nRoundedEdges, aProps.m_nObjectLines );
- aProps.m_eScheme = ::chart::ThreeDHelper::detectScheme( xDiagram );
+ aProps.m_eScheme = xDiagram->detectScheme();
}
catch( const uno::Exception & )
{
@@ -71,7 +68,7 @@ void lcl_setShadeModeAtModel( rtl::Reference<::chart::ChartModel> const & xModel
{
try
{
- rtl::Reference< ::chart::Diagram > xDiaProp = ::chart::ChartModelHelper::findDiagram( xModel );
+ rtl::Reference< ::chart::Diagram > xDiaProp = xModel->getFirstChartDiagram();
xDiaProp->setPropertyValue( "D3DSceneShadeMode" , uno::Any( aShadeMode ));
}
catch( const uno::Exception & )
@@ -90,9 +87,9 @@ namespace chart
#define POS_3DSCHEME_CUSTOM 2
ThreeD_SceneAppearance_TabPage::ThreeD_SceneAppearance_TabPage(weld::Container* pParent,
- const rtl::Reference<::chart::ChartModel>& xChartModel,
+ rtl::Reference<::chart::ChartModel> xChartModel,
ControllerLockHelper& rControllerLockHelper)
- : m_xChartModel(xChartModel)
+ : m_xChartModel(std::move(xChartModel))
, m_bUpdateOtherControls(true)
, m_bCommitToModel(true)
, m_rControllerLockHelper(rControllerLockHelper)
@@ -161,7 +158,7 @@ void ThreeD_SceneAppearance_TabPage::applyRoundedEdgeAndObjectLinesToModel()
// locked controllers
ControllerLockHelperGuard aGuard( m_rControllerLockHelper );
ThreeDHelper::setRoundedEdgesAndObjectLines(
- ::chart::ChartModelHelper::findDiagram( m_xChartModel ), nCurrentRoundedEdges, nObjectLines );
+ m_xChartModel->getFirstChartDiagram(), nCurrentRoundedEdges, nObjectLines );
}
void ThreeD_SceneAppearance_TabPage::applyShadeModeToModel()
@@ -272,12 +269,12 @@ IMPL_LINK_NOARG(ThreeD_SceneAppearance_TabPage, SelectSchemeHdl, weld::ComboBox&
// locked controllers
ControllerLockHelperGuard aGuard( m_rControllerLockHelper );
- rtl::Reference< Diagram > xDiagram = ::chart::ChartModelHelper::findDiagram( m_xChartModel );
+ rtl::Reference< Diagram > xDiagram = m_xChartModel->getFirstChartDiagram();
if( m_xLB_Scheme->get_active() == POS_3DSCHEME_REALISTIC )
- ThreeDHelper::setScheme( xDiagram, ThreeDLookScheme::ThreeDLookScheme_Realistic );
+ xDiagram->setScheme( ThreeDLookScheme::ThreeDLookScheme_Realistic );
else if( m_xLB_Scheme->get_active() == POS_3DSCHEME_SIMPLE )
- ThreeDHelper::setScheme( xDiagram, ThreeDLookScheme::ThreeDLookScheme_Simple );
+ xDiagram->setScheme( ThreeDLookScheme::ThreeDLookScheme_Simple );
else
{
OSL_FAIL( "Invalid Entry selected" );
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
index 9d255c076e28..41366251729f 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
@@ -32,7 +32,7 @@ class ThreeD_SceneAppearance_TabPage
public:
ThreeD_SceneAppearance_TabPage(
weld::Container* pParent,
- const rtl::Reference<::chart::ChartModel> & xChartModel,
+ rtl::Reference<::chart::ChartModel> xChartModel,
ControllerLockHelper & rControllerLockHelper );
void ActivatePage();
~ThreeD_SceneAppearance_TabPage();
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
index 3a76aa57f6dd..f368a8193a58 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
@@ -19,13 +19,15 @@
#include "tp_3D_SceneGeometry.hxx"
-#include <DiagramHelper.hxx>
+#include <Diagram.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <ThreeDHelper.hxx>
#include <ControllerLockGuard.hxx>
#include <com/sun/star/drawing/ProjectionMode.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/helpers.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
namespace chart
@@ -44,9 +46,9 @@ void lcl_SetMetricFieldLimits(weld::MetricSpinButton& rField, sal_Int64 nLimit)
}
ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage(weld::Container* pParent,
- const uno::Reference< beans::XPropertySet > & xSceneProperties,
+ rtl::Reference< ::chart::Diagram > xDiagram,
ControllerLockHelper & rControllerLockHelper)
- : m_xSceneProperties( xSceneProperties )
+ : m_xDiagram(std::move( xDiagram ))
, m_aAngleTimer("chart2 ThreeD_SceneGeometry_TabPage m_aAngleTimer")
, m_aPerspectiveTimer("chart2 ThreeD_SceneGeometry_TabPage m_aPerspectiveTimer")
, m_nXRotation(0)
@@ -66,7 +68,7 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage(weld::Container* pPar
, m_xMFPerspective(m_xBuilder->weld_metric_spin_button("MTR_FLD_PERSPECTIVE", FieldUnit::PERCENT))
{
double fXAngle, fYAngle, fZAngle;
- ThreeDHelper::getRotationAngleFromDiagram( m_xSceneProperties, fXAngle, fYAngle, fZAngle );
+ m_xDiagram->getRotationAngle( fXAngle, fYAngle, fZAngle );
fXAngle = basegfx::rad2deg(fXAngle);
fYAngle = basegfx::rad2deg(fYAngle);
@@ -97,12 +99,12 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage(weld::Container* pPar
m_xMFZRotation->connect_value_changed( aAngleEditedLink );
drawing::ProjectionMode aProjectionMode = drawing::ProjectionMode_PERSPECTIVE;
- m_xSceneProperties->getPropertyValue( "D3DScenePerspective" ) >>= aProjectionMode;
+ m_xDiagram->getPropertyValue( "D3DScenePerspective" ) >>= aProjectionMode;
m_xCbxPerspective->set_active( aProjectionMode == drawing::ProjectionMode_PERSPECTIVE );
m_xCbxPerspective->connect_toggled( LINK( this, ThreeD_SceneGeometry_TabPage, PerspectiveToggled ));
sal_Int32 nPerspectivePercentage = 20;
- m_xSceneProperties->getPropertyValue( "Perspective" ) >>= nPerspectivePercentage;
+ m_xDiagram->getPropertyValue( "Perspective" ) >>= nPerspectivePercentage;
m_xMFPerspective->set_value(nPerspectivePercentage, FieldUnit::PERCENT);
m_aPerspectiveTimer.SetTimeout(nTimeout);
@@ -111,11 +113,10 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage(weld::Container* pPar
m_xMFPerspective->set_sensitive( m_xCbxPerspective->get_active() );
//RightAngledAxes
- uno::Reference< chart2::XDiagram > xDiagram( m_xSceneProperties, uno::UNO_QUERY );
- if (ChartTypeHelper::isSupportingRightAngledAxes(DiagramHelper::getChartTypeByIndex(xDiagram, 0)))
+ if (ChartTypeHelper::isSupportingRightAngledAxes(m_xDiagram->getChartTypeByIndex(0)))
{
bool bRightAngledAxes = false;
- m_xSceneProperties->getPropertyValue( "RightAngledAxes" ) >>= bRightAngledAxes;
+ m_xDiagram->getPropertyValue( "RightAngledAxes" ) >>= bRightAngledAxes;
m_xCbxRightAngledAxes->connect_toggled( LINK( this, ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled ));
m_xCbxRightAngledAxes->set_active( bRightAngledAxes );
RightAngledAxesToggled(*m_xCbxRightAngledAxes);
@@ -157,7 +158,7 @@ void ThreeD_SceneGeometry_TabPage::applyAnglesToModel()
fYAngle = basegfx::deg2rad(fYAngle);
fZAngle = basegfx::deg2rad(fZAngle);
- ThreeDHelper::setRotationAngleToDiagram( m_xSceneProperties, fXAngle, fYAngle, fZAngle );
+ m_xDiagram->setRotationAngle( fXAngle, fYAngle, fZAngle );
m_bAngleChangePending = false;
m_aAngleTimer.Stop();
@@ -188,8 +189,8 @@ void ThreeD_SceneGeometry_TabPage::applyPerspectiveToModel()
try
{
- m_xSceneProperties->setPropertyValue( "D3DScenePerspective" , uno::Any( aMode ));
- m_xSceneProperties->setPropertyValue( "Perspective" , uno::Any( static_cast<sal_Int32>(m_xMFPerspective->get_value(FieldUnit::PERCENT)) ));
+ m_xDiagram->setPropertyValue( "D3DScenePerspective" , uno::Any( aMode ));
+ m_xDiagram->setPropertyValue( "Perspective" , uno::Any( static_cast<sal_Int32>(m_xMFPerspective->get_value(FieldUnit::PERCENT)) ));
}
catch( const uno::Exception & )
{
@@ -247,7 +248,8 @@ IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled, weld::Togg
m_xMFZRotation->set_value(m_nZRotation, FieldUnit::DEGREE);
}
- ThreeDHelper::switchRightAngledAxes( m_xSceneProperties, m_xCbxRightAngledAxes->get_active() );
+ if (m_xDiagram)
+ m_xDiagram->switchRightAngledAxes( m_xCbxRightAngledAxes->get_active() );
}
} //namespace chart
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
index ca7f75ebea0d..d0fc8a69d667 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
@@ -20,18 +20,20 @@
#include <vcl/timer.hxx>
#include <vcl/weld.hxx>
+#include <rtl/ref.hxx>
namespace com::sun::star::beans { class XPropertySet; }
namespace chart { class ControllerLockHelper; }
namespace chart
{
+class Diagram;
class ThreeD_SceneGeometry_TabPage
{
public:
ThreeD_SceneGeometry_TabPage(weld::Container* pWindow,
- const css::uno::Reference< css::beans::XPropertySet > & xSceneProperties,
+ rtl::Reference< ::chart::Diagram > xDiagram,
ControllerLockHelper & rControllerLockHelper);
~ThreeD_SceneGeometry_TabPage();
@@ -54,7 +56,7 @@ private:
void applyAnglesToModel();
void applyPerspectiveToModel();
- css::uno::Reference< css::beans::XPropertySet > m_xSceneProperties;
+ rtl::Reference< ::chart::Diagram > m_xDiagram;
Timer m_aAngleTimer;
Timer m_aPerspectiveTimer;
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index 56d2d44f9ce6..2650e56fe8a4 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -29,8 +29,9 @@
#include <svtools/colrdlg.hxx>
#include <svx/svx3ditems.hxx>
#include <svx/svddef.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -99,7 +100,7 @@ namespace
void lcl_selectColor(ColorListBox& rListBox, const Color& rColor)
{
rListBox.SetNoSelection();
- rListBox.SelectEntry(std::make_pair(rColor, lcl_makeColorName(rColor)));
+ rListBox.SelectEntry({rColor, lcl_makeColorName(rColor)});
}
::chart::LightSource lcl_getLightSourceFromProperties(
@@ -138,7 +139,7 @@ namespace
try
{
xSceneProperties->setPropertyValue( "D3DSceneLightColor" + aIndex,
- uno::makeAny( rLightSource.nDiffuseColor ));
+ uno::Any( rLightSource.nDiffuseColor ));
xSceneProperties->setPropertyValue( "D3DSceneLightDirection" + aIndex,
uno::Any( rLightSource.aDirection ));
xSceneProperties->setPropertyValue( "D3DSceneLightOn" + aIndex,
@@ -172,7 +173,7 @@ namespace
try
{
xSceneProperties->setPropertyValue("D3DSceneAmbientColor",
- uno::makeAny( rColor ));
+ uno::Any( rColor ));
}
catch( const uno::Exception & )
{
@@ -183,9 +184,9 @@ namespace
ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage(weld::Container* pParent,
weld::Window* pTopLevel,
- const uno::Reference< beans::XPropertySet > & xSceneProperties,
+ uno::Reference< beans::XPropertySet > xSceneProperties,
const rtl::Reference<::chart::ChartModel>& xChartModel)
- : m_xSceneProperties( xSceneProperties )
+ : m_xSceneProperties(std::move( xSceneProperties ))
, m_aTimerTriggeredControllerLock( xChartModel )
, m_bInCommitToModel( false )
, m_aModelChangeListener( LINK( this, ThreeD_SceneIllumination_TabPage, fillControlsFromModel ) )
@@ -193,14 +194,14 @@ ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage(weld::Contain
, m_pTopLevel(pTopLevel)
, m_xBuilder(Application::CreateBuilder(pParent, "modules/schart/ui/tp_3D_SceneIllumination.ui"))
, m_xContainer(m_xBuilder->weld_container("tp_3D_SceneIllumination"))
- , m_xBtn_Light1(new LightButton(m_xBuilder->weld_toggle_button("BTN_LIGHT_1")))
- , m_xBtn_Light2(new LightButton(m_xBuilder->weld_toggle_button("BTN_LIGHT_2")))
- , m_xBtn_Light3(new LightButton(m_xBuilder->weld_toggle_button("BTN_LIGHT_3")))
- , m_xBtn_Light4(new LightButton(m_xBuilder->weld_toggle_button("BTN_LIGHT_4")))
- , m_xBtn_Light5(new LightButton(m_xBuilder->weld_toggle_button("BTN_LIGHT_5")))
- , m_xBtn_Light6(new LightButton(m_xBuilder->weld_toggle_button("BTN_LIGHT_6")))
- , m_xBtn_Light7(new LightButton(m_xBuilder->weld_toggle_button("BTN_LIGHT_7")))
- , m_xBtn_Light8(new LightButton(m_xBuilder->weld_toggle_button("BTN_LIGHT_8")))
+ , m_aBtn_Light1(m_xBuilder->weld_toggle_button("BTN_LIGHT_1"))
+ , m_aBtn_Light2(m_xBuilder->weld_toggle_button("BTN_LIGHT_2"))
+ , m_aBtn_Light3(m_xBuilder->weld_toggle_button("BTN_LIGHT_3"))
+ , m_aBtn_Light4(m_xBuilder->weld_toggle_button("BTN_LIGHT_4"))
+ , m_aBtn_Light5(m_xBuilder->weld_toggle_button("BTN_LIGHT_5"))
+ , m_aBtn_Light6(m_xBuilder->weld_toggle_button("BTN_LIGHT_6"))
+ , m_aBtn_Light7(m_xBuilder->weld_toggle_button("BTN_LIGHT_7"))
+ , m_aBtn_Light8(m_xBuilder->weld_toggle_button("BTN_LIGHT_8"))
, m_xLB_LightSource(new ColorListBox(m_xBuilder->weld_menu_button("LB_LIGHTSOURCE"), [this]{ return m_pTopLevel; }))
, m_xBtn_LightSource_Color(m_xBuilder->weld_button("BTN_LIGHTSOURCE_COLOR"))
, m_xLB_AmbientLight(new ColorListBox(m_xBuilder->weld_menu_button("LB_AMBIENTLIGHT"), [this]{ return m_pTopLevel; }))
@@ -213,25 +214,25 @@ ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage(weld::Contain
, m_xCtl_Preview(new SvxLightCtl3D(*m_xPreview, *m_xHoriScale, *m_xVertScale, *m_xBtn_Corner))
{
m_pLightSourceInfoList.reset(new LightSourceInfo[8]);
- m_pLightSourceInfoList[0].pButton = m_xBtn_Light1.get();
- m_pLightSourceInfoList[1].pButton = m_xBtn_Light2.get();
- m_pLightSourceInfoList[2].pButton = m_xBtn_Light3.get();
- m_pLightSourceInfoList[3].pButton = m_xBtn_Light4.get();
- m_pLightSourceInfoList[4].pButton = m_xBtn_Light5.get();
- m_pLightSourceInfoList[5].pButton = m_xBtn_Light6.get();
- m_pLightSourceInfoList[6].pButton = m_xBtn_Light7.get();
- m_pLightSourceInfoList[7].pButton = m_xBtn_Light8.get();
+ m_pLightSourceInfoList[0].pButton = &m_aBtn_Light1;
+ m_pLightSourceInfoList[1].pButton = &m_aBtn_Light2;
+ m_pLightSourceInfoList[2].pButton = &m_aBtn_Light3;
+ m_pLightSourceInfoList[3].pButton = &m_aBtn_Light4;
+ m_pLightSourceInfoList[4].pButton = &m_aBtn_Light5;
+ m_pLightSourceInfoList[5].pButton = &m_aBtn_Light6;
+ m_pLightSourceInfoList[6].pButton = &m_aBtn_Light7;
+ m_pLightSourceInfoList[7].pButton = &m_aBtn_Light8;
fillControlsFromModel(nullptr);
- m_xBtn_Light1->connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
- m_xBtn_Light2->connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
- m_xBtn_Light3->connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
- m_xBtn_Light4->connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
- m_xBtn_Light5->connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
- m_xBtn_Light6->connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
- m_xBtn_Light7->connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
- m_xBtn_Light8->connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
+ m_aBtn_Light1.connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
+ m_aBtn_Light2.connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
+ m_aBtn_Light3.connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
+ m_aBtn_Light4.connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
+ m_aBtn_Light5.connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
+ m_aBtn_Light6.connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
+ m_aBtn_Light7.connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
+ m_aBtn_Light8.connect_clicked( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) );
m_xLB_AmbientLight->SetSelectHdl( LINK( this, ThreeD_SceneIllumination_TabPage, SelectColorHdl ) );
m_xLB_LightSource->SetSelectHdl( LINK( this, ThreeD_SceneIllumination_TabPage, SelectColorHdl ) );
@@ -242,13 +243,15 @@ ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage(weld::Contain
m_xCtl_Preview->SetUserInteractiveChangeCallback( LINK( this, ThreeD_SceneIllumination_TabPage, PreviewChangeHdl ) );
m_xCtl_Preview->SetUserSelectionChangeCallback( LINK( this, ThreeD_SceneIllumination_TabPage, PreviewSelectHdl ) );
- ClickLightSourceButtonHdl(*m_xBtn_Light2->get_widget());
+ ClickLightSourceButtonHdl(*m_aBtn_Light2.get_widget());
m_aModelChangeListener.startListening( uno::Reference< util::XModifyBroadcaster >(m_xSceneProperties, uno::UNO_QUERY) );
}
ThreeD_SceneIllumination_TabPage::~ThreeD_SceneIllumination_TabPage()
{
+ // drop page view before the widget it paints to is destroyed
+ m_xPreview->ClearPageView();
}
IMPL_LINK_NOARG(ThreeD_SceneIllumination_TabPage, fillControlsFromModel, void*, void)
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
index 7ad91e225d37..98a1f3273620 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
@@ -22,6 +22,7 @@
#include <TimerTriggeredControllerLock.hxx>
#include <vcl/weld.hxx>
#include <svx/dlgctl3d.hxx>
+#include <svx/float3d.hxx>
namespace com::sun::star::beans
{
@@ -29,7 +30,6 @@ class XPropertySet;
}
class ColorListBox;
-class LightButton;
namespace chart
{
@@ -39,10 +39,9 @@ class ChartModel;
class ThreeD_SceneIllumination_TabPage
{
public:
- ThreeD_SceneIllumination_TabPage(
- weld::Container* pParent, weld::Window* pTopLevel,
- const css::uno::Reference<css::beans::XPropertySet>& xSceneProperties,
- const rtl::Reference<::chart::ChartModel>& xChartModel);
+ ThreeD_SceneIllumination_TabPage(weld::Container* pParent, weld::Window* pTopLevel,
+ css::uno::Reference<css::beans::XPropertySet> xSceneProperties,
+ const rtl::Reference<::chart::ChartModel>& xChartModel);
~ThreeD_SceneIllumination_TabPage();
private:
@@ -74,14 +73,14 @@ private:
weld::Window* m_pTopLevel;
std::unique_ptr<weld::Builder> m_xBuilder;
std::unique_ptr<weld::Container> m_xContainer;
- std::unique_ptr<LightButton> m_xBtn_Light1;
- std::unique_ptr<LightButton> m_xBtn_Light2;
- std::unique_ptr<LightButton> m_xBtn_Light3;
- std::unique_ptr<LightButton> m_xBtn_Light4;
- std::unique_ptr<LightButton> m_xBtn_Light5;
- std::unique_ptr<LightButton> m_xBtn_Light6;
- std::unique_ptr<LightButton> m_xBtn_Light7;
- std::unique_ptr<LightButton> m_xBtn_Light8;
+ LightButton m_aBtn_Light1;
+ LightButton m_aBtn_Light2;
+ LightButton m_aBtn_Light3;
+ LightButton m_aBtn_Light4;
+ LightButton m_aBtn_Light5;
+ LightButton m_aBtn_Light6;
+ LightButton m_aBtn_Light7;
+ LightButton m_aBtn_Light8;
std::unique_ptr<ColorListBox> m_xLB_LightSource;
std::unique_ptr<weld::Button> m_xBtn_LightSource_Color;
std::unique_ptr<ColorListBox> m_xLB_AmbientLight;
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index 1ee392238141..79976618341c 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -48,12 +48,11 @@ SchAxisLabelTabPage::SchAxisLabelTabPage(weld::Container* pPage, weld::DialogCon
, m_xCbTextOverlap(m_xBuilder->weld_check_button("overlapCB"))
, m_xCbTextBreak(m_xBuilder->weld_check_button("breakCB"))
, m_xFtABCD(m_xBuilder->weld_label("labelABCD"))
- , m_xFlOrient(m_xBuilder->weld_label("labelTextOrient"))
, m_xFtRotate(m_xBuilder->weld_label("degreeL"))
, m_xNfRotate(m_xBuilder->weld_metric_spin_button("OrientDegree", FieldUnit::DEGREE))
, m_xCbStacked(m_xBuilder->weld_check_button("stackedCB"))
, m_xFtTextDirection(m_xBuilder->weld_label("textdirL"))
- , m_xLbTextDirection(new TextDirectionListBox(m_xBuilder->weld_combo_box("textdirLB")))
+ , m_aLbTextDirection(m_xBuilder->weld_combo_box("textdirLB"))
, m_xCtrlDial(new svx::DialControl)
, m_xCtrlDialWin(new weld::CustomWeld(*m_xBuilder, "dialCtrl", *m_xCtrlDial))
{
@@ -72,7 +71,6 @@ SchAxisLabelTabPage::~SchAxisLabelTabPage()
{
m_xCtrlDialWin.reset();
m_xCtrlDial.reset();
- m_xLbTextDirection.reset();
}
std::unique_ptr<SfxTabPage> SchAxisLabelTabPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrs)
@@ -124,8 +122,8 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs )
if( m_xCbShowDescription->get_state() != TRISTATE_INDET )
rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, m_xCbShowDescription->get_active() ) );
- if (m_xLbTextDirection->get_active() != -1)
- rOutAttrs->Put( SvxFrameDirectionItem( m_xLbTextDirection->get_active_id(), EE_PARA_WRITINGDIR ) );
+ if (m_aLbTextDirection.get_active() != -1)
+ rOutAttrs->Put( SvxFrameDirectionItem( m_aLbTextDirection.get_active_id(), EE_PARA_WRITINGDIR ) );
return true;
}
@@ -136,7 +134,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
// show description
SfxItemState aState = rInAttrs->GetItemState( SCHATTR_AXIS_SHOWDESCR, false, &pPoolItem );
- if( aState == SfxItemState::DONTCARE )
+ if( aState == SfxItemState::INVALID )
{
m_xCbShowDescription->set_state( TRISTATE_INDET );
}
@@ -159,7 +157,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
if( aState == SfxItemState::SET )
m_nInitialDegrees = static_cast< const SdrAngleItem * >( pPoolItem )->GetValue();
- m_bHasInitialDegrees = aState != SfxItemState::DONTCARE;
+ m_bHasInitialDegrees = aState != SfxItemState::INVALID;
if( m_bHasInitialDegrees )
m_xCtrlDial->SetRotation( m_nInitialDegrees );
else
@@ -171,19 +169,19 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
if( aState == SfxItemState::SET )
m_bInitialStacking = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
- m_bHasInitialStacking = aState != SfxItemState::DONTCARE;
+ m_bHasInitialStacking = aState != SfxItemState::INVALID;
if( m_bHasInitialDegrees )
m_xCbStacked->set_state(m_bInitialStacking ? TRISTATE_TRUE : TRISTATE_FALSE);
else
m_xCbStacked->set_state(TRISTATE_INDET);
StackedToggleHdl(*m_xCbStacked);
- if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
- m_xLbTextDirection->set_active_id( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() );
+ if( const SvxFrameDirectionItem* pDirectionItem = rInAttrs->GetItemIfSet( EE_PARA_WRITINGDIR ) )
+ m_aLbTextDirection.set_active_id( pDirectionItem->GetValue() );
// Text overlap ----------
aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_OVERLAP, false, &pPoolItem );
- if( aState == SfxItemState::DONTCARE )
+ if( aState == SfxItemState::INVALID )
{
m_xCbTextOverlap->set_state( TRISTATE_INDET );
}
@@ -200,7 +198,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
// text break ----------
aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_BREAK, false, &pPoolItem );
- if( aState == SfxItemState::DONTCARE )
+ if( aState == SfxItemState::INVALID )
{
m_xCbTextBreak->set_state( TRISTATE_INDET );
}
@@ -222,10 +220,9 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
// text order ----------
if( m_bShowStaggeringControls )
{
- aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_ORDER, false, &pPoolItem );
- if( aState == SfxItemState::SET )
+ if( const SvxChartTextOrderItem* pOrderItem = rInAttrs->GetItemIfSet( SCHATTR_AXIS_LABEL_ORDER, false ) )
{
- SvxChartTextOrder eOrder = static_cast< const SvxChartTextOrderItem * >( pPoolItem )->GetValue();
+ SvxChartTextOrder eOrder = pOrderItem->GetValue();
switch( eOrder )
{
@@ -296,7 +293,7 @@ IMPL_LINK_NOARG(SchAxisLabelTabPage, ToggleShowLabel, weld::Toggleable&, void)
m_xCbTextBreak->set_sensitive( bEnable );
m_xFtTextDirection->set_sensitive( bEnable );
- m_xLbTextDirection->set_sensitive( bEnable );
+ m_aLbTextDirection.set_sensitive( bEnable );
}
} //namespace chart
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
index a94a030fe9a1..75704ec4e4d5 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
@@ -21,8 +21,8 @@
#include <sfx2/tabdlg.hxx>
#include <svx/dialcontrol.hxx>
#include <tools/degree.hxx>
+#include <TextDirectionListBox.hxx>
-namespace chart { class TextDirectionListBox; }
namespace weld {
class CheckButton;
class CustomWeld;
@@ -56,12 +56,11 @@ private:
std::unique_ptr<weld::CheckButton> m_xCbTextOverlap;
std::unique_ptr<weld::CheckButton> m_xCbTextBreak;
std::unique_ptr<weld::Label> m_xFtABCD;
- std::unique_ptr<weld::Label> m_xFlOrient;
std::unique_ptr<weld::Label> m_xFtRotate;
std::unique_ptr<weld::MetricSpinButton> m_xNfRotate;
std::unique_ptr<weld::CheckButton> m_xCbStacked;
std::unique_ptr<weld::Label> m_xFtTextDirection;
- std::unique_ptr<TextDirectionListBox> m_xLbTextDirection;
+ TextDirectionListBox m_aLbTextDirection;
std::unique_ptr<svx::DialControl> m_xCtrlDial;
std::unique_ptr<weld::CustomWeld> m_xCtrlDialWin;
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index 6812e9f94818..2e3988267c77 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -42,13 +42,11 @@ AxisPositionsTabPage::AxisPositionsTabPage(weld::Container* pPage, weld::DialogC
, m_xLB_CrossesAt(m_xBuilder->weld_combo_box("LB_CROSSES_OTHER_AXIS_AT"))
, m_xED_CrossesAt(m_xBuilder->weld_formatted_spin_button("EDT_CROSSES_OTHER_AXIS_AT"))
, m_xED_CrossesAtCategory(m_xBuilder->weld_combo_box( "EDT_CROSSES_OTHER_AXIS_AT_CATEGORY"))
- , m_xCB_AxisBetweenCategories(m_xBuilder->weld_check_button("CB_AXIS_BETWEEN_CATEGORIES"))
, m_xFL_Position(m_xBuilder->weld_frame("FL_POSITION"))
, m_xRB_On(m_xBuilder->weld_radio_button("RB_ON"))
, m_xRB_Between(m_xBuilder->weld_radio_button("RB_BETWEEN"))
, m_xFL_Labels(m_xBuilder->weld_frame("FL_LABELS"))
, m_xLB_PlaceLabels(m_xBuilder->weld_combo_box("LB_PLACE_LABELS"))
- , m_xED_LabelDistance(m_xBuilder->weld_formatted_spin_button("EDT_AXIS_LABEL_DISTANCE"))
, m_xCB_TicksInner(m_xBuilder->weld_check_button("CB_TICKS_INNER"))
, m_xCB_TicksOuter(m_xBuilder->weld_check_button("CB_TICKS_OUTER"))
, m_xCB_MinorInner(m_xBuilder->weld_check_button("CB_MINOR_INNER"))
@@ -100,8 +98,8 @@ bool AxisPositionsTabPage::FillItemSet(SfxItemSet* rOutAttrs)
rOutAttrs->Put( SfxInt32Item( SCHATTR_AXIS_LABEL_POSITION, nLabelPos ));
// tick marks
- tools::Long nTicks=0;
- tools::Long nMinorTicks=0;
+ sal_Int32 nTicks=0;
+ sal_Int32 nMinorTicks=0;
if(m_xCB_MinorInner->get_active())
nMinorTicks|=CHAXIS_MARK_INNER;
@@ -129,7 +127,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs)
m_xED_CrossesAtCategory->set_visible( m_bCrossingAxisIsCategoryAxis );
if (m_bCrossingAxisIsCategoryAxis)
{
- for( auto const & cat : std::as_const(m_aCategories) )
+ for (auto const& cat : m_aCategories)
m_xED_CrossesAtCategory->append_text(cat);
}
@@ -142,13 +140,12 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs)
}
//fill controls
- const SfxPoolItem *pPoolItem = nullptr;
//axis line
- if(rInAttrs->GetItemState(SCHATTR_AXIS_POSITION,true, &pPoolItem)== SfxItemState::SET)
+ if(SfxInt32Item const * pPositionItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_POSITION))
{
bool bZero = false;
- sal_Int32 nPos = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
+ sal_Int32 nPos = pPositionItem->GetValue();
if(nPos==0)
{
//switch to value
@@ -162,11 +159,12 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs)
m_xLB_CrossesAt->set_active( nPos );
CrossesAtSelectHdl( *m_xLB_CrossesAt );
- if( rInAttrs->GetItemState(SCHATTR_AXIS_POSITION_VALUE,true, &pPoolItem)== SfxItemState::SET || bZero )
+ const SvxDoubleItem* pPosValueItem;
+ if( (pPosValueItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_POSITION_VALUE)) || bZero )
{
double fCrossover = 0.0;
if( !bZero )
- fCrossover = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
+ fCrossover = pPosValueItem->GetValue();
if( m_bCrossingAxisIsCategoryAxis )
m_xED_CrossesAtCategory->set_active( static_cast<sal_uInt16>(::rtl::math::round(fCrossover-1.0)) );
else
@@ -188,9 +186,10 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs)
}
// shifted category position
- if (m_bSupportCategoryPositioning && rInAttrs->GetItemState(SCHATTR_AXIS_SHIFTED_CATEGORY_POSITION, true, &pPoolItem) == SfxItemState::SET)
+ const SfxBoolItem* pCatPosItem;
+ if (m_bSupportCategoryPositioning && (pCatPosItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_SHIFTED_CATEGORY_POSITION)))
{
- if (static_cast<const SfxBoolItem*>(pPoolItem)->GetValue())
+ if (pCatPosItem->GetValue())
m_xRB_Between->set_active(true);
else
m_xRB_On->set_active(true);
@@ -199,9 +198,9 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs)
m_xFL_Position->hide();
// Labels
- if( rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_POSITION, false, &pPoolItem ) == SfxItemState::SET )
+ if( const SfxInt32Item* pLabelPosItem = rInAttrs->GetItemIfSet( SCHATTR_AXIS_LABEL_POSITION, false) )
{
- sal_Int32 nPos = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
+ sal_Int32 nPos = pLabelPosItem->GetValue();
if( nPos < m_xLB_PlaceLabels->get_count() )
m_xLB_PlaceLabels->set_active( nPos );
}
@@ -211,10 +210,10 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs)
// Tick marks
tools::Long nTicks = 0, nMinorTicks = 0;
- if (rInAttrs->GetItemState(SCHATTR_AXIS_TICKS,true, &pPoolItem)== SfxItemState::SET)
- nTicks = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
- if (rInAttrs->GetItemState(SCHATTR_AXIS_HELPTICKS,true, &pPoolItem)== SfxItemState::SET)
- nMinorTicks = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
+ if (const SfxInt32Item* pTicksItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_TICKS))
+ nTicks = pTicksItem->GetValue();
+ if (const SfxInt32Item* pHelpTicksItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_HELPTICKS))
+ nMinorTicks = pHelpTicksItem->GetValue();
m_xCB_TicksInner->set_active(bool(nTicks&CHAXIS_MARK_INNER));
m_xCB_TicksOuter->set_active(bool(nTicks&CHAXIS_MARK_OUTER));
@@ -222,9 +221,9 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs)
m_xCB_MinorOuter->set_active(bool(nMinorTicks&CHAXIS_MARK_OUTER));
// Tick position
- if( rInAttrs->GetItemState( SCHATTR_AXIS_MARK_POSITION, false, &pPoolItem ) == SfxItemState::SET )
+ if( const SfxInt32Item* pMarkPosItem = rInAttrs->GetItemIfSet( SCHATTR_AXIS_MARK_POSITION, false) )
{
- sal_Int32 nPos = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
+ sal_Int32 nPos = pMarkPosItem->GetValue();
if( nPos < m_xLB_PlaceTicks->get_count() )
m_xLB_PlaceTicks->set_active( nPos );
}
@@ -261,10 +260,9 @@ void AxisPositionsTabPage::SetNumFormatter( SvNumberFormatter* pFormatter )
rCrossFormatter.SetFormatter(m_pNumFormatter);
rCrossFormatter.UseInputStringForFormatting();
- const SfxPoolItem *pPoolItem = nullptr;
- if( GetItemSet().GetItemState( SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SfxUInt32Item* pNumFormatItem = GetItemSet().GetItemIfSet(SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT) )
{
- sal_uLong nFmt = static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
+ sal_uInt32 nFmt = pNumFormatItem->GetValue();
rCrossFormatter.SetFormatKey(nFmt);
}
}
@@ -297,7 +295,7 @@ IMPL_LINK_NOARG(AxisPositionsTabPage, CrossesAtSelectHdl, weld::ComboBox&, void)
if (m_xED_CrossesAt->get_text().isEmpty())
m_xED_CrossesAt->GetFormatter().SetValue(0.0);
- if (m_xED_CrossesAtCategory->get_active() == -1)
+ if (m_xED_CrossesAtCategory->get_active() == -1 && m_xED_CrossesAtCategory->get_count())
m_xED_CrossesAtCategory->set_active(0);
PlaceLabelsSelectHdl(*m_xLB_PlaceLabels);
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.hxx b/chart2/source/controller/dialogs/tp_AxisPositions.hxx
index d7f18242dd42..86f749a26850 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.hxx
@@ -60,7 +60,6 @@ private: //member:
std::unique_ptr<weld::ComboBox> m_xLB_CrossesAt;
std::unique_ptr<weld::FormattedSpinButton> m_xED_CrossesAt;
std::unique_ptr<weld::ComboBox> m_xED_CrossesAtCategory;
- std::unique_ptr<weld::CheckButton> m_xCB_AxisBetweenCategories;
std::unique_ptr<weld::Frame> m_xFL_Position;
std::unique_ptr<weld::RadioButton> m_xRB_On;
@@ -68,7 +67,6 @@ private: //member:
std::unique_ptr<weld::Frame> m_xFL_Labels;
std::unique_ptr<weld::ComboBox> m_xLB_PlaceLabels;
- std::unique_ptr<weld::FormattedSpinButton> m_xED_LabelDistance;
std::unique_ptr<weld::CheckButton> m_xCB_TicksInner;
std::unique_ptr<weld::CheckButton> m_xCB_TicksOuter;
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index f5eec8625bc7..b301a9794d5d 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -22,27 +22,24 @@
#include <ChartTypeManager.hxx>
#include <strings.hrc>
#include <ResId.hxx>
-#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
#include <ChartTypeTemplate.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
#include <unonames.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <svtools/valueset.hxx>
+#include <utility>
#include <vcl/weld.hxx>
#include <vcl/outdev.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
-ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogController* pController, const rtl::Reference<::chart::ChartModel>& xChartModel,
+ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogController* pController, rtl::Reference<::chart::ChartModel> xChartModel,
bool bShowDescription)
: OWizardPage(pPage, pController, "modules/schart/ui/tp_ChartType.ui", "tp_ChartType")
, m_pDim3DLookResourceGroup( new Dim3DLookResourceGroup(m_xBuilder.get()) )
@@ -50,7 +47,7 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle
, m_pSplineResourceGroup( new SplineResourceGroup(m_xBuilder.get(), pController->getDialog()) )
, m_pGeometryResourceGroup( new GeometryResourceGroup(m_xBuilder.get()) )
, m_pSortByXValuesResourceGroup( new SortByXValuesResourceGroup(m_xBuilder.get()) )
- , m_xChartModel( xChartModel )
+ , m_xChartModel(std::move( xChartModel ))
, m_aChartTypeDialogControllerList(0)
, m_pCurrentMainType(nullptr)
, m_nChangingCalls(0)
@@ -79,7 +76,7 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle
m_xSubTypeList->SetStyle(m_xSubTypeList->GetStyle() |
WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_FLATVALUESET | WB_3DLOOK );
- m_xSubTypeList->SetColCount(4);
+ m_xSubTypeList->SetColCount(6);
m_xSubTypeList->SetLineCount(1);
bool bEnableComplexChartTypes = true;
@@ -181,9 +178,9 @@ void ChartTypeTabPage::stateChanged()
commitToModel( aParameter );
//detect the new ThreeDLookScheme
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram(m_xChartModel);
+ rtl::Reference< Diagram > xDiagram = m_xChartModel->getFirstChartDiagram();
// tdf#124295 - select always a 3D scheme
- if (ThreeDLookScheme aThreeDLookScheme = ThreeDHelper::detectScheme(xDiagram);
+ if (ThreeDLookScheme aThreeDLookScheme = xDiagram->detectScheme();
aThreeDLookScheme != ThreeDLookScheme::ThreeDLookScheme_Unknown)
aParameter.eThreeDLookScheme = aThreeDLookScheme;
@@ -246,15 +243,18 @@ void ChartTypeTabPage::selectMainType()
m_pCurrentMainType->adjustParameterToMainType( aParameter );
commitToModel( aParameter );
//detect the new ThreeDLookScheme
- aParameter.eThreeDLookScheme = ThreeDHelper::detectScheme( ChartModelHelper::findDiagram( m_xChartModel ) );
+ aParameter.eThreeDLookScheme = ThreeDLookScheme::ThreeDLookScheme_Unknown;
+ rtl::Reference< Diagram > xDiagram = m_xChartModel->getFirstChartDiagram();
+ if (xDiagram)
+ aParameter.eThreeDLookScheme = m_xChartModel->getFirstChartDiagram()->detectScheme();
if (!aParameter.b3DLook
&& aParameter.eThreeDLookScheme != ThreeDLookScheme::ThreeDLookScheme_Realistic)
aParameter.eThreeDLookScheme = ThreeDLookScheme::ThreeDLookScheme_Realistic;
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram(m_xChartModel);
try
{
- xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
+ if (xDiagram)
+ xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
}
catch ( const uno::Exception& )
{
@@ -305,9 +305,10 @@ void ChartTypeTabPage::initializePage()
if( !m_xChartModel.is() )
return;
rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = m_xChartModel->getTypeManager();
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( m_xChartModel );
- DiagramHelper::tTemplateWithServiceName aTemplate =
- DiagramHelper::getTemplateForDiagram( xDiagram, xChartTypeManager );
+ rtl::Reference< Diagram > xDiagram = m_xChartModel->getFirstChartDiagram();
+ Diagram::tTemplateWithServiceName aTemplate;
+ if (xDiagram)
+ aTemplate = xDiagram->getTemplate( xChartTypeManager );
OUString aServiceName( aTemplate.sServiceName );
bool bFound = false;
@@ -326,7 +327,7 @@ void ChartTypeTabPage::initializePage()
m_pCurrentMainType = getSelectedMainType();
//set ThreeDLookScheme
- aParameter.eThreeDLookScheme = ThreeDHelper::detectScheme( xDiagram );
+ aParameter.eThreeDLookScheme = xDiagram->detectScheme();
if (!aParameter.b3DLook
&& aParameter.eThreeDLookScheme != ThreeDLookScheme::ThreeDLookScheme_Realistic)
aParameter.eThreeDLookScheme = ThreeDLookScheme::ThreeDLookScheme_Realistic;
diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx
index 34ed8abf2327..c01b599f58d5 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.hxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.hxx
@@ -45,7 +45,7 @@ class ChartTypeTabPage final : public ResourceChangeListener, public vcl::OWizar
{
public:
ChartTypeTabPage( weld::Container* pPage, weld::DialogController* pController
- , const rtl::Reference<::chart::ChartModel>& xChartModel
+ , rtl::Reference<::chart::ChartModel> xChartModel
, bool bShowDescription = true );
virtual ~ChartTypeTabPage() override;
diff --git a/chart2/source/controller/dialogs/tp_DataPointOption.cxx b/chart2/source/controller/dialogs/tp_DataPointOption.cxx
index 7fb9f230ed7e..4c824287206c 100644
--- a/chart2/source/controller/dialogs/tp_DataPointOption.cxx
+++ b/chart2/source/controller/dialogs/tp_DataPointOption.cxx
@@ -53,12 +53,10 @@ bool DataPointOptionTabPage::FillItemSet(SfxItemSet* rOutAttrs)
void DataPointOptionTabPage::Reset(const SfxItemSet* rInAttrs)
{
- const SfxPoolItem* pPoolItem = nullptr;
-
- if (rInAttrs->GetItemState(SCHATTR_HIDE_DATA_POINT_LEGEND_ENTRY, true, &pPoolItem)
- == SfxItemState::SET)
+ if (const SfxBoolItem* pEntryItem
+ = rInAttrs->GetItemIfSet(SCHATTR_HIDE_DATA_POINT_LEGEND_ENTRY))
{
- bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
+ bool bVal = pEntryItem->GetValue();
m_xCBHideLegendEntry->set_active(bVal);
}
}
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 45c00bfefb4c..fe4ba0981599 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -20,36 +20,32 @@
#include "tp_DataSource.hxx"
#include <strings.hrc>
#include <ResId.hxx>
+#include <ChartType.hxx>
#include <ChartTypeTemplateProvider.hxx>
#include <ChartTypeTemplate.hxx>
#include <ChartModel.hxx>
#include <RangeSelectionHelper.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <ControllerLockGuard.hxx>
#include <DataSourceHelper.hxx>
+#include <LabeledDataSequence.hxx>
#include "DialogModel.hxx"
#include <o3tl/safeint.hxx>
#include <TabPageNotifiable.hxx>
-#include <com/sun/star/chart2/XChartType.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/util/XModifiable.hpp>
-#include <com/sun/star/chart2/data/XDataSink.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
namespace
{
-constexpr OUStringLiteral lcl_aLabelRole( u"label" );
+constexpr OUString lcl_aLabelRole( u"label"_ustr );
void lcl_UpdateCurrentRange(weld::TreeView& rOutListBox, const OUString & rRole,
const OUString& rRange)
@@ -59,7 +55,7 @@ void lcl_UpdateCurrentRange(weld::TreeView& rOutListBox, const OUString & rRole,
{
rOutListBox.set_text(nEntry, ::chart::DialogModel::ConvertRoleFromInternalToUI(rRole), 0);
rOutListBox.set_text(nEntry, rRange, 1);
- ::chart::SeriesEntry* pEntry = reinterpret_cast<::chart::SeriesEntry*>(rOutListBox.get_id(nEntry).toInt64());
+ ::chart::SeriesEntry* pEntry = weld::fromId<::chart::SeriesEntry*>(rOutListBox.get_id(nEntry));
pEntry->m_sRole = rRole;
}
}
@@ -71,11 +67,10 @@ bool lcl_UpdateCurrentSeriesName(weld::TreeView& rOutListBox)
return false;
bool bResult = false;
- ::chart::SeriesEntry * pEntry = reinterpret_cast<::chart::SeriesEntry*>(rOutListBox.get_id(nEntry).toInt64());
+ ::chart::SeriesEntry * pEntry = weld::fromId<::chart::SeriesEntry*>(rOutListBox.get_id(nEntry));
if (pEntry->m_xDataSeries.is() && pEntry->m_xChartType.is())
{
- OUString aLabel(::chart::DataSeriesHelper::getDataSeriesLabel(
- pEntry->m_xDataSeries,
+ OUString aLabel(pEntry->m_xDataSeries->getLabelForRole(
pEntry->m_xChartType->getRoleOfSequenceForSeriesLabel()));
if (!aLabel.isEmpty())
{
@@ -93,7 +88,7 @@ OUString lcl_GetSelectedRole(const weld::TreeView& rRoleListBox, bool bUITransla
{
if (bUITranslated)
return rRoleListBox.get_text(nEntry);
- ::chart::SeriesEntry* pEntry = reinterpret_cast<::chart::SeriesEntry*>(rRoleListBox.get_id(nEntry).toInt64());
+ ::chart::SeriesEntry* pEntry = weld::fromId<::chart::SeriesEntry*>(rRoleListBox.get_id(nEntry));
return pEntry->m_sRole;
}
return OUString();
@@ -126,32 +121,29 @@ void lcl_enableRangeChoosing(bool bEnable, weld::DialogController* pDialog)
}
void lcl_addLSequenceToDataSource(
- const Reference< chart2::data::XLabeledDataSequence > & xLSequence,
- const Reference< chart2::data::XDataSource > & xSource )
+ const uno::Reference< chart2::data::XLabeledDataSequence > & xLSequence,
+ const Reference< ::chart::DataSeries > & xSource )
{
- Reference< data::XDataSink > xSink( xSource, uno::UNO_QUERY );
- if( xSink.is())
+ if( xSource.is())
{
- Sequence< Reference< chart2::data::XLabeledDataSequence > > aData( xSource->getDataSequences());
- aData.realloc( aData.getLength() + 1 );
- aData.getArray()[ aData.getLength() - 1 ] = xLSequence;
- xSink->setData( aData );
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData = xSource->getDataSequences2();
+ aData.push_back( xLSequence );
+ xSource->setData( aData );
}
}
-Reference< chart2::data::XLabeledDataSequence > lcl_findLSequenceWithOnlyLabel(
- const Reference< chart2::data::XDataSource > & xDataSource )
+uno::Reference< chart2::data::XLabeledDataSequence > lcl_findLSequenceWithOnlyLabel(
+ const rtl::Reference< ::chart::DataSeries > & xDataSource )
{
- Reference< chart2::data::XLabeledDataSequence > xResult;
- const Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences( xDataSource->getDataSequences());
+ uno::Reference< chart2::data::XLabeledDataSequence > xResult;
- for( Reference< chart2::data::XLabeledDataSequence > const & labeledDataSeq : aSequences )
+ for( uno::Reference< chart2::data::XLabeledDataSequence > const & labeledDataSeq : xDataSource->getDataSequences2() )
{
// no values are set but a label exists
if( ! labeledDataSeq->getValues().is() &&
labeledDataSeq->getLabel().is())
{
- xResult.set( labeledDataSeq );
+ xResult = labeledDataSeq;
break;
}
}
@@ -233,7 +225,7 @@ void DataSourceTabPage::InsertRoleLBEntry(const OUString& rRole, const OUString&
m_aEntries.emplace_back(new SeriesEntry);
SeriesEntry* pEntry = m_aEntries.back().get();
pEntry->m_sRole = rRole;
- m_xLB_ROLE->append(OUString::number(reinterpret_cast<sal_Int64>(pEntry)),
+ m_xLB_ROLE->append(weld::toId(pEntry),
::chart::DialogModel::ConvertRoleFromInternalToUI(rRole));
m_xLB_ROLE->set_text(m_xLB_ROLE->n_children() - 1, rRange, 1);
}
@@ -327,13 +319,13 @@ void DataSourceTabPage::updateControlsFromDialogModel()
void DataSourceTabPage::fillSeriesListBox()
{
- Reference< XDataSeries > xSelected;
+ rtl::Reference< DataSeries > xSelected;
SeriesEntry* pEntry = nullptr;
int nEntry = m_xLB_SERIES->get_selected_index();
if (nEntry != -1)
{
- pEntry = reinterpret_cast<SeriesEntry*>(m_xLB_SERIES->get_id(nEntry).toInt64());
- xSelected.set(pEntry->m_xDataSeries);
+ pEntry = weld::fromId<SeriesEntry*>(m_xLB_SERIES->get_id(nEntry));
+ xSelected = pEntry->m_xDataSeries;
}
bool bHasSelectedEntry = (pEntry != nullptr);
@@ -357,7 +349,7 @@ void DataSourceTabPage::fillSeriesListBox()
OUString aResString(::chart::SchResId( STR_DATA_UNNAMED_SERIES_WITH_INDEX ));
// replace index of unnamed series
- static const OUStringLiteral aReplacementStr( u"%NUMBER" );
+ static constexpr OUString aReplacementStr( u"%NUMBER"_ustr );
sal_Int32 nIndex = aResString.indexOf( aReplacementStr );
if( nIndex != -1 )
aLabel = aResString.replaceAt(
@@ -372,9 +364,9 @@ void DataSourceTabPage::fillSeriesListBox()
m_aEntries.emplace_back(new SeriesEntry);
pEntry = m_aEntries.back().get();
- pEntry->m_xDataSeries.set(series.second.first);
- pEntry->m_xChartType.set(series.second.second);
- m_xLB_SERIES->append(OUString::number(reinterpret_cast<sal_Int64>(pEntry)), aLabel);
+ pEntry->m_xDataSeries = series.second.first;
+ pEntry->m_xChartType = series.second.second;
+ m_xLB_SERIES->append(weld::toId(pEntry), aLabel);
if (bHasSelectedEntry && series.second.first == xSelected)
nSelectedEntry = nEntry;
++nEntry;
@@ -391,7 +383,7 @@ void DataSourceTabPage::fillRoleListBox()
int nSeriesEntry = m_xLB_SERIES->get_selected_index();
SeriesEntry* pSeriesEntry = nullptr;
if (nSeriesEntry != -1)
- pSeriesEntry = reinterpret_cast<SeriesEntry*>(m_xLB_SERIES->get_id(nSeriesEntry).toInt64());
+ pSeriesEntry = weld::fromId<SeriesEntry*>(m_xLB_SERIES->get_id(nSeriesEntry));
bool bHasSelectedEntry = (pSeriesEntry != nullptr);
int nRoleIndex = m_xLB_ROLE->get_selected_index();
@@ -487,7 +479,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, RoleSelectionChangedHdl, weld::TreeView&, voi
OUString aSelectedRange = lcl_GetSelectedRolesRange( *m_xLB_ROLE );
// replace role in fixed text label
- static const OUStringLiteral aReplacementStr( u"%VALUETYPE" );
+ static constexpr OUString aReplacementStr( u"%VALUETYPE"_ustr );
sal_Int32 nIndex = m_aFixedTextRange.indexOf( aReplacementStr );
if( nIndex != -1 )
{
@@ -559,23 +551,23 @@ IMPL_LINK_NOARG(DataSourceTabPage, AddButtonClickedHdl, weld::Button&, void)
{
m_rDialogModel.startControllerLockTimer();
int nEntry = m_xLB_SERIES->get_selected_index();
- Reference< XDataSeries > xSeriesToInsertAfter;
- Reference< XChartType > xChartTypeForNewSeries;
+ rtl::Reference< DataSeries > xSeriesToInsertAfter;
+ rtl::Reference< ChartType > xChartTypeForNewSeries;
if( m_pTemplateProvider )
m_rDialogModel.setTemplate( m_pTemplateProvider->getCurrentTemplate());
if (nEntry != -1)
{
- ::chart::SeriesEntry* pEntry = reinterpret_cast<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(nEntry).toInt64());
- xSeriesToInsertAfter.set(pEntry->m_xDataSeries);
- xChartTypeForNewSeries.set(pEntry->m_xChartType);
+ ::chart::SeriesEntry* pEntry = weld::fromId<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(nEntry));
+ xSeriesToInsertAfter = pEntry->m_xDataSeries;
+ xChartTypeForNewSeries = pEntry->m_xChartType;
}
else
{
- std::vector< Reference< XDataSeriesContainer > > aCntVec(
+ std::vector< rtl::Reference< ChartType > > aCntVec(
m_rDialogModel.getAllDataSeriesContainers());
if( ! aCntVec.empty())
- xChartTypeForNewSeries.set( aCntVec.front(), uno::UNO_QUERY );
+ xChartTypeForNewSeries = aCntVec.front();
}
OSL_ENSURE( xChartTypeForNewSeries.is(), "Cannot insert new series" );
@@ -602,15 +594,15 @@ IMPL_LINK_NOARG(DataSourceTabPage, RemoveButtonClickedHdl, weld::Button&, void)
if (nEntry == -1)
return;
- SeriesEntry* pEntry = reinterpret_cast<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(nEntry).toInt64());
- Reference< XDataSeries > xNewSelSeries;
+ SeriesEntry* pEntry = weld::fromId<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(nEntry));
+ rtl::Reference< DataSeries > xNewSelSeries;
SeriesEntry * pNewSelEntry = nullptr;
if (nEntry + 1 < m_xLB_SERIES->n_children())
- pNewSelEntry = reinterpret_cast<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(nEntry + 1).toInt64());
+ pNewSelEntry = weld::fromId<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(nEntry + 1));
else if (nEntry > 0)
- pNewSelEntry = reinterpret_cast<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(nEntry - 1).toInt64());
+ pNewSelEntry = weld::fromId<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(nEntry - 1));
if (pNewSelEntry)
- xNewSelSeries.set(pNewSelEntry->m_xDataSeries);
+ xNewSelSeries = pNewSelEntry->m_xDataSeries;
m_rDialogModel.deleteSeries( pEntry->m_xDataSeries, pEntry->m_xChartType );
setDirty();
@@ -623,7 +615,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, RemoveButtonClickedHdl, weld::Button&, void)
{
for (int i = 0; i < m_xLB_SERIES->n_children(); ++i)
{
- pEntry = reinterpret_cast<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(i).toInt64());
+ pEntry = weld::fromId<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(i));
if (pEntry->m_xDataSeries == xNewSelSeries)
{
m_xLB_SERIES->select(i);
@@ -641,7 +633,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, UpButtonClickedHdl, weld::Button&, void)
int nEntry = m_xLB_SERIES->get_selected_index();
SeriesEntry* pEntry = nullptr;
if (nEntry != -1)
- pEntry = reinterpret_cast<SeriesEntry*>(m_xLB_SERIES->get_id(nEntry).toInt64());
+ pEntry = weld::fromId<SeriesEntry*>(m_xLB_SERIES->get_id(nEntry));
bool bHasSelectedEntry = (pEntry != nullptr);
@@ -661,7 +653,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, DownButtonClickedHdl, weld::Button&, void)
int nEntry = m_xLB_SERIES->get_selected_index();
SeriesEntry* pEntry = nullptr;
if (nEntry != -1)
- pEntry = reinterpret_cast<SeriesEntry*>(m_xLB_SERIES->get_id(nEntry).toInt64());
+ pEntry = weld::fromId<SeriesEntry*>(m_xLB_SERIES->get_id(nEntry));
bool bHasSelectedEntry = (pEntry != nullptr);
@@ -750,7 +742,7 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField)
if (bAll || (pField == m_xEDT_CATEGORIES.get()))
{
- Reference< data::XLabeledDataSequence > xLabeledSeq( m_rDialogModel.getCategories() );
+ uno::Reference< chart2::data::XLabeledDataSequence > xLabeledSeq( m_rDialogModel.getCategories() );
if( xDataProvider.is())
{
OUString aRange(m_xEDT_CATEGORIES->get_text());
@@ -759,7 +751,7 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField)
// create or change categories
if( !xLabeledSeq.is())
{
- xLabeledSeq.set( DataSourceHelper::createLabeledDataSequence() );
+ xLabeledSeq = DataSourceHelper::createLabeledDataSequence();
m_rDialogModel.setCategories( xLabeledSeq );
}
try
@@ -775,7 +767,7 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField)
else if( xLabeledSeq.is())
{
// clear existing categories
- xLabeledSeq.set(nullptr);
+ xLabeledSeq.clear();
m_rDialogModel.setCategories( xLabeledSeq );
}
}
@@ -784,7 +776,7 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField)
int nSeriesEntry = m_xLB_SERIES->get_selected_index();
SeriesEntry* pSeriesEntry = nullptr;
if (nSeriesEntry != -1)
- pSeriesEntry = reinterpret_cast<SeriesEntry*>(m_xLB_SERIES->get_id(nSeriesEntry).toInt64());
+ pSeriesEntry = weld::fromId<SeriesEntry*>(m_xLB_SERIES->get_id(nSeriesEntry));
bool bHasSelectedEntry = (pSeriesEntry != nullptr);
if( bHasSelectedEntry )
@@ -802,9 +794,8 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField)
if( bIsLabel )
aSequenceRole = aSequenceNameForLabel;
- Reference< data::XDataSource > xSource( pSeriesEntry->m_xDataSeries, uno::UNO_QUERY_THROW );
- Reference< data::XLabeledDataSequence > xLabeledSeq(
- DataSeriesHelper::getDataSequenceByRole( xSource, aSequenceRole ));
+ uno::Reference< chart2::data::XLabeledDataSequence > xLabeledSeq =
+ DataSeriesHelper::getDataSequenceByRole( pSeriesEntry->m_xDataSeries, aSequenceRole );
if( xDataProvider.is())
{
@@ -813,12 +804,12 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField)
if( ! xLabeledSeq.is())
{
// check if there is already an "orphan" label sequence
- xLabeledSeq.set( lcl_findLSequenceWithOnlyLabel( xSource ));
+ xLabeledSeq = lcl_findLSequenceWithOnlyLabel( pSeriesEntry->m_xDataSeries );
if( ! xLabeledSeq.is())
{
// no corresponding labeled data sequence for label found
- xLabeledSeq.set( DataSourceHelper::createLabeledDataSequence() );
- lcl_addLSequenceToDataSource( xLabeledSeq, xSource );
+ xLabeledSeq = DataSourceHelper::createLabeledDataSequence();
+ lcl_addLSequenceToDataSource( xLabeledSeq, pSeriesEntry->m_xDataSeries );
}
}
if( xLabeledSeq.is())
@@ -842,7 +833,7 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField)
// "$Sheet1.$A$1"
aRange = xNewSeq->getSourceRangeRepresentation();
Reference< beans::XPropertySet > xProp( xNewSeq, uno::UNO_QUERY_THROW );
- xProp->setPropertyValue( "Role" , uno::Any( OUString(lcl_aLabelRole) ));
+ xProp->setPropertyValue( "Role" , uno::Any( lcl_aLabelRole ));
//Labels should always include hidden cells, regardless of the setting chosen
xProp->setPropertyValue( "IncludeHiddenCells", uno::Any(true));
@@ -881,11 +872,11 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField)
if( !xLabeledSeq.is())
{
if( aSelectedRole == aSequenceNameForLabel )
- xLabeledSeq.set( lcl_findLSequenceWithOnlyLabel( xSource ));
+ xLabeledSeq = lcl_findLSequenceWithOnlyLabel( pSeriesEntry->m_xDataSeries );
if( ! xLabeledSeq.is())
{
- xLabeledSeq.set( DataSourceHelper::createLabeledDataSequence() );
- lcl_addLSequenceToDataSource( xLabeledSeq, xSource );
+ xLabeledSeq = DataSourceHelper::createLabeledDataSequence();
+ lcl_addLSequenceToDataSource( xLabeledSeq, pSeriesEntry->m_xDataSeries );
}
}
xLabeledSeq->setValues( xNewSeq );
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx
index 1b6ba9862168..40219d917f9c 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.hxx
@@ -18,6 +18,9 @@
*/
#pragma once
+#include <DataSeries.hxx>
+#include <ChartType.hxx>
+
#include <vcl/wizardmachine.hxx>
#include <RangeSelectionListener.hxx>
@@ -29,8 +32,9 @@ namespace chart { class TabPageNotifiable; }
namespace chart
{
-
+class ChartType;
class ChartTypeTemplateProvider;
+class DataSeries;
class DialogModel;
class SeriesEntry
@@ -39,10 +43,10 @@ public:
OUString m_sRole;
/// the corresponding data series
- css::uno::Reference< css::chart2::XDataSeries > m_xDataSeries;
+ rtl::Reference< ::chart::DataSeries > m_xDataSeries;
/// the chart type that contains the series (via XDataSeriesContainer)
- css::uno::Reference< css::chart2::XChartType > m_xChartType;
+ rtl::Reference< ::chart::ChartType > m_xChartType;
};
class DataSourceTabPage final :
diff --git a/chart2/source/controller/dialogs/tp_DataTable.cxx b/chart2/source/controller/dialogs/tp_DataTable.cxx
new file mode 100644
index 000000000000..e6982b4a5067
--- /dev/null
+++ b/chart2/source/controller/dialogs/tp_DataTable.cxx
@@ -0,0 +1,43 @@
+/* -*- 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 "tp_DataTable.hxx"
+
+namespace chart
+{
+DataTableTabPage::DataTableTabPage(weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet& rInAttrs)
+ : SfxTabPage(pPage, pController, "modules/schart/ui/tp_DataTable.ui", "DataTableTabPage",
+ &rInAttrs)
+ , m_aDataTablePropertiesResources(*m_xBuilder)
+{
+}
+
+DataTableTabPage::~DataTableTabPage() = default;
+
+std::unique_ptr<SfxTabPage> DataTableTabPage::Create(weld::Container* pPage,
+ weld::DialogController* pController,
+ const SfxItemSet* rAttrs)
+{
+ return std::make_unique<DataTableTabPage>(pPage, pController, *rAttrs);
+}
+
+bool DataTableTabPage::FillItemSet(SfxItemSet* pOutAttrs)
+{
+ return m_aDataTablePropertiesResources.writeToItemSet(*pOutAttrs);
+}
+
+void DataTableTabPage::Reset(const SfxItemSet* pInAttrs)
+{
+ m_aDataTablePropertiesResources.initFromItemSet(*pInAttrs);
+}
+
+} //namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/tp_DataTable.hxx b/chart2/source/controller/dialogs/tp_DataTable.hxx
new file mode 100644
index 000000000000..00ab64cf89ce
--- /dev/null
+++ b/chart2/source/controller/dialogs/tp_DataTable.hxx
@@ -0,0 +1,37 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include <sfx2/tabdlg.hxx>
+#include <res_DataTableProperties.hxx>
+
+namespace chart
+{
+/** Tab page for the data table properties */
+class DataTableTabPage : public SfxTabPage
+{
+private:
+ DataTablePropertiesResources m_aDataTablePropertiesResources;
+
+public:
+ DataTableTabPage(weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet& rInAttrs);
+ virtual ~DataTableTabPage() override;
+
+ static std::unique_ptr<SfxTabPage>
+ Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rInAttrs);
+
+ virtual bool FillItemSet(SfxItemSet* rOutAttrs) override;
+ virtual void Reset(const SfxItemSet* rInAttrs) override;
+};
+
+} //namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
index 04697e75efc9..21a889bf854f 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
@@ -30,14 +30,13 @@ namespace chart
SchLegendPosTabPage::SchLegendPosTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs)
: SfxTabPage(pPage, pController, "modules/schart/ui/tp_LegendPosition.ui", "tp_LegendPosition", &rInAttrs)
, m_aLegendPositionResources(*m_xBuilder)
- , m_xLbTextDirection(new TextDirectionListBox(m_xBuilder->weld_combo_box("LB_LEGEND_TEXTDIR")))
+ , m_aLbTextDirection(m_xBuilder->weld_combo_box("LB_LEGEND_TEXTDIR"))
, m_xCBLegendNoOverlay(m_xBuilder->weld_check_button("CB_NO_OVERLAY"))
{
}
SchLegendPosTabPage::~SchLegendPosTabPage()
{
- m_xLbTextDirection.reset();
}
std::unique_ptr<SfxTabPage> SchLegendPosTabPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rOutAttrs)
@@ -49,8 +48,8 @@ bool SchLegendPosTabPage::FillItemSet(SfxItemSet* rOutAttrs)
{
m_aLegendPositionResources.writeToItemSet(*rOutAttrs);
- if (m_xLbTextDirection->get_active() != -1)
- rOutAttrs->Put(SvxFrameDirectionItem(m_xLbTextDirection->get_active_id(), EE_PARA_WRITINGDIR));
+ if (m_aLbTextDirection.get_active() != -1)
+ rOutAttrs->Put(SvxFrameDirectionItem(m_aLbTextDirection.get_active_id(), EE_PARA_WRITINGDIR));
if (m_xCBLegendNoOverlay->get_visible())
rOutAttrs->Put(SfxBoolItem(SCHATTR_LEGEND_NO_OVERLAY, m_xCBLegendNoOverlay->get_active()));
@@ -62,13 +61,12 @@ void SchLegendPosTabPage::Reset(const SfxItemSet* rInAttrs)
{
m_aLegendPositionResources.initFromItemSet(*rInAttrs);
- const SfxPoolItem* pPoolItem = nullptr;
- if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
- m_xLbTextDirection->set_active_id( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() );
+ if( const SvxFrameDirectionItem* pDirectionItem = rInAttrs->GetItemIfSet( EE_PARA_WRITINGDIR ) )
+ m_aLbTextDirection.set_active_id( pDirectionItem->GetValue() );
- if (rInAttrs->GetItemState(SCHATTR_LEGEND_NO_OVERLAY, true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxBoolItem* pNoOverlayItem = rInAttrs->GetItemIfSet(SCHATTR_LEGEND_NO_OVERLAY))
{
- bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
+ bool bVal = pNoOverlayItem->GetValue();
m_xCBLegendNoOverlay->set_active(bVal);
}
}
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.hxx b/chart2/source/controller/dialogs/tp_LegendPosition.hxx
index 9e5f32d281a7..4534501b5209 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.hxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.hxx
@@ -21,8 +21,7 @@
#include <sfx2/tabdlg.hxx>
#include <res_LegendPosition.hxx>
-
-namespace chart { class TextDirectionListBox; }
+#include <TextDirectionListBox.hxx>
namespace chart
{
@@ -32,7 +31,7 @@ class SchLegendPosTabPage : public SfxTabPage
private:
LegendPositionResources m_aLegendPositionResources;
- std::unique_ptr<TextDirectionListBox> m_xLbTextDirection;
+ TextDirectionListBox m_aLbTextDirection;
std::unique_ptr<weld::CheckButton> m_xCBLegendNoOverlay;
public:
diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
index 88116ee890e1..7c2c4d942e66 100644
--- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
@@ -62,11 +62,9 @@ bool SchLayoutTabPage::FillItemSet(SfxItemSet* rOutAttrs)
void SchLayoutTabPage::Reset(const SfxItemSet* rInAttrs)
{
- const SfxPoolItem *pPoolItem = nullptr;
-
- if (rInAttrs->GetItemState(SCHATTR_STYLE_SHAPE,true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxInt32Item* pShapeItem = rInAttrs->GetItemIfSet(SCHATTR_STYLE_SHAPE))
{
- tools::Long nVal = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
+ tools::Long nVal = pShapeItem->GetValue();
if(m_pGeometryResources)
{
m_pGeometryResources->select(static_cast<sal_uInt16>(nVal));
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
index ed4172d68110..ad7b2b6f0f3e 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
@@ -69,11 +69,9 @@ bool PolarOptionsTabPage::FillItemSet( SfxItemSet* rOutAttrs )
void PolarOptionsTabPage::Reset(const SfxItemSet* rInAttrs)
{
- const SfxPoolItem *pPoolItem = nullptr;
-
- if (rInAttrs->GetItemState(SCHATTR_STARTING_ANGLE, true, &pPoolItem) == SfxItemState::SET)
+ if (const SdrAngleItem* pAngleItem = rInAttrs->GetItemIfSet(SCHATTR_STARTING_ANGLE))
{
- Degree100 nTmp = static_cast<const SdrAngleItem*>(pPoolItem)->GetValue();
+ Degree100 nTmp = pAngleItem->GetValue();
m_xAngleDial->SetRotation( nTmp );
}
else
@@ -81,18 +79,20 @@ void PolarOptionsTabPage::Reset(const SfxItemSet* rInAttrs)
m_xFL_StartingAngle->hide();
}
// tdf#108059 Hide clockwise orientation checkbox in OOXML-heavy environments it would be useless anyways
- if (!officecfg::Office::Compatibility::View::ClockwisePieChartDirection::get() && rInAttrs->GetItemState(SCHATTR_CLOCKWISE, true, &pPoolItem) == SfxItemState::SET)
+ const SfxBoolItem* pClockWiseItem = nullptr;
+ if (!officecfg::Office::Compatibility::View::ClockwisePieChartDirection::get() &&
+ (pClockWiseItem = rInAttrs->GetItemIfSet(SCHATTR_CLOCKWISE)))
{
- bool bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
+ bool bCheck = pClockWiseItem->GetValue();
m_xCB_Clockwise->set_active(bCheck);
}
else
{
m_xCB_Clockwise->hide();
}
- if (rInAttrs->GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxBoolItem* pHiddenCellsItem = rInAttrs->GetItemIfSet(SCHATTR_INCLUDE_HIDDEN_CELLS))
{
- bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
+ bool bVal = pHiddenCellsItem->GetValue();
m_xCB_IncludeHiddenCells->set_active(bVal);
}
else
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 05f137f5a7be..a88f6a826e0b 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -69,7 +69,6 @@ RangeChooserTabPage::RangeChooserTabPage(weld::Container* pPage, weld::DialogCon
, m_rDialogModel( rDialogModel )
, m_pTabPageNotifiable(dynamic_cast<TabPageNotifiable*>(pController))
, m_xFT_Caption(m_xBuilder->weld_label("FT_CAPTION_FOR_WIZARD"))
- , m_xFT_Range(m_xBuilder->weld_label("FT_RANGE"))
, m_xED_Range(m_xBuilder->weld_entry("ED_RANGE"))
, m_xIB_Range(m_xBuilder->weld_button("IB_RANGE"))
, m_xRB_Rows(m_xBuilder->weld_radio_button("RB_DATAROWS"))
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
index e372b3f159b1..428e8a127dd9 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
@@ -24,7 +24,6 @@
#include <vcl/wizardmachine.hxx>
namespace chart { class TabPageNotifiable; }
-namespace com::sun::star::chart2 { class XChartTypeTemplate; }
namespace chart
{
@@ -79,7 +78,6 @@ private:
TabPageNotifiable * m_pTabPageNotifiable;
std::unique_ptr<weld::Label> m_xFT_Caption;
- std::unique_ptr<weld::Label> m_xFT_Range;
std::unique_ptr<weld::Entry> m_xED_Range;
std::unique_ptr<weld::Button> m_xIB_Range;
std::unique_ptr<weld::RadioButton> m_xRB_Rows;
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index 6c7effde6707..b8c9f0598357 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -26,6 +26,7 @@
#include <svx/svxids.hrc>
#include <osl/diagnose.h>
+#include <sfx2/dialoghelper.hxx>
#include <svx/chrtitem.hxx>
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
@@ -271,19 +272,18 @@ void ScaleTabPage::Reset(const SfxItemSet* rInAttrs)
if(!pNumFormatter)
return;
- const SfxPoolItem *pPoolItem = nullptr;
- if (rInAttrs->GetItemState(SCHATTR_AXIS_ALLOW_DATEAXIS, true, &pPoolItem) == SfxItemState::SET)
- m_bAllowDateAxis = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
+ if (const SfxBoolItem* pDateAxisItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_ALLOW_DATEAXIS))
+ m_bAllowDateAxis = pDateAxisItem->GetValue();
m_nAxisType=chart2::AxisType::REALNUMBER;
- if (rInAttrs->GetItemState(SCHATTR_AXISTYPE, true, &pPoolItem) == SfxItemState::SET)
- m_nAxisType = static_cast<int>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue());
+ if (const SfxInt32Item* pAxisTypeItem = rInAttrs->GetItemIfSet(SCHATTR_AXISTYPE))
+ m_nAxisType = static_cast<int>(pAxisTypeItem->GetValue());
if( m_nAxisType==chart2::AxisType::DATE && !m_bAllowDateAxis )
m_nAxisType=chart2::AxisType::CATEGORY;
if( m_bAllowDateAxis )
{
bool bAutoDateAxis = false;
- if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_DATEAXIS, true, &pPoolItem) == SfxItemState::SET)
- bAutoDateAxis = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
+ if (const SfxBoolItem* pDateAxisItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_AUTO_DATEAXIS))
+ bAutoDateAxis = pDateAxisItem->GetValue();
sal_uInt16 nPos = 0;
if( m_nAxisType==chart2::AxisType::DATE )
@@ -302,74 +302,74 @@ void ScaleTabPage::Reset(const SfxItemSet* rInAttrs)
m_xCbxAutoOrigin->set_active(true);
m_xCbx_AutoTimeResolution->set_active(true);
- if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_MIN,true,&pPoolItem) == SfxItemState::SET)
- m_xCbxAutoMin->set_active(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
+ if (const SfxBoolItem* pAutoMinItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_AUTO_MIN))
+ m_xCbxAutoMin->set_active(pAutoMinItem->GetValue());
- if (rInAttrs->GetItemState(SCHATTR_AXIS_MIN,true, &pPoolItem) == SfxItemState::SET)
+ if (const SvxDoubleItem* pAxisMinItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_MIN))
{
- fMin = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
+ fMin = pAxisMinItem->GetValue();
lcl_setValue( *m_xFmtFldMin, fMin );
m_xFmtFldMin->save_value();
}
- if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_MAX,true, &pPoolItem) == SfxItemState::SET)
- m_xCbxAutoMax->set_active(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
+ if (const SfxBoolItem* pAutoMaxItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_AUTO_MAX))
+ m_xCbxAutoMax->set_active(pAutoMaxItem->GetValue());
- if (rInAttrs->GetItemState(SCHATTR_AXIS_MAX,true, &pPoolItem) == SfxItemState::SET)
+ if (const SvxDoubleItem* pAxisMaxItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_MAX))
{
- fMax = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
+ fMax = pAxisMaxItem->GetValue();
lcl_setValue( *m_xFmtFldMax, fMax );
m_xFmtFldMax->save_value();
}
- if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_STEP_MAIN,true, &pPoolItem) == SfxItemState::SET)
- m_xCbxAutoStepMain->set_active(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
+ if (const SfxBoolItem* pAutoStepMainItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_AUTO_STEP_MAIN))
+ m_xCbxAutoStepMain->set_active(pAutoStepMainItem->GetValue());
- if (rInAttrs->GetItemState(SCHATTR_AXIS_STEP_MAIN,true, &pPoolItem) == SfxItemState::SET)
+ if (const SvxDoubleItem* pStepMainItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_STEP_MAIN))
{
- fStepMain = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
+ fStepMain = pStepMainItem->GetValue();
lcl_setValue( *m_xFmtFldStepMain, fStepMain );
m_xFmtFldStepMain->save_value();
m_xMt_MainDateStep->set_value( static_cast<sal_Int32>(fStepMain) );
m_xMt_MainDateStep->save_value();
}
- if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_STEP_HELP,true, &pPoolItem) == SfxItemState::SET)
- m_xCbxAutoStepHelp->set_active(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
- if (rInAttrs->GetItemState(SCHATTR_AXIS_LOGARITHM,true, &pPoolItem) == SfxItemState::SET)
- m_xCbxLogarithm->set_active(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
- if (rInAttrs->GetItemState(SCHATTR_AXIS_REVERSE,true, &pPoolItem) == SfxItemState::SET)
- m_xCbxReverse->set_active(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
- if (rInAttrs->GetItemState(SCHATTR_AXIS_STEP_HELP,true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxBoolItem* pAutoStepHelpItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_AUTO_STEP_HELP))
+ m_xCbxAutoStepHelp->set_active(pAutoStepHelpItem->GetValue());
+ if (const SfxBoolItem* pLogItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_LOGARITHM))
+ m_xCbxLogarithm->set_active(pLogItem->GetValue());
+ if (const SfxBoolItem* pReverseItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_REVERSE))
+ m_xCbxReverse->set_active(pReverseItem->GetValue());
+ if (const SfxInt32Item* pStepHelpItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_STEP_HELP))
{
- nStepHelp = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
+ nStepHelp = pStepHelpItem->GetValue();
m_xMtStepHelp->set_value( nStepHelp );
m_xMtStepHelp->save_value();
}
- if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_ORIGIN,true, &pPoolItem) == SfxItemState::SET)
- m_xCbxAutoOrigin->set_active(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
- if (rInAttrs->GetItemState(SCHATTR_AXIS_ORIGIN,true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxBoolItem* pOriginItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_AUTO_ORIGIN))
+ m_xCbxAutoOrigin->set_active(pOriginItem->GetValue());
+ if (const SvxDoubleItem* pOriginItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_ORIGIN))
{
- fOrigin = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
+ fOrigin = pOriginItem->GetValue();
lcl_setValue( *m_xFmtFldOrigin, fOrigin );
m_xFmtFldOrigin->save_value();
}
- if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_TIME_RESOLUTION,true, &pPoolItem) == SfxItemState::SET)
- m_xCbx_AutoTimeResolution->set_active(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
- if (rInAttrs->GetItemState(SCHATTR_AXIS_TIME_RESOLUTION,true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxBoolItem* pAutoTimeResItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_AUTO_TIME_RESOLUTION))
+ m_xCbx_AutoTimeResolution->set_active(pAutoTimeResItem->GetValue());
+ if (const SfxInt32Item* pTimeResItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_TIME_RESOLUTION))
{
- m_nTimeResolution = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
+ m_nTimeResolution = pTimeResItem->GetValue();
m_xLB_TimeResolution->set_active( m_nTimeResolution );
}
- if (rInAttrs->GetItemState(SCHATTR_AXIS_MAIN_TIME_UNIT,true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxInt32Item* pMainTimeUnitItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_MAIN_TIME_UNIT))
{
- m_nMainTimeUnit = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
+ m_nMainTimeUnit = pMainTimeUnitItem->GetValue();
m_xLB_MainTimeUnit->set_active( m_nMainTimeUnit );
}
- if (rInAttrs->GetItemState(SCHATTR_AXIS_HELP_TIME_UNIT,true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxInt32Item* pHelpTimeUnitItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_HELP_TIME_UNIT))
{
- m_nHelpTimeUnit = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
+ m_nHelpTimeUnit = pHelpTimeUnitItem->GetValue();
m_xLB_HelpTimeUnit->set_active( m_nHelpTimeUnit );
}
@@ -524,12 +524,12 @@ void ScaleTabPage::SetNumFormatter( SvNumberFormatter* pFormatter )
void ScaleTabPage::SetNumFormat()
{
- const SfxPoolItem *pPoolItem = nullptr;
+ const SfxUInt32Item *pNumFormatItem = GetItemSet().GetItemIfSet( SID_ATTR_NUMBERFORMAT_VALUE );
- if( GetItemSet().GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, true, &pPoolItem ) != SfxItemState::SET )
+ if( !pNumFormatItem )
return;
- sal_uLong nFmt = static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
+ sal_uInt32 nFmt = pNumFormatItem->GetValue();
Formatter& rFmtFldMax = m_xFmtFldMax->GetFormatter();
rFmtFldMax.SetFormatKey(nFmt);
@@ -558,6 +558,12 @@ void ScaleTabPage::SetNumFormat()
nFmt = pNumFormatter->GetStandardFormat( SvNumFormatType::TIME, pFormat->GetLanguage() );
else
nFmt = pNumFormatter->GetStandardFormat( SvNumFormatType::TIME );
+
+ // tdf#141625 give enough space to see full date+time
+ int nWidestTime(m_xFmtFldMin->get_pixel_size(getWidestDateTime(Application::GetSettings().GetLocaleDataWrapper(), true)).Width());
+ int nWidthChars = std::ceil(nWidestTime / m_xFmtFldMin->get_approximate_digit_width()) + 1;
+ m_xFmtFldMin->set_width_chars(nWidthChars);
+ m_xFmtFldMax->set_width_chars(nWidthChars);
}
if( m_nAxisType == chart2::AxisType::DATE && ( eType != SvNumFormatType::DATE && eType != SvNumFormatType::DATETIME) )
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
index 15976e89fea8..3ffbc3642e9c 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
@@ -113,13 +113,11 @@ bool SchOptionTabPage::FillItemSet(SfxItemSet* rOutAttrs)
void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs)
{
- const SfxPoolItem *pPoolItem = nullptr;
-
m_xRbtAxis1->set_active(true);
m_xRbtAxis2->set_active(false);
- if (rInAttrs->GetItemState(SCHATTR_AXIS,true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxInt32Item* pAxisItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS))
{
- tools::Long nVal=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
+ tools::Long nVal = pAxisItem->GetValue();
if(nVal==CHART_AXIS_SECONDARY_Y)
{
m_xRbtAxis2->set_active(true);
@@ -128,34 +126,34 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs)
}
tools::Long nTmp;
- if (rInAttrs->GetItemState(SCHATTR_BAR_GAPWIDTH, true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxInt32Item* pGapWidthItem = rInAttrs->GetItemIfSet(SCHATTR_BAR_GAPWIDTH))
{
- nTmp = static_cast<tools::Long>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue());
+ nTmp = static_cast<tools::Long>(pGapWidthItem->GetValue());
m_xMTGap->set_value(nTmp, FieldUnit::PERCENT);
}
- if (rInAttrs->GetItemState(SCHATTR_BAR_OVERLAP, true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxInt32Item* pOverlapItem = rInAttrs->GetItemIfSet(SCHATTR_BAR_OVERLAP))
{
- nTmp = static_cast<tools::Long>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue());
+ nTmp = static_cast<tools::Long>(pOverlapItem->GetValue());
m_xMTOverlap->set_value(nTmp, FieldUnit::PERCENT);
}
- if (rInAttrs->GetItemState(SCHATTR_BAR_CONNECT, true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxBoolItem* pConnectItem = rInAttrs->GetItemIfSet(SCHATTR_BAR_CONNECT))
{
- bool bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
+ bool bCheck = pConnectItem->GetValue();
m_xCBConnect->set_active(bCheck);
}
- if (rInAttrs->GetItemState(SCHATTR_AXIS_FOR_ALL_SERIES, true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxInt32Item* pAllSeriesItem = rInAttrs->GetItemIfSet(SCHATTR_AXIS_FOR_ALL_SERIES))
{
- m_nAllSeriesAxisIndex = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
+ m_nAllSeriesAxisIndex = pAllSeriesItem->GetValue();
m_xCBAxisSideBySide->set_sensitive(false);
}
- if (rInAttrs->GetItemState(SCHATTR_GROUP_BARS_PER_AXIS, true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxBoolItem* pPerAxisItem = rInAttrs->GetItemIfSet(SCHATTR_GROUP_BARS_PER_AXIS))
{
// model property is "group bars per axis", UI feature is the other way
// round: "show bars side by side"
- bool bCheck = ! static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
+ bool bCheck = ! pPerAxisItem->GetValue();
m_xCBAxisSideBySide->set_active( bCheck );
}
else
@@ -166,10 +164,12 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs)
//missing value treatment
{
std::vector< sal_Int32 > aMissingValueTreatments;
- if( rInAttrs->GetItemState(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, true, &pPoolItem) == SfxItemState::SET )
- aMissingValueTreatments = static_cast<const SfxIntegerListItem*>(pPoolItem)->GetList();
+ if (const SfxIntegerListItem* pValueTreatmentsItem = rInAttrs->GetItemIfSet(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS))
+ aMissingValueTreatments = pValueTreatmentsItem->GetList();
- if ( aMissingValueTreatments.size()>1 && rInAttrs->GetItemState(SCHATTR_MISSING_VALUE_TREATMENT,true, &pPoolItem) == SfxItemState::SET)
+ const SfxInt32Item* pMissingValueTreatmentItem;
+ if ( aMissingValueTreatments.size()>1 &&
+ (pMissingValueTreatmentItem = rInAttrs->GetItemIfSet(SCHATTR_MISSING_VALUE_TREATMENT)) )
{
m_xRB_DontPaint->set_sensitive(false);
m_xRB_AssumeZero->set_sensitive(false);
@@ -185,7 +185,7 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs)
m_xRB_ContinueLine->set_sensitive(true);
}
- tools::Long nVal=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
+ tools::Long nVal=pMissingValueTreatmentItem->GetValue();
if(nVal==css::chart::MissingValueTreatment::LEAVE_GAP)
m_xRB_DontPaint->set_active(true);
else if(nVal==css::chart::MissingValueTreatment::USE_ZERO)
@@ -200,9 +200,9 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs)
}
// Include hidden cells
- if (rInAttrs->GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxBoolItem* pHiddenCellsItem = rInAttrs->GetItemIfSet(SCHATTR_INCLUDE_HIDDEN_CELLS))
{
- bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
+ bool bVal = pHiddenCellsItem->GetValue();
m_xCBIncludeHiddenCells->set_active(bVal);
}
else
@@ -215,9 +215,9 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs)
m_xGrpPlotOptions->hide();
}
- if (rInAttrs->GetItemState(SCHATTR_HIDE_LEGEND_ENTRY, true, &pPoolItem) == SfxItemState::SET)
+ if (const SfxBoolItem* pEntryItem = rInAttrs->GetItemIfSet(SCHATTR_HIDE_LEGEND_ENTRY))
{
- bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
+ bool bVal = pEntryItem->GetValue();
m_xCBHideLegendEntry->set_active(bVal);
}
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
index ed99a9a39501..f3380042eb13 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
@@ -35,9 +35,8 @@ SchAlignmentTabPage::SchAlignmentTabPage(weld::Container* pPage, weld::DialogCon
, m_xFtRotate(m_xBuilder->weld_label("degreeL"))
, m_xNfRotate(m_xBuilder->weld_metric_spin_button("OrientDegree", FieldUnit::DEGREE))
, m_xCbStacked(m_xBuilder->weld_check_button("stackedCB"))
- , m_xFtTextDirection(m_xBuilder->weld_label("textdirL"))
, m_xFtABCD(m_xBuilder->weld_label("labelABCD"))
- , m_xLbTextDirection(new TextDirectionListBox(m_xBuilder->weld_combo_box("textdirLB")))
+ , m_aLbTextDirection(m_xBuilder->weld_combo_box("textdirLB"))
, m_xCtrlDial(new svx::DialControl)
, m_xCtrlDialWin(new weld::CustomWeld(*m_xBuilder, "dialCtrl", *m_xCtrlDial))
{
@@ -72,7 +71,6 @@ SchAlignmentTabPage::~SchAlignmentTabPage()
{
m_xCtrlDialWin.reset();
m_xCtrlDial.reset();
- m_xLbTextDirection.reset();
}
std::unique_ptr<SfxTabPage> SchAlignmentTabPage::Create(weld::Container* pPage, weld::DialogController* pController,
@@ -96,7 +94,7 @@ bool SchAlignmentTabPage::FillItemSet(SfxItemSet* rOutAttrs)
Degree100 nDegrees = bStacked ? 0_deg100 : m_xCtrlDial->GetRotation();
rOutAttrs->Put( SdrAngleItem( SCHATTR_TEXT_DEGREES, nDegrees ) );
- SvxFrameDirection aDirection( m_xLbTextDirection->get_active_id() );
+ SvxFrameDirection aDirection( m_aLbTextDirection.get_active_id() );
rOutAttrs->Put( SvxFrameDirectionItem( aDirection, EE_PARA_WRITINGDIR ) );
return true;
@@ -114,8 +112,8 @@ void SchAlignmentTabPage::Reset(const SfxItemSet* rInAttrs)
m_xCbStacked->set_active(bStacked);
StackedToggleHdl(*m_xCbStacked);
- if( rInAttrs->GetItemState(EE_PARA_WRITINGDIR, true, &pItem) == SfxItemState::SET)
- m_xLbTextDirection->set_active_id(static_cast<const SvxFrameDirectionItem*>(pItem)->GetValue());
+ if( const SvxFrameDirectionItem* pDirectionItem = rInAttrs->GetItemIfSet(EE_PARA_WRITINGDIR) )
+ m_aLbTextDirection.set_active_id(pDirectionItem->GetValue());
}
} //namespace chart
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.hxx b/chart2/source/controller/dialogs/tp_TitleRotation.hxx
index b303e4d3596c..9d59b693f9a8 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.hxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx
@@ -20,8 +20,8 @@
#include <sfx2/tabdlg.hxx>
#include <svx/dialcontrol.hxx>
+#include <TextDirectionListBox.hxx>
-namespace chart { class TextDirectionListBox; }
namespace weld {
class CheckButton;
class CustomWeld;
@@ -39,9 +39,8 @@ private:
std::unique_ptr<weld::Label> m_xFtRotate;
std::unique_ptr<weld::MetricSpinButton> m_xNfRotate;
std::unique_ptr<weld::CheckButton> m_xCbStacked;
- std::unique_ptr<weld::Label> m_xFtTextDirection;
std::unique_ptr<weld::Label> m_xFtABCD;
- std::unique_ptr<TextDirectionListBox> m_xLbTextDirection;
+ TextDirectionListBox m_aLbTextDirection;
std::unique_ptr<svx::DialControl> m_xCtrlDial;
std::unique_ptr<weld::CustomWeld> m_xCtrlDialWin;
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
index 2719874fd66a..4e813b4593fa 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
@@ -20,13 +20,11 @@
#include "tp_Wizard_TitlesAndObjects.hxx"
#include <res_Titles.hxx>
#include <res_LegendPosition.hxx>
-#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
#include <Diagram.hxx>
#include <AxisHelper.hxx>
#include <ControllerLockGuard.hxx>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <utility>
namespace chart
{
@@ -34,12 +32,12 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
TitlesAndObjectsTabPage::TitlesAndObjectsTabPage(weld::Container* pPage, weld::DialogController* pController,
- const rtl::Reference<::chart::ChartModel>& xChartModel,
+ rtl::Reference<::chart::ChartModel> xChartModel,
const uno::Reference< uno::XComponentContext >& xContext )
: OWizardPage(pPage, pController, "modules/schart/ui/wizelementspage.ui", "WizElementsPage")
, m_xTitleResources(new TitleResources(*m_xBuilder, false))
, m_xLegendPositionResources(new LegendPositionResources(*m_xBuilder, xContext))
- , m_xChartModel(xChartModel)
+ , m_xChartModel(std::move(xChartModel))
, m_xCC(xContext)
, m_bCommitToModel(true)
, m_aTimerTriggeredControllerLock( m_xChartModel )
@@ -77,7 +75,7 @@ void TitlesAndObjectsTabPage::initializePage()
//init grid checkboxes
{
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( m_xChartModel );
+ rtl::Reference< Diagram > xDiagram = m_xChartModel->getFirstChartDiagram();
uno::Sequence< sal_Bool > aPossibilityList;
uno::Sequence< sal_Bool > aExistenceList;
AxisHelper::getAxisOrGridPossibilities( aPossibilityList, xDiagram, false );
@@ -122,7 +120,7 @@ void TitlesAndObjectsTabPage::commitToModel()
//commit grid changes to model
{
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xModel );
+ rtl::Reference< Diagram > xDiagram = xModel->getFirstChartDiagram();
uno::Sequence< sal_Bool > aOldExistenceList;
AxisHelper::getAxisOrGridExistence( aOldExistenceList, xDiagram, false );
uno::Sequence< sal_Bool > aNewExistenceList(aOldExistenceList);
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
index f06a3e7ec589..d2c30d8b4363 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
@@ -39,7 +39,7 @@ class TitlesAndObjectsTabPage final : public vcl::OWizardPage
{
public:
TitlesAndObjectsTabPage(weld::Container* pPage, weld::DialogController* pController,
- const rtl::Reference<::chart::ChartModel>& xChartModel,
+ rtl::Reference<::chart::ChartModel> xChartModel,
const css::uno::Reference< css::uno::XComponentContext >& xContext);
virtual ~TitlesAndObjectsTabPage() override;
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 3918a296e638..74be51a5ee11 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -19,9 +19,10 @@
#include <DrawViewWrapper.hxx>
#include <chartview/DrawModelWrapper.hxx>
-#include <ConfigurationAccess.hxx>
#include <unotools/lingucfg.hxx>
+#include <unotools/syslocale.hxx>
+#include <unotools/localedatawrapper.hxx>
#include <editeng/eeitem.hxx>
#include <editeng/langitem.hxx>
#include <svl/intitem.hxx>
@@ -35,11 +36,12 @@
#include <editeng/fhgtitem.hxx>
#include <osl/diagnose.h>
-#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <sfx2/objsh.hxx>
+#include <sfx2/viewsh.hxx>
#include <svx/helperhittest3d.hxx>
+#include <officecfg/Office/Calc.hxx>
using namespace ::com::sun::star;
@@ -79,7 +81,6 @@ DrawViewWrapper::DrawViewWrapper(
{
SetBufferedOutputAllowed(true);
SetBufferedOverlayAllowed(true);
- SetPagePaintingAllowed(true);
// #i12587# support for shapes in chart
SdrOutliner* pOutliner = getOutliner();
@@ -89,12 +90,12 @@ DrawViewWrapper::DrawViewWrapper(
SvtLinguConfig aLinguConfig;
SvtLinguOptions aLinguOptions;
aLinguConfig.GetOptions( aLinguOptions );
- pOutlinerPool->SetPoolDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage, EE_CHAR_LANGUAGE ) );
- pOutlinerPool->SetPoolDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage_CJK, EE_CHAR_LANGUAGE_CJK ) );
- pOutlinerPool->SetPoolDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage_CTL, EE_CHAR_LANGUAGE_CTL ) );
+ pOutlinerPool->SetUserDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage, EE_CHAR_LANGUAGE ) );
+ pOutlinerPool->SetUserDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage_CJK, EE_CHAR_LANGUAGE_CJK ) );
+ pOutlinerPool->SetUserDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage_CTL, EE_CHAR_LANGUAGE_CTL ) );
// set font height without changing SdrEngineDefaults
- pOutlinerPool->SetPoolDefaultItem( SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT ) ); // 12pt
+ pOutlinerPool->SetUserDefaultItem( SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT ) ); // 12pt
}
// #i121463# Use big handles by default
@@ -122,7 +123,7 @@ void DrawViewWrapper::ReInit()
tools::Rectangle aRect(Point(0,0), aOutputSize);
SetWorkArea(aRect);
- ShowSdrPage(GetModel()->GetPage(0));
+ ShowSdrPage(GetModel().GetPage(0));
}
DrawViewWrapper::~DrawViewWrapper()
@@ -168,7 +169,7 @@ SdrObject* DrawViewWrapper::getHitObject( const Point& rPnt ) const
//3d objects need a special treatment
//because the simple PickObj method is not accurate in this case for performance reasons
- E3dObject* pE3d = dynamic_cast< E3dObject* >(pRet);
+ E3dObject* pE3d = DynCastE3dObject(pRet);
if( pE3d )
{
E3dScene* pScene(pE3d->getRootE3dSceneFromE3dObject());
@@ -211,10 +212,23 @@ void DrawViewWrapper::setMarkHandleProvider( MarkHandleProvider* pMarkHandleProv
void DrawViewWrapper::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* /* pRedirector */)
{
- svtools::ColorConfig aColorConfig;
- Color aFillColor( aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor );
+ Color aFillColor;
+ if (const SfxViewShell* pViewShell = SfxViewShell::Current())
+ aFillColor = pViewShell->GetColorConfigColor(svtools::DOCCOLOR);
+ else
+ {
+ svtools::ColorConfig aColorConfig;
+ aFillColor = aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor;
+ }
SetApplicationBackgroundColor(aFillColor);
+
+ SdrOutliner& rOutliner = GetModel().GetDrawOutliner();
+ Color aOldBackColor = rOutliner.GetBackgroundColor();
+ rOutliner.SetBackgroundColor(aFillColor);
+
E3dView::CompleteRedraw( pOut, rReg );
+
+ rOutliner.SetBackgroundColor(aOldBackColor);
}
SdrObject* DrawViewWrapper::getSelectedObject() const
@@ -255,8 +269,16 @@ SdrOutliner* DrawViewWrapper::getOutliner() const
SfxItemSet DrawViewWrapper::getPositionAndSizeItemSetFromMarkedObject() const
{
+ SvtSysLocale aSysLocale;
+ MeasurementSystem eSys = aSysLocale.GetLocaleData().getMeasurementSystemEnum();
+ sal_uInt16 nAttrMetric;
+ if( eSys == MeasurementSystem::Metric )
+ nAttrMetric = officecfg::Office::Calc::Layout::Other::MeasureUnit::Metric::get();
+ else
+ nAttrMetric = officecfg::Office::Calc::Layout::Other::MeasureUnit::NonMetric::get();
+
SfxItemSet aFullSet(
- GetModel()->GetItemPool(),
+ GetModel().GetItemPool(),
svl::Items<
SDRATTR_CORNER_RADIUS, SDRATTR_CORNER_RADIUS,
SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_ANGLE,
@@ -264,7 +286,7 @@ SfxItemSet DrawViewWrapper::getPositionAndSizeItemSetFromMarkedObject() const
SID_ATTR_METRIC, SID_ATTR_METRIC>);
SfxItemSet aGeoSet( E3dView::GetGeoAttrFromMarked() );
aFullSet.Put( aGeoSet );
- aFullSet.Put( SfxUInt16Item(SID_ATTR_METRIC,static_cast< sal_uInt16 >( ConfigurationAccess::getFieldUnit())));
+ aFullSet.Put( SfxUInt16Item(SID_ATTR_METRIC, nAttrMetric) );
return aFullSet;
}
@@ -293,8 +315,8 @@ bool DrawViewWrapper::IsObjectHit( SdrObject const * pObj, const Point& rPnt )
void DrawViewWrapper::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
//prevent wrong reselection of objects
- SdrModel* pSdrModel( GetModel() );
- if( pSdrModel && pSdrModel->isLocked() )
+ SdrModel& rSdrModel = GetModel();
+ if (rSdrModel.isLocked())
return;
const SdrHint* pSdrHint = ( rHint.GetId() == SfxHintId::ThisIsAnSdrHint ? static_cast<const SdrHint*>(&rHint) : nullptr );
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index 77099c9444fe..51b163d1fccd 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -26,14 +26,13 @@
#include <com/sun/star/drawing/Direction3D.hpp>
#include <o3tl/safeint.hxx>
#include <svx/xtable.hxx>
-#include <svl/itempool.hxx>
#include <svtools/ctrltool.hxx>
#include <vcl/svapp.hxx>
#include <svx/svdobj.hxx>
#include <vcl/virdev.hxx>
#include <svx/svdview.hxx>
#include <svx/svdpage.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
@@ -110,10 +109,6 @@ SdrObjList* ViewElementListProvider::GetSymbolList() const
{
//@todo use mutex
- //get shape factory
- uno::Reference<lang::XMultiServiceFactory> xShapeFactory(
- m_pDrawModelWrapper->getShapeFactory());
-
//get hidden draw page (target):
rtl::Reference<SvxDrawPage> xTarget = m_pDrawModelWrapper->getHiddenDrawPage();
@@ -143,7 +138,7 @@ Graphic ViewElementListProvider::GetSymbolGraphic( sal_Int32 nStandardSymbol, co
nStandardSymbol*=-1;
if( o3tl::make_unsigned(nStandardSymbol) >= pSymbolList->GetObjCount() )
nStandardSymbol %= pSymbolList->GetObjCount();
- SdrObject* pObj = pSymbolList->GetObj(nStandardSymbol);
+ rtl::Reference<SdrObject> pObj = pSymbolList->GetObj(nStandardSymbol);
ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->SetMapMode(MapMode(MapUnit::Map100thMM));
@@ -151,7 +146,6 @@ Graphic ViewElementListProvider::GetSymbolGraphic( sal_Int32 nStandardSymbol, co
std::unique_ptr<SdrModel> pModel(
new SdrModel());
- pModel->GetItemPool().FreezeIdRanges();
rtl::Reference<SdrPage> pPage = new SdrPage( *pModel, false );
pPage->SetSize(Size(1000,1000));
pModel->InsertPage( pPage.get(), 0 );
@@ -162,8 +156,8 @@ Graphic ViewElementListProvider::GetSymbolGraphic( sal_Int32 nStandardSymbol, co
// directly clone to target SdrModel
pObj = pObj->CloneSdrObject(*pModel);
- pPage->NbcInsertObject(pObj);
- aView.MarkObj(pObj,pPageView);
+ pPage->NbcInsertObject(pObj.get());
+ aView.MarkObj(pObj.get(),pPageView);
if( pSymbolShapeProperties )
pObj->SetMergedItemSet(*pSymbolShapeProperties);
@@ -176,7 +170,9 @@ Graphic ViewElementListProvider::GetSymbolGraphic( sal_Int32 nStandardSymbol, co
aView.UnmarkAll();
pObj=pPage->RemoveObject(0);
- SdrObject::Free( pObj );
+ // these need to die before the associated SdrModel
+ pObj.clear();
+ pPage.clear();
return aGraph;
}
diff --git a/chart2/source/controller/inc/AccessibleBase.hxx b/chart2/source/controller/inc/AccessibleBase.hxx
index 4bd51c342678..b7ccbac900da 100644
--- a/chart2/source/controller/inc/AccessibleBase.hxx
+++ b/chart2/source/controller/inc/AccessibleBase.hxx
@@ -29,7 +29,6 @@
#include <comphelper/accessibleeventnotifier.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
-#include <rtl/ref.hxx>
#include <tools/color.hxx>
#include <unotools/weakref.hxx>
@@ -40,7 +39,6 @@
namespace com::sun::star::awt { class XWindow; }
namespace com::sun::star::chart2 { class XChartDocument; }
namespace com::sun::star::view { class XSelectionSupplier; }
-namespace utl { class AccessibleStateSetHelper; }
class SdrView;
@@ -54,7 +52,9 @@ namespace chart
{
class AccessibleBase;
+class ChartView;
class ObjectHierarchy;
+class ChartController;
typedef ObjectIdentifier AccessibleUniqueId;
@@ -63,8 +63,8 @@ struct AccessibleElementInfo
AccessibleUniqueId m_aOID;
unotools::WeakReference< ::chart::ChartModel > m_xChartDocument;
- css::uno::WeakReference< css::view::XSelectionSupplier > m_xSelectionSupplier;
- css::uno::WeakReference< css::uno::XInterface > m_xView;
+ unotools::WeakReference< ::chart::ChartController > m_xChartController;
+ unotools::WeakReference< ::chart::ChartView > m_xView;
css::uno::WeakReference< css::awt::XWindow > m_xWindow;
std::shared_ptr< ObjectHierarchy > m_spObjectHierarchy;
@@ -99,7 +99,7 @@ public:
LOST_SELECTION
};
- AccessibleBase( const AccessibleElementInfo & rAccInfo,
+ AccessibleBase( AccessibleElementInfo aAccInfo,
bool bMayHaveChildren,
bool bAlwaysTransparent );
virtual ~AccessibleBase() override;
@@ -135,14 +135,14 @@ protected:
@throws css::uno::RuntimeException
*/
- void AddState( sal_Int16 aState );
+ void AddState( sal_Int64 aState );
/** Removes a state from the set if the set contains the state, otherwise
nothing is done.
@throws css::uno::RuntimeException
*/
- void RemoveState( sal_Int16 aState );
+ void RemoveState( sal_Int64 aState );
/** has to be overridden by derived classes that support child elements.
With this method a rescan is initiated that should result in a correct
@@ -185,14 +185,10 @@ protected:
/** This method creates an AccessibleEventObject and sends it to all
listeners that are currently listening to this object
-
- If bSendGlobally is true, the event is also broadcast via
- vcl::unohelper::NotifyAccessibleStateEventGlobally()
*/
void BroadcastAccEvent( sal_Int16 nId,
const css::uno::Any & rNew,
- const css::uno::Any & rOld,
- bool bSendGlobally = false ) const;
+ const css::uno::Any & rOld ) const;
/** Removes all children from the internal lists and broadcasts child remove
events.
@@ -209,14 +205,14 @@ protected:
@throws css::uno::RuntimeException
*/
virtual css::uno::Reference< css::accessibility::XAccessible >
- ImplGetAccessibleChildById( sal_Int32 i ) const;
+ ImplGetAccessibleChildById( sal_Int64 i ) const;
/** Is called from getAccessibleChildCount(). Before this method is called,
an update of children is done if necessary.
@throws css::uno::RuntimeException
*/
- virtual sal_Int32 ImplGetAccessibleChildCount() const;
+ virtual sal_Int64 ImplGetAccessibleChildCount() const;
const AccessibleElementInfo& GetInfo() const { return m_aAccInfo;}
void SetInfo( const AccessibleElementInfo & rNewInfo );
@@ -229,12 +225,12 @@ protected:
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override;
// ________ XAccessibleContext ________
- virtual sal_Int32 SAL_CALL getAccessibleChildCount() override;
+ virtual sal_Int64 SAL_CALL getAccessibleChildCount() override;
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
- getAccessibleChild( sal_Int32 i ) override;
+ getAccessibleChild( sal_Int64 i ) override;
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
getAccessibleParent() override;
- virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
+ virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override;
/// @return AccessibleRole.SHAPE
virtual sal_Int16 SAL_CALL getAccessibleRole() override;
// has to be implemented by derived classes
@@ -242,8 +238,7 @@ protected:
// throw (css::uno::RuntimeException);
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL
getAccessibleRelationSet() override;
- virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL
- getAccessibleStateSet() override;
+ virtual sal_Int64 SAL_CALL getAccessibleStateSet() override;
virtual css::lang::Locale SAL_CALL getLocale() override;
// has to be implemented by derived classes
// virtual OUString SAL_CALL getAccessibleDescription()
@@ -305,11 +300,9 @@ private:
::comphelper::AccessibleEventNotifier::TClientId m_nEventNotifierId;
- /** Implementation helper for getAccessibleStateSet()
-
- Note: This member must come before m_aStateSet!
+ /** for getAccessibleStateSet()
*/
- rtl::Reference<::utl::AccessibleStateSetHelper> m_xStateSetHelper;
+ sal_Int64 m_nStateSet;
AccessibleElementInfo m_aAccInfo;
const bool m_bAlwaysTransparent;
diff --git a/chart2/source/controller/inc/AccessibleChartView.hxx b/chart2/source/controller/inc/AccessibleChartView.hxx
index eb3367b205d6..793cdd69ab77 100644
--- a/chart2/source/controller/inc/AccessibleChartView.hxx
+++ b/chart2/source/controller/inc/AccessibleChartView.hxx
@@ -38,12 +38,12 @@ class IAccessibleViewForwarder;
namespace chart
{
+class ChartView;
namespace impl
{
typedef ::cppu::ImplInheritanceHelper<
::chart::AccessibleBase,
- css::lang::XInitialization,
css::view::XSelectionChangeListener >
AccessibleChartView_Base;
}
@@ -52,7 +52,7 @@ class AccessibleChartView final :
public impl::AccessibleChartView_Base
{
public:
- AccessibleChartView(SdrView* pView );
+ AccessibleChartView( SdrView* pView );
virtual ~AccessibleChartView() override;
AccessibleChartView() = delete;
@@ -60,15 +60,19 @@ public:
// ____ WeakComponentHelper (called from XComponent::dispose()) ____
using AccessibleBase::disposing;
- // ____ lang::XInitialization ____
// 0: view::XSelectionSupplier offers notifications for selection changes and access to the selection itself
// 1: frame::XModel representing the chart model - offers access to object data
// 2: lang::XInterface representing the normal chart view - offers access to some extra object data
// 3: accessibility::XAccessible representing the parent accessible
// 4: awt::XWindow representing the view's window (is a vcl Window)
// all arguments are only valid until next initialization - don't keep them longer
- virtual void SAL_CALL initialize(
- const css::uno::Sequence< css::uno::Any >& aArguments ) override;
+ void initialize( ChartController& rChartController,
+ const rtl::Reference<::chart::ChartModel>& xChartModel,
+ const rtl::Reference<::chart::ChartView>& xChartView,
+ const css::uno::Reference< css::accessibility::XAccessible >& xParent,
+ const css::uno::Reference<css::awt::XWindow>& xViewWindow );
+ // used to disconnect from view
+ void initialize();
// ____ view::XSelectionChangeListener ____
virtual void SAL_CALL selectionChanged( const css::lang::EventObject& aEvent ) override;
@@ -79,7 +83,7 @@ public:
// ________ XAccessibleContext ________
virtual OUString SAL_CALL getAccessibleDescription() override;
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override;
- virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
+ virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override;
virtual OUString SAL_CALL getAccessibleName() override;
virtual sal_Int16 SAL_CALL getAccessibleRole() override;
@@ -101,9 +105,9 @@ private: // methods
css::awt::Rectangle GetWindowPosSize() const;
private: // members
- css::uno::WeakReference< css::view::XSelectionSupplier > m_xSelectionSupplier;
- unotools::WeakReference<::chart::ChartModel> m_xChartModel;
- css::uno::WeakReference< css::uno::XInterface > m_xChartView;
+ unotools::WeakReference< ::chart::ChartController > m_xChartController;
+ unotools::WeakReference< ::chart::ChartModel > m_xChartModel;
+ unotools::WeakReference< ChartView > m_xChartView;
css::uno::WeakReference< css::awt::XWindow > m_xWindow;
css::uno::WeakReference< css::accessibility::XAccessible > m_xParent;
diff --git a/chart2/source/controller/inc/AccessibleTextHelper.hxx b/chart2/source/controller/inc/AccessibleTextHelper.hxx
index 075fbf0f9709..85fcb83dc3e4 100644
--- a/chart2/source/controller/inc/AccessibleTextHelper.hxx
+++ b/chart2/source/controller/inc/AccessibleTextHelper.hxx
@@ -18,16 +18,11 @@
*/
#pragma once
-#include <memory>
#include <comphelper/compbase.hxx>
-#include <com/sun/star/lang/XInitialization.hpp>
+#include <svx/AccessibleTextHelper.hxx>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
-// forward declaration of helper class from svx
-namespace accessibility
-{
-class AccessibleTextHelper;
-}
namespace chart
{
@@ -37,7 +32,6 @@ class DrawViewWrapper;
namespace impl
{
typedef comphelper::WeakComponentImplHelper<
- css::lang::XInitialization,
css::accessibility::XAccessibleContext >
AccessibleTextHelper_Base;
}
@@ -49,7 +43,6 @@ public:
explicit AccessibleTextHelper( DrawViewWrapper * pDrawViewWrapper );
virtual ~AccessibleTextHelper() override;
- // ____ XInitialization ____
/** Must be called at least once for this helper class to work.
mandatory parameter 0: type string. This is the CID that is used to find
@@ -62,24 +55,25 @@ public:
mandatory parameter 2: type awt::XWindow. The Window that shows the
text currently.
*/
- virtual void SAL_CALL initialize(
- const css::uno::Sequence< css::uno::Any >& aArguments ) override;
+ void initialize(const OUString& aCID,
+ const css::uno::Reference< css::accessibility::XAccessible >& xEventSource,
+ const css::uno::Reference< css::awt::XWindow >& xWindow );
// ____ XAccessibleContext ____
- virtual ::sal_Int32 SAL_CALL getAccessibleChildCount() override;
+ virtual sal_Int64 SAL_CALL getAccessibleChildCount() override;
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(
- ::sal_Int32 i ) override;
+ sal_Int64 i ) override;
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override;
- virtual ::sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
+ virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override;
virtual ::sal_Int16 SAL_CALL getAccessibleRole() override;
virtual OUString SAL_CALL getAccessibleDescription() override;
virtual OUString SAL_CALL getAccessibleName() override;
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override;
- virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override;
+ virtual sal_Int64 SAL_CALL getAccessibleStateSet() override;
virtual css::lang::Locale SAL_CALL getLocale() override;
private:
- std::unique_ptr<::accessibility::AccessibleTextHelper> m_pTextHelper;
+ std::optional<::accessibility::AccessibleTextHelper> m_oTextHelper;
DrawViewWrapper * m_pDrawViewWrapper;
};
diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx b/chart2/source/controller/inc/AxisItemConverter.hxx
index cbb75d2a1db6..c14ef82bd595 100644
--- a/chart2/source/controller/inc/AxisItemConverter.hxx
+++ b/chart2/source/controller/inc/AxisItemConverter.hxx
@@ -19,14 +19,16 @@
#pragma once
#include "ItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
#include <rtl/ref.hxx>
+#include <optional>
#include <vector>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::chart2 { class XAxis; }
namespace com::sun::star::chart2 { class XChartDocument; }
+namespace chart { class Axis; }
namespace chart { struct ExplicitIncrementData; }
namespace chart { struct ExplicitScaleData; }
namespace chart { class ChartModel; }
@@ -44,7 +46,7 @@ public:
const rtl::Reference<::chart::ChartModel> & xChartDoc,
ExplicitScaleData const * pScale,
ExplicitIncrementData const * pIncrement,
- const css::awt::Size* pRefSize );
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~AxisItemConverter() override;
@@ -60,8 +62,7 @@ protected:
private:
std::vector< std::unique_ptr<ItemConverter> > m_aConverters;
- css::uno::Reference<
- css::chart2::XAxis > m_xAxis;
+ rtl::Reference<::chart::Axis> m_xAxis;
rtl::Reference<::chart::ChartModel>m_xChartDoc;
diff --git a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
index 96138e237230..65ff58ea45ab 100644
--- a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
+++ b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
@@ -35,8 +35,8 @@ public:
CharacterPropertyItemConverter(
const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
SfxItemPool& rItemPool,
- const css::awt::Size* pRefSize,
- const OUString & rRefSizePropertyName,
+ const std::optional<css::awt::Size>& pRefSize,
+ OUString aRefSizePropertyName,
const css::uno::Reference<css::beans::XPropertySet>& rRefSizePropSet = css::uno::Reference<css::beans::XPropertySet>() );
virtual ~CharacterPropertyItemConverter() override;
diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx
index d50800fd67ad..737d0cf3768f 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -19,6 +19,7 @@
#pragma once
#include <LifeTime.hxx>
+#include <ReferenceSizeProvider.hxx>
#include "CommandDispatchContainer.hxx"
#include "SelectionHelper.hxx"
@@ -34,10 +35,9 @@
#include <com/sun/star/util/XModeChangeListener.hpp>
#include <com/sun/star/util/XCloseListener.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
-#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XController2.hpp>
#include <com/sun/star/frame/XLayoutManagerListener.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <memory>
#include <string_view>
@@ -61,7 +61,6 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace com::sun::star::util { class XCloseable; }
namespace com::sun::star::view { class XSelectionSupplier; }
-
class SdrModel;
namespace svt
@@ -83,26 +82,27 @@ namespace chart
{
class UndoGuard;
+class ChartView;
class ChartWindow;
class DrawModelWrapper;
class DrawViewWrapper;
-class ReferenceSizeProvider;
+class ViewElementListProvider;
class ViewElementListProvider;
class Diagram;
+class AccessibleChartView;
+class AccessibleTextHelper;
enum ChartDrawMode { CHARTDRAW_INSERT, CHARTDRAW_SELECT };
class ChartController final : public ::cppu::WeakImplHelper <
- css::frame::XController //comprehends XComponent (required interface)
+ css::frame::XController2 //comprehends XComponent (css::frame::XController is required interface)
,css::frame::XDispatchProvider //(required interface)
,css::view::XSelectionSupplier //(optional interface)
,css::ui::XContextMenuInterception //(optional interface)
,css::util::XCloseListener //(needed for communication with XModel)
- ,css::lang::XServiceInfo
,css::frame::XDispatch
,css::awt::XWindow //this is the Window Controller part of this Controller, that will be given to a Frame via setComponent
- ,css::lang::XMultiServiceFactory
,css::util::XModifyListener
,css::util::XModeChangeListener
,css::frame::XLayoutManagerListener
@@ -110,16 +110,11 @@ class ChartController final : public ::cppu::WeakImplHelper <
{
public:
ChartController() = delete;
- explicit ChartController(css::uno::Reference< css::uno::XComponentContext > const & xContext);
+ explicit ChartController(css::uno::Reference< css::uno::XComponentContext > xContext);
virtual ~ChartController() override;
OUString GetContextName();
- // css::lang::XServiceInfo
- virtual OUString SAL_CALL getImplementationName() override;
- virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
- virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
-
// css::frame::XController (required interface)
virtual void SAL_CALL
attachFrame( const css::uno::Reference< css::frame::XFrame > & xFrame ) override;
@@ -142,6 +137,12 @@ public:
virtual sal_Bool SAL_CALL
suspend( sal_Bool bSuspend ) override;
+ // css::frame::XController2
+ virtual css::uno::Reference<css::awt::XWindow> SAL_CALL getComponentWindow() override;
+ virtual OUString SAL_CALL getViewControllerName() override;
+ virtual css::uno::Sequence<css::beans::PropertyValue> SAL_CALL getCreationArguments() override;
+ virtual css::uno::Reference<css::ui::XSidebarProvider> SAL_CALL getSidebar() override;
+
// css::lang::XComponent (base of XController)
virtual void SAL_CALL
dispose() override;
@@ -262,16 +263,6 @@ public:
virtual void SAL_CALL
removePaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override;
- // css::lang XMultiServiceFactory
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
- createInstance( const OUString& aServiceSpecifier ) override;
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
- createInstanceWithArguments( const OUString& ServiceSpecifier,
- const css::uno::Sequence<
- css::uno::Any >& Arguments ) override;
- virtual css::uno::Sequence< OUString > SAL_CALL
- getAvailableServiceNames() override;
-
// css::util::XModifyListener
virtual void SAL_CALL modified(
const css::lang::EventObject& aEvent ) override;
@@ -318,11 +309,21 @@ public:
css::uno::Reference< css::accessibility::XAccessible > CreateAccessible();
+ /** Creates a helper accessibility class that must be initialized via initialize(). For
+ parameters see
+
+ The returned object should not be used directly. Instead a proxy object
+ should use this helper to retrieve its children and add them to its own
+ children.
+ */
+ rtl::Reference< ::chart::AccessibleTextHelper > createAccessibleTextContext();
+
static bool isObjectDeleteable( const css::uno::Any& rSelection );
void setDrawMode( ChartDrawMode eMode ) { m_eDrawMode = eMode; }
bool isShapeContext() const;
+ bool IsTextEdit() const;
ViewElementListProvider getViewElementListProvider();
DrawModelWrapper* GetDrawModelWrapper();
@@ -335,7 +336,7 @@ public:
void NotifyUndoActionHdl( std::unique_ptr<SdrUndoAction> );
- css::uno::Reference<css::uno::XInterface> const & getChartView() const;
+ rtl::Reference<::chart::ChartView> const & getChartView() const { return m_xChartView; }
rtl::Reference<::chart::ChartModel> getChartModel();
rtl::Reference<::chart::Diagram> getFirstDiagram();
@@ -344,7 +345,7 @@ private:
class TheModel : public salhelper::SimpleReferenceObject
{
public:
- explicit TheModel( const rtl::Reference<::chart::ChartModel> & xModel );
+ explicit TheModel( rtl::Reference<::chart::ChartModel> xModel );
virtual ~TheModel() override;
@@ -389,7 +390,7 @@ private:
//view
css::uno::Reference<css::awt::XWindow> m_xViewWindow;
- css::uno::Reference<css::uno::XInterface> m_xChartView;
+ rtl::Reference<::chart::ChartView> m_xChartView;
std::shared_ptr< DrawModelWrapper > m_pDrawModelWrapper;
std::unique_ptr<DrawViewWrapper> m_pDrawViewWrapper;
@@ -420,7 +421,7 @@ private:
rtl::Reference<svx::sidebar::SelectionChangeHandler> mpSelectionChangeHandler;
bool impl_isDisposedOrSuspended() const;
- std::unique_ptr<ReferenceSizeProvider> impl_createReferenceSizeProvider();
+ ReferenceSizeProvider impl_createReferenceSizeProvider();
void impl_adaptDataSeriesAutoResize();
void impl_createDrawViewController();
@@ -430,7 +431,7 @@ private:
void executeDispatch_ObjectProperties();
void executeDispatch_FormatObject( std::u16string_view rDispatchCommand );
void executeDlg_ObjectProperties( const OUString& rObjectCID );
- bool executeDlg_ObjectProperties_withoutUndoGuard( const OUString& rObjectCID, bool bSuccessOnUnchanged );
+ void executeDlg_ObjectProperties_withUndoGuard( std::shared_ptr<UndoGuard> aUndoGuard, const OUString& rObjectCID, bool bSuccessOnUnchanged );
void executeDispatch_ChartType();
@@ -441,6 +442,10 @@ private:
void executeDispatch_InsertAxes();
void executeDispatch_InsertGrid();
+ void executeDispatch_InsertDataTable();
+ void executeDispatch_DeleteDataTable();
+ void executeDispatch_OpenInsertDataTableDialog();
+
void executeDispatch_InsertMenu_DataLabels();
void executeDispatch_InsertMenu_Trendlines();
void executeDispatch_InsertMenu_MeanValues();
@@ -480,6 +485,8 @@ private:
void executeDispatch_MoveSeries( bool bForward );
bool EndTextEdit();
+ css::uno::Sequence< css::uno::Reference<css::chart2::XFormattedString >> GetFormattedTitle(
+ const EditTextObject& aEdit, const css::uno::Reference< css::drawing::XShape >& xShape );
void executeDispatch_View3D();
void executeDispatch_PositionAndSize( const ::css::uno::Sequence< ::css::beans::PropertyValue >* pArgs = nullptr );
@@ -500,17 +507,17 @@ private:
void executeDispatch_LOKSetTextSelection(int nType, int nX, int nY);
void executeDispatch_LOKPieSegmentDragging(int nOffset);
void executeDispatch_FillColor(sal_uInt32 nColor);
- void executeDispatch_FillGradient(OUString sJSONGradient);
+ void executeDispatch_FillGradient(std::u16string_view sJSONGradient);
void executeDispatch_LineColor(sal_uInt32 nColor);
void executeDispatch_LineWidth(sal_uInt32 nWidth);
- void sendPopupRequest(OUString const & rCID, tools::Rectangle aRectangle);
+ void sendPopupRequest(std::u16string_view rCID, tools::Rectangle aRectangle);
void impl_ShapeControllerDispatch( const css::util::URL& rURL,
const css::uno::Sequence< css::beans::PropertyValue >& rArgs );
DECL_LINK( DoubleClickWaitingHdl, Timer*, void );
- void execute_DoubleClick( const Point* pMousePixel );
+ void execute_DoubleClick( const Point* pMousePixel, bool &bEditText );
void startDoubleClickWaiting();
void stopDoubleClickWaiting();
@@ -518,7 +525,7 @@ private:
void impl_notifySelectionChangeListeners();
void impl_invalidateAccessible();
void impl_initializeAccessible();
- void impl_initializeAccessible( const css::uno::Reference< css::lang::XInitialization >& xInit );
+ void impl_initializeAccessible( AccessibleChartView& xInit );
//sets the model member to null if it equals the parameter
//returns true if successful
@@ -532,20 +539,10 @@ private:
/// @return </sal_True>, if resize/move was successful
bool impl_moveOrResizeObject(
const OUString & rCID, eMoveOrResizeType eType, double fAmountLogicX, double fAmountLogicY );
- bool impl_DragDataPoint( const OUString & rCID, double fOffset );
+ bool impl_DragDataPoint( std::u16string_view rCID, double fOffset );
static const o3tl::sorted_vector< OUString >& impl_getAvailableCommands();
- /** Creates a helper accessibility class that must be initialized via XInitialization. For
- parameters see
-
- The returned object should not be used directly. Instead a proxy object
- should use this helper to retrieve its children and add them to its own
- children.
- */
- css::uno::Reference< css::accessibility::XAccessibleContext >
- impl_createAccessibleTextContext();
-
void impl_PasteGraphic( css::uno::Reference< css::graphic::XGraphic > const & xGraphic,
const ::Point & aPosition );
void impl_PasteShapes( SdrModel* pModel );
diff --git a/chart2/source/controller/inc/ChartDocumentWrapper.hxx b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
index 04f76d705b6b..a5bded3c8fb7 100644
--- a/chart2/source/controller/inc/ChartDocumentWrapper.hxx
+++ b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
@@ -139,6 +139,10 @@ protected:
virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties() override;
virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override;
+ // ____ XPropertySet ____
+ virtual void SAL_CALL setPropertyValue(const OUString& rPropertyName,
+ const css::uno::Any& rValue) override;
+
private: //methods
void impl_resetAddIn();
diff --git a/chart2/source/controller/inc/ChartWindow.hxx b/chart2/source/controller/inc/ChartWindow.hxx
index 4ab65ddd959e..918805cb3a8a 100644
--- a/chart2/source/controller/inc/ChartWindow.hxx
+++ b/chart2/source/controller/inc/ChartWindow.hxx
@@ -53,15 +53,8 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
virtual void RequestHelp( const HelpEvent& rHEvt ) override;
- /// For LibreOfficeKit, we need to route these to the mouse events.
- virtual void LogicMouseButtonDown(const MouseEvent&) override;
- virtual void LogicMouseButtonUp(const MouseEvent&) override;
- virtual void LogicMouseMove(const MouseEvent&) override;
-
void ForceInvalidate();
- virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) override;
- virtual void Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) override;
- virtual void Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE ) override;
+ virtual void ImplInvalidate( const vcl::Region* rRegion, InvalidateFlags nFlags ) override;
/// Notify the LOK client about an invalidated area.
virtual void LogicInvalidate( const tools::Rectangle* pRectangle ) override;
diff --git a/chart2/source/controller/inc/ConfigurationAccess.hxx b/chart2/source/controller/inc/ConfigurationAccess.hxx
deleted file mode 100644
index 2fb4636d2217..000000000000
--- a/chart2/source/controller/inc/ConfigurationAccess.hxx
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- 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 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 .
- */
-
-#pragma once
-
-#include <tools/fldunit.hxx>
-
-namespace chart::ConfigurationAccess
-{
-/** @descr Retrieve the FieldUnit to be used for the UI. This unit is retrieved
- from the registry settings of the Calc application.
-
- If this setting can not be found there is a fallback to cm which is the most
- common setting worldwide (or not?)
-
- @return the FieldUnit enum. See <vcl/fldunit.hxx> for definition
- */
-FieldUnit getFieldUnit();
-
-} //namespace chart
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx b/chart2/source/controller/inc/DataPointItemConverter.hxx
index 1cba4854d890..720cc0fef2e7 100644
--- a/chart2/source/controller/inc/DataPointItemConverter.hxx
+++ b/chart2/source/controller/inc/DataPointItemConverter.hxx
@@ -20,18 +20,19 @@
#include "ItemConverter.hxx"
#include "GraphicPropertyItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/uno/Sequence.h>
#include <tools/color.hxx>
#include <rtl/ref.hxx>
-
+#include <optional>
#include <vector>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::chart2 { class XDataSeries; }
namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::uno { class XComponentContext; }
namespace chart { class ChartModel; }
+namespace chart { class DataSeries; }
class SdrModel;
namespace chart::wrapper {
@@ -43,12 +44,12 @@ public:
const rtl::Reference<::chart::ChartModel>& xChartModel,
const css::uno::Reference<css::uno::XComponentContext>& xContext,
const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
- const css::uno::Reference<css::chart2::XDataSeries>& xSeries,
+ const rtl::Reference<::chart::DataSeries>& xSeries,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
GraphicObjectType eMapTo,
- const css::awt::Size* pRefSize = nullptr,
+ const std::optional<css::awt::Size>& pRefSize = std::nullopt,
bool bDataSeries = false,
bool bUseSpecialFillColor = false,
sal_Int32 nSpecialFillColor = 0,
@@ -81,7 +82,7 @@ private:
bool m_bForbidPercentValue;
bool m_bHideLegendEntry;
sal_Int32 m_nPointIndex;
- css::uno::Reference<css::chart2::XDataSeries> m_xSeries;
+ rtl::Reference<::chart::DataSeries> m_xSeries;
};
}
diff --git a/chart2/source/controller/inc/DataTableItemConverter.hxx b/chart2/source/controller/inc/DataTableItemConverter.hxx
new file mode 100644
index 000000000000..f3809632f8a5
--- /dev/null
+++ b/chart2/source/controller/inc/DataTableItemConverter.hxx
@@ -0,0 +1,56 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include "ItemConverter.hxx"
+#include <rtl/ref.hxx>
+#include <vector>
+
+namespace com::sun::star::awt
+{
+struct Size;
+}
+namespace com::sun::star::beans
+{
+class XPropertySet;
+}
+namespace chart
+{
+class ChartModel;
+}
+
+class SdrModel;
+
+namespace chart::wrapper
+{
+/** Convert data table properties to and from ItemSet and UNO PropertySet */
+class DataTableItemConverter final : public ItemConverter
+{
+public:
+ DataTableItemConverter(const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
+ SfxItemPool& rItemPool, SdrModel& rDrawModel,
+ const rtl::Reference<::chart::ChartModel>& xChartDoc);
+
+ virtual ~DataTableItemConverter() override;
+
+ virtual void FillItemSet(SfxItemSet& rOutItemSet) const override;
+ virtual bool ApplyItemSet(const SfxItemSet& rItemSet) override;
+
+protected:
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
+ virtual bool GetItemProperty(tWhichIdType nWhichId,
+ tPropertyNameWithMemberId& rOutProperty) const override;
+
+private:
+ std::vector<std::unique_ptr<ItemConverter>> m_aConverters;
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ErrorBarItemConverter.hxx b/chart2/source/controller/inc/ErrorBarItemConverter.hxx
index 997bda7d269e..a53fbe18ef60 100644
--- a/chart2/source/controller/inc/ErrorBarItemConverter.hxx
+++ b/chart2/source/controller/inc/ErrorBarItemConverter.hxx
@@ -33,7 +33,7 @@ class ErrorBarItemConverter final : public ItemConverter
{
public:
ErrorBarItemConverter(
- const css::uno::Reference< css::frame::XModel > & xChartModel,
+ css::uno::Reference< css::frame::XModel > xChartModel,
const css::uno::Reference< css::beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
diff --git a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
index 234e50751ab6..9d119d53ca3a 100644
--- a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
+++ b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
@@ -42,7 +42,7 @@ public:
const css::uno::Reference< css::beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
- const css::uno::Reference< css::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
+ css::uno::Reference< css::lang::XMultiServiceFactory > xNamedPropertyContainerFactory,
GraphicObjectType eObjectType );
virtual ~GraphicPropertyItemConverter() override;
diff --git a/chart2/source/controller/inc/ItemConverter.hxx b/chart2/source/controller/inc/ItemConverter.hxx
index 865268a3abf9..031a633c22d8 100644
--- a/chart2/source/controller/inc/ItemConverter.hxx
+++ b/chart2/source/controller/inc/ItemConverter.hxx
@@ -73,7 +73,7 @@ public:
reading/writing converted items
*/
ItemConverter(
- const css::uno::Reference< css::beans::XPropertySet > & rPropertySet ,
+ css::uno::Reference< css::beans::XPropertySet > xPropertySet ,
SfxItemPool& rItemPool );
virtual ~ItemConverter() override;
diff --git a/chart2/source/controller/inc/LegendItemConverter.hxx b/chart2/source/controller/inc/LegendItemConverter.hxx
index 3e9315acc20d..cbb657edf0d3 100644
--- a/chart2/source/controller/inc/LegendItemConverter.hxx
+++ b/chart2/source/controller/inc/LegendItemConverter.hxx
@@ -19,10 +19,10 @@
#pragma once
#include "ItemConverter.hxx"
-
+#include <com/sun/star/awt/Size.hpp>
+#include <optional>
#include <vector>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
class SdrModel;
@@ -38,7 +38,7 @@ public:
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
- const css::awt::Size* pRefSize );
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~LegendItemConverter() override;
diff --git a/chart2/source/controller/inc/MultipleChartConverters.hxx b/chart2/source/controller/inc/MultipleChartConverters.hxx
index 4fe1bb1de066..8fc9f33b4367 100644
--- a/chart2/source/controller/inc/MultipleChartConverters.hxx
+++ b/chart2/source/controller/inc/MultipleChartConverters.hxx
@@ -19,9 +19,10 @@
#pragma once
#include "MultipleItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
#include <rtl/ref.hxx>
+#include <optional>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
namespace chart { class ChartModel; }
@@ -36,7 +37,7 @@ public:
const rtl::Reference<::chart::ChartModel> & xChartModel,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
- const css::awt::Size* pRefSize );
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~AllAxisItemConverter() override;
diff --git a/chart2/source/controller/inc/ObjectHierarchy.hxx b/chart2/source/controller/inc/ObjectHierarchy.hxx
index d8f7747e8bc6..1531866aaf2b 100644
--- a/chart2/source/controller/inc/ObjectHierarchy.hxx
+++ b/chart2/source/controller/inc/ObjectHierarchy.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <ChartModel.hxx>
#include <ObjectIdentifier.hxx>
#include <map>
#include <vector>
@@ -51,11 +52,10 @@ public:
static bool isRootNode( const ObjectIdentifier& rOID );
/// equal to getChildren( getRootNodeOID())
- const tChildContainer & getTopLevelChildren() const;
- bool hasChildren( const ObjectIdentifier& rParent ) const;
- const tChildContainer & getChildren( const ObjectIdentifier& rParent ) const;
-
- const tChildContainer & getSiblings( const ObjectIdentifier& rNode ) const;
+ const tChildContainer& getTopLevelChildren() const;
+ bool hasChildren(const ObjectIdentifier& rParent) const;
+ const tChildContainer& getChildren(const ObjectIdentifier& rParent) const;
+ const tChildContainer& getSiblings(const ObjectIdentifier& rNode) const;
/// The result is empty, if the node cannot be found in the tree
ObjectIdentifier getParent( const ObjectIdentifier& rNode ) const;
@@ -65,30 +65,29 @@ public:
private:
void createTree( const rtl::Reference<::chart::ChartModel> & xChartDocument );
void createAxesTree(
- ObjectHierarchy::tChildContainer & rContainer,
+ tChildContainer & rContainer,
const rtl::Reference<::chart::ChartModel> & xChartDoc,
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
void createDiagramTree(
- ObjectHierarchy::tChildContainer& rContainer,
+ tChildContainer& rContainer,
const rtl::Reference<::chart::ChartModel>& xChartDoc,
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ const rtl::Reference< ::chart::Diagram >& xDiagram );
void createDataSeriesTree(
- ObjectHierarchy::tChildContainer & rOutDiagramSubContainer,
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ tChildContainer & rOutDiagramSubContainer,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
static void createWallAndFloor(
- ObjectHierarchy::tChildContainer & rContainer,
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ tChildContainer & rContainer,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
void createLegendTree(
- ObjectHierarchy::tChildContainer & rContainer,
+ tChildContainer & rContainer,
const rtl::Reference<::chart::ChartModel> & xChartDoc,
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
- void createAdditionalShapesTree( ObjectHierarchy::tChildContainer& rContainer );
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
+ void createAdditionalShapesTree(tChildContainer& rContainer);
ObjectIdentifier getParentImpl(
const ObjectIdentifier& rParentOID,
const ObjectIdentifier& rOID ) const;
- typedef std::map< ObjectIdentifier, ObjectHierarchy::tChildContainer >
- tChildMap;
+ typedef std::map<ObjectIdentifier, tChildContainer> tChildMap;
tChildMap m_aChildMap;
ExplicitValueProvider* m_pExplicitValueProvider;
bool m_bFlattenDiagram;
@@ -98,8 +97,8 @@ private:
class ObjectKeyNavigation
{
public:
- explicit ObjectKeyNavigation( const ObjectIdentifier & rCurrentOID,
- const rtl::Reference<::chart::ChartModel> & xChartDocument,
+ explicit ObjectKeyNavigation( ObjectIdentifier aCurrentOID,
+ rtl::Reference<::chart::ChartModel> xChartDocument,
ExplicitValueProvider * pExplicitValueProvider );
bool handleKeyEvent( const css::awt::KeyEvent & rEvent );
diff --git a/chart2/source/controller/inc/ObjectNameProvider.hxx b/chart2/source/controller/inc/ObjectNameProvider.hxx
index 276e58977d35..c613dd5ce855 100644
--- a/chart2/source/controller/inc/ObjectNameProvider.hxx
+++ b/chart2/source/controller/inc/ObjectNameProvider.hxx
@@ -35,33 +35,33 @@ class ObjectNameProvider
{
public:
static OUString getName( ObjectType eObjectType, bool bPlural=false );
- static OUString getAxisName( const OUString& rObjectCID
+ static OUString getAxisName( std::u16string_view rObjectCID
, const rtl::Reference<::chart::ChartModel>& xChartModel );
- static OUString getGridName( const OUString& rObjectCID
+ static OUString getGridName( std::u16string_view rObjectCID
, const rtl::Reference<::chart::ChartModel>& xChartModel );
- static OUString getTitleName( const OUString& rObjectCID
+ static OUString getTitleName( std::u16string_view rObjectCID
, const rtl::Reference<::chart::ChartModel>& xChartModel );
static OUString getTitleNameByType( TitleHelper::eTitleType eType );
static OUString getNameForCID(
- const OUString& rObjectCID,
+ std::u16string_view rObjectCID,
const rtl::Reference<::chart::ChartModel>& xChartDocument );
static OUString getName_ObjectForSeries(
ObjectType eObjectType,
- const OUString& rSeriesCID,
+ std::u16string_view rSeriesCID,
const rtl::Reference<::chart::ChartModel>& xChartDocument );
static OUString getName_ObjectForAllSeries( ObjectType eObjectType );
/** Provides help texts for the various chart elements.
The parameter rObjectCID has to be a ClassifiedIdentifier - see class ObjectIdentifier.
*/
- static OUString getHelpText( const OUString& rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel, bool bVerbose=false );
+ static OUString getHelpText( std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel, bool bVerbose=false );
/** This is used for showing the currently selected object in the status bar
(command "Context")
*/
- static OUString getSelectedObjectText( const OUString & rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartDocument );
+ static OUString getSelectedObjectText( std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel>& xChartDocument );
};
} //namespace chart
diff --git a/chart2/source/controller/inc/PositionAndSizeHelper.hxx b/chart2/source/controller/inc/PositionAndSizeHelper.hxx
index f70ccf302f6d..0f79373d52f9 100644
--- a/chart2/source/controller/inc/PositionAndSizeHelper.hxx
+++ b/chart2/source/controller/inc/PositionAndSizeHelper.hxx
@@ -36,7 +36,7 @@ public:
, const css::awt::Rectangle& rOldPositionAndSize
, const css::awt::Rectangle& rPageRectangle );
- static bool moveObject( const OUString& rObjectCID
+ static bool moveObject( std::u16string_view rObjectCID
, const rtl::Reference<::chart::ChartModel>& xChartModel
, const css::awt::Rectangle& rNewPositionAndSize
, const css::awt::Rectangle& rOldPositionAndSize
diff --git a/chart2/source/controller/inc/RangeSelectionHelper.hxx b/chart2/source/controller/inc/RangeSelectionHelper.hxx
index 02db335a1fc0..36fe0db99cce 100644
--- a/chart2/source/controller/inc/RangeSelectionHelper.hxx
+++ b/chart2/source/controller/inc/RangeSelectionHelper.hxx
@@ -42,7 +42,7 @@ class RangeSelectionHelper
{
public:
explicit RangeSelectionHelper(
- const rtl::Reference<::chart::ChartModel> & xChartDocument );
+ rtl::Reference<::chart::ChartModel> xChartDocument );
~RangeSelectionHelper();
bool hasRangeSelection();
diff --git a/chart2/source/controller/inc/RangeSelectionListener.hxx b/chart2/source/controller/inc/RangeSelectionListener.hxx
index 29bea261c820..9117b4d9b2fc 100644
--- a/chart2/source/controller/inc/RangeSelectionListener.hxx
+++ b/chart2/source/controller/inc/RangeSelectionListener.hxx
@@ -47,7 +47,7 @@ class RangeSelectionListener final
{
public:
explicit RangeSelectionListener(
- RangeSelectionListenerParent& rParent, const OUString& rInitialRange,
+ RangeSelectionListenerParent& rParent, OUString aInitialRange,
const rtl::Reference<::chart::ChartModel>& xModelToLockController);
virtual ~RangeSelectionListener() override;
diff --git a/chart2/source/controller/inc/RegressionCurveItemConverter.hxx b/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
index 63c296a3e3b1..8c4262b55ec5 100644
--- a/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
+++ b/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
@@ -19,10 +19,11 @@
#pragma once
#include "ItemConverter.hxx"
+#include <rtl/ref.hxx>
namespace com::sun::star::chart2 { class XRegressionCurveContainer; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
-
+namespace chart { class DataSeries; }
class SdrModel;
namespace chart::wrapper
@@ -33,7 +34,7 @@ class RegressionCurveItemConverter final : public ItemConverter
public:
RegressionCurveItemConverter(
const css::uno::Reference< css::beans::XPropertySet > & rPropertySet,
- const css::uno::Reference< css::chart2::XRegressionCurveContainer > & xRegCurveCnt,
+ rtl::Reference< ::chart::DataSeries > xRegCurveCnt,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory );
@@ -51,7 +52,7 @@ protected:
private:
std::shared_ptr< ItemConverter > m_spGraphicConverter;
- css::uno::Reference< css::chart2::XRegressionCurveContainer > m_xCurveContainer;
+ rtl::Reference< ::chart::DataSeries > m_xCurveContainer;
};
} // namespace chart::wrapper
diff --git a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
index 0b32e4b9ed7c..83394b1ea45d 100644
--- a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
+++ b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
@@ -19,10 +19,10 @@
#pragma once
#include "ItemConverter.hxx"
-
+#include <com/sun/star/awt/Size.hpp>
+#include <optional>
#include <vector>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
@@ -38,7 +38,7 @@ public:
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
- const css::awt::Size* pRefSize );
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~RegressionEquationItemConverter() override;
diff --git a/chart2/source/controller/inc/SelectionHelper.hxx b/chart2/source/controller/inc/SelectionHelper.hxx
index ae241d61ab42..119640bd4300 100644
--- a/chart2/source/controller/inc/SelectionHelper.hxx
+++ b/chart2/source/controller/inc/SelectionHelper.hxx
@@ -39,6 +39,7 @@ public: //methods
bool isResizeableObjectSelected() const;
bool isRotateableObjectSelected( const rtl::Reference<::chart::ChartModel>& xChartModel ) const;
+ bool isTitleObjectSelected() const;
bool isDragableObjectSelected() const;
bool isAdditionalShapeSelected() const;
@@ -92,7 +93,7 @@ public:
DrawViewWrapper const & rDrawViewWrapper,
bool bGetDiagramInsteadOf_Wall=false );
- static bool isRotateableObject( const OUString& rCID
+ static bool isRotateableObject( std::u16string_view rCID
, const rtl::Reference<::chart::ChartModel>& xChartModel );
explicit SelectionHelper( SdrObject* pSelectedObj );
diff --git a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
index c658b08fa7dc..b55457ac5b30 100644
--- a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
+++ b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
@@ -26,6 +26,8 @@ namespace com::sun::star::chart2 { class XCoordinateSystem; }
namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::uno { class XComponentContext; }
namespace chart { class ChartModel; }
+namespace chart { class BaseCoordinateSystem; }
+namespace chart { class DataSeries; }
namespace chart::wrapper
{
@@ -35,8 +37,8 @@ class SeriesOptionsItemConverter final : public ItemConverter
public:
SeriesOptionsItemConverter(
const rtl::Reference<::chart::ChartModel> & xChartModel,
- const css::uno::Reference< css::uno::XComponentContext > & xContext,
- const css::uno::Reference< css::beans::XPropertySet > & rPropertySet,
+ css::uno::Reference< css::uno::XComponentContext > xContext,
+ const rtl::Reference<::chart::DataSeries> & rPropertySet,
SfxItemPool& rItemPool );
virtual ~SeriesOptionsItemConverter() override;
@@ -66,7 +68,7 @@ private:
sal_Int32 m_nStartingAngle;
bool m_bClockwise;
- css::uno::Reference< css::chart2::XCoordinateSystem > m_xCooSys;
+ rtl::Reference< ::chart::BaseCoordinateSystem > m_xCooSys;
css::uno::Sequence< sal_Int32 > m_aSupportedMissingValueTreatments;
sal_Int32 m_nMissingValueTreatment;
diff --git a/chart2/source/controller/inc/ShapeController.h b/chart2/source/controller/inc/ShapeController.h
deleted file mode 100644
index 392c28d2fe4c..000000000000
--- a/chart2/source/controller/inc/ShapeController.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- 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 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 .
- */
-#ifndef CHART_SHAPECONTROLLER_H
-#define CHART_SHAPECONTROLLER_H
-
-//Command Ids:
-#define COMMAND_ID_FORMAT_LINE 1
-#define COMMAND_ID_FORMAT_AREA 2
-#define COMMAND_ID_TEXT_ATTRIBUTES 3
-#define COMMAND_ID_TRANSFORM_DIALOG 4
-#define COMMAND_ID_OBJECT_TITLE_DESCRIPTION 5
-#define COMMAND_ID_RENAME_OBJECT 6
-#define COMMAND_ID_BRING_TO_FRONT 8
-#define COMMAND_ID_FORWARD 9
-#define COMMAND_ID_BACKWARD 10
-#define COMMAND_ID_SEND_TO_BACK 11
-#define COMMAND_ID_FONT_DIALOG 15
-#define COMMAND_ID_PARAGRAPH_DIALOG 16
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/StatisticsItemConverter.hxx b/chart2/source/controller/inc/StatisticsItemConverter.hxx
index b82c1c230ae8..a6c56a2691e7 100644
--- a/chart2/source/controller/inc/StatisticsItemConverter.hxx
+++ b/chart2/source/controller/inc/StatisticsItemConverter.hxx
@@ -31,7 +31,7 @@ class StatisticsItemConverter final : public ItemConverter
{
public:
StatisticsItemConverter(
- const rtl::Reference<::chart::ChartModel> & xChartModel,
+ rtl::Reference<::chart::ChartModel> xChartModel,
const css::uno::Reference< css::beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool );
virtual ~StatisticsItemConverter() override;
diff --git a/chart2/source/controller/inc/TabPageNotifiable.hxx b/chart2/source/controller/inc/TabPageNotifiable.hxx
index 440cda2de9aa..c0b53972e546 100644
--- a/chart2/source/controller/inc/TabPageNotifiable.hxx
+++ b/chart2/source/controller/inc/TabPageNotifiable.hxx
@@ -18,6 +18,8 @@
*/
#pragma once
+#include <sal/types.h>
+
// color to use as foreground for an invalid range
#define RANGE_SELECTION_INVALID_RANGE_FOREGROUND_COLOR COL_WHITE
// color to use as background for an invalid range
@@ -27,7 +29,7 @@ class BuilderPage;
namespace chart
{
-class TabPageNotifiable
+class SAL_LOPLUGIN_ANNOTATE("crosscast") TabPageNotifiable
{
public:
virtual void setInvalidPage(BuilderPage* pTabPage) = 0;
diff --git a/chart2/source/controller/inc/TextLabelItemConverter.hxx b/chart2/source/controller/inc/TextLabelItemConverter.hxx
index d44138332798..cb5406cf6a01 100644
--- a/chart2/source/controller/inc/TextLabelItemConverter.hxx
+++ b/chart2/source/controller/inc/TextLabelItemConverter.hxx
@@ -20,14 +20,16 @@
#include "ItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/uno/Sequence.h>
#include <rtl/ref.hxx>
+#include <optional>
#include <vector>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::chart2 { class XDataSeries; }
namespace com::sun::star::frame { class XModel; }
namespace chart { class ChartModel; }
+namespace chart { class DataSeries; }
namespace chart::wrapper {
@@ -37,9 +39,9 @@ public:
TextLabelItemConverter(
const rtl::Reference<::chart::ChartModel>& xChartModel,
const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
- const css::uno::Reference<css::chart2::XDataSeries>& xSeries,
+ const rtl::Reference<::chart::DataSeries>& xSeries,
SfxItemPool& rItemPool,
- const css::awt::Size* pRefSize,
+ const std::optional<css::awt::Size>& pRefSize,
bool bDataSeries,
sal_Int32 nNumberFormat,
sal_Int32 nPercentNumberFormat );
@@ -65,7 +67,7 @@ private:
bool mbDataSeries:1;
bool mbForbidPercentValue:1;
- css::uno::Reference<css::chart2::XDataSeries> m_xSeries;
+ rtl::Reference<::chart::DataSeries> m_xSeries;
};
}
diff --git a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
index 4952e112db88..49541b1552d4 100644
--- a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
+++ b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
@@ -19,7 +19,6 @@
#pragma once
-#include <com/sun/star/uno/Reference.h>
#include <vcl/timer.hxx>
#include <rtl/ref.hxx>
@@ -41,7 +40,7 @@ class ChartModel;
class TimerTriggeredControllerLock final
{
public:
- TimerTriggeredControllerLock(const rtl::Reference<::chart::ChartModel>& xModel);
+ TimerTriggeredControllerLock(rtl::Reference<::chart::ChartModel> xModel);
~TimerTriggeredControllerLock();
void startTimer();
diff --git a/chart2/source/controller/inc/TitleDialogData.hxx b/chart2/source/controller/inc/TitleDialogData.hxx
index 5f398f34a1f0..123ae9d6d65f 100644
--- a/chart2/source/controller/inc/TitleDialogData.hxx
+++ b/chart2/source/controller/inc/TitleDialogData.hxx
@@ -19,7 +19,6 @@
#pragma once
#include <ReferenceSizeProvider.hxx>
-#include <memory>
#include <com/sun/star/uno/Sequence.hxx>
#include <rtl/ref.hxx>
@@ -35,9 +34,9 @@ struct TitleDialogData
css::uno::Sequence< sal_Bool > aPossibilityList;
css::uno::Sequence< sal_Bool > aExistenceList;
css::uno::Sequence< OUString > aTextList;
- std::unique_ptr< ReferenceSizeProvider > apReferenceSizeProvider;
+ std::optional< ReferenceSizeProvider > apReferenceSizeProvider;
- TitleDialogData(std::unique_ptr<ReferenceSizeProvider> pReferenzeSizeProvider = nullptr);
+ TitleDialogData(std::optional<ReferenceSizeProvider> pReferenzeSizeProvider = std::nullopt);
void readFromModel( const rtl::Reference<::chart::ChartModel>& xChartModel );
/* return true if anything has changed;
@@ -45,7 +44,7 @@ struct TitleDialogData
*/
bool writeDifferenceToModel( const rtl::Reference<::chart::ChartModel>& xChartModel
, const css::uno::Reference< css::uno::XComponentContext >& xContext
- , TitleDialogData* pOldState=nullptr );
+ , const TitleDialogData* pOldState=nullptr );
};
} //namespace chart
diff --git a/chart2/source/controller/inc/TitleItemConverter.hxx b/chart2/source/controller/inc/TitleItemConverter.hxx
index 5a2686d62814..4a306b690363 100644
--- a/chart2/source/controller/inc/TitleItemConverter.hxx
+++ b/chart2/source/controller/inc/TitleItemConverter.hxx
@@ -20,9 +20,10 @@
#include "ItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
+#include <optional>
#include <vector>
-namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
class SdrModel;
@@ -36,7 +37,7 @@ public:
const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
SfxItemPool& rItemPool, SdrModel& rDrawModel,
const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
- const css::awt::Size* pRefSize );
+ const std::optional<css::awt::Size>& pRefSize );
virtual ~TitleItemConverter() override;
diff --git a/chart2/source/controller/inc/dlg_ChartType.hxx b/chart2/source/controller/inc/dlg_ChartType.hxx
index 7520869e86c4..02e6ac998bbc 100644
--- a/chart2/source/controller/inc/dlg_ChartType.hxx
+++ b/chart2/source/controller/inc/dlg_ChartType.hxx
@@ -34,7 +34,7 @@ class ChartTypeTabPage;
class ChartTypeDialog final : public weld::GenericDialogController
{
public:
- ChartTypeDialog(weld::Window* pWindow, const rtl::Reference<::chart::ChartModel>& xChartModel);
+ ChartTypeDialog(weld::Window* pWindow, rtl::Reference<::chart::ChartModel> xChartModel);
virtual ~ChartTypeDialog() override;
private:
diff --git a/chart2/source/controller/inc/dlg_CreationWizard.hxx b/chart2/source/controller/inc/dlg_CreationWizard.hxx
index a0fcc9dae6f9..1b782632f4d3 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard.hxx
@@ -37,7 +37,6 @@ class XComponentContext;
}
using vcl::WizardTypes::WizardState;
-using vcl::WizardTypes::CommitPageReason;
namespace chart
{
@@ -49,7 +48,7 @@ class CreationWizard final : public vcl::RoadmapWizardMachine, public TabPageNot
{
public:
CreationWizard(weld::Window* pParent, const rtl::Reference<::chart::ChartModel>& xChartModel,
- const css::uno::Reference<css::uno::XComponentContext>& xContext);
+ css::uno::Reference<css::uno::XComponentContext> xContext);
CreationWizard() = delete;
virtual ~CreationWizard() override;
diff --git a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
index 7e1792f087f1..89b8cb5a08f2 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
@@ -53,7 +53,7 @@ class CreationWizardUnoDlg final : public cppu::BaseMutex
public:
CreationWizardUnoDlg() = delete;
- CreationWizardUnoDlg( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ CreationWizardUnoDlg( css::uno::Reference< css::uno::XComponentContext > xContext );
virtual ~CreationWizardUnoDlg() override;
// XInterface
diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx
index 5156e0831b45..205e822a12a5 100644
--- a/chart2/source/controller/inc/dlg_DataEditor.hxx
+++ b/chart2/source/controller/inc/dlg_DataEditor.hxx
@@ -40,7 +40,7 @@ class DataEditor final : public weld::GenericDialogController
{
public:
DataEditor(weld::Window* pParent,
- const rtl::Reference<::chart::ChartModel> & xChartDoc,
+ rtl::Reference<::chart::ChartModel> xChartDoc,
const css::uno::Reference<css::uno::XComponentContext> & xContext);
virtual ~DataEditor() override;
@@ -63,7 +63,7 @@ private:
VclPtr<DataBrowser> m_xBrwData;
/// handles actions of the toolbox
- DECL_LINK( ToolboxHdl, const OString&, void );
+ DECL_LINK( ToolboxHdl, const OUString&, void );
/// is called, if the cursor of the table has moved
DECL_LINK( BrowserCursorMovedHdl, DataBrowser*, void);
};
diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx
index 97eb659c7052..166131e30ec9 100644
--- a/chart2/source/controller/inc/dlg_DataSource.hxx
+++ b/chart2/source/controller/inc/dlg_DataSource.hxx
@@ -41,8 +41,7 @@ class DataSourceDialog final :
public:
explicit DataSourceDialog(
weld::Window * pParent,
- const rtl::Reference<::chart::ChartModel> & xChartDocument,
- const css::uno::Reference< css::uno::XComponentContext > & xContext );
+ const rtl::Reference<::chart::ChartModel> & xChartDocument );
virtual ~DataSourceDialog() override;
// from GenericDialogController base
@@ -53,8 +52,8 @@ public:
virtual void setValidPage( BuilderPage * pTabPage ) override;
private:
- DECL_LINK(ActivatePageHdl, const OString&, void);
- DECL_LINK(DeactivatePageHdl, const OString&, bool);
+ DECL_LINK(ActivatePageHdl, const OUString&, void);
+ DECL_LINK(DeactivatePageHdl, const OUString&, bool);
std::unique_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider;
std::unique_ptr< DialogModel > m_apDialogModel;
diff --git a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
index b69ab70f64f3..2b265c7d6541 100644
--- a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
+++ b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
@@ -38,7 +38,6 @@ struct InsertAxisOrGridDialogData
\************************************************************************/
class SchAxisDlg : public weld::GenericDialogController
{
-protected:
std::unique_ptr<weld::CheckButton> m_xCbPrimaryX;
std::unique_ptr<weld::CheckButton> m_xCbPrimaryY;
std::unique_ptr<weld::CheckButton> m_xCbPrimaryZ;
diff --git a/chart2/source/controller/inc/dlg_InsertDataTable.hxx b/chart2/source/controller/inc/dlg_InsertDataTable.hxx
new file mode 100644
index 000000000000..cd77099864c4
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_InsertDataTable.hxx
@@ -0,0 +1,52 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include <vcl/weld.hxx>
+#include "res_DataTableProperties.hxx"
+
+namespace chart
+{
+/** The data table properties (data) used by the dialog */
+struct DataTableDialogData
+{
+ bool mbShow = true;
+ bool mbHorizontalBorders = false;
+ bool mbVerticalBorders = false;
+ bool mbOutline = false;
+ bool mbKeys = false;
+};
+
+/** The dialog to change the data table specific properties */
+class InsertDataTableDialog final : public weld::GenericDialogController
+{
+private:
+ DataTablePropertiesResources m_aDataTablePropertiesResources;
+ std::unique_ptr<weld::CheckButton> m_xCbShowDataTable;
+
+ DataTableDialogData m_aData;
+
+ DECL_LINK(ShowDataTableToggle, weld::Toggleable&, void);
+
+ void changeEnabled();
+
+public:
+ InsertDataTableDialog(weld::Window* pParent);
+
+ /** Set the initial state of the data table properties */
+ void init(DataTableDialogData const& rData);
+
+ /** Get the state of the data table properties from the dialog */
+ DataTableDialogData& getDataTableDialogData();
+};
+
+} //namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_InsertErrorBars.hxx b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
index e68036153c10..4f8e8d094a34 100644
--- a/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
+++ b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
@@ -31,6 +31,8 @@ class XModel;
namespace chart
{
+class ChartView;
+
class InsertErrorBarsDialog final : public weld::GenericDialogController
{
public:
@@ -40,10 +42,10 @@ public:
void SetAxisMinorStepWidthForErrorBarDecimals(double fMinorStepWidth);
- static double getAxisMinorStepWidthForErrorBarDecimals(
- const rtl::Reference<::chart::ChartModel>& xChartModel,
- const css::uno::Reference<css::uno::XInterface>& xChartView,
- const OUString& rSelectedObjectCID);
+ static double
+ getAxisMinorStepWidthForErrorBarDecimals(const rtl::Reference<::chart::ChartModel>& xChartModel,
+ const rtl::Reference<::chart::ChartView>& xChartView,
+ std::u16string_view rSelectedObjectCID);
void FillItemSet(SfxItemSet& rOutAttrs);
diff --git a/chart2/source/controller/inc/dlg_ObjectProperties.hxx b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
index 238ccc83b42f..621f096753e4 100644
--- a/chart2/source/controller/inc/dlg_ObjectProperties.hxx
+++ b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
@@ -20,9 +20,9 @@
#include <ObjectIdentifier.hxx>
#include <sfx2/tabdlg.hxx>
+#include <vcl/graph.hxx>
namespace com::sun::star::util { class XNumberFormatsSupplier; }
-class Graphic;
namespace chart
{
@@ -30,7 +30,7 @@ namespace chart
class ObjectPropertiesDialogParameter final
{
public:
- ObjectPropertiesDialogParameter( const OUString& rObjectCID );
+ ObjectPropertiesDialogParameter( OUString aObjectCID );
~ObjectPropertiesDialogParameter();
void init( const rtl::Reference<::chart::ChartModel>& xModel );
@@ -115,14 +115,14 @@ private:
SvNumberFormatter* m_pNumberFormatter;
std::optional<SfxItemSet> m_oSymbolShapeProperties;
- std::unique_ptr<Graphic> m_pAutoSymbolGraphic;
+ std::optional<Graphic> m_oAutoSymbolGraphic;
double m_fAxisMinorStepWidthForErrorBarDecimals;
bool m_bOKPressed;
DECL_LINK(OKPressed, weld::Button&, void);
- virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override;
public:
SchAttribTabDlg(weld::Window* pParent, const SfxItemSet* pAttr,
@@ -133,7 +133,7 @@ public:
//pSymbolShapeProperties: Properties to be set on the symbollist shapes
//pAutoSymbolGraphic: Graphic to be shown if AutoSymbol gets selected
- void setSymbolInformation( SfxItemSet&& rSymbolShapeProperties, std::unique_ptr<Graphic> pAutoSymbolGraphic );
+ void setSymbolInformation( SfxItemSet&& rSymbolShapeProperties, std::optional<Graphic> oAutoSymbolGraphic );
void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
diff --git a/chart2/source/controller/inc/dlg_ShapeFont.hxx b/chart2/source/controller/inc/dlg_ShapeFont.hxx
index 6998ba47094b..cfeb002fb92d 100644
--- a/chart2/source/controller/inc/dlg_ShapeFont.hxx
+++ b/chart2/source/controller/inc/dlg_ShapeFont.hxx
@@ -33,7 +33,7 @@ public:
const ViewElementListProvider* pViewElementListProvider);
private:
- virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override;
const ViewElementListProvider* m_pViewElementListProvider;
};
diff --git a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
index 9d4d7496d64d..15d0c014d848 100644
--- a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
+++ b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
@@ -30,7 +30,7 @@ public:
ShapeParagraphDialog(weld::Window* pParent, const SfxItemSet* pAttr);
private:
- virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override;
};
} // namespace chart
diff --git a/chart2/source/controller/inc/dlg_View3D.hxx b/chart2/source/controller/inc/dlg_View3D.hxx
index c165e828535e..66c4a8eaf41a 100644
--- a/chart2/source/controller/inc/dlg_View3D.hxx
+++ b/chart2/source/controller/inc/dlg_View3D.hxx
@@ -41,7 +41,7 @@ public:
virtual short run() override;
private:
- DECL_LINK(ActivatePageHdl, const OString&, void);
+ DECL_LINK(ActivatePageHdl, const OUString&, void);
ControllerLockHelper m_aControllerLocker;
diff --git a/chart2/source/controller/inc/helpids.h b/chart2/source/controller/inc/helpids.h
index 69a23771c8dd..775ec1489b42 100644
--- a/chart2/source/controller/inc/helpids.h
+++ b/chart2/source/controller/inc/helpids.h
@@ -19,14 +19,14 @@
#pragma once
-#include <rtl/string.hxx>
+#include <rtl/ustring.hxx>
-inline constexpr OStringLiteral HID_SCH_WIN_DOCUMENT = "CHART2_HID_SCH_WIN_DOCUMENT";
-inline constexpr OStringLiteral HID_SCH_ERROR_BARS_FROM_DATA = "CHART2_SCH_ERROR_BARS_FROM_DATA";
+inline constexpr OUString HID_SCH_WIN_DOCUMENT = u"CHART2_HID_SCH_WIN_DOCUMENT"_ustr;
+inline constexpr OUString HID_SCH_ERROR_BARS_FROM_DATA = u"CHART2_SCH_ERROR_BARS_FROM_DATA"_ustr;
-inline constexpr OStringLiteral HID_SCH_WIZARD_ROADMAP = "CHART2_HID_SCH_WIZARD_ROADMAP";
-inline constexpr OStringLiteral HID_SCH_DATA_SERIES_LABEL = "CHART2_HID_SCH_DATA_SERIES_LABEL";
+inline constexpr OUString HID_SCH_WIZARD_ROADMAP = u"CHART2_HID_SCH_WIZARD_ROADMAP"_ustr;
+inline constexpr OUString HID_SCH_DATA_SERIES_LABEL = u"CHART2_HID_SCH_DATA_SERIES_LABEL"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/res_DataTableProperties.hxx b/chart2/source/controller/inc/res_DataTableProperties.hxx
new file mode 100644
index 000000000000..4b2aaa4f2ef7
--- /dev/null
+++ b/chart2/source/controller/inc/res_DataTableProperties.hxx
@@ -0,0 +1,48 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include <svl/itemset.hxx>
+#include <vcl/weld.hxx>
+
+namespace chart
+{
+/** The shared UI elements for the data table properties */
+class DataTablePropertiesResources final
+{
+private:
+ std::unique_ptr<weld::CheckButton> m_xCbHorizontalBorder;
+ std::unique_ptr<weld::CheckButton> m_xCbVerticalBorder;
+ std::unique_ptr<weld::CheckButton> m_xCbOutilne;
+ std::unique_ptr<weld::CheckButton> m_xCbKeys;
+
+public:
+ DataTablePropertiesResources(weld::Builder& rBuilder);
+
+ void initFromItemSet(SfxItemSet const& rInAttrs);
+ bool writeToItemSet(SfxItemSet& rOutAttrs) const;
+ void setChecksSensitive(bool bSensitive);
+
+ bool getHorizontalBorder() { return m_xCbHorizontalBorder->get_active(); }
+ void setHorizontalBorder(bool bActive) { m_xCbHorizontalBorder->set_active(bActive); }
+
+ bool getVerticalBorder() { return m_xCbVerticalBorder->get_active(); }
+ void setVerticalBorder(bool bActive) { m_xCbVerticalBorder->set_active(bActive); }
+
+ bool getOutline() { return m_xCbOutilne->get_active(); }
+ void setOutline(bool bActive) { m_xCbOutilne->set_active(bActive); }
+
+ bool getKeys() { return m_xCbKeys->get_active(); }
+ void setKeys(bool bActive) { m_xCbKeys->set_active(bActive); }
+};
+
+} //namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx
index d34c28cdd79c..80ccaa85da6e 100644
--- a/chart2/source/controller/inc/res_LegendPosition.hxx
+++ b/chart2/source/controller/inc/res_LegendPosition.hxx
@@ -40,8 +40,8 @@ public:
//constructor without Display checkbox
LegendPositionResources(weld::Builder& rBuilder);
//constructor inclusive Display checkbox
- LegendPositionResources(weld::Builder& rBuilder, const css::uno::Reference<
- css::uno::XComponentContext>& xCC );
+ LegendPositionResources(weld::Builder& rBuilder, css::uno::Reference<
+ css::uno::XComponentContext> xCC );
~LegendPositionResources();
void writeToResources( const rtl::Reference<::chart::ChartModel>& xChartModel );
@@ -57,6 +57,7 @@ public:
private:
void impl_setRadioButtonToggleHdl();
+ void PositionEnable();
private:
css::uno::Reference< css::uno::XComponentContext> m_xCC;
diff --git a/chart2/source/controller/inc/uiobject.hxx b/chart2/source/controller/inc/uiobject.hxx
index b40fffb4451b..6de63f5d3fdf 100644
--- a/chart2/source/controller/inc/uiobject.hxx
+++ b/chart2/source/controller/inc/uiobject.hxx
@@ -19,7 +19,7 @@ class ChartUIObject final : public UIObject
public:
ChartUIObject(const VclPtr<chart::ChartWindow>& xChartWindow,
- const OUString& rCID);
+ OUString aCID);
StringMap get_state() override;
@@ -32,6 +32,8 @@ public:
virtual OUString get_type() const override;
+ virtual bool equals(const UIObject& rOther) const override;
+
private:
OUString maCID;
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index cb53acb3a873..c91eb41dbe97 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -25,10 +25,11 @@
#include <chartview/ExplicitScaleValues.hxx>
#include <chartview/ExplicitValueProvider.hxx>
#include "SchWhichPairs.hxx"
-#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <CommonConverters.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <Diagram.hxx>
#include <unonames.hxx>
@@ -40,10 +41,8 @@
#include <com/sun/star/chart/ChartAxisPosition.hpp>
#include <com/sun/star/chart/TimeInterval.hpp>
#include <com/sun/star/chart2/XAxis.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/AxisOrientation.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <osl/diagnose.h>
#include <o3tl/any.hxx>
@@ -85,7 +84,7 @@ AxisItemConverter::AxisItemConverter(
const rtl::Reference<::chart::ChartModel> & xChartDoc,
::chart::ExplicitScaleData const * pScale /* = NULL */,
::chart::ExplicitIncrementData const * pIncrement /* = NULL */,
- const awt::Size* pRefSize ) :
+ const std::optional<awt::Size>& pRefSize ) :
ItemConverter( rPropertySet, rItemPool ),
m_xChartDoc( xChartDoc )
{
@@ -101,8 +100,8 @@ AxisItemConverter::AxisItemConverter(
m_aConverters.emplace_back(
new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize"));
- m_xAxis.set( Reference< chart2::XAxis >( rPropertySet, uno::UNO_QUERY ) );
- OSL_ASSERT( m_xAxis.is());
+ m_xAxis = dynamic_cast<::chart::Axis*>(rPropertySet.get());
+ assert(m_xAxis);
}
AxisItemConverter::~AxisItemConverter()
@@ -180,12 +179,12 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
{
double fMax = 10.0;
if( rScale.Maximum >>= fMax )
- rOutItemSet.Put( SvxDoubleItem( fMax, nWhichId ) );
+ rOutItemSet.Put( SvxDoubleItem( fMax, SCHATTR_AXIS_MAX ) );
else
{
if( m_pExplicitScale )
fMax = m_pExplicitScale->Maximum;
- rOutItemSet.Put( SvxDoubleItem( fMax, nWhichId ) );
+ rOutItemSet.Put( SvxDoubleItem( fMax, SCHATTR_AXIS_MAX ) );
}
}
break;
@@ -198,9 +197,9 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
{
double fMin = 0.0;
if( rScale.Minimum >>= fMin )
- rOutItemSet.Put( SvxDoubleItem( fMin, nWhichId ) );
+ rOutItemSet.Put( SvxDoubleItem( fMin, SCHATTR_AXIS_MIN ) );
else if( m_pExplicitScale )
- rOutItemSet.Put( SvxDoubleItem( m_pExplicitScale->Minimum, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem( m_pExplicitScale->Minimum, SCHATTR_AXIS_MIN ));
}
break;
@@ -238,17 +237,17 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
{
TimeInterval aTimeInterval;
if( rTimeIncrement.MajorTimeInterval >>= aTimeInterval )
- rOutItemSet.Put( SvxDoubleItem(aTimeInterval.Number, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem(aTimeInterval.Number, SCHATTR_AXIS_STEP_MAIN ));
else if( m_pExplicitIncrement )
- rOutItemSet.Put( SvxDoubleItem( m_pExplicitIncrement->MajorTimeInterval.Number, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem( m_pExplicitIncrement->MajorTimeInterval.Number, SCHATTR_AXIS_STEP_MAIN ));
}
else
{
double fDistance = 1.0;
if( rIncrement.Distance >>= fDistance )
- rOutItemSet.Put( SvxDoubleItem(fDistance, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem(fDistance, SCHATTR_AXIS_STEP_MAIN ));
else if( m_pExplicitIncrement )
- rOutItemSet.Put( SvxDoubleItem( m_pExplicitIncrement->Distance, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem( m_pExplicitIncrement->Distance, SCHATTR_AXIS_STEP_MAIN ));
}
break;
@@ -307,7 +306,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
break;
case SCHATTR_AXIS_TIME_RESOLUTION:
{
- tools::Long nTimeResolution=0;
+ sal_Int32 nTimeResolution=0;
if( rTimeIncrement.TimeResolution >>= nTimeResolution )
rOutItemSet.Put( SfxInt32Item( nWhichId, nTimeResolution ) );
else if( m_pExplicitScale )
@@ -329,7 +328,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
if( m_pExplicitScale )
fOrigin = m_pExplicitScale->Origin;
}
- rOutItemSet.Put( SvxDoubleItem( fOrigin, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem( fOrigin, SCHATTR_AXIS_ORIGIN ));
}
break;
@@ -345,7 +344,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
{
double fValue = 0.0;
if( GetPropertySet()->getPropertyValue( "CrossoverValue" ) >>= fValue )
- rOutItemSet.Put( SvxDoubleItem( fValue, nWhichId ) );
+ rOutItemSet.Put( SvxDoubleItem( fValue, SCHATTR_AXIS_POSITION_VALUE ) );
}
break;
@@ -355,9 +354,9 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
//necessary tp display the crossing value with an appropriate format
rtl::Reference< BaseCoordinateSystem > xCooSys( AxisHelper::getCoordinateSystemOfAxis(
- m_xAxis, ChartModelHelper::findDiagram( m_xChartDoc ) ) );
+ m_xAxis, m_xChartDoc->getFirstChartDiagram() ) );
- Reference< chart2::XAxis > xCrossingMainAxis( AxisHelper::getCrossingMainAxis( m_xAxis, xCooSys ) );
+ rtl::Reference< Axis > xCrossingMainAxis = AxisHelper::getCrossingMainAxis( m_xAxis, xCooSys );
sal_Int32 nFormatKey = ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
xCrossingMainAxis, xCooSys, m_xChartDoc);
@@ -393,7 +392,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
if( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fVal )
{
- rOutItemSet.Put( SdrAngleItem( nWhichId, Degree100(static_cast< sal_Int32 >(
+ rOutItemSet.Put( SdrAngleItem( SCHATTR_TEXT_DEGREES, Degree100(static_cast< sal_Int32 >(
::rtl::math::round( fVal * 100.0 )) ) ));
}
}
@@ -403,9 +402,9 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
{
if( m_pExplicitScale )
{
- Reference< chart2::XCoordinateSystem > xCooSys(
+ rtl::Reference< BaseCoordinateSystem > xCooSys(
AxisHelper::getCoordinateSystemOfAxis(
- m_xAxis, ChartModelHelper::findDiagram( m_xChartDoc ) ) );
+ m_xAxis, m_xChartDoc->getFirstChartDiagram() ) );
sal_Int32 nFormatKey = ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
m_xAxis, xCooSys, m_xChartDoc);
@@ -433,8 +432,8 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
case SCHATTR_AXIS_ALLOW_DATEAXIS:
{
- Reference< chart2::XCoordinateSystem > xCooSys(
- AxisHelper::getCoordinateSystemOfAxis( m_xAxis, ChartModelHelper::findDiagram( m_xChartDoc ) ) );
+ rtl::Reference< BaseCoordinateSystem > xCooSys(
+ AxisHelper::getCoordinateSystemOfAxis( m_xAxis, m_xChartDoc->getFirstChartDiagram() ) );
sal_Int32 nDimensionIndex=0; sal_Int32 nAxisIndex=0;
AxisHelper::getIndicesForAxis(m_xAxis, xCooSys, nDimensionIndex, nAxisIndex );
bool bChartTypeAllowsDateAxis = ChartTypeHelper::isSupportingDateAxis( AxisHelper::getChartTypeByIndex( xCooSys, 0 ), nDimensionIndex );
@@ -715,14 +714,14 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
if( !AxisHelper::isAxisPositioningEnabled() )
{
//keep old and new settings for axis positioning in sync somehow
- Reference< chart2::XCoordinateSystem > xCooSys( AxisHelper::getCoordinateSystemOfAxis(
- m_xAxis, ChartModelHelper::findDiagram( m_xChartDoc ) ) );
+ rtl::Reference< BaseCoordinateSystem > xCooSys( AxisHelper::getCoordinateSystemOfAxis(
+ m_xAxis, m_xChartDoc->getFirstChartDiagram() ) );
sal_Int32 nDimensionIndex=0;
sal_Int32 nAxisIndex=0;
if( AxisHelper::getIndicesForAxis( m_xAxis, xCooSys, nDimensionIndex, nAxisIndex ) && nAxisIndex==0 )
{
- Reference< beans::XPropertySet > xCrossingMainAxis( AxisHelper::getCrossingMainAxis( m_xAxis, xCooSys ), uno::UNO_QUERY );
+ rtl::Reference< Axis > xCrossingMainAxis = AxisHelper::getCrossingMainAxis( m_xAxis, xCooSys );
if( xCrossingMainAxis.is() )
{
double fValue = 0.0;
@@ -757,7 +756,8 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
//move the parallel axes to the other side if necessary
if( eAxisPos==css::chart::ChartAxisPosition_START || eAxisPos==css::chart::ChartAxisPosition_END )
{
- Reference< beans::XPropertySet > xParallelAxis( AxisHelper::getParallelAxis( m_xAxis, ChartModelHelper::findDiagram( m_xChartDoc ) ), uno::UNO_QUERY );
+ rtl::Reference<Diagram> xDiagram = m_xChartDoc->getFirstChartDiagram();
+ rtl::Reference< Axis > xParallelAxis = AxisHelper::getParallelAxis( m_xAxis, xDiagram );
if( xParallelAxis.is() )
{
css::chart::ChartAxisPosition eOtherPos;
@@ -792,8 +792,8 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
//keep old and new settings for axis positioning in sync somehow
{
- Reference< chart2::XCoordinateSystem > xCooSys( AxisHelper::getCoordinateSystemOfAxis(
- m_xAxis, ChartModelHelper::findDiagram( m_xChartDoc ) ) );
+ rtl::Reference< BaseCoordinateSystem > xCooSys( AxisHelper::getCoordinateSystemOfAxis(
+ m_xAxis, m_xChartDoc->getFirstChartDiagram() ) );
sal_Int32 nDimensionIndex=0;
sal_Int32 nAxisIndex=0;
@@ -840,7 +840,8 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
//move the parallel axes to the other side if necessary
if( ePos==css::chart::ChartAxisLabelPosition_OUTSIDE_START || ePos==css::chart::ChartAxisLabelPosition_OUTSIDE_END )
{
- Reference< beans::XPropertySet > xParallelAxis( AxisHelper::getParallelAxis( m_xAxis, ChartModelHelper::findDiagram( m_xChartDoc ) ), uno::UNO_QUERY );
+ rtl::Reference<Diagram> xDiagram = m_xChartDoc->getFirstChartDiagram();
+ rtl::Reference< Axis > xParallelAxis = AxisHelper::getParallelAxis( m_xAxis, xDiagram );
if( xParallelAxis.is() )
{
css::chart::ChartAxisLabelPosition eOtherPos;
@@ -897,8 +898,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
if( m_pExplicitScale )
{
bool bUseSourceFormat =
- static_cast< const SfxBoolItem & >(
- rItemSet.Get( SID_ATTR_NUMBERFORMAT_SOURCE )).GetValue();
+ rItemSet.Get( SID_ATTR_NUMBERFORMAT_SOURCE ).GetValue();
if( ! bUseSourceFormat )
{
@@ -940,9 +940,9 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
}
else
{
- Reference< chart2::XCoordinateSystem > xCooSys(
- AxisHelper::getCoordinateSystemOfAxis(
- m_xAxis, ChartModelHelper::findDiagram( m_xChartDoc ) ) );
+ rtl::Reference< BaseCoordinateSystem > xCooSys =
+ AxisHelper::getCoordinateSystemOfAxis(
+ m_xAxis, m_xChartDoc->getFirstChartDiagram() );
sal_Int32 nFormatKey = ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
m_xAxis, xCooSys, m_xChartDoc);
diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
index 5345f9168ca3..a338ae70b4b8 100644
--- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
@@ -33,7 +33,8 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/chart2/XFormattedString.hpp>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
@@ -73,11 +74,11 @@ CharacterPropertyItemConverter::CharacterPropertyItemConverter(
CharacterPropertyItemConverter::CharacterPropertyItemConverter(
const uno::Reference< beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool,
- const awt::Size* pRefSize,
- const OUString & rRefSizePropertyName,
+ const std::optional<awt::Size>& pRefSize,
+ OUString aRefSizePropertyName,
const uno::Reference< beans::XPropertySet > & rRefSizePropSet ) :
ItemConverter( rPropertySet, rItemPool ),
- m_aRefSizePropertyName( rRefSizePropertyName ),
+ m_aRefSizePropertyName(std::move( aRefSizePropertyName )),
m_xRefSizePropSet( rRefSizePropSet.is() ? rRefSizePropSet : rPropertySet )
{
if (pRefSize)
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 264bdf92af3b..571f98a56952 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -25,11 +25,12 @@
#include <CharacterPropertyItemConverter.hxx>
#include <StatisticsItemConverter.hxx>
#include <SeriesOptionsItemConverter.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
-#include <DiagramHelper.hxx>
+#include <DataSeriesProperties.hxx>
#include <Diagram.hxx>
#include <ChartModel.hxx>
-#include <ChartModelHelper.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <unonames.hxx>
@@ -39,7 +40,6 @@
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/frame/XModel.hpp>
#include <comphelper/sequence.hxx>
#include <svx/xflclit.hxx>
@@ -50,7 +50,7 @@
#include <editeng/brushitem.hxx>
#include <svl/ilstitem.hxx>
#include <svx/sdangitm.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <vcl/graph.hxx>
#include <rtl/math.hxx>
@@ -60,6 +60,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Reference;
namespace chart::wrapper {
@@ -105,7 +106,7 @@ bool lcl_NumberFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxItemSe
bool bChanged = false;
if( !xPropertySet.is() )
return bChanged;
- OUString aPropertyName = (nWhichId==SID_ATTR_NUMBERFORMAT_VALUE) ? OUString(CHART_UNONAME_NUMFMT) : OUString( "PercentageNumberFormat" );
+ OUString aPropertyName = (nWhichId==SID_ATTR_NUMBERFORMAT_VALUE) ? CHART_UNONAME_NUMFMT : OUString( "PercentageNumberFormat" );
sal_uInt16 nSourceWhich = (nWhichId==SID_ATTR_NUMBERFORMAT_VALUE) ? SID_ATTR_NUMBERFORMAT_SOURCE : SCHATTR_PERCENT_NUMBERFORMAT_SOURCE;
if( rItemSet.GetItemState( nSourceWhich ) != SfxItemState::SET )
@@ -131,7 +132,7 @@ bool lcl_NumberFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxItemSe
uno::Any aOldValue( xPropertySet->getPropertyValue(aPropertyName) );
if( bOverwriteAttributedDataPointsAlso )
{
- Reference< chart2::XDataSeries > xSeries( xPropertySet, uno::UNO_QUERY);
+ rtl::Reference< DataSeries > xSeries( dynamic_cast<DataSeries*>(xPropertySet.get()) );
if( aValue != aOldValue ||
::chart::DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, aPropertyName, aOldValue ) )
{
@@ -152,7 +153,7 @@ bool lcl_UseSourceFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxIte
bool bChanged = false;
if( !xPropertySet.is() )
return bChanged;
- OUString aPropertyName = (nWhichId==SID_ATTR_NUMBERFORMAT_SOURCE) ? OUString(CHART_UNONAME_NUMFMT) : OUString( "PercentageNumberFormat" );
+ OUString aPropertyName = (nWhichId==SID_ATTR_NUMBERFORMAT_SOURCE) ? CHART_UNONAME_NUMFMT : OUString( "PercentageNumberFormat" );
sal_uInt16 nFormatWhich = (nWhichId==SID_ATTR_NUMBERFORMAT_SOURCE) ? SID_ATTR_NUMBERFORMAT_VALUE : SCHATTR_PERCENT_NUMBERFORMAT_VALUE;
if( rItemSet.GetItemState( nWhichId ) != SfxItemState::SET )
@@ -179,7 +180,7 @@ bool lcl_UseSourceFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxIte
uno::Any aOldValue( xPropertySet->getPropertyValue(aPropertyName) );
if( bOverwriteAttributedDataPointsAlso )
{
- Reference< chart2::XDataSeries > xSeries( xPropertySet, uno::UNO_QUERY);
+ rtl::Reference< DataSeries > xSeries( dynamic_cast<DataSeries*>(xPropertySet.get()) );
if( aNewValue != aOldValue ||
::chart::DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, aPropertyName, aOldValue ) )
{
@@ -202,12 +203,12 @@ DataPointItemConverter::DataPointItemConverter(
const rtl::Reference<::chart::ChartModel> & xChartModel,
const uno::Reference< uno::XComponentContext > & xContext,
const uno::Reference< beans::XPropertySet > & rPropertySet,
- const uno::Reference< XDataSeries > & xSeries,
+ const rtl::Reference< DataSeries > & xSeries,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const uno::Reference<lang::XMultiServiceFactory>& xNamedPropertyContainerFactory,
GraphicObjectType eMapTo,
- const awt::Size* pRefSize,
+ const std::optional<awt::Size>& pRefSize,
bool bDataSeries,
bool bUseSpecialFillColor,
sal_Int32 nSpecialFillColor,
@@ -232,15 +233,17 @@ DataPointItemConverter::DataPointItemConverter(
m_aConverters.emplace_back( new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize"));
if( bDataSeries )
{
+ assert(dynamic_cast<DataSeries*>(rPropertySet.get()));
m_aConverters.emplace_back( new StatisticsItemConverter( xChartModel, rPropertySet, rItemPool ));
- m_aConverters.emplace_back( new SeriesOptionsItemConverter( xChartModel, xContext, rPropertySet, rItemPool ));
+ m_aConverters.emplace_back( new SeriesOptionsItemConverter( xChartModel, xContext,
+ dynamic_cast<DataSeries*>(rPropertySet.get()), rItemPool ));
}
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram(xChartModel) );
- uno::Reference< XChartType > xChartType( DiagramHelper::getChartTypeOfSeries( xDiagram , xSeries ) );
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
+ rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeOfSeries( xSeries ) );
bool bFound = false;
bool bAmbiguous = false;
- bool bSwapXAndY = DiagramHelper::getVertical( xDiagram, bFound, bAmbiguous );
+ bool bSwapXAndY = xDiagram->getVertical( bFound, bAmbiguous );
m_aAvailableLabelPlacements = ChartTypeHelper::getSupportedLabelPlacements( xChartType, bSwapXAndY, xSeries );
m_bForbidPercentValue = ChartTypeHelper::getAxisType( xChartType, 0 ) != AxisType::CATEGORY;
@@ -248,10 +251,10 @@ DataPointItemConverter::DataPointItemConverter(
if (bDataSeries)
return;
- uno::Reference<beans::XPropertySet> xSeriesProp(xSeries, uno::UNO_QUERY);
uno::Sequence<sal_Int32> deletedLegendEntriesSeq;
- xSeriesProp->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntriesSeq;
- for (const auto& deletedLegendEntry : std::as_const(deletedLegendEntriesSeq))
+ // "DeletedLegendEntries"
+ xSeries->getFastPropertyValue(PROP_DATASERIES_DELETED_LEGEND_ENTRIES) >>= deletedLegendEntriesSeq;
+ for (const auto& deletedLegendEntry : deletedLegendEntriesSeq)
{
if (nPointIndex == deletedLegendEntry)
{
@@ -338,7 +341,7 @@ bool DataPointItemConverter::ApplySpecialItem(
rValue = rItem.GetValue();
if( m_bOverwriteLabelsForAttributedDataPointsAlso )
{
- Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if( bOldValue != bool(rValue) ||
DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, CHART_UNONAME_LABEL , aOldValue ) )
{
@@ -379,7 +382,7 @@ bool DataPointItemConverter::ApplySpecialItem(
GetPropertySet()->getPropertyValue( "LabelSeparator" ) >>= aOldValue;
if( m_bOverwriteLabelsForAttributedDataPointsAlso )
{
- Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if( aOldValue != aNewValue ||
DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "LabelSeparator" , uno::Any( aOldValue ) ) )
{
@@ -410,7 +413,7 @@ bool DataPointItemConverter::ApplySpecialItem(
GetPropertySet()->getPropertyValue( "TextWordWrap" ) >>= bOld;
if( m_bOverwriteLabelsForAttributedDataPointsAlso )
{
- Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if( bOld!=bNew ||
DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "TextWordWrap", uno::Any( bOld ) ) )
{
@@ -442,7 +445,7 @@ bool DataPointItemConverter::ApplySpecialItem(
GetPropertySet()->getPropertyValue("LabelPlacement") >>= nOld;
if( m_bOverwriteLabelsForAttributedDataPointsAlso )
{
- Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if( nOld!=nNew ||
DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "LabelPlacement" , uno::Any( nOld ) ) )
{
@@ -454,6 +457,7 @@ bool DataPointItemConverter::ApplySpecialItem(
{
GetPropertySet()->setPropertyValue("LabelPlacement", uno::Any(nNew));
GetPropertySet()->setPropertyValue("CustomLabelPosition", uno::Any());
+ GetPropertySet()->setPropertyValue("CustomLabelSize", uno::Any());
bChanged = true;
}
}
@@ -571,17 +575,18 @@ bool DataPointItemConverter::ApplySpecialItem(
if (bHideLegendEntry != m_bHideLegendEntry)
{
uno::Sequence<sal_Int32> deletedLegendEntriesSeq;
- Reference<beans::XPropertySet> xSeriesProp(m_xSeries, uno::UNO_QUERY);
- xSeriesProp->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntriesSeq;
+ // "DeletedLegendEntries"
+ m_xSeries->getFastPropertyValue(PROP_DATASERIES_DELETED_LEGEND_ENTRIES) >>= deletedLegendEntriesSeq;
std::vector<sal_Int32> deletedLegendEntries;
- for (const auto& deletedLegendEntry : std::as_const(deletedLegendEntriesSeq))
+ for (const auto& deletedLegendEntry : deletedLegendEntriesSeq)
{
if (bHideLegendEntry || m_nPointIndex != deletedLegendEntry)
deletedLegendEntries.push_back(deletedLegendEntry);
}
if (bHideLegendEntry)
deletedLegendEntries.push_back(m_nPointIndex);
- xSeriesProp->setPropertyValue("DeletedLegendEntries", uno::makeAny(comphelper::containerToSequence(deletedLegendEntries)));
+ // "DeletedLegendEntries"
+ m_xSeries->setFastPropertyValue(PROP_DATASERIES_DELETED_LEGEND_ENTRIES, uno::Any(comphelper::containerToSequence(deletedLegendEntries)));
}
}
break;
@@ -592,10 +597,9 @@ bool DataPointItemConverter::ApplySpecialItem(
{
bool bNew = static_cast<const SfxBoolItem&>(rItemSet.Get(nWhichId)).GetValue();
bool bOld = true;
- Reference<beans::XPropertySet> xSeriesProp(m_xSeries, uno::UNO_QUERY);
- if( (xSeriesProp->getPropertyValue("ShowCustomLeaderLines") >>= bOld) && bOld != bNew )
+ if( (m_xSeries->getFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES) >>= bOld) && bOld != bNew )
{
- xSeriesProp->setPropertyValue("ShowCustomLeaderLines", uno::Any(bNew));
+ m_xSeries->setFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES, uno::Any(bNew));
bChanged = true;
}
}
@@ -634,7 +638,7 @@ void DataPointItemConverter::FillSpecialItem(
if( m_bOverwriteLabelsForAttributedDataPointsAlso )
{
if( DataSeriesHelper::hasAttributedDataPointDifferentValue(
- Reference< chart2::XDataSeries >( GetPropertySet(), uno::UNO_QUERY), CHART_UNONAME_LABEL , uno::Any(aLabel) ) )
+ dynamic_cast<DataSeries*>(GetPropertySet().get()), CHART_UNONAME_LABEL , uno::Any(aLabel) ) )
{
rOutItemSet.InvalidateItem(nWhichId);
}
@@ -759,8 +763,7 @@ void DataPointItemConverter::FillSpecialItem(
try
{
bool bValue = true;
- Reference<beans::XPropertySet> xSeriesProp(m_xSeries, uno::UNO_QUERY);
- if( xSeriesProp->getPropertyValue( "ShowCustomLeaderLines" ) >>= bValue )
+ if( m_xSeries->getFastPropertyValue( PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES ) >>= bValue )
rOutItemSet.Put(SfxBoolItem(nWhichId, bValue));
}
catch (const uno::Exception&)
@@ -804,7 +807,7 @@ void DataPointItemConverter::FillSpecialItem(
if( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fValue )
{
- rOutItemSet.Put( SdrAngleItem( nWhichId, Degree100(static_cast< sal_Int32 >(
+ rOutItemSet.Put( SdrAngleItem( SCHATTR_TEXT_DEGREES, Degree100(static_cast< sal_Int32 >(
::rtl::math::round( fValue * 100.0 ) ) )));
}
}
diff --git a/chart2/source/controller/itemsetwrapper/DataTableItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataTableItemConverter.cxx
new file mode 100644
index 000000000000..e152bf298dfc
--- /dev/null
+++ b/chart2/source/controller/itemsetwrapper/DataTableItemConverter.cxx
@@ -0,0 +1,92 @@
+/* -*- 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 <DataTableItemConverter.hxx>
+#include <ItemPropertyMap.hxx>
+#include <CharacterPropertyItemConverter.hxx>
+#include <GraphicPropertyItemConverter.hxx>
+#include <chartview/ChartSfxItemIds.hxx>
+#include "SchWhichPairs.hxx"
+#include <ChartModel.hxx>
+#include <memory>
+
+using namespace css;
+
+namespace chart::wrapper
+{
+namespace
+{
+ItemPropertyMapType& lclDataTablePropertyMap()
+{
+ static ItemPropertyMapType aPropertyMap{
+ { SCHATTR_DATA_TABLE_HORIZONTAL_BORDER, { "HBorder", 0 } },
+ { SCHATTR_DATA_TABLE_VERTICAL_BORDER, { "VBorder", 0 } },
+ { SCHATTR_DATA_TABLE_OUTLINE, { "Outline", 0 } },
+ { SCHATTR_DATA_TABLE_KEYS, { "Keys", 0 } },
+ };
+ return aPropertyMap;
+};
+}
+
+DataTableItemConverter::DataTableItemConverter(
+ const uno::Reference<beans::XPropertySet>& rPropertySet, SfxItemPool& rItemPool,
+ SdrModel& rDrawModel, const rtl::Reference<::chart::ChartModel>& xChartDoc)
+ : ItemConverter(rPropertySet, rItemPool)
+{
+ m_aConverters.emplace_back(new GraphicPropertyItemConverter(
+ rPropertySet, rItemPool, rDrawModel, xChartDoc, GraphicObjectType::LineProperties));
+ m_aConverters.emplace_back(new CharacterPropertyItemConverter(rPropertySet, rItemPool));
+}
+
+DataTableItemConverter::~DataTableItemConverter() = default;
+
+void DataTableItemConverter::FillItemSet(SfxItemSet& rOutItemSet) const
+{
+ for (const auto& pConv : m_aConverters)
+ {
+ pConv->FillItemSet(rOutItemSet);
+ }
+
+ // own items
+ ItemConverter::FillItemSet(rOutItemSet);
+}
+
+bool DataTableItemConverter::ApplyItemSet(const SfxItemSet& rItemSet)
+{
+ bool bResult = false;
+
+ for (const auto& pConv : m_aConverters)
+ {
+ bResult = pConv->ApplyItemSet(rItemSet) || bResult;
+ }
+
+ // own items
+ return ItemConverter::ApplyItemSet(rItemSet) || bResult;
+}
+
+const WhichRangesContainer& DataTableItemConverter::GetWhichPairs() const
+{
+ return nDataTableWhichPairs;
+}
+
+bool DataTableItemConverter::GetItemProperty(tWhichIdType nWhichId,
+ tPropertyNameWithMemberId& rOutProperty) const
+{
+ ItemPropertyMapType& rMap(lclDataTablePropertyMap());
+ auto aIt = rMap.find(nWhichId);
+ if (aIt == rMap.cend())
+ return false;
+
+ rOutProperty = (*aIt).second;
+
+ return true;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
index 89c4e8cc212a..33e09062a9a7 100644
--- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
@@ -30,7 +30,8 @@
#include <com/sun/star/chart2/XInternalDataProvider.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
@@ -78,7 +79,7 @@ namespace chart::wrapper
{
ErrorBarItemConverter::ErrorBarItemConverter(
- const uno::Reference< frame::XModel > & xModel,
+ uno::Reference< frame::XModel > xModel,
const uno::Reference< beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
@@ -88,7 +89,7 @@ ErrorBarItemConverter::ErrorBarItemConverter(
rPropertySet, rItemPool, rDrawModel,
xNamedPropertyContainerFactory,
GraphicObjectType::LineProperties )),
- m_xModel( xModel )
+ m_xModel(std::move( xModel ))
{}
ErrorBarItemConverter::~ErrorBarItemConverter()
@@ -356,7 +357,7 @@ void ErrorBarItemConverter::FillSpecialItem(
{
double fPos(0.0), fNeg(0.0);
lcl_getErrorValues( GetPropertySet(), fPos, fNeg );
- rOutItemSet.Put( SvxDoubleItem( ( fPos + fNeg ) / 2.0, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem( ( fPos + fNeg ) / 2.0, SCHATTR_STAT_PERCENT ));
}
break;
@@ -364,7 +365,7 @@ void ErrorBarItemConverter::FillSpecialItem(
{
double fPos(0.0), fNeg(0.0);
lcl_getErrorValues( GetPropertySet(), fPos, fNeg );
- rOutItemSet.Put( SvxDoubleItem( ( fPos + fNeg ) / 2.0, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem( ( fPos + fNeg ) / 2.0, SCHATTR_STAT_BIGERROR ));
}
break;
@@ -372,7 +373,7 @@ void ErrorBarItemConverter::FillSpecialItem(
{
double fPos(0.0), fNeg(0.0);
lcl_getErrorValues( GetPropertySet(), fPos, fNeg );
- rOutItemSet.Put( SvxDoubleItem( fPos, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem( fPos, SCHATTR_STAT_CONSTPLUS ));
}
break;
@@ -380,7 +381,7 @@ void ErrorBarItemConverter::FillSpecialItem(
{
double fPos(0.0), fNeg(0.0);
lcl_getErrorValues( GetPropertySet(), fPos, fNeg );
- rOutItemSet.Put( SvxDoubleItem( fNeg, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem( fNeg, SCHATTR_STAT_CONSTMINUS ));
}
break;
diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
index e265e4198180..ac0b961ba2e4 100644
--- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
@@ -39,7 +39,8 @@
#include <com/sun/star/drawing/BitmapMode.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
@@ -137,12 +138,12 @@ GraphicPropertyItemConverter::GraphicPropertyItemConverter(
beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
- const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
+ uno::Reference< lang::XMultiServiceFactory > xNamedPropertyContainerFactory,
GraphicObjectType eObjectType /* = FILL_PROPERTIES */ ) :
ItemConverter( rPropertySet, rItemPool ),
m_GraphicObjectType( eObjectType ),
m_rDrawModel( rDrawModel ),
- m_xNamedPropertyTableFactory( xNamedPropertyContainerFactory )
+ m_xNamedPropertyTableFactory(std::move( xNamedPropertyContainerFactory ))
{}
GraphicPropertyItemConverter::~GraphicPropertyItemConverter()
@@ -425,7 +426,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem(
case XATTR_FILLBMP_STRETCH:
if( lcl_supportsFillProperties( m_GraphicObjectType ))
{
- static const OUStringLiteral aModePropName(u"FillBitmapMode");
+ static constexpr OUString aModePropName(u"FillBitmapMode"_ustr);
bool bStretched = rItemSet.Get( XATTR_FILLBMP_STRETCH ).GetValue();
drawing::BitmapMode aMode =
(bStretched ? drawing::BitmapMode_STRETCH : drawing::BitmapMode_NO_REPEAT);
@@ -447,7 +448,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem(
case XATTR_FILLBMP_TILE:
if( lcl_supportsFillProperties( m_GraphicObjectType ))
{
- static const OUStringLiteral aModePropName(u"FillBitmapMode");
+ static constexpr OUString aModePropName(u"FillBitmapMode"_ustr);
bool bTiled = rItemSet.Get( XATTR_FILLBMP_TILE ).GetValue();
drawing::BitmapMode aMode =
(bTiled ? drawing::BitmapMode_REPEAT : drawing::BitmapMode_NO_REPEAT);
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index e90fad016cfd..3d4cf2abc309 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -25,17 +25,18 @@
#include <svl/itemiter.hxx>
#include <svl/whiter.hxx>
#include <svx/svxids.hrc>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
+#include <utility>
using namespace ::com::sun::star;
namespace chart::wrapper {
ItemConverter::ItemConverter(
- const uno::Reference< beans::XPropertySet > & rPropertySet,
+ uno::Reference< beans::XPropertySet > xPropertySet,
SfxItemPool& rItemPool ) :
- m_xPropertySet( rPropertySet ),
+ m_xPropertySet(std::move( xPropertySet )),
m_rItemPool( rItemPool )
{
resetPropertySet( m_xPropertySet );
@@ -94,7 +95,7 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const
if( GetItemProperty( nWhich, aProperty ))
{
// put the Property into the itemset
- std::unique_ptr<SfxPoolItem> pItem(rPool.GetDefaultItem( nWhich ).Clone());
+ std::unique_ptr<SfxPoolItem> pItem(rPool.GetUserOrPoolDefaultItem( nWhich ).Clone());
if( pItem )
{
@@ -157,7 +158,7 @@ bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet )
for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem())
{
- if( rItemSet.GetItemState( pItem->Which(), false ) == SfxItemState::SET )
+ if( aIter.GetItemState( false ) == SfxItemState::SET )
{
if( GetItemProperty( pItem->Which(), aProperty ))
{
@@ -198,7 +199,8 @@ void ItemConverter::InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItem
while (nWhich)
{
- if ((rSourceSet.GetItemState(nWhich, true, &pPoolItem) == SfxItemState::SET) &&
+ SfxItemState nSourceItemState = aIter.GetItemState(true, &pPoolItem);
+ if ((nSourceItemState == SfxItemState::SET) &&
(rDestSet.GetItemState(nWhich, true, &pPoolItem) == SfxItemState::SET))
{
if (rSourceSet.Get(nWhich) != rDestSet.Get(nWhich))
@@ -209,7 +211,7 @@ void ItemConverter::InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItem
}
}
}
- else if( rSourceSet.GetItemState(nWhich, true, &pPoolItem) == SfxItemState::DONTCARE )
+ else if( nSourceItemState == SfxItemState::INVALID )
rDestSet.InvalidateItem(nWhich);
nWhich = aIter.NextWhich ();
diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
index 081e8ebbd390..255445764b04 100644
--- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
@@ -27,7 +27,7 @@
#include <svl/intitem.hxx>
#include <svl/eitem.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <memory>
@@ -41,7 +41,7 @@ LegendItemConverter::LegendItemConverter(
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
- const awt::Size* pRefSize ) :
+ const std::optional<awt::Size>& pRefSize ) :
ItemConverter( rPropertySet, rItemPool )
{
m_aConverters.emplace_back( new GraphicPropertyItemConverter(
@@ -96,10 +96,9 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe
{
case SCHATTR_LEGEND_SHOW:
{
- const SfxPoolItem* pPoolItem = nullptr;
- if( rInItemSet.GetItemState( SCHATTR_LEGEND_SHOW, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SfxBoolItem* pShowItem = rInItemSet.GetItemIfSet( SCHATTR_LEGEND_SHOW ) )
{
- bool bShow = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
+ bool bShow = pShowItem->GetValue();
bool bWasShown = true;
if( ! (GetPropertySet()->getPropertyValue( "Show" ) >>= bWasShown) ||
( bWasShown != bShow ))
@@ -113,10 +112,9 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe
break;
case SCHATTR_LEGEND_POS:
{
- const SfxPoolItem* pPoolItem = nullptr;
- if( rInItemSet.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SfxInt32Item* pPosItem = rInItemSet.GetItemIfSet( SCHATTR_LEGEND_POS ) )
{
- chart2::LegendPosition eNewPos = static_cast<chart2::LegendPosition>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue());
+ chart2::LegendPosition eNewPos = static_cast<chart2::LegendPosition>(pPosItem->GetValue());
css::chart::ChartLegendExpansion eExpansion = css::chart::ChartLegendExpansion_HIGH;
switch( eNewPos )
@@ -154,10 +152,9 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe
break;
case SCHATTR_LEGEND_NO_OVERLAY:
{
- const SfxPoolItem* pPoolItem = nullptr;
- if(rInItemSet.GetItemState(SCHATTR_LEGEND_NO_OVERLAY, true, &pPoolItem) == SfxItemState::SET)
+ if(const SfxBoolItem* pNoOverlayItem = rInItemSet.GetItemIfSet(SCHATTR_LEGEND_NO_OVERLAY))
{
- bool bOverlay = !static_cast<const SfxBoolItem *>(pPoolItem)->GetValue();
+ bool bOverlay = !pNoOverlayItem->GetValue();
bool bOldOverlay = false;
if(!(GetPropertySet()->getPropertyValue("Overlay") >>= bOldOverlay) ||
(bOldOverlay != bOverlay))
diff --git a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
index 7c67ef59c139..ef0a1fc4c098 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
@@ -27,15 +27,13 @@
#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
#include <Diagram.hxx>
+#include <DataSeries.hxx>
+#include <GridProperties.hxx>
#include <TitleHelper.hxx>
#include <TitleItemConverter.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <chartview/ExplicitValueProvider.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
-#include <com/sun/star/chart2/XTitle.hpp>
-#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#include <com/sun/star/chart2/XAxis.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
@@ -48,14 +46,14 @@ AllAxisItemConverter::AllAxisItemConverter(
const rtl::Reference<::chart::ChartModel> & xChartModel,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
- const awt::Size* pRefSize )
+ const std::optional<awt::Size>& pRefSize )
: MultipleItemConverter( rItemPool )
{
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
- const Sequence< Reference< XAxis > > aElementList( AxisHelper::getAllAxesOfDiagram( xDiagram ) );
- for( Reference< XAxis > const & axis : aElementList )
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
+ const std::vector< rtl::Reference< Axis > > aElementList = AxisHelper::getAllAxesOfDiagram( xDiagram );
+ for( rtl::Reference< Axis > const & axis : aElementList )
{
- uno::Reference< beans::XPropertySet > xObjectProperties(axis, uno::UNO_QUERY);
+ uno::Reference< beans::XPropertySet > xObjectProperties(axis);
m_aConverters.emplace_back( new ::chart::wrapper::AxisItemConverter(
xObjectProperties, rItemPool, rDrawModel,
xChartModel, nullptr, nullptr,
@@ -80,9 +78,9 @@ AllGridItemConverter::AllGridItemConverter(
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory )
: MultipleItemConverter( rItemPool )
{
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
- const Sequence< Reference< beans::XPropertySet > > aElementList( AxisHelper::getAllGrids( xDiagram ) );
- for( Reference< beans::XPropertySet > const & xObjectProperties : aElementList )
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
+ std::vector< rtl::Reference< GridProperties > > aElementList( AxisHelper::getAllGrids( xDiagram ) );
+ for( rtl::Reference< GridProperties > const & xObjectProperties : aElementList )
{
m_aConverters.emplace_back( new ::chart::wrapper::GraphicPropertyItemConverter(
xObjectProperties, rItemPool, rDrawModel, xNamedPropertyContainerFactory,
@@ -107,23 +105,22 @@ AllDataLabelItemConverter::AllDataLabelItemConverter(
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory )
: MultipleItemConverter( rItemPool )
{
- std::vector< uno::Reference< chart2::XDataSeries > > aSeriesList(
- ::chart::ChartModelHelper::getDataSeries( xChartModel ));
+ std::vector< rtl::Reference< DataSeries > > aSeriesList =
+ ::chart::ChartModelHelper::getDataSeries( xChartModel );
for (auto const& series : aSeriesList)
{
- uno::Reference< beans::XPropertySet > xObjectProperties(series, uno::UNO_QUERY);
uno::Reference< uno::XComponentContext> xContext;//do not need Context for label properties
- sal_Int32 nNumberFormat=ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel( xObjectProperties );
+ sal_Int32 nNumberFormat=ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel( series );
sal_Int32 nPercentNumberFormat=ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabel(
- xObjectProperties,xChartModel);
+ series,xChartModel);
m_aConverters.emplace_back(
new ::chart::wrapper::DataPointItemConverter(
- xChartModel, xContext, xObjectProperties, series, rItemPool, rDrawModel,
+ xChartModel, xContext, series, series, rItemPool, rDrawModel,
xNamedPropertyContainerFactory, GraphicObjectType::FilledDataPoint,
- nullptr, true, false, 0, true, nNumberFormat, nPercentNumberFormat));
+ std::nullopt, true, false, 0, true, nNumberFormat, nPercentNumberFormat));
}
}
@@ -146,13 +143,13 @@ AllTitleItemConverter::AllTitleItemConverter(
{
for(sal_Int32 nTitle = TitleHelper::TITLE_BEGIN; nTitle < TitleHelper::NORMAL_TITLE_END; nTitle++ )
{
- uno::Reference< chart2::XTitle > xTitle( TitleHelper::getTitle( TitleHelper::eTitleType(nTitle), xChartModel ) );
+ rtl::Reference< Title > xTitle( TitleHelper::getTitle( TitleHelper::eTitleType(nTitle), xChartModel ) );
if(!xTitle.is())
continue;
- uno::Reference< beans::XPropertySet > xObjectProperties( xTitle, uno::UNO_QUERY);
+ uno::Reference< beans::XPropertySet > xObjectProperties( xTitle );
m_aConverters.emplace_back(
new ::chart::wrapper::TitleItemConverter(
- xObjectProperties, rItemPool, rDrawModel, xNamedPropertyContainerFactory, nullptr));
+ xObjectProperties, rItemPool, rDrawModel, xNamedPropertyContainerFactory, std::nullopt));
}
}
@@ -171,14 +168,13 @@ AllSeriesStatisticsConverter::AllSeriesStatisticsConverter(
SfxItemPool& rItemPool )
: MultipleItemConverter( rItemPool )
{
- std::vector< uno::Reference< chart2::XDataSeries > > aSeriesList(
- ::chart::ChartModelHelper::getDataSeries( xChartModel ));
+ std::vector< rtl::Reference< DataSeries > > aSeriesList =
+ ::chart::ChartModelHelper::getDataSeries( xChartModel );
for (auto const& series : aSeriesList)
{
- uno::Reference< beans::XPropertySet > xObjectProperties(series, uno::UNO_QUERY);
m_aConverters.emplace_back( new ::chart::wrapper::StatisticsItemConverter(
- xChartModel, xObjectProperties, rItemPool ));
+ xChartModel, series, rItemPool ));
}
}
diff --git a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
index f98ec6375f3b..da521d874df6 100644
--- a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
@@ -18,9 +18,11 @@
*/
#include <RegressionCurveHelper.hxx>
+#include <RegressionCurveModel.hxx>
#include <RegressionCurveItemConverter.hxx>
#include "SchWhichPairs.hxx"
#include <GraphicPropertyItemConverter.hxx>
+#include <DataSeries.hxx>
#include <com/sun/star/chart2/XRegressionCurve.hpp>
#include <osl/diagnose.h>
@@ -28,6 +30,7 @@
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
+#include <utility>
using namespace ::com::sun::star;
@@ -65,12 +68,12 @@ void lclConvertToItemSet(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const uno::R
}
}
-void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const uno::Reference<beans::XPropertySet>& xProperties, const OUString& aPropertyID)
+void lclConvertToItemSetDouble(SfxItemSet& rItemSet, TypedWhichId<SvxDoubleItem> nWhichId, const uno::Reference<beans::XPropertySet>& xProperties, const OUString& aPropertyID)
{
OSL_ASSERT(xProperties.is());
if( xProperties.is() )
{
- double aValue = static_cast<const SvxDoubleItem&>(rItemSet.Get( nWhichId )).GetValue();
+ double aValue = rItemSet.Get( nWhichId ).GetValue();
if(xProperties->getPropertyValue( aPropertyID ) >>= aValue)
{
rItemSet.Put(SvxDoubleItem( aValue, nWhichId ));
@@ -85,7 +88,7 @@ namespace chart::wrapper
RegressionCurveItemConverter::RegressionCurveItemConverter(
const uno::Reference< beans::XPropertySet >& rPropertySet,
- const uno::Reference< chart2::XRegressionCurveContainer >& xContainer,
+ rtl::Reference< DataSeries > xContainer,
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory ) :
@@ -94,7 +97,7 @@ RegressionCurveItemConverter::RegressionCurveItemConverter(
rPropertySet, rItemPool, rDrawModel,
xNamedPropertyContainerFactory,
GraphicObjectType::LineProperties )),
- m_xCurveContainer( xContainer )
+ m_xCurveContainer(std::move( xContainer ))
{}
RegressionCurveItemConverter::~RegressionCurveItemConverter()
@@ -283,13 +286,13 @@ void RegressionCurveItemConverter::FillSpecialItem(sal_uInt16 nWhichId, SfxItemS
case SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD:
{
- lclConvertToItemSetDouble(rOutItemSet, nWhichId, xProperties, "ExtrapolateForward");
+ lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD, xProperties, "ExtrapolateForward");
}
break;
case SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD:
{
- lclConvertToItemSetDouble(rOutItemSet, nWhichId, xProperties, "ExtrapolateBackward");
+ lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD, xProperties, "ExtrapolateBackward");
}
break;
@@ -301,7 +304,7 @@ void RegressionCurveItemConverter::FillSpecialItem(sal_uInt16 nWhichId, SfxItemS
case SCHATTR_REGRESSION_INTERCEPT_VALUE:
{
- lclConvertToItemSetDouble(rOutItemSet, nWhichId, xProperties, "InterceptValue");
+ lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_INTERCEPT_VALUE, xProperties, "InterceptValue");
}
break;
diff --git a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
index 22fc379b2a2c..9b10afd4f79d 100644
--- a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
@@ -49,7 +49,7 @@ RegressionEquationItemConverter::RegressionEquationItemConverter(
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
- const awt::Size* pRefSize ) :
+ const std::optional<awt::Size>& pRefSize ) :
ItemConverter( rPropertySet, rItemPool )
{
m_aConverters.emplace_back( new GraphicPropertyItemConverter(
diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
index 3c1387009afd..676527f3fef3 100644
--- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
+++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
@@ -171,4 +171,11 @@ const WhichRangesContainer nRegEquationWhichPairs(svl::Items<
SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING // Characters
>);
+const WhichRangesContainer nDataTableWhichPairs(svl::Items<
+ SCHATTR_DATA_TABLE_START, SCHATTR_DATA_TABLE_END,
+ XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx
+ XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1018 - 1046 svx/xdef.hxx
+ EE_ITEMS_START, EE_ITEMS_END
+>);
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index 4d035c061b6c..653e7bf20e5a 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -21,6 +21,8 @@
#include "SchWhichPairs.hxx"
#include <ChartModelHelper.hxx>
+#include <ChartType.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <DiagramHelper.hxx>
#include <Diagram.hxx>
@@ -29,13 +31,12 @@
#include <ChartModel.hxx>
#include <BaseCoordinateSystem.hxx>
-#include <com/sun/star/chart2/XDataSeries.hpp>
-
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
#include <svl/ilstitem.hxx>
#include <svx/sdangitm.hxx>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
@@ -45,12 +46,12 @@ namespace chart::wrapper
SeriesOptionsItemConverter::SeriesOptionsItemConverter(
const rtl::Reference<::chart::ChartModel>& xChartModel
- , const uno::Reference< uno::XComponentContext > & xContext
- , const uno::Reference< beans::XPropertySet >& xPropertySet
+ , uno::Reference< uno::XComponentContext > xContext
+ , const rtl::Reference< ::chart::DataSeries >& xDataSeries
, SfxItemPool& rItemPool )
- : ItemConverter( xPropertySet, rItemPool )
+ : ItemConverter( xDataSeries, rItemPool )
, m_xChartModel(xChartModel)
- , m_xCC(xContext)
+ , m_xCC(std::move(xContext))
, m_bAttachToMainAxis(true)
, m_bSupportingOverlapAndGapWidthProperties(false)
, m_bSupportingBarConnectors(false)
@@ -69,22 +70,20 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter(
{
try
{
- uno::Reference< XDataSeries > xDataSeries( xPropertySet, uno::UNO_QUERY );
-
m_bAttachToMainAxis = DiagramHelper::isSeriesAttachedToMainAxis( xDataSeries );
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram(xChartModel) );
- uno::Reference< XChartType > xChartType( DiagramHelper::getChartTypeOfSeries( xDiagram , xDataSeries ) );
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
+ rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeOfSeries( xDataSeries ) );
m_xCooSys = DataSeriesHelper::getCoordinateSystemOfSeries( xDataSeries, xDiagram );
if( m_xCooSys.is() )
{
- uno::Reference< chart2::XAxis > xAxis( AxisHelper::getAxis( 1, 0, m_xCooSys ) );
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( 1, 0, m_xCooSys );
chart2::ScaleData aScale( xAxis->getScaleData() );
m_bClockwise = (aScale.Orientation == chart2::AxisOrientation_REVERSE);
}
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
+ sal_Int32 nDimensionCount = xDiagram->getDimension();
m_bSupportingOverlapAndGapWidthProperties = ChartTypeHelper::isSupportingOverlapAndGapWidthProperties( xChartType, nDimensionCount );
if( m_bSupportingOverlapAndGapWidthProperties )
@@ -93,15 +92,14 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter(
sal_Int32 nAxisIndex = DataSeriesHelper::getAttachedAxisIndex(xDataSeries);
uno::Sequence< sal_Int32 > aBarPositionSequence;
- uno::Reference< beans::XPropertySet > xChartTypeProps( xChartType, uno::UNO_QUERY );
- if( xChartTypeProps.is() )
+ if( xChartType.is() )
{
- if( xChartTypeProps->getPropertyValue( "OverlapSequence" ) >>= aBarPositionSequence )
+ if( xChartType->getPropertyValue( "OverlapSequence" ) >>= aBarPositionSequence )
{
if( nAxisIndex >= 0 && nAxisIndex < aBarPositionSequence.getLength() )
m_nBarOverlap = aBarPositionSequence[nAxisIndex];
}
- if( xChartTypeProps->getPropertyValue( "GapwidthSequence" ) >>= aBarPositionSequence )
+ if( xChartType->getPropertyValue( "GapwidthSequence" ) >>= aBarPositionSequence )
{
if( nAxisIndex >= 0 && nAxisIndex < aBarPositionSequence.getLength() )
m_nGapWidth = aBarPositionSequence[nAxisIndex];
@@ -128,8 +126,7 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter(
}
m_aSupportedMissingValueTreatments = ChartTypeHelper::getSupportedMissingValueTreatments( xChartType );
- m_nMissingValueTreatment = DiagramHelper::getCorrectedMissingValueTreatment(
- ChartModelHelper::findDiagram(m_xChartModel), xChartType );
+ m_nMissingValueTreatment = xDiagram->getCorrectedMissingValueTreatment( xChartType );
uno::Reference< beans::XPropertySet > xProp( m_xChartModel->getDataProvider(), uno::UNO_QUERY );
if( xProp.is() )
@@ -147,7 +144,7 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter(
}
}
- m_bHideLegendEntry = !xPropertySet->getPropertyValue("ShowLegendEntry").get<bool>();
+ m_bHideLegendEntry = !xDataSeries->getPropertyValue("ShowLegendEntry").get<bool>();
}
catch( const uno::Exception & )
{
@@ -183,8 +180,9 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
if( bAttachToMainAxis != m_bAttachToMainAxis )
{
//change model:
- bChanged = DiagramHelper::attachSeriesToAxis( bAttachToMainAxis, uno::Reference< XDataSeries >::query( GetPropertySet() )
- , ChartModelHelper::findDiagram(m_xChartModel), m_xCC );
+ rtl::Reference<DataSeries> xDataSeries = dynamic_cast<DataSeries*>( GetPropertySet().get() );
+ bChanged = m_xChartModel->getFirstChartDiagram()->attachSeriesToAxis( bAttachToMainAxis, xDataSeries
+ , m_xCC );
if( bChanged )
m_bAttachToMainAxis = bAttachToMainAxis;
@@ -204,30 +202,27 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
if( nWhichId == SCHATTR_BAR_OVERLAP )
aPropName = "OverlapSequence";
- uno::Reference< XDataSeries > xDataSeries( GetPropertySet(), uno::UNO_QUERY );
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram(m_xChartModel) );
- uno::Reference< beans::XPropertySet > xChartTypeProps( DiagramHelper::getChartTypeOfSeries( xDiagram , xDataSeries ), uno::UNO_QUERY );
- if( xChartTypeProps.is() )
+ rtl::Reference< DataSeries > xDataSeries( dynamic_cast<DataSeries*>(GetPropertySet().get()) );
+ rtl::Reference< Diagram > xDiagram( m_xChartModel->getFirstChartDiagram() );
+ rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeOfSeries( xDataSeries ) );
+ if( xChartType.is() )
{
sal_Int32 nAxisIndex = DataSeriesHelper::getAttachedAxisIndex(xDataSeries);
uno::Sequence< sal_Int32 > aBarPositionSequence;
- if( xChartTypeProps.is() )
+ if( xChartType->getPropertyValue( aPropName ) >>= aBarPositionSequence )
{
- if( xChartTypeProps->getPropertyValue( aPropName ) >>= aBarPositionSequence )
+ bool bGroupBarsPerAxis = rItemSet.Get( SCHATTR_GROUP_BARS_PER_AXIS ).GetValue();
+ if(!bGroupBarsPerAxis)
{
- bool bGroupBarsPerAxis = rItemSet.Get( SCHATTR_GROUP_BARS_PER_AXIS ).GetValue();
- if(!bGroupBarsPerAxis)
- {
- //set the same value for all axes
- for( auto & pos : asNonConstRange(aBarPositionSequence) )
- pos = rBarPosition;
- }
- else if( nAxisIndex >= 0 && nAxisIndex < aBarPositionSequence.getLength() )
- aBarPositionSequence.getArray()[nAxisIndex] = rBarPosition;
-
- xChartTypeProps->setPropertyValue( aPropName, uno::Any(aBarPositionSequence) );
- bChanged = true;
+ //set the same value for all axes
+ for( auto & pos : asNonConstRange(aBarPositionSequence) )
+ pos = rBarPosition;
}
+ else if( nAxisIndex >= 0 && nAxisIndex < aBarPositionSequence.getLength() )
+ aBarPositionSequence.getArray()[nAxisIndex] = rBarPosition;
+
+ xChartType->setPropertyValue( aPropName, uno::Any(aBarPositionSequence) );
+ bChanged = true;
}
}
}
@@ -241,7 +236,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
if( m_bSupportingBarConnectors )
{
bool bOldConnectBars = false;
- rtl::Reference< Diagram > xDiagramProperties( ChartModelHelper::findDiagram(m_xChartModel), uno::UNO_QUERY );
+ rtl::Reference< Diagram > xDiagramProperties( m_xChartModel->getFirstChartDiagram() );
if( xDiagramProperties.is() &&
(xDiagramProperties->getPropertyValue( "ConnectBars" ) >>= bOldConnectBars) &&
bOldConnectBars != m_bConnectBars )
@@ -260,7 +255,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
if( m_bSupportingAxisSideBySide )
{
bool bOldGroupBarsPerAxis = true;
- rtl::Reference< Diagram > xDiagramProperties( ChartModelHelper::findDiagram(m_xChartModel), uno::UNO_QUERY );
+ rtl::Reference< Diagram > xDiagramProperties( m_xChartModel->getFirstChartDiagram() );
if( xDiagramProperties.is() &&
(xDiagramProperties->getPropertyValue( "GroupBarsPerAxis" ) >>= bOldGroupBarsPerAxis) &&
bOldGroupBarsPerAxis != m_bGroupBarsPerAxis )
@@ -277,7 +272,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
if( m_bSupportingStartingAngle )
{
m_nStartingAngle = static_cast< const SdrAngleItem & >( rItemSet.Get( nWhichId )).GetValue().get() / 100;
- rtl::Reference< Diagram > xDiagramProperties( ChartModelHelper::findDiagram(m_xChartModel), uno::UNO_QUERY );
+ rtl::Reference< Diagram > xDiagramProperties( m_xChartModel->getFirstChartDiagram() );
if( xDiagramProperties.is() )
{
xDiagramProperties->setPropertyValue( "StartingAngle" , uno::Any(m_nStartingAngle) );
@@ -293,7 +288,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
rItemSet.Get( nWhichId )).GetValue();
if( m_xCooSys.is() )
{
- uno::Reference< chart2::XAxis > xAxis( AxisHelper::getAxis( 1, 0, m_xCooSys ) );
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( 1, 0, m_xCooSys );
if( xAxis.is() )
{
chart2::ScaleData aScaleData( xAxis->getScaleData() );
@@ -314,7 +309,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
{
try
{
- rtl::Reference< Diagram > xDiagramProperties( ChartModelHelper::findDiagram(m_xChartModel), uno::UNO_QUERY );
+ rtl::Reference< Diagram > xDiagramProperties( m_xChartModel->getFirstChartDiagram() );
if( xDiagramProperties.is() )
{
xDiagramProperties->setPropertyValue( "MissingValueTreatment" , uno::Any( nNew ));
@@ -347,7 +342,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
bool bHideLegendEntry = static_cast<const SfxBoolItem &>(rItemSet.Get(nWhichId)).GetValue();
if (bHideLegendEntry != m_bHideLegendEntry)
{
- GetPropertySet()->setPropertyValue("ShowLegendEntry", css::uno::makeAny(!bHideLegendEntry));
+ GetPropertySet()->setPropertyValue("ShowLegendEntry", css::uno::Any(!bHideLegendEntry));
}
}
break;
@@ -397,7 +392,7 @@ void SeriesOptionsItemConverter::FillSpecialItem(
case SCHATTR_STARTING_ANGLE:
{
if( m_bSupportingStartingAngle )
- rOutItemSet.Put( SdrAngleItem(nWhichId, Degree100(m_nStartingAngle*100)) );
+ rOutItemSet.Put( SdrAngleItem(SCHATTR_STARTING_ANGLE, Degree100(m_nStartingAngle*100)) );
break;
}
case SCHATTR_CLOCKWISE:
diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
index a900466b85b8..c725972c249b 100644
--- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
@@ -20,6 +20,7 @@
#include <StatisticsItemConverter.hxx>
#include "SchWhichPairs.hxx"
#include <RegressionCurveHelper.hxx>
+#include <RegressionCurveModel.hxx>
#include <ErrorBar.hxx>
#include <StatisticsHelper.hxx>
#include <ChartModel.hxx>
@@ -31,10 +32,10 @@
#include <rtl/math.hxx>
#include <com/sun/star/chart2/XInternalDataProvider.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
@@ -49,7 +50,7 @@ uno::Reference< beans::XPropertySet > lcl_GetErrorBar(
if( xProp.is())
try
{
- ( xProp->getPropertyValue( bYError ? OUString(CHART_UNONAME_ERRORBAR_Y) : OUString(CHART_UNONAME_ERRORBAR_X) ) >>= xResult );
+ ( xProp->getPropertyValue( bYError ? CHART_UNONAME_ERRORBAR_Y : CHART_UNONAME_ERRORBAR_X ) >>= xResult );
}
catch( const uno::Exception & )
{
@@ -107,10 +108,9 @@ uno::Reference< beans::XPropertySet > lcl_getEquationProperties(
// ensure that a trendline is on
if( pItemSet )
{
- const SfxPoolItem *pPoolItem = nullptr;
- if( pItemSet->GetItemState( SCHATTR_REGRESSION_TYPE, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SvxChartRegressItem* pRegressionItem = pItemSet->GetItemIfSet( SCHATTR_REGRESSION_TYPE ) )
{
- SvxChartRegress eRegress = static_cast< const SvxChartRegressItem * >( pPoolItem )->GetValue();
+ SvxChartRegress eRegress = pRegressionItem->GetValue();
bEquationExists = ( eRegress != SvxChartRegress::NONE );
}
}
@@ -118,8 +118,8 @@ uno::Reference< beans::XPropertySet > lcl_getEquationProperties(
if( bEquationExists )
{
uno::Reference< chart2::XRegressionCurveContainer > xRegCnt( xSeriesPropSet, uno::UNO_QUERY );
- uno::Reference< chart2::XRegressionCurve > xCurve(
- ::chart::RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCnt ));
+ rtl::Reference< ::chart::RegressionCurveModel > xCurve =
+ ::chart::RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCnt );
if( xCurve.is())
{
return xCurve->getEquationProperties();
@@ -137,10 +137,9 @@ uno::Reference< beans::XPropertySet > lcl_getCurveProperties(
// ensure that a trendline is on
if( pItemSet )
{
- const SfxPoolItem *pPoolItem = nullptr;
- if( pItemSet->GetItemState( SCHATTR_REGRESSION_TYPE, true, &pPoolItem ) == SfxItemState::SET )
+ if( const SvxChartRegressItem* pRegressionItem = pItemSet->GetItemIfSet( SCHATTR_REGRESSION_TYPE ) )
{
- SvxChartRegress eRegress = static_cast< const SvxChartRegressItem * >( pPoolItem )->GetValue();
+ SvxChartRegress eRegress = pRegressionItem->GetValue();
bExists = ( eRegress != SvxChartRegress::NONE );
}
}
@@ -192,12 +191,12 @@ void lclConvertToItemSet(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const uno::R
}
}
-void lclConvertToItemSetDouble(SfxItemSet& rItemSet, sal_uInt16 nWhichId, const uno::Reference<beans::XPropertySet>& xProperties, const OUString& aPropertyID)
+void lclConvertToItemSetDouble(SfxItemSet& rItemSet, TypedWhichId<SvxDoubleItem> nWhichId, const uno::Reference<beans::XPropertySet>& xProperties, const OUString& aPropertyID)
{
OSL_ASSERT(xProperties.is());
if( xProperties.is() )
{
- double aValue = static_cast<const SvxDoubleItem&>(rItemSet.Get( nWhichId )).GetValue();
+ double aValue = rItemSet.Get( nWhichId ).GetValue();
if(xProperties->getPropertyValue( aPropertyID ) >>= aValue)
{
rItemSet.Put(SvxDoubleItem( aValue, nWhichId ));
@@ -211,11 +210,11 @@ namespace chart::wrapper
{
StatisticsItemConverter::StatisticsItemConverter(
- const rtl::Reference<::chart::ChartModel> & xModel,
+ rtl::Reference<::chart::ChartModel> xModel,
const uno::Reference< beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool ) :
ItemConverter( rPropertySet, rItemPool ),
- m_xModel( xModel )
+ m_xModel(std::move( xModel ))
{
}
@@ -309,7 +308,7 @@ bool StatisticsItemConverter::ApplySpecialItem(
if( !xErrorBarProp.is() )
{
xErrorBarProp = lcl_GetDefaultErrorBar();
- GetPropertySet()->setPropertyValue( bYError ? OUString(CHART_UNONAME_ERRORBAR_Y) : OUString(CHART_UNONAME_ERRORBAR_X),
+ GetPropertySet()->setPropertyValue( bYError ? CHART_UNONAME_ERRORBAR_Y : CHART_UNONAME_ERRORBAR_X,
uno::Any( xErrorBarProp ));
}
@@ -663,7 +662,7 @@ void StatisticsItemConverter::FillSpecialItem(
{
double fPos(0.0), fNeg(0.0);
lcl_getErrorValues( xErrorBarProp, fPos, fNeg );
- rOutItemSet.Put( SvxDoubleItem( ( fPos + fNeg ) / 2.0, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem( ( fPos + fNeg ) / 2.0, SCHATTR_STAT_PERCENT ));
}
}
break;
@@ -677,7 +676,7 @@ void StatisticsItemConverter::FillSpecialItem(
{
double fPos(0.0), fNeg(0.0);
lcl_getErrorValues( xErrorBarProp, fPos, fNeg );
- rOutItemSet.Put( SvxDoubleItem( ( fPos + fNeg ) / 2.0, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem( ( fPos + fNeg ) / 2.0, SCHATTR_STAT_BIGERROR ));
}
}
break;
@@ -691,7 +690,7 @@ void StatisticsItemConverter::FillSpecialItem(
{
double fPos(0.0), fNeg(0.0);
lcl_getErrorValues( xErrorBarProp, fPos, fNeg );
- rOutItemSet.Put( SvxDoubleItem( fPos, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem( fPos, SCHATTR_STAT_CONSTPLUS ));
}
}
break;
@@ -705,7 +704,7 @@ void StatisticsItemConverter::FillSpecialItem(
{
double fPos(0.0), fNeg(0.0);
lcl_getErrorValues( xErrorBarProp, fPos, fNeg );
- rOutItemSet.Put( SvxDoubleItem( fNeg, nWhichId ));
+ rOutItemSet.Put( SvxDoubleItem( fNeg, SCHATTR_STAT_CONSTMINUS ));
}
}
break;
@@ -745,14 +744,14 @@ void StatisticsItemConverter::FillSpecialItem(
case SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD:
{
uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr ));
- lclConvertToItemSetDouble(rOutItemSet, nWhichId, xProperties, "ExtrapolateForward");
+ lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD, xProperties, "ExtrapolateForward");
}
break;
case SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD:
{
uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr ));
- lclConvertToItemSetDouble(rOutItemSet, nWhichId, xProperties, "ExtrapolateBackward");
+ lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD, xProperties, "ExtrapolateBackward");
}
break;
@@ -766,7 +765,7 @@ void StatisticsItemConverter::FillSpecialItem(
case SCHATTR_REGRESSION_INTERCEPT_VALUE:
{
uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr ));
- lclConvertToItemSetDouble(rOutItemSet, nWhichId, xProperties, "InterceptValue");
+ lclConvertToItemSetDouble(rOutItemSet, SCHATTR_REGRESSION_INTERCEPT_VALUE, xProperties, "InterceptValue");
}
break;
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index 36a0686e95f7..a8838f3b24e0 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -20,10 +20,11 @@
#include <TextLabelItemConverter.hxx>
#include <CharacterPropertyItemConverter.hxx>
#include <ChartModel.hxx>
-#include <ChartModelHelper.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
-#include <DiagramHelper.hxx>
+#include <DataSeriesProperties.hxx>
#include <Diagram.hxx>
#include <ItemPropertyMap.hxx>
#include "SchWhichPairs.hxx"
@@ -37,7 +38,7 @@
#include <svl/stritem.hxx>
#include <svx/tabline.hxx>
#include <svx/sdangitm.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <vcl/graph.hxx>
#include <rtl/math.hxx>
@@ -46,12 +47,12 @@
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
-#include <com/sun/star/frame/XModel.hpp>
#include <memory>
using namespace com::sun::star;
using namespace com::sun::star::chart2;
using com::sun::star::uno::Reference;
+using namespace ::chart::DataSeriesProperties;
namespace chart::wrapper {
@@ -100,7 +101,7 @@ bool numberFormatFromItemToPropertySet(
if (!xPropertySet.is())
return bChanged;
- OUString aPropertyName = (nWhichId == SID_ATTR_NUMBERFORMAT_VALUE) ? OUString(CHART_UNONAME_NUMFMT) : OUString("PercentageNumberFormat");
+ OUString aPropertyName = (nWhichId == SID_ATTR_NUMBERFORMAT_VALUE) ? CHART_UNONAME_NUMFMT : OUString("PercentageNumberFormat");
sal_uInt16 nSourceWhich = (nWhichId == SID_ATTR_NUMBERFORMAT_VALUE) ? SID_ATTR_NUMBERFORMAT_SOURCE : SCHATTR_PERCENT_NUMBERFORMAT_SOURCE;
if (rItemSet.GetItemState(nSourceWhich) != SfxItemState::SET)
@@ -125,7 +126,7 @@ bool numberFormatFromItemToPropertySet(
uno::Any aOldValue = xPropertySet->getPropertyValue(aPropertyName);
if (bOverwriteDataPoints)
{
- Reference<chart2::XDataSeries> xSeries(xPropertySet, uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries( dynamic_cast<DataSeries*>(xPropertySet.get()) );
if (aValue != aOldValue ||
::chart::DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, aPropertyName, aOldValue))
{
@@ -148,7 +149,7 @@ bool useSourceFormatFromItemToPropertySet(
bool bChanged = false;
if (!xPropertySet.is())
return bChanged;
- OUString aPropertyName = (nWhichId == SID_ATTR_NUMBERFORMAT_SOURCE) ? OUString(CHART_UNONAME_NUMFMT) : OUString("PercentageNumberFormat");
+ OUString aPropertyName = (nWhichId == SID_ATTR_NUMBERFORMAT_SOURCE) ? CHART_UNONAME_NUMFMT : OUString("PercentageNumberFormat");
sal_uInt16 nFormatWhich = (nWhichId == SID_ATTR_NUMBERFORMAT_SOURCE) ? SID_ATTR_NUMBERFORMAT_VALUE : SCHATTR_PERCENT_NUMBERFORMAT_VALUE;
if (rItemSet.GetItemState(nWhichId) != SfxItemState::SET)
@@ -175,7 +176,7 @@ bool useSourceFormatFromItemToPropertySet(
uno::Any aOldValue(xPropertySet->getPropertyValue(aPropertyName));
if (bOverwriteDataPoints)
{
- Reference<chart2::XDataSeries> xSeries(xPropertySet, uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(xPropertySet.get()));
if (aNewValue != aOldValue ||
::chart::DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, aPropertyName, aOldValue))
{
@@ -197,8 +198,8 @@ bool useSourceFormatFromItemToPropertySet(
TextLabelItemConverter::TextLabelItemConverter(
const rtl::Reference<::chart::ChartModel>& xChartModel,
const uno::Reference<beans::XPropertySet>& rPropertySet,
- const uno::Reference<XDataSeries>& xSeries,
- SfxItemPool& rItemPool, const awt::Size* pRefSize,
+ const rtl::Reference<DataSeries>& xSeries,
+ SfxItemPool& rItemPool, const std::optional<awt::Size>& pRefSize,
bool bDataSeries, sal_Int32 nNumberFormat, sal_Int32 nPercentNumberFormat ) :
ItemConverter(rPropertySet, rItemPool),
mnNumberFormat(nNumberFormat),
@@ -209,11 +210,11 @@ TextLabelItemConverter::TextLabelItemConverter(
{
maConverters.emplace_back(new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize"));
- rtl::Reference< Diagram > xDiagram(ChartModelHelper::findDiagram(xChartModel));
- uno::Reference<XChartType> xChartType(DiagramHelper::getChartTypeOfSeries(xDiagram, xSeries));
+ rtl::Reference< Diagram > xDiagram(xChartModel->getFirstChartDiagram());
+ rtl::Reference< ChartType > xChartType(xDiagram->getChartTypeOfSeries(xSeries));
bool bFound = false;
bool bAmbiguous = false;
- bool bSwapXAndY = DiagramHelper::getVertical(xDiagram, bFound, bAmbiguous);
+ bool bSwapXAndY = xDiagram->getVertical(bFound, bAmbiguous);
maAvailableLabelPlacements = ChartTypeHelper::getSupportedLabelPlacements(xChartType, bSwapXAndY, xSeries);
mbForbidPercentValue = ChartTypeHelper::getAxisType(xChartType, 0) != AxisType::CATEGORY;
@@ -287,7 +288,7 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
rValue = rItem.GetValue();
if (mbDataSeries)
{
- Reference<chart2::XDataSeries> xSeries(GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if (bOldValue != bool(rValue) ||
DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, CHART_UNONAME_LABEL, aOldValue))
{
@@ -325,7 +326,7 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
GetPropertySet()->getPropertyValue("LabelSeparator") >>= aOldValue;
if (mbDataSeries)
{
- Reference<chart2::XDataSeries> xSeries(GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if (aOldValue != aNewValue ||
DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, "LabelSeparator", uno::Any(aOldValue)))
{
@@ -355,7 +356,7 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
GetPropertySet()->getPropertyValue( "TextWordWrap" ) >>= bOld;
if( mbDataSeries )
{
- Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference< DataSeries > xSeries( dynamic_cast<DataSeries*>(GetPropertySet().get()) );
if( bOld!=bNew ||
DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "TextWordWrap", uno::Any( bOld ) ) )
{
@@ -385,7 +386,7 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
GetPropertySet()->getPropertyValue("LabelPlacement") >>= nOld;
if (mbDataSeries)
{
- Reference<chart2::XDataSeries> xSeries(GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if (nOld != nNew ||
DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, "LabelPlacement", uno::Any(nOld)))
{
@@ -397,6 +398,7 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
{
GetPropertySet()->setPropertyValue("LabelPlacement", uno::Any(nNew));
GetPropertySet()->setPropertyValue("CustomLabelPosition", uno::Any());
+ GetPropertySet()->setPropertyValue("CustomLabelSize", uno::Any());
bChanged = true;
}
}
@@ -511,10 +513,9 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
{
bool bNew = static_cast<const SfxBoolItem&>(rItemSet.Get(nWhichId)).GetValue();
bool bOld = true;
- Reference<beans::XPropertySet> xSeriesProp(m_xSeries, uno::UNO_QUERY);
- if( (xSeriesProp->getPropertyValue("ShowCustomLeaderLines") >>= bOld) && bOld != bNew )
+ if( (m_xSeries->getFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES) >>= bOld) && bOld != bNew )
{
- xSeriesProp->setPropertyValue("ShowCustomLeaderLines", uno::Any(bNew));
+ m_xSeries->setFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES, uno::Any(bNew));
bChanged = true;
}
}
@@ -552,7 +553,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r
if (mbDataSeries)
{
if (DataSeriesHelper::hasAttributedDataPointDifferentValue(
- Reference<chart2::XDataSeries>(GetPropertySet(), uno::UNO_QUERY), CHART_UNONAME_LABEL, uno::Any(aLabel)))
+ dynamic_cast<DataSeries*>(GetPropertySet().get()), CHART_UNONAME_LABEL, uno::Any(aLabel)))
{
rOutItemSet.InvalidateItem(nWhichId);
}
@@ -668,8 +669,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r
try
{
bool bValue = true;
- Reference<beans::XPropertySet> xSeriesProp(m_xSeries, uno::UNO_QUERY);
- if( xSeriesProp->getPropertyValue( "ShowCustomLeaderLines" ) >>= bValue )
+ if( m_xSeries->getFastPropertyValue( PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES ) >>= bValue )
rOutItemSet.Put(SfxBoolItem(nWhichId, bValue));
}
catch (const uno::Exception&)
@@ -711,7 +711,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r
if (GetPropertySet()->getPropertyValue("TextRotation") >>= fValue)
{
rOutItemSet.Put(
- SdrAngleItem(nWhichId, Degree100(static_cast<sal_Int32>(rtl::math::round(fValue * 100.0)))));
+ SdrAngleItem(SCHATTR_TEXT_DEGREES, Degree100(static_cast<sal_Int32>(rtl::math::round(fValue * 100.0)))));
}
}
break;
diff --git a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
index 605eb07b4692..1327a0a0d91b 100644
--- a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
@@ -50,7 +50,7 @@ public:
FormattedStringsConverter(
const uno::Sequence< uno::Reference< chart2::XFormattedString > > & aStrings,
SfxItemPool & rItemPool,
- const awt::Size* pRefSize,
+ const std::optional<awt::Size>& pRefSize,
const uno::Reference< beans::XPropertySet > & xParentProp );
protected:
@@ -62,7 +62,7 @@ protected:
FormattedStringsConverter::FormattedStringsConverter(
const uno::Sequence< uno::Reference< chart2::XFormattedString > > & aStrings,
SfxItemPool & rItemPool,
- const awt::Size* pRefSize,
+ const std::optional<awt::Size>& pRefSize,
const uno::Reference< beans::XPropertySet > & xParentProp ) :
MultipleItemConverter( rItemPool )
{
@@ -92,7 +92,7 @@ TitleItemConverter::TitleItemConverter(
SfxItemPool& rItemPool,
SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
- const awt::Size* pRefSize ) :
+ const std::optional<awt::Size>& pRefSize ) :
ItemConverter( rPropertySet, rItemPool )
{
m_aConverters.emplace_back( new GraphicPropertyItemConverter(
@@ -197,7 +197,7 @@ void TitleItemConverter::FillSpecialItem(
if( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fVal )
{
- rOutItemSet.Put( SdrAngleItem( nWhichId, Degree100(static_cast< sal_Int32 >(
+ rOutItemSet.Put( SdrAngleItem( SCHATTR_TEXT_DEGREES, Degree100(static_cast< sal_Int32 >(
::rtl::math::round( fVal * 100.0 ) ) )));
}
}
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 5a25f761e896..2bd0bf549e89 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -22,22 +22,23 @@
#include <config_wasm_strip.h>
#include <ChartController.hxx>
+#include <ChartView.hxx>
#include <servicenames.hxx>
#include <ResId.hxx>
#include <dlg_DataSource.hxx>
#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
+#include <ChartType.hxx>
#include "ControllerCommandDispatch.hxx"
+#include <DataSeries.hxx>
#include <Diagram.hxx>
#include <strings.hrc>
-#include <chartview/ExplicitValueProvider.hxx>
#include <ChartViewHelper.hxx>
#include <ChartWindow.hxx>
#include <chartview/DrawModelWrapper.hxx>
#include <DrawViewWrapper.hxx>
#include <ObjectIdentifier.hxx>
-#include <DiagramHelper.hxx>
#include <ControllerLockGuard.hxx>
#include "UndoGuard.hxx"
#include "ChartDropTargetHelper.hxx"
@@ -51,42 +52,36 @@
#include "UndoActions.hxx"
#include <ViewElementListProvider.hxx>
-#include <cppuhelper/supportsservice.hxx>
-#include <comphelper/servicehelper.hxx>
+#include <comphelper/dispatchcommand.hxx>
#include <BaseCoordinateSystem.hxx>
-#include <com/sun/star/awt/XWindowPeer.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/data/XDataReceiver.hpp>
#include <com/sun/star/frame/XController2.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
-#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/frame/LayoutManagerEvents.hpp>
#include <com/sun/star/frame/XLayoutManagerEventBroadcaster.hpp>
-#include <com/sun/star/document/XUndoManagerSupplier.hpp>
#include <com/sun/star/ui/XSidebar.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XDataProviderAccess.hpp>
+#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <sal/log.hxx>
#include <tools/debug.hxx>
#include <svx/sidebar/SelectionChangeHandler.hxx>
#include <toolkit/helper/vclunohelper.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <osl/mutex.hxx>
+#include <comphelper/lok.hxx>
#include <sfx2/sidebar/SidebarController.hxx>
-
+#include <com/sun/star/awt/XVclWindowPeer.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
// this is needed to properly destroy the unique_ptr to the AcceleratorExecute
// object in the DTOR
#include <svtools/acceleratorexecute.hxx>
#include <svx/ActionDescriptionProvider.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
// enable the following define to let the controller listen to model changes and
// react on this by rebuilding the view
@@ -101,10 +96,10 @@ using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-ChartController::ChartController(uno::Reference<uno::XComponentContext> const & xContext) :
+ChartController::ChartController(uno::Reference<uno::XComponentContext> xContext) :
m_aLifeTimeManager( nullptr ),
m_bSuspended( false ),
- m_xCC(xContext),
+ m_xCC(std::move(xContext)),
m_aModel( nullptr, m_aModelMutex ),
m_eDragMode(SdrDragMode::Move),
m_aDoubleClickTimer("chart2 ChartController m_aDoubleClickTimer"),
@@ -127,8 +122,8 @@ ChartController::~ChartController()
stopDoubleClickWaiting();
}
-ChartController::TheModel::TheModel( const rtl::Reference<::chart::ChartModel> & xModel ) :
- m_xModel( xModel ),
+ChartController::TheModel::TheModel( rtl::Reference<::chart::ChartModel> xModel ) :
+ m_xModel(std::move( xModel )),
m_bOwnership( true )
{
}
@@ -231,20 +226,17 @@ bool ChartController::TheModelRef::is() const
namespace {
-css::uno::Reference<css::chart2::XChartType> getChartType(
- const rtl::Reference<ChartModel>& xChartDoc)
+rtl::Reference<ChartType> getChartType(const rtl::Reference<ChartModel>& xChartDoc)
{
rtl::Reference<Diagram > xDiagram = xChartDoc->getFirstChartDiagram();
if (!xDiagram.is())
- return css::uno::Reference<css::chart2::XChartType>();
+ return nullptr;
- const std::vector< rtl::Reference< BaseCoordinateSystem > > xCooSysSequence( xDiagram->getBaseCoordinateSystems());
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & xCooSysSequence( xDiagram->getBaseCoordinateSystems());
if (xCooSysSequence.empty())
- return css::uno::Reference<css::chart2::XChartType>();
-
- Sequence< Reference< chart2::XChartType > > xChartTypeSequence( xCooSysSequence[0]->getChartTypes() );
+ return nullptr;
- return xChartTypeSequence[0];
+ return xCooSysSequence[0]->getChartTypes2()[0];
}
}
@@ -279,7 +271,7 @@ OUString ChartController::GetContextName()
return "Grid";
case OBJECTTYPE_DIAGRAM:
{
- css::uno::Reference<css::chart2::XChartType> xChartType = getChartType(getChartModel());
+ rtl::Reference<ChartType> xChartType = getChartType(getChartModel());
if (xChartType.is() && xChartType->getChartType() == "com.sun.star.chart2.PieChartType")
return "ChartElements";
break;
@@ -309,27 +301,6 @@ bool ChartController::impl_isDisposedOrSuspended() const
return false;
}
-// lang::XServiceInfo
-
-OUString SAL_CALL ChartController::getImplementationName()
-{
- return CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME;
-}
-
-sal_Bool SAL_CALL ChartController::supportsService( const OUString& rServiceName )
-{
- return cppu::supportsService(this, rServiceName);
-}
-
-css::uno::Sequence< OUString > SAL_CALL ChartController::getSupportedServiceNames()
-{
- return {
- CHART_CONTROLLER_SERVICE_NAME,
- "com.sun.star.frame.Controller"
- //// @todo : add additional services if you support any further
- };
-}
-
namespace {
uno::Reference<ui::XSidebar> getSidebarFromModel(const uno::Reference<frame::XModel>& xModel)
@@ -365,19 +336,6 @@ void SAL_CALL ChartController::attachFrame(
if( impl_isDisposedOrSuspended() ) //@todo? allow attaching the frame while suspended?
return; //behave passive if already disposed or suspended
- mpSelectionChangeHandler->Connect();
-
- uno::Reference<ui::XSidebar> xSidebar = getSidebarFromModel(getModel());
- if (xSidebar.is())
- {
- auto pSidebar = dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get());
- assert(pSidebar);
- sfx2::sidebar::SidebarController::registerSidebarForFrame(pSidebar, this);
- pSidebar->updateModel(getModel());
- css::lang::EventObject aEvent;
- mpSelectionChangeHandler->selectionChanged(aEvent);
- }
-
if(m_xFrame.is()) //what happens, if we do have a Frame already??
{
//@todo? throw exception?
@@ -388,6 +346,20 @@ void SAL_CALL ChartController::attachFrame(
//--attach frame
m_xFrame = xFrame; //the frameloader is responsible to call xFrame->setComponent
+ // Only notify after setting the frame, otherwise notification will fail
+ mpSelectionChangeHandler->Connect();
+
+ uno::Reference<ui::XSidebar> xSidebar = getSidebarFromModel(getChartModel());
+ if (xSidebar.is())
+ {
+ auto pSidebar = dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get());
+ assert(pSidebar);
+ pSidebar->registerSidebarForFrame(this);
+ pSidebar->updateModel(getChartModel());
+ css::lang::EventObject aEvent;
+ mpSelectionChangeHandler->selectionChanged(aEvent);
+ }
+
//add as disposelistener to the frame (due to persistent reference) ??...:
//the frame is considered to be owner of this controller and will live longer than we do
@@ -546,9 +518,8 @@ sal_Bool SAL_CALL ChartController::attachModel( const uno::Reference< frame::XMo
//--handle relations to the old model if any
if( aOldModelRef.is() )
{
- uno::Reference< util::XModeChangeBroadcaster > xViewBroadcaster( m_xChartView, uno::UNO_QUERY );
- if( xViewBroadcaster.is() )
- xViewBroadcaster->removeModeChangeListener(this);
+ if( m_xChartView.is() )
+ m_xChartView->removeModeChangeListener(this);
m_pDrawModelWrapper.reset();
aOldModelRef->removeListener( this );
@@ -590,14 +561,12 @@ sal_Bool SAL_CALL ChartController::attachModel( const uno::Reference< frame::XMo
// select chart area per default:
// select( uno::Any( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) ) );
- uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY );
+ rtl::Reference< ChartModel > xFact = getChartModel();
if( xFact.is())
{
- m_xChartView = xFact->createInstance( CHART_VIEW_SERVICE_NAME );
+ m_xChartView = dynamic_cast<::chart::ChartView*>(xFact->createInstance( CHART_VIEW_SERVICE_NAME ).get());
GetDrawModelWrapper();
- uno::Reference< util::XModeChangeBroadcaster > xViewBroadcaster( m_xChartView, uno::UNO_QUERY );
- if( xViewBroadcaster.is() )
- xViewBroadcaster->addModeChangeListener(this);
+ m_xChartView->addModeChangeListener(this);
}
//the frameloader is responsible to call xModel->connectController
@@ -608,8 +577,7 @@ sal_Bool SAL_CALL ChartController::attachModel( const uno::Reference< frame::XMo
pChartWindow->Invalidate();
}
- uno::Reference< document::XUndoManagerSupplier > xSuppUndo( getModel(), uno::UNO_QUERY_THROW );
- m_xUndoManager.set( xSuppUndo->getUndoManager(), uno::UNO_SET_THROW );
+ m_xUndoManager.set( getChartModel()->getUndoManager(), uno::UNO_SET_THROW );
return true;
}
@@ -642,7 +610,7 @@ rtl::Reference<::chart::ChartModel> ChartController::getChartModel()
rtl::Reference<::chart::Diagram> ChartController::getFirstDiagram()
{
- return ChartModelHelper::findDiagram( getChartModel() );
+ return getChartModel()->getFirstChartDiagram();
}
uno::Any SAL_CALL ChartController::getViewData()
@@ -698,6 +666,24 @@ sal_Bool SAL_CALL ChartController::suspend( sal_Bool bSuspend )
return true;
}
+// css::frame::XController2
+
+css::uno::Reference<css::awt::XWindow> SAL_CALL ChartController::getComponentWindow()
+{
+ // it is a special characteristic of ChartController
+ // that it simultaneously provides the XWindow functionality
+ return this;
+}
+
+OUString SAL_CALL ChartController::getViewControllerName() { return {}; }
+
+css::uno::Sequence<css::beans::PropertyValue> SAL_CALL ChartController::getCreationArguments()
+{
+ return {};
+}
+
+css::uno::Reference<css::ui::XSidebarProvider> SAL_CALL ChartController::getSidebar() { return {}; }
+
void ChartController::impl_createDrawViewController()
{
SolarMutexGuard aGuard;
@@ -705,8 +691,21 @@ void ChartController::impl_createDrawViewController()
{
if( m_pDrawModelWrapper )
{
+ bool bLokCalcGlobalRTL = false;
+ if(comphelper::LibreOfficeKit::isActive() && AllSettings::GetLayoutRTL())
+ {
+ rtl::Reference< ChartModel > xChartModel = getChartModel();
+ if (xChartModel.is())
+ {
+ uno::Reference<css::sheet::XSpreadsheetDocument> xSSDoc(xChartModel->getParent(), uno::UNO_QUERY);
+ if (xSSDoc.is())
+ bLokCalcGlobalRTL = true;
+ }
+ }
+
m_pDrawViewWrapper.reset( new DrawViewWrapper(m_pDrawModelWrapper->getSdrModel(),GetChartWindow()->GetOutDev()) );
- m_pDrawViewWrapper->attachParentReferenceDevice( getModel() );
+ m_pDrawViewWrapper->SetNegativeX(bLokCalcGlobalRTL);
+ m_pDrawViewWrapper->attachParentReferenceDevice( getChartModel() );
}
}
}
@@ -733,10 +732,10 @@ void SAL_CALL ChartController::dispose()
if (getModel().is())
{
- uno::Reference<ui::XSidebar> xSidebar = getSidebarFromModel(getModel());
+ uno::Reference<ui::XSidebar> xSidebar = getSidebarFromModel(getChartModel());
if (sfx2::sidebar::SidebarController* pSidebar = dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get()))
{
- sfx2::sidebar::SidebarController::unregisterSidebarForFrame(pSidebar, this);
+ pSidebar->unregisterSidebarForFrame(this);
}
}
@@ -759,7 +758,7 @@ void SAL_CALL ChartController::dispose()
if( m_aModel.is())
{
uno::Reference< view::XSelectionChangeListener > xSelectionChangeListener;
- uno::Reference< chart2::data::XDataReceiver > xDataReceiver( getModel(), uno::UNO_QUERY );
+ rtl::Reference< ChartModel > xDataReceiver = getChartModel();
if( xDataReceiver.is() )
xSelectionChangeListener.set( xDataReceiver->getRangeHighlighter(), uno::UNO_QUERY );
if( xSelectionChangeListener.is() )
@@ -772,9 +771,8 @@ void SAL_CALL ChartController::dispose()
//--release all resources and references
{
- uno::Reference< util::XModeChangeBroadcaster > xViewBroadcaster( m_xChartView, uno::UNO_QUERY );
- if( xViewBroadcaster.is() )
- xViewBroadcaster->removeModeChangeListener(this);
+ if( m_xChartView.is() )
+ m_xChartView->removeModeChangeListener(this);
impl_invalidateAccessible();
SolarMutexGuard aSolarGuard;
@@ -793,7 +791,7 @@ void SAL_CALL ChartController::dispose()
if( m_xLayoutManagerEventBroadcaster.is())
{
m_xLayoutManagerEventBroadcaster->removeLayoutManagerEventListener( this );
- m_xLayoutManagerEventBroadcaster.set( nullptr );
+ m_xLayoutManagerEventBroadcaster.clear();
}
m_xFrame.clear();
@@ -839,12 +837,12 @@ void SAL_CALL ChartController::dispose()
void SAL_CALL ChartController::addEventListener(
const uno::Reference<lang::XEventListener>& xListener )
{
- SolarMutexGuard aGuard;
if( impl_isDisposedOrSuspended() )//@todo? allow adding of listeners in suspend mode?
return; //behave passive if already disposed or suspended
//--add listener
- m_aLifeTimeManager.m_aListenerContainer.addInterface( cppu::UnoType<lang::XEventListener>::get(), xListener );
+ std::unique_lock aGuard2(m_aLifeTimeManager.m_aAccessMutex);
+ m_aLifeTimeManager.m_aEventListeners.addInterface( aGuard2, xListener );
}
void SAL_CALL ChartController::removeEventListener(
@@ -855,7 +853,8 @@ void SAL_CALL ChartController::removeEventListener(
return; //behave passive if already disposed or suspended
//--remove listener
- m_aLifeTimeManager.m_aListenerContainer.removeInterface( cppu::UnoType<lang::XEventListener>::get(), xListener );
+ std::unique_lock aGuard2(m_aLifeTimeManager.m_aAccessMutex);
+ m_aLifeTimeManager.m_aEventListeners.removeInterface( aGuard2, xListener );
}
// util::XCloseListener
@@ -936,7 +935,7 @@ void SAL_CALL ChartController::disposing(
if( !impl_releaseThisModel( rSource.Source ))
{
if( rSource.Source == m_xLayoutManagerEventBroadcaster )
- m_xLayoutManagerEventBroadcaster.set( nullptr );
+ m_xLayoutManagerEventBroadcaster.clear();
}
}
@@ -1115,7 +1114,7 @@ void SAL_CALL ChartController::dispatch(
}
else if(aCommand.startsWith("FillGradient"))
{
- this->executeDispatch_FillGradient(aCommand.copy(aCommand.indexOf('=') + 1));
+ this->executeDispatch_FillGradient(aCommand.subView(aCommand.indexOf('=') + 1));
}
else if(aCommand == "Paste")
this->executeDispatch_Paste();
@@ -1127,7 +1126,7 @@ void SAL_CALL ChartController::dispatch(
this->executeDispatch_SourceData();
else if(aCommand == "Update" ) //Update Chart
{
- ChartViewHelper::setViewToDirtyState( getModel() );
+ ChartViewHelper::setViewToDirtyState( getChartModel() );
SolarMutexGuard aGuard;
auto pChartWindow(GetChartWindow());
if( pChartWindow )
@@ -1160,6 +1159,8 @@ void SAL_CALL ChartController::dispatch(
this->executeDispatch_InsertErrorBars(false);
else if( aCommand == "InsertMenuYErrorBars" )
this->executeDispatch_InsertErrorBars(true);
+ else if( aCommand == "InsertMenuDataTable" )
+ this->executeDispatch_OpenInsertDataTableDialog();
else if( aCommand == "InsertSymbol" )
this->executeDispatch_InsertSpecialCharacter();
else if( aCommand == "InsertTrendline" )
@@ -1214,6 +1215,10 @@ void SAL_CALL ChartController::dispatch(
this->executeDispatch_DeleteMajorGrid();
else if( aCommand == "DeleteMinorGrid" )
this->executeDispatch_DeleteMinorGrid();
+ else if( aCommand == "InsertDataTable" )
+ this->executeDispatch_InsertDataTable();
+ else if( aCommand == "DeleteDataTable" )
+ this->executeDispatch_DeleteDataTable();
//format objects
else if( aCommand == "FormatSelection" )
this->executeDispatch_ObjectProperties();
@@ -1228,7 +1233,9 @@ void SAL_CALL ChartController::dispatch(
this->executeDispatch_PositionAndSize();
}
}
- else if( lcl_isFormatObjectCommand(aCommand) )
+ else if ( aCommand == "FontDialog" )
+ this->impl_ShapeControllerDispatch(rURL, rArgs);
+ else if (lcl_isFormatObjectCommand(aCommand))
this->executeDispatch_FormatObject(rURL.Path);
//more format
else if( aCommand == "DiagramType" )
@@ -1292,6 +1299,8 @@ void SAL_CALL ChartController::dispatch(
}
}
}
+ else if( aCommand == "ChangeTheme" )
+ comphelper::dispatchCommand(".uno:ChangeTheme", getFrame(), rArgs);
}
void SAL_CALL ChartController::addStatusListener(
@@ -1326,17 +1335,19 @@ void SAL_CALL ChartController::releaseContextMenuInterceptor(
void ChartController::executeDispatch_ChartType()
{
- UndoLiveUpdateGuard aUndoGuard(
- SchResId( STR_ACTION_EDIT_CHARTTYPE ), m_xUndoManager );
+ auto xUndoGuard = std::make_shared<UndoLiveUpdateGuard>(SchResId(STR_ACTION_EDIT_CHARTTYPE),
+ m_xUndoManager);
SolarMutexGuard aSolarGuard;
//prepare and open dialog
- ChartTypeDialog aDlg(GetChartFrame(), getChartModel());
- if (aDlg.run() == RET_OK)
- {
- impl_adaptDataSeriesAutoResize();
- aUndoGuard.commit();
- }
+ auto aDlg = std::make_shared<ChartTypeDialog>(GetChartFrame(), getChartModel());
+ weld::DialogController::runAsync(aDlg, [this, xUndoGuard=std::move(xUndoGuard)](int nResult) {
+ if (nResult == RET_OK)
+ {
+ impl_adaptDataSeriesAutoResize();
+ xUndoGuard->commit();
+ }
+ });
}
void ChartController::executeDispatch_SourceData()
@@ -1378,17 +1389,17 @@ void ChartController::executeDispatch_SourceData()
rModel.attachDataProvider(xDataProvider);
}
}
-
- UndoLiveUpdateGuard aUndoGuard(
- SchResId(STR_ACTION_EDIT_DATA_RANGES), m_xUndoManager);
-
+ auto xUndoGuard = std::make_shared<UndoLiveUpdateGuard>(SchResId(STR_ACTION_EDIT_DATA_RANGES),
+ m_xUndoManager);
SolarMutexGuard aSolarGuard;
- ::chart::DataSourceDialog aDlg(GetChartFrame(), xChartDoc, m_xCC);
- if (aDlg.run() == RET_OK)
- {
- impl_adaptDataSeriesAutoResize();
- aUndoGuard.commit();
- }
+ auto aDlg = std::make_shared<DataSourceDialog>(GetChartFrame(), xChartDoc);
+ weld::DialogController::runAsync(aDlg, [this, xUndoGuard=std::move(xUndoGuard)](int nResult) {
+ if (nResult == RET_OK)
+ {
+ impl_adaptDataSeriesAutoResize();
+ xUndoGuard->commit();
+ }
+ });
}
void ChartController::executeDispatch_MoveSeries( bool bForward )
@@ -1397,8 +1408,8 @@ void ChartController::executeDispatch_MoveSeries( bool bForward )
//get selected series
OUString aObjectCID(m_aSelection.getSelectedCID());
- uno::Reference< XDataSeries > xGivenDataSeries( ObjectIdentifier::getDataSeriesForCID( //yyy todo also legend entries and labels?
- aObjectCID, getChartModel() ) );
+ rtl::Reference< DataSeries > xGivenDataSeries = ObjectIdentifier::getDataSeriesForCID( //yyy todo also legend entries and labels?
+ aObjectCID, getChartModel() );
UndoGuardWithSelection aUndoGuard(
ActionDescriptionProvider::createDescription(
@@ -1406,7 +1417,7 @@ void ChartController::executeDispatch_MoveSeries( bool bForward )
SchResId(STR_OBJECT_DATASERIES)),
m_xUndoManager );
- bool bChanged = DiagramHelper::moveSeries( getFirstDiagram(), xGivenDataSeries, bForward );
+ bool bChanged = getFirstDiagram()->moveSeries( xGivenDataSeries, bForward );
if( bChanged )
{
m_aSelection.setSelection( ObjectIdentifier::getMovedSeriesCID( aObjectCID, bForward ) );
@@ -1414,38 +1425,6 @@ void ChartController::executeDispatch_MoveSeries( bool bForward )
}
}
-// ____ XMultiServiceFactory ____
-uno::Reference< uno::XInterface > SAL_CALL
- ChartController::createInstance( const OUString& aServiceSpecifier )
-{
- uno::Reference< uno::XInterface > xResult;
-
-#if !ENABLE_WASM_STRIP_ACCESSIBILITY
- if( aServiceSpecifier == CHART_ACCESSIBLE_TEXT_SERVICE_NAME )
- xResult.set( impl_createAccessibleTextContext());
-#else
- (void)aServiceSpecifier;
-#endif
-
- return xResult;
-}
-
-uno::Reference< uno::XInterface > SAL_CALL
- ChartController::createInstanceWithArguments(
- const OUString& ServiceSpecifier,
- const uno::Sequence< uno::Any >& /* Arguments */ )
-{
- // ignore Arguments
- return createInstance( ServiceSpecifier );
-}
-
-uno::Sequence< OUString > SAL_CALL
- ChartController::getAvailableServiceNames()
-{
- uno::Sequence< OUString > aServiceNames { CHART_ACCESSIBLE_TEXT_SERVICE_NAME };
- return aServiceNames;
-}
-
// ____ XModifyListener ____
void SAL_CALL ChartController::modified(
const lang::EventObject& /* aEvent */ )
@@ -1465,7 +1444,7 @@ void ChartController::NotifyUndoActionHdl( std::unique_ptr<SdrUndoAction> pUndoA
try
{
- const Reference< document::XUndoManagerSupplier > xSuppUndo( getModel(), uno::UNO_QUERY_THROW );
+ rtl::Reference< ChartModel > xSuppUndo = getChartModel();
const Reference< document::XUndoManager > xUndoManager( xSuppUndo->getUndoManager(), uno::UNO_SET_THROW );
const Reference< document::XUndoAction > xAction( new impl::ShapeUndoElement( std::move(pUndoAction) ) );
xUndoManager->addUndoAction( xAction );
@@ -1480,9 +1459,8 @@ DrawModelWrapper* ChartController::GetDrawModelWrapper()
{
if( !m_pDrawModelWrapper )
{
- ExplicitValueProvider* pProvider = comphelper::getFromUnoTunnel<ExplicitValueProvider>( m_xChartView );
- if( pProvider )
- m_pDrawModelWrapper = pProvider->getDrawModelWrapper();
+ if( m_xChartView )
+ m_pDrawModelWrapper = m_xChartView->getDrawModelWrapper();
if ( m_pDrawModelWrapper )
{
m_pDrawModelWrapper->getSdrModel().SetNotifyUndoActionHdl(
@@ -1541,8 +1519,8 @@ void ChartController::SetAndApplySelection(const Reference<drawing::XShape>& rxS
uno::Reference< XAccessible > ChartController::CreateAccessible()
{
#if !ENABLE_WASM_STRIP_ACCESSIBILITY
- uno::Reference< XAccessible > xResult = new AccessibleChartView( GetDrawViewWrapper() );
- impl_initializeAccessible( uno::Reference< lang::XInitialization >( xResult, uno::UNO_QUERY ) );
+ rtl::Reference< AccessibleChartView > xResult = new AccessibleChartView( GetDrawViewWrapper() );
+ impl_initializeAccessible( *xResult );
return xResult;
#else
return uno::Reference< XAccessible >();
@@ -1551,30 +1529,35 @@ uno::Reference< XAccessible > ChartController::CreateAccessible()
void ChartController::impl_invalidateAccessible()
{
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
SolarMutexGuard aGuard;
auto pChartWindow(GetChartWindow());
if( pChartWindow )
{
- Reference< lang::XInitialization > xInit( pChartWindow->GetAccessible(false), uno::UNO_QUERY );
+ Reference< XInterface > xInit( pChartWindow->GetAccessible(false) );
if(xInit.is())
{
- uno::Sequence< uno::Any > aArguments(3);//empty arguments -> invalid accessible
- xInit->initialize(aArguments);
+ //empty arguments -> invalid accessible
+ dynamic_cast<AccessibleChartView&>(*xInit).initialize();
}
}
+#endif
}
void ChartController::impl_initializeAccessible()
{
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
SolarMutexGuard aGuard;
auto pChartWindow(GetChartWindow());
- if( pChartWindow )
- this->impl_initializeAccessible( Reference< lang::XInitialization >( pChartWindow->GetAccessible(false), uno::UNO_QUERY ) );
+ if( !pChartWindow )
+ return;
+ Reference< XInterface > xInit( pChartWindow->GetAccessible(false) );
+ if(xInit.is())
+ impl_initializeAccessible( dynamic_cast<AccessibleChartView&>(*xInit) );
+#endif
}
-void ChartController::impl_initializeAccessible( const uno::Reference< lang::XInitialization >& xInit )
+#if !ENABLE_WASM_STRIP_ACCESSIBILITY
+void ChartController::impl_initializeAccessible( AccessibleChartView& rAccChartView )
{
- if(!xInit.is())
- return;
-
uno::Reference< XAccessible > xParent;
{
SolarMutexGuard aGuard;
@@ -1586,14 +1569,12 @@ void ChartController::impl_initializeAccessible( const uno::Reference< lang::XIn
xParent.set( pParentWin->GetAccessible());
}
}
- uno::Sequence< uno::Any > aArguments{ uno::Any(uno::Reference<view::XSelectionSupplier>(this)),
- uno::Any(getModel()),
- uno::Any(m_xChartView),
- uno::Any(xParent),
- uno::Any(m_xViewWindow) };
- xInit->initialize(aArguments);
+ rAccChartView.initialize(*this, getChartModel(), m_xChartView, xParent, m_xViewWindow);
}
+#else
+void ChartController::impl_initializeAccessible( AccessibleChartView& /* rAccChartView */) {}
+#endif
const o3tl::sorted_vector< OUString >& ChartController::impl_getAvailableCommands()
{
@@ -1622,8 +1603,10 @@ const o3tl::sorted_vector< OUString >& ChartController::impl_getAvailableCommand
"DeleteTrendline", "DeleteMeanValue", "DeleteTrendlineEquation",
"DeleteXErrorBars", "DeleteYErrorBars",
"DeleteDataLabels", "DeleteDataLabel",
+ "InsertMenuDataTable",
+ "InsertDataTable", "DeleteDataTable",
//format objects
- "FormatSelection", "TransformDialog",
+ "FormatSelection", "FontDialog", "TransformDialog",
"DiagramType", "View3D",
"Forward", "Backward",
"MainTitle", "SubTitle",
@@ -1670,11 +1653,4 @@ ViewElementListProvider ChartController::getViewElementListProvider()
} //namespace chart
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
-com_sun_star_comp_chart2_ChartController_get_implementation(css::uno::XComponentContext *context,
- css::uno::Sequence<css::uno::Any> const &)
-{
- return cppu::acquire(new chart::ChartController(context));
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx
index 4f0a979956b0..63577edf3920 100644
--- a/chart2/source/controller/main/ChartController_EditData.cxx
+++ b/chart2/source/controller/main/ChartController_EditData.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <ChartWindow.hxx>
#include <ChartController.hxx>
#include <ChartModel.hxx>
@@ -27,12 +26,9 @@
#include <strings.hrc>
#include <vcl/svapp.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
using namespace ::com::sun::star;
-using ::com::sun::star::uno::Reference;
-
namespace chart
{
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index b14a788f2140..b3455ad49e04 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -25,14 +25,15 @@
#include <dlg_InsertLegend.hxx>
#include <dlg_InsertErrorBars.hxx>
#include <dlg_InsertTitle.hxx>
+#include <dlg_InsertDataTable.hxx>
#include <dlg_ObjectProperties.hxx>
-#include <ChartModel.hxx>
-#include <ChartModelHelper.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <TitleHelper.hxx>
-#include <DiagramHelper.hxx>
+#include <DataSeries.hxx>
#include <Diagram.hxx>
+#include <GridProperties.hxx>
#include <chartview/DrawModelWrapper.hxx>
#include <chartview/ChartSfxItemIds.hxx>
#include <NumberFormatterWrapper.hxx>
@@ -50,15 +51,17 @@
#include <ErrorBarItemConverter.hxx>
#include <DataSeriesHelper.hxx>
#include <ObjectNameProvider.hxx>
+#include <Legend.hxx>
#include <LegendHelper.hxx>
+#include <DataTable.hxx>
+#include <RegressionCurveModel.hxx>
#include <com/sun/star/chart2/XRegressionCurve.hpp>
-#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <svx/ActionDescriptionProvider.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -69,14 +72,12 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-void lcl_InsertMeanValueLine( const uno::Reference< chart2::XDataSeries > & xSeries )
+void lcl_InsertMeanValueLine( const rtl::Reference< ::chart::DataSeries > & xSeries )
{
- uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt(
- xSeries, uno::UNO_QUERY );
- if( xRegCurveCnt.is())
+ if( xSeries.is())
{
::chart::RegressionCurveHelper::addMeanValueLine(
- xRegCurveCnt, uno::Reference< beans::XPropertySet >( xSeries, uno::UNO_QUERY ));
+ xSeries, xSeries);
}
}
@@ -87,35 +88,36 @@ namespace chart
void ChartController::executeDispatch_InsertAxes()
{
- UndoGuard aUndoGuard(
+ auto xUndoGuard = std::make_shared<UndoGuard>(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::ActionType::Insert, SchResId( STR_OBJECT_AXES )),
m_xUndoManager );
try
{
- InsertAxisOrGridDialogData aDialogInput;
+ auto aDialogInput = std::make_shared<InsertAxisOrGridDialogData>();
rtl::Reference< Diagram > xDiagram = getFirstDiagram();
- AxisHelper::getAxisOrGridExistence( aDialogInput.aExistenceList, xDiagram );
- AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram );
+ AxisHelper::getAxisOrGridExistence( aDialogInput->aExistenceList, xDiagram );
+ AxisHelper::getAxisOrGridPossibilities( aDialogInput->aPossibilityList, xDiagram );
SolarMutexGuard aGuard;
- SchAxisDlg aDlg(GetChartFrame(), aDialogInput);
- if (aDlg.run() == RET_OK)
- {
- // lock controllers till end of block
- ControllerLockGuardUNO aCLGuard( getChartModel() );
+ auto aDlg = std::make_shared<SchAxisDlg>(GetChartFrame(), *aDialogInput);
+ weld::DialogController::runAsync(aDlg, [this, aDlg, aDialogInput, xUndoGuard=std::move(xUndoGuard)](int nResult) {
+ if ( nResult == RET_OK )
+ {
+ // lock controllers till end of block
+ ControllerLockGuardUNO aCLGuard( getChartModel() );
- InsertAxisOrGridDialogData aDialogOutput;
- aDlg.getResult(aDialogOutput);
- std::unique_ptr< ReferenceSizeProvider > pRefSizeProvider(
- impl_createReferenceSizeProvider());
- bool bChanged = AxisHelper::changeVisibilityOfAxes( xDiagram
- , aDialogInput.aExistenceList, aDialogOutput.aExistenceList, m_xCC
- , pRefSizeProvider.get() );
- if( bChanged )
- aUndoGuard.commit();
- }
+ InsertAxisOrGridDialogData aDialogOutput;
+ aDlg->getResult(aDialogOutput);
+ ReferenceSizeProvider aRefSizeProvider(impl_createReferenceSizeProvider());
+ bool bChanged = AxisHelper::changeVisibilityOfAxes( getFirstDiagram()
+ , aDialogInput->aExistenceList, aDialogOutput.aExistenceList, m_xCC
+ , &aRefSizeProvider );
+ if( bChanged )
+ xUndoGuard->commit();
+ }
+ });
}
catch(const uno::RuntimeException&)
{
@@ -157,30 +159,145 @@ void ChartController::executeDispatch_InsertGrid()
}
}
+void ChartController::executeDispatch_OpenInsertDataTableDialog()
+{
+ SolarMutexGuard aGuard;
+
+ auto aUndoDescription = ActionDescriptionProvider::createDescription(ActionDescriptionProvider::ActionType::Insert, SchResId(STR_DATA_TABLE));
+ UndoGuard aUndoGuard(aUndoDescription, m_xUndoManager);
+
+ rtl::Reference<Diagram> xDiagram = getFirstDiagram();
+
+ InsertDataTableDialog aDialog(GetChartFrame());
+ {
+ // init values
+ DataTableDialogData aData;
+ auto xDataTable = xDiagram->getDataTable();
+ aData.mbShow = xDataTable.is();
+ if (xDataTable.is())
+ {
+ uno::Reference<beans::XPropertySet> xProperties(xDataTable, uno::UNO_QUERY);
+
+ uno::Any aAny = xProperties->getPropertyValue("HBorder");
+ if (aAny.has<bool>())
+ aData.mbHorizontalBorders = aAny.get<bool>();
+
+ aAny = xProperties->getPropertyValue("VBorder");
+ if (aAny.has<bool>())
+ aData.mbVerticalBorders = aAny.get<bool>();
+
+ aAny = xProperties->getPropertyValue("Outline");
+ if (aAny.has<bool>())
+ aData.mbOutline = aAny.get<bool>();
+
+ aAny = xProperties->getPropertyValue("Keys");
+ if (aAny.has<bool>())
+ aData.mbKeys = aAny.get<bool>();
+ }
+ aDialog.init(aData);
+ }
+
+ // show the dialog
+ if (aDialog.run() == RET_OK)
+ {
+ bool bChanged = false;
+
+ auto& rDialogData = aDialog.getDataTableDialogData();
+ auto xDataTable = xDiagram->getDataTable();
+ if (!rDialogData.mbShow && xDataTable.is())
+ {
+ xDiagram->setDataTable(uno::Reference<chart2::XDataTable>());
+ bChanged = true;
+ }
+ else if (rDialogData.mbShow && !xDataTable.is())
+ {
+ uno::Reference<chart2::XDataTable> xNewDataTable(new DataTable);
+ if (xNewDataTable.is())
+ {
+ xDiagram->setDataTable(xNewDataTable);
+ bChanged = true;
+ }
+ }
+
+ // Set the properties
+ xDataTable = xDiagram->getDataTable();
+ if (rDialogData.mbShow && xDataTable.is())
+ {
+ uno::Reference<beans::XPropertySet> xProperties(xDataTable, uno::UNO_QUERY);
+ xProperties->setPropertyValue("HBorder" , uno::Any(rDialogData.mbHorizontalBorders));
+ xProperties->setPropertyValue("VBorder" , uno::Any(rDialogData.mbVerticalBorders));
+ xProperties->setPropertyValue("Outline" , uno::Any(rDialogData.mbOutline));
+ xProperties->setPropertyValue("Keys" , uno::Any(rDialogData.mbKeys));
+ bChanged = true;
+ }
+
+ if (bChanged)
+ aUndoGuard.commit();
+ }
+}
+
+/** Create and insert a data table to the chart */
+void ChartController::executeDispatch_InsertDataTable()
+{
+ auto aUndoDescription = ActionDescriptionProvider::createDescription(ActionDescriptionProvider::ActionType::Insert, SchResId(STR_DATA_TABLE));
+ UndoGuard aUndoGuard(aUndoDescription, m_xUndoManager);
+
+
+ rtl::Reference<Diagram> xDiagram = getFirstDiagram();
+ auto xDataTable = xDiagram->getDataTable();
+ if (!xDataTable.is())
+ {
+ uno::Reference<chart2::XDataTable> xNewDataTable(new DataTable);
+ if (xNewDataTable.is())
+ {
+ xDiagram->setDataTable(xNewDataTable);
+ aUndoGuard.commit();
+ }
+ }
+}
+
+/** Delete a data table from the chart */
+void ChartController::executeDispatch_DeleteDataTable()
+{
+ auto aUndoDescription = ActionDescriptionProvider::createDescription(ActionDescriptionProvider::ActionType::Delete, SchResId(STR_DATA_TABLE));
+ UndoGuard aUndoGuard(aUndoDescription, m_xUndoManager);
+
+ rtl::Reference<Diagram> xDiagram = getFirstDiagram();
+ auto xDataTable = xDiagram->getDataTable();
+ if (xDataTable.is())
+ {
+ // insert a empty data table reference
+ xDiagram->setDataTable(uno::Reference<chart2::XDataTable>());
+ aUndoGuard.commit();
+ }
+}
+
void ChartController::executeDispatch_InsertTitles()
{
- UndoGuard aUndoGuard(
+ auto xUndoGuard = std::make_shared<UndoGuard>(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::ActionType::Insert, SchResId( STR_OBJECT_TITLES )),
m_xUndoManager );
try
{
- TitleDialogData aDialogInput;
- aDialogInput.readFromModel( getChartModel() );
+ auto aDialogInput = std::make_shared<TitleDialogData>();
+ aDialogInput->readFromModel( getChartModel() );
SolarMutexGuard aGuard;
- SchTitleDlg aDlg(GetChartFrame(), aDialogInput);
- if (aDlg.run() == RET_OK)
- {
- // lock controllers till end of block
- ControllerLockGuardUNO aCLGuard( getChartModel() );
- TitleDialogData aDialogOutput(impl_createReferenceSizeProvider());
- aDlg.getResult(aDialogOutput);
- bool bChanged = aDialogOutput.writeDifferenceToModel( getChartModel(), m_xCC, &aDialogInput );
- if( bChanged )
- aUndoGuard.commit();
- }
+ auto aDlg = std::make_shared<SchTitleDlg>(GetChartFrame(), *aDialogInput);
+ weld::DialogController::runAsync(aDlg, [this, aDlg, aDialogInput, xUndoGuard=std::move(xUndoGuard)](int nResult){
+ if ( nResult == RET_OK )
+ {
+ // lock controllers till end of block
+ ControllerLockGuardUNO aCLGuard( getChartModel() );
+ TitleDialogData aDialogOutput( impl_createReferenceSizeProvider() );
+ aDlg->getResult( aDialogOutput );
+ bool bChanged = aDialogOutput.writeDifferenceToModel( getChartModel(), m_xCC, aDialogInput.get() );
+ if( bChanged )
+ xUndoGuard->commit();
+ }
+ });
}
catch(const uno::RuntimeException&)
{
@@ -195,8 +312,7 @@ void ChartController::executeDispatch_DeleteLegend()
ActionDescriptionProvider::ActionType::Delete, SchResId( STR_OBJECT_LEGEND )),
m_xUndoManager );
- ChartModel& rModel = dynamic_cast<ChartModel&>(*getModel());
- LegendHelper::hideLegend(rModel);
+ LegendHelper::hideLegend(*getChartModel());
aUndoGuard.commit();
}
@@ -207,8 +323,7 @@ void ChartController::executeDispatch_InsertLegend()
ActionDescriptionProvider::ActionType::Insert, SchResId( STR_OBJECT_LEGEND )),
m_xUndoManager );
- ChartModel& rModel = dynamic_cast<ChartModel&>(*getModel());
- LegendHelper::showLegend(rModel, m_xCC);
+ LegendHelper::showLegend(*getChartModel(), m_xCC);
aUndoGuard.commit();
}
@@ -241,13 +356,13 @@ void ChartController::executeDispatch_OpenLegendDialog()
void ChartController::executeDispatch_InsertMenu_DataLabels()
{
- UndoGuard aUndoGuard(
+ std::shared_ptr<UndoGuard> aUndoGuard = std::make_shared<UndoGuard>(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::ActionType::Insert, SchResId( STR_OBJECT_DATALABELS )),
m_xUndoManager );
//if a series is selected insert labels for that series only:
- uno::Reference< chart2::XDataSeries > xSeries =
+ rtl::Reference< DataSeries > xSeries =
ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel());
if( xSeries.is() )
{
@@ -258,19 +373,16 @@ void ChartController::executeDispatch_InsertMenu_DataLabels()
OUString aObjectCID = ObjectIdentifier::createClassifiedIdentifierForParticles(
ObjectIdentifier::getSeriesParticleFromCID(m_aSelection.getSelectedCID()), aChildParticle );
- bool bSuccess = ChartController::executeDlg_ObjectProperties_withoutUndoGuard( aObjectCID, true );
- if( bSuccess )
- aUndoGuard.commit();
+ ChartController::executeDlg_ObjectProperties_withUndoGuard( aUndoGuard, aObjectCID, true );
return;
}
-
try
{
wrapper::AllDataLabelItemConverter aItemConverter(
getChartModel(),
m_pDrawModelWrapper->GetItemPool(),
m_pDrawModelWrapper->getSdrModel(),
- uno::Reference< lang::XMultiServiceFactory >( getModel(), uno::UNO_QUERY ));
+ getChartModel() );
SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();
aItemConverter.FillItemSet( aItemSet );
@@ -278,8 +390,7 @@ void ChartController::executeDispatch_InsertMenu_DataLabels()
SolarMutexGuard aGuard;
//get number formatter
- uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( getModel(), uno::UNO_QUERY );
- NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
+ NumberFormatterWrapper aNumberFormatterWrapper( getChartModel() );
SvNumberFormatter* pNumberFormatter = aNumberFormatterWrapper.getSvNumberFormatter();
DataLabelsDialog aDlg(GetChartFrame(), aItemSet, pNumberFormatter);
@@ -292,7 +403,7 @@ void ChartController::executeDispatch_InsertMenu_DataLabels()
ControllerLockGuardUNO aCLGuard( getChartModel() );
bool bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now
if( bChanged )
- aUndoGuard.commit();
+ aUndoGuard->commit();
}
}
catch(const uno::RuntimeException&)
@@ -319,17 +430,17 @@ void ChartController::executeDispatch_InsertMenu_MeanValues()
ActionDescriptionProvider::ActionType::Insert, SchResId( STR_OBJECT_AVERAGE_LINE )),
m_xUndoManager );
- uno::Reference< chart2::XDataSeries > xSeries =
+ rtl::Reference< DataSeries > xSeries =
ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xSeries.is() )
{
//if a series is selected insert mean value only for that series:
lcl_InsertMeanValueLine( xSeries );
}
- else
+ else if (rtl::Reference<Diagram> xDiagram = getFirstDiagram())
{
- std::vector< uno::Reference< chart2::XDataSeries > > aSeries(
- DiagramHelper::getDataSeriesFromDiagram( getFirstDiagram()));
+ std::vector< rtl::Reference< DataSeries > > aSeries =
+ xDiagram->getDataSeries();
for( const auto& xSrs : aSeries )
lcl_InsertMeanValueLine( xSrs );
@@ -341,7 +452,7 @@ void ChartController::executeDispatch_InsertMenu_Trendlines()
{
OUString aCID = m_aSelection.getSelectedCID();
- uno::Reference< chart2::XDataSeries > xSeries =
+ rtl::Reference< DataSeries > xSeries =
ObjectIdentifier::getDataSeriesForCID( aCID, getChartModel() );
if( !xSeries.is() )
@@ -352,35 +463,33 @@ void ChartController::executeDispatch_InsertMenu_Trendlines()
void ChartController::executeDispatch_InsertTrendline()
{
- uno::Reference< chart2::XRegressionCurveContainer > xRegressionCurveContainer(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel()), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xRegressionCurveContainer =
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel());
if( !xRegressionCurveContainer.is() )
return;
- UndoLiveUpdateGuard aUndoGuard(
+ auto xUndoGuard = std::make_shared<UndoLiveUpdateGuard>(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::ActionType::Insert, SchResId( STR_OBJECT_CURVE )),
m_xUndoManager );
- uno::Reference< chart2::XRegressionCurve > xCurve =
+ rtl::Reference< RegressionCurveModel > xCurve =
RegressionCurveHelper::addRegressionCurve(
SvxChartRegress::Linear,
xRegressionCurveContainer );
- uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY );
-
- if( !xProperties.is())
+ if( !xCurve.is())
return;
- wrapper::RegressionCurveItemConverter aItemConverter(
- xProperties, xRegressionCurveContainer, m_pDrawModelWrapper->getSdrModel().GetItemPool(),
+ auto aItemConverter = std::make_shared<wrapper::RegressionCurveItemConverter>(
+ xCurve, xRegressionCurveContainer, m_pDrawModelWrapper->getSdrModel().GetItemPool(),
m_pDrawModelWrapper->getSdrModel(),
- uno::Reference< lang::XMultiServiceFactory >( getModel(), uno::UNO_QUERY ));
+ getChartModel() );
// open dialog
- SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();
- aItemConverter.FillItemSet( aItemSet );
+ SfxItemSet aItemSet = aItemConverter->CreateEmptyItemSet();
+ aItemConverter->FillItemSet( aItemSet );
ObjectPropertiesDialogParameter aDialogParameter(
ObjectIdentifier::createDataCurveCID(
ObjectIdentifier::getSeriesParticleFromCID( m_aSelection.getSelectedCID()),
@@ -388,24 +497,23 @@ void ChartController::executeDispatch_InsertTrendline()
aDialogParameter.init( getChartModel() );
ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get());
SolarMutexGuard aGuard;
- SchAttribTabDlg aDialog(
- GetChartFrame(), &aItemSet, &aDialogParameter,
- &aViewElementListProvider,
- uno::Reference< util::XNumberFormatsSupplier >(
- getModel(), uno::UNO_QUERY ) );
+ auto aDialog = std::make_shared<SchAttribTabDlg>(GetChartFrame(), &aItemSet, &aDialogParameter,
+ &aViewElementListProvider, getChartModel());
// note: when a user pressed "OK" but didn't change any settings in the
// dialog, the SfxTabDialog returns "Cancel"
- if( aDialog.run() == RET_OK || aDialog.DialogWasClosedWithOK())
- {
- const SfxItemSet* pOutItemSet = aDialog.GetOutputItemSet();
- if( pOutItemSet )
+ SfxTabDialogController::runAsync(aDialog, [this, aDialog, aItemConverter, xUndoGuard=std::move(xUndoGuard)](int nResult) {
+ if ( nResult == RET_OK || aDialog->DialogWasClosedWithOK() )
{
- ControllerLockGuardUNO aCLGuard( getChartModel() );
- aItemConverter.ApplyItemSet( *pOutItemSet );
+ const SfxItemSet* pOutItemSet = aDialog->GetOutputItemSet();
+ if( pOutItemSet )
+ {
+ ControllerLockGuardUNO aCLGuard( getChartModel() );
+ aItemConverter->ApplyItemSet( *pOutItemSet );
+ }
+ xUndoGuard->commit();
}
- aUndoGuard.commit();
- }
+ });
}
void ChartController::executeDispatch_InsertErrorBars( bool bYError )
@@ -413,12 +521,12 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError )
ObjectType objType = bYError ? OBJECTTYPE_DATA_ERRORS_Y : OBJECTTYPE_DATA_ERRORS_X;
//if a series is selected insert error bars for that series only:
- uno::Reference< chart2::XDataSeries > xSeries =
+ rtl::Reference< DataSeries > xSeries =
ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xSeries.is())
{
- UndoLiveUpdateGuard aUndoGuard(
+ auto xUndoGuard = std::make_shared<UndoLiveUpdateGuard>(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::ActionType::Insert,
SchResId( bYError ? STR_OBJECT_ERROR_BARS_Y : STR_OBJECT_ERROR_BARS_X )),
@@ -431,47 +539,48 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError )
bYError));
// get an appropriate item converter
- wrapper::ErrorBarItemConverter aItemConverter(
- getModel(), xErrorBarProp, m_pDrawModelWrapper->getSdrModel().GetItemPool(),
+ auto aItemConverter = std::make_shared<wrapper::ErrorBarItemConverter> (
+ getChartModel(), xErrorBarProp, m_pDrawModelWrapper->getSdrModel().GetItemPool(),
m_pDrawModelWrapper->getSdrModel(),
- uno::Reference< lang::XMultiServiceFactory >( getModel(), uno::UNO_QUERY ));
+ getChartModel() );
// open dialog
- SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();
+ SfxItemSet aItemSet = aItemConverter->CreateEmptyItemSet();
aItemSet.Put(SfxBoolItem(SCHATTR_STAT_ERRORBAR_TYPE,bYError));
- aItemConverter.FillItemSet( aItemSet );
+ aItemConverter->FillItemSet( aItemSet );
ObjectPropertiesDialogParameter aDialogParameter(
ObjectIdentifier::createClassifiedIdentifierWithParent(
objType, u"", m_aSelection.getSelectedCID()));
aDialogParameter.init( getChartModel() );
ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get());
SolarMutexGuard aGuard;
- SchAttribTabDlg aDlg(
+ auto aDlg = std::make_shared<SchAttribTabDlg>(
GetChartFrame(), &aItemSet, &aDialogParameter,
&aViewElementListProvider,
- uno::Reference< util::XNumberFormatsSupplier >(
- getModel(), uno::UNO_QUERY ) );
- aDlg.SetAxisMinorStepWidthForErrorBarDecimals(
+ getChartModel() );
+ aDlg->SetAxisMinorStepWidthForErrorBarDecimals(
InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getChartModel(),
m_xChartView, m_aSelection.getSelectedCID()));
// note: when a user pressed "OK" but didn't change any settings in the
// dialog, the SfxTabDialog returns "Cancel"
- if (aDlg.run() == RET_OK || aDlg.DialogWasClosedWithOK())
- {
- const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet();
- if( pOutItemSet )
+ SfxTabDialogController::runAsync(aDlg, [this, aDlg, aItemConverter, xUndoGuard=std::move(xUndoGuard)](int nResult) {
+ if ( nResult == RET_OK || aDlg->DialogWasClosedWithOK() )
{
- ControllerLockGuardUNO aCLGuard( getChartModel() );
- aItemConverter.ApplyItemSet( *pOutItemSet );
+ const SfxItemSet* pOutItemSet = aDlg->GetOutputItemSet();
+ if( pOutItemSet )
+ {
+ ControllerLockGuardUNO aCLGuard( getChartModel() );
+ aItemConverter->ApplyItemSet( *pOutItemSet );
+ }
+ xUndoGuard->commit();
}
- aUndoGuard.commit();
- }
+ });
}
else
{
//if no series is selected insert error bars for all series
- UndoGuard aUndoGuard(
+ auto xUndoGuard = std::make_shared<UndoGuard>(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::ActionType::Insert,
ObjectNameProvider::getName_ObjectForAllSeries( objType ) ),
@@ -479,32 +588,34 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError )
try
{
- wrapper::AllSeriesStatisticsConverter aItemConverter(
+ auto aItemConverter = std::make_shared<wrapper::AllSeriesStatisticsConverter>(
getChartModel(), m_pDrawModelWrapper->GetItemPool() );
- SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();
- aItemConverter.FillItemSet( aItemSet );
+ SfxItemSet aItemSet = aItemConverter->CreateEmptyItemSet();
+ aItemConverter->FillItemSet( aItemSet );
//prepare and open dialog
SolarMutexGuard aGuard;
- InsertErrorBarsDialog aDlg(
+ auto aDlg = std::make_shared<InsertErrorBarsDialog>(
GetChartFrame(), aItemSet,
getChartModel(),
bYError ? ErrorBarResources::ERROR_BAR_Y : ErrorBarResources::ERROR_BAR_X);
- aDlg.SetAxisMinorStepWidthForErrorBarDecimals(
- InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getChartModel(), m_xChartView, OUString() ) );
-
- if (aDlg.run() == RET_OK)
- {
- SfxItemSet aOutItemSet = aItemConverter.CreateEmptyItemSet();
- aDlg.FillItemSet( aOutItemSet );
-
- // lock controllers till end of block
- ControllerLockGuardUNO aCLGuard( getChartModel() );
- bool bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now
- if( bChanged )
- aUndoGuard.commit();
- }
+ aDlg->SetAxisMinorStepWidthForErrorBarDecimals(
+ InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getChartModel(), m_xChartView, u"" ) );
+
+ weld::DialogController::runAsync(aDlg, [this, aDlg, aItemConverter, xUndoGuard=std::move(xUndoGuard)](int nResult) {
+ if ( nResult == RET_OK )
+ {
+ SfxItemSet aOutItemSet = aItemConverter->CreateEmptyItemSet();
+ aDlg->FillItemSet( aOutItemSet );
+
+ // lock controllers till end of block
+ ControllerLockGuardUNO aCLGuard( getChartModel() );
+ bool bChanged = aItemConverter->ApplyItemSet( aOutItemSet );//model should be changed now
+ if( bChanged )
+ xUndoGuard->commit();
+ }
+ });
}
catch(const uno::RuntimeException&)
{
@@ -519,8 +630,8 @@ void ChartController::executeDispatch_InsertTrendlineEquation( bool bInsertR2 )
ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getChartModel() ), uno::UNO_QUERY );
if( !xRegCurve.is() )
{
- uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() ), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xRegCurveCnt =
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
xRegCurve.set( RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCurveCnt ) );
}
if( !xRegCurve.is())
@@ -573,8 +684,8 @@ void ChartController::executeDispatch_DeleteR2Value()
void ChartController::executeDispatch_DeleteMeanValue()
{
- uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() ), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xRegCurveCnt =
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xRegCurveCnt.is())
{
UndoGuard aUndoGuard(
@@ -588,8 +699,8 @@ void ChartController::executeDispatch_DeleteMeanValue()
void ChartController::executeDispatch_DeleteTrendline()
{
- uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() ), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xRegCurveCnt =
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xRegCurveCnt.is())
{
UndoGuard aUndoGuard(
@@ -603,8 +714,8 @@ void ChartController::executeDispatch_DeleteTrendline()
void ChartController::executeDispatch_DeleteTrendlineEquation()
{
- uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() ), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xRegCurveCnt =
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xRegCurveCnt.is())
{
UndoGuard aUndoGuard(
@@ -618,8 +729,8 @@ void ChartController::executeDispatch_DeleteTrendlineEquation()
void ChartController::executeDispatch_DeleteErrorBars( bool bYError )
{
- uno::Reference< chart2::XDataSeries > xDataSeries(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() ));
+ rtl::Reference< DataSeries > xDataSeries =
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xDataSeries.is())
{
UndoGuard aUndoGuard(
@@ -633,7 +744,7 @@ void ChartController::executeDispatch_DeleteErrorBars( bool bYError )
void ChartController::executeDispatch_InsertDataLabels()
{
- uno::Reference< chart2::XDataSeries > xSeries =
+ rtl::Reference< DataSeries > xSeries =
ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xSeries.is() )
{
@@ -656,7 +767,7 @@ void ChartController::executeDispatch_InsertDataLabel()
void ChartController::executeDispatch_DeleteDataLabels()
{
- uno::Reference< chart2::XDataSeries > xSeries =
+ rtl::Reference< DataSeries > xSeries =
ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xSeries.is() )
{
@@ -682,7 +793,7 @@ void ChartController::executeDispatch_ResetAllDataPoints()
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::ActionType::Format,
SchResId( STR_OBJECT_DATAPOINTS )),
m_xUndoManager );
- uno::Reference< chart2::XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xSeries.is() )
xSeries->resetAllDataPoints();
aUndoGuard.commit();
@@ -692,7 +803,7 @@ void ChartController::executeDispatch_ResetDataPoint()
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::ActionType::Format,
SchResId( STR_OBJECT_DATAPOINT )),
m_xUndoManager );
- uno::Reference< chart2::XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xSeries.is() )
{
sal_Int32 nPointIndex = ObjectIdentifier::getIndexFromParticleOrCID( m_aSelection.getSelectedCID() );
@@ -705,14 +816,14 @@ void ChartController::executeDispatch_InsertAxisTitle()
{
try
{
- uno::Reference< XTitle > xTitle;
+ rtl::Reference< Title > xTitle;
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::ActionType::Insert, SchResId( STR_OBJECT_TITLE )),
m_xUndoManager );
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
sal_Int32 nDimensionIndex = -1;
sal_Int32 nCooSysIndex = -1;
sal_Int32 nAxisIndex = -1;
@@ -726,8 +837,8 @@ void ChartController::executeDispatch_InsertAxisTitle()
else
eTitleType = TitleHelper::Z_AXIS_TITLE;
- std::unique_ptr< ReferenceSizeProvider > apRefSizeProvider( impl_createReferenceSizeProvider());
- xTitle = TitleHelper::createTitle( eTitleType, ObjectNameProvider::getTitleNameByType(eTitleType), getChartModel(), m_xCC, apRefSizeProvider.get() );
+ ReferenceSizeProvider aRefSizeProvider( impl_createReferenceSizeProvider());
+ xTitle = TitleHelper::createTitle( eTitleType, ObjectNameProvider::getTitleNameByType(eTitleType), getChartModel(), m_xCC, &aRefSizeProvider );
aUndoGuard.commit();
}
}
@@ -746,7 +857,7 @@ void ChartController::executeDispatch_InsertAxis()
try
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xAxis.is() )
{
AxisHelper::makeAxisVisible( xAxis );
@@ -768,7 +879,7 @@ void ChartController::executeDispatch_DeleteAxis()
try
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xAxis.is() )
{
AxisHelper::makeAxisInvisible( xAxis );
@@ -790,10 +901,10 @@ void ChartController::executeDispatch_InsertMajorGrid()
try
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xAxis.is() )
{
- AxisHelper::makeGridVisible( xAxis->getGridProperties() );
+ AxisHelper::makeGridVisible( xAxis->getGridProperties2() );
aUndoGuard.commit();
}
}
@@ -812,10 +923,10 @@ void ChartController::executeDispatch_DeleteMajorGrid()
try
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xAxis.is() )
{
- AxisHelper::makeGridInvisible( xAxis->getGridProperties() );
+ AxisHelper::makeGridInvisible( xAxis->getGridProperties2() );
aUndoGuard.commit();
}
}
@@ -834,11 +945,11 @@ void ChartController::executeDispatch_InsertMinorGrid()
try
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xAxis.is() )
{
- const Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );
- for( Reference< beans::XPropertySet > const & props : aSubGrids)
+ std::vector< rtl::Reference< ::chart::GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
+ for( rtl::Reference< GridProperties > const & props : aSubGrids)
AxisHelper::makeGridVisible( props );
aUndoGuard.commit();
}
@@ -858,11 +969,11 @@ void ChartController::executeDispatch_DeleteMinorGrid()
try
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
if( xAxis.is() )
{
- const Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );
- for( Reference< beans::XPropertySet > const & props : aSubGrids)
+ std::vector< rtl::Reference< ::chart::GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
+ for( rtl::Reference< ::chart::GridProperties > const & props : aSubGrids)
AxisHelper::makeGridInvisible( props );
aUndoGuard.commit();
}
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index f57a3b8e8f96..df047d747afd 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -19,31 +19,28 @@
#include <ChartController.hxx>
-#include <ChartWindow.hxx>
#include <DrawViewWrapper.hxx>
#include <PositionAndSizeHelper.hxx>
#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
+#include <ChartView.hxx>
#include "UndoGuard.hxx"
#include <ObjectNameProvider.hxx>
#include <DiagramHelper.hxx>
-#include <chartview/ExplicitValueProvider.hxx>
#include <CommonConverters.hxx>
#include <svx/ActionDescriptionProvider.hxx>
-#include <comphelper/servicehelper.hxx>
#include <svx/svxids.hrc>
#include <svx/rectenum.hxx>
#include <svl/intitem.hxx>
#include <svx/svxdlg.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <vcl/svapp.hxx>
#include <memory>
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
static void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectangle& rPosAndSize, const awt::Size& rOriginalSize )
{
@@ -54,19 +51,18 @@ static void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::
RectPoint eRP = RectPoint::LT;
- const SfxPoolItem* pPoolItem=nullptr;
//read position
- if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_X,true,&pPoolItem)==SfxItemState::SET)
- nPosX= static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
- if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_Y,true,&pPoolItem)==SfxItemState::SET)
- nPosY=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
+ if (const SfxInt32Item* pPosXItem = rItemSet.GetItemIfSet(SID_ATTR_TRANSFORM_POS_X))
+ nPosX = pPosXItem->GetValue();
+ if (const SfxInt32Item* pPosYItem = rItemSet.GetItemIfSet(SID_ATTR_TRANSFORM_POS_Y))
+ nPosY = pPosYItem->GetValue();
//read size
- if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_WIDTH,true,&pPoolItem)==SfxItemState::SET)
- nSizX=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
- if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)==SfxItemState::SET)
- nSizY=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
- if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_SIZE_POINT,true,&pPoolItem)==SfxItemState::SET)
- eRP=static_cast<RectPoint>(static_cast<const SfxUInt16Item*>(pPoolItem)->GetValue());
+ if (const SfxUInt32Item* pWidthItem = rItemSet.GetItemIfSet(SID_ATTR_TRANSFORM_WIDTH))
+ nSizX = pWidthItem->GetValue();
+ if (const SfxUInt32Item* pHeightItem = rItemSet.GetItemIfSet(SID_ATTR_TRANSFORM_HEIGHT))
+ nSizY = pHeightItem->GetValue();
+ if (const SfxUInt16Item* pSizeItem = rItemSet.GetItemIfSet(SID_ATTR_TRANSFORM_SIZE_POINT))
+ eRP=static_cast<RectPoint>(pSizeItem->GetValue());
switch( eRP )
{
@@ -150,26 +146,21 @@ void ChartController::executeDispatch_PositionAndSize(const ::css::uno::Sequence
if (!pPool)
return;
- sal_uInt16 nWhich;
for (const auto& aProp: *pArgs)
{
sal_Int32 nValue = 0;
aProp.Value >>= nValue;
if (aProp.Name == "TransformPosX") {
- nWhich = pPool->GetWhich(SID_ATTR_TRANSFORM_POS_X);
- aItemSet.Put(SfxInt32Item(nWhich, nValue));
+ aItemSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_POS_X, nValue));
}
else if (aProp.Name == "TransformPosY") {
- nWhich = pPool->GetWhich(SID_ATTR_TRANSFORM_POS_Y);
- aItemSet.Put(SfxInt32Item(nWhich, nValue));
+ aItemSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_POS_Y, nValue));
}
else if (aProp.Name == "TransformWidth") {
- nWhich = pPool->GetWhich(SID_ATTR_TRANSFORM_WIDTH);
- aItemSet.Put(SfxUInt32Item(nWhich, static_cast<sal_uInt32>(nValue)));
+ aItemSet.Put(SfxUInt32Item(SID_ATTR_TRANSFORM_WIDTH, static_cast<sal_uInt32>(nValue)));
}
else if (aProp.Name == "TransformHeight") {
- nWhich = pPool->GetWhich(SID_ATTR_TRANSFORM_HEIGHT);
- aItemSet.Put(SfxUInt32Item(nWhich, static_cast<sal_uInt32>(nValue)));
+ aItemSet.Put(SfxUInt32Item(SID_ATTR_TRANSFORM_HEIGHT, static_cast<sal_uInt32>(nValue)));
}
}
}
@@ -177,9 +168,8 @@ void ChartController::executeDispatch_PositionAndSize(const ::css::uno::Sequence
if(pOutItemSet || pArgs)
{
awt::Rectangle aOldObjectRect;
- ExplicitValueProvider* pProvider(comphelper::getFromUnoTunnel<ExplicitValueProvider>( m_xChartView ));
- if( pProvider )
- aOldObjectRect = pProvider->getRectangleOfObject(aCID);
+ if( m_xChartView )
+ aOldObjectRect = m_xChartView->getRectangleOfObject(aCID);
awt::Rectangle aNewObjectRect;
lcl_getPositionAndSizeFromItemSet( aItemSet, aNewObjectRect, ToSize(aOldObjectRect) );
@@ -189,8 +179,7 @@ void ChartController::executeDispatch_PositionAndSize(const ::css::uno::Sequence
bool bChanged = false;
if ( eObjectType == OBJECTTYPE_LEGEND )
{
- ChartModel& rModel = dynamic_cast<ChartModel&>(*getModel());
- bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning(rModel, false , true);
+ bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning(*getChartModel(), false , true);
}
bool bMoved = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID(), getChartModel()
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index df0da042a218..62b7ad8a6beb 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -18,7 +18,7 @@
*/
#include <ChartController.hxx>
-#include <ChartWindow.hxx>
+#include <ChartView.hxx>
#include <chartview/DrawModelWrapper.hxx>
#include <chartview/ChartSfxItemIds.hxx>
#include <ObjectIdentifier.hxx>
@@ -34,16 +34,20 @@
#include <MultipleChartConverters.hxx>
#include <TitleItemConverter.hxx>
#include <LegendItemConverter.hxx>
+#include <DataTableItemConverter.hxx>
#include <RegressionCurveItemConverter.hxx>
#include <RegressionEquationItemConverter.hxx>
#include <ErrorBarItemConverter.hxx>
#include <ChartModelHelper.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <TitleHelper.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <ChartModel.hxx>
#include <ColorPerPointHelper.hxx>
-#include <DiagramHelper.hxx>
+#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <Diagram.hxx>
#include <ControllerLockGuard.hxx>
#include "UndoGuard.hxx"
@@ -52,28 +56,28 @@
#include <strings.hrc>
#include <ReferenceSizeProvider.hxx>
#include <RegressionCurveHelper.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <RegressionCurveModel.hxx>
+#include <o3tl/string_view.hxx>
#include <com/sun/star/util/CloseVetoException.hpp>
-#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
-#include <comphelper/servicehelper.hxx>
#include <memory>
#include <vcl/svapp.hxx>
#include <svx/ActionDescriptionProvider.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Reference;
namespace
{
wrapper::ItemConverter* createItemConverter(
- const OUString & aObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel,
+ std::u16string_view aObjectCID, const rtl::Reference<::chart::ChartModel>& xChartModel,
const uno::Reference<uno::XComponentContext>& xContext, SdrModel& rDrawModel,
ExplicitValueProvider* pExplicitValueProvider, ReferenceSizeProvider const * pRefSizeProvider )
{
@@ -87,8 +91,8 @@ wrapper::ItemConverter* createItemConverter(
return nullptr;
}
- OUString aParticleID = ObjectIdentifier::getParticleID( aObjectCID );
- bool bAffectsMultipleObjects = aParticleID == "ALLELEMENTS";
+ std::u16string_view aParticleID = ObjectIdentifier::getParticleID( aObjectCID );
+ bool bAffectsMultipleObjects = aParticleID == u"ALLELEMENTS";
if( !bAffectsMultipleObjects )
{
uno::Reference< beans::XPropertySet > xObjectProperties =
@@ -106,26 +110,26 @@ wrapper::ItemConverter* createItemConverter(
break;
case OBJECTTYPE_TITLE:
{
- std::unique_ptr<awt::Size> pRefSize;
+ std::optional<awt::Size> pRefSize;
if (pRefSizeProvider)
- pRefSize.reset(new awt::Size(pRefSizeProvider->getPageSize()));
+ pRefSize.emplace(pRefSizeProvider->getPageSize());
pItemConverter = new wrapper::TitleItemConverter(
xObjectProperties, rDrawModel.GetItemPool(), rDrawModel,
xChartModel,
- pRefSize.get());
+ pRefSize);
}
break;
case OBJECTTYPE_LEGEND:
{
- std::unique_ptr<awt::Size> pRefSize;
+ std::optional<awt::Size> pRefSize;
if (pRefSizeProvider)
- pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
+ pRefSize.emplace( pRefSizeProvider->getPageSize() );
pItemConverter = new wrapper::LegendItemConverter(
xObjectProperties, rDrawModel.GetItemPool(), rDrawModel,
xChartModel,
- pRefSize.get());
+ pRefSize);
}
break;
case OBJECTTYPE_LEGEND_ENTRY:
@@ -141,9 +145,9 @@ wrapper::ItemConverter* createItemConverter(
break;
case OBJECTTYPE_AXIS:
{
- std::unique_ptr<awt::Size> pRefSize;
+ std::optional<awt::Size> pRefSize;
if (pRefSizeProvider)
- pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
+ pRefSize.emplace( pRefSizeProvider->getPageSize() );
// the second property set contains the property CoordinateOrigin
// nOriginIndex is the index of the corresponding index of the
@@ -153,7 +157,7 @@ wrapper::ItemConverter* createItemConverter(
ExplicitIncrementData aExplicitIncrement;
if( pExplicitValueProvider )
pExplicitValueProvider->getExplicitValuesForAxis(
- uno::Reference< XAxis >( xObjectProperties, uno::UNO_QUERY ),
+ dynamic_cast< Axis* >( xObjectProperties.get() ),
aExplicitScale, aExplicitIncrement );
pItemConverter = new wrapper::AxisItemConverter(
@@ -161,7 +165,7 @@ wrapper::ItemConverter* createItemConverter(
rDrawModel,
xChartModel,
&aExplicitScale, &aExplicitIncrement,
- pRefSize.get() );
+ pRefSize );
}
break;
case OBJECTTYPE_AXIS_UNITLABEL:
@@ -169,11 +173,11 @@ wrapper::ItemConverter* createItemConverter(
case OBJECTTYPE_DATA_LABELS:
case OBJECTTYPE_DATA_LABEL:
{
- std::unique_ptr<awt::Size> pRefSize;
+ std::optional<awt::Size> pRefSize;
if (pRefSizeProvider)
- pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
+ pRefSize.emplace( pRefSizeProvider->getPageSize() );
- uno::Reference<XDataSeries> xSeries = ObjectIdentifier::getDataSeriesForCID(aObjectCID, xChartModel);
+ rtl::Reference<DataSeries> xSeries = ObjectIdentifier::getDataSeriesForCID(aObjectCID, xChartModel);
bool bDataSeries = eObjectType == OBJECTTYPE_DATA_LABELS;
@@ -183,25 +187,25 @@ wrapper::ItemConverter* createItemConverter(
pItemConverter = new wrapper::TextLabelItemConverter(
xChartModel, xObjectProperties, xSeries,
- rDrawModel.GetItemPool(), pRefSize.get(), bDataSeries,
+ rDrawModel.GetItemPool(), pRefSize, bDataSeries,
nNumberFormat, nPercentNumberFormat);
}
break;
case OBJECTTYPE_DATA_SERIES:
case OBJECTTYPE_DATA_POINT:
{
- std::unique_ptr<awt::Size> pRefSize;
+ std::optional<awt::Size> pRefSize;
if (pRefSizeProvider)
- pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
+ pRefSize.emplace( pRefSizeProvider->getPageSize() );
wrapper::GraphicObjectType eMapTo =
wrapper::GraphicObjectType::FilledDataPoint;
- uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( aObjectCID, xChartModel );
- uno::Reference< XChartType > xChartType = ChartModelHelper::getChartTypeOfSeries( xChartModel, xSeries );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( aObjectCID, xChartModel );
+ rtl::Reference< ChartType > xChartType = ChartModelHelper::getChartTypeOfSeries( xChartModel, xSeries );
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartModel );
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
+ rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
+ sal_Int32 nDimensionCount = xDiagram->getDimension();
if( !ChartTypeHelper::isSupportingAreaProperties( xChartType, nDimensionCount ) )
eMapTo = wrapper::GraphicObjectType::LineDataPoint;
@@ -213,14 +217,14 @@ wrapper::ItemConverter* createItemConverter(
sal_Int32 nPointIndex = -1; /*-1 for whole series*/
if(!bDataSeries)
{
- nPointIndex = aParticleID.toInt32();
- uno::Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY );
+ nPointIndex = o3tl::toInt32(aParticleID);
bool bVaryColorsByPoint = false;
- if( xSeriesProp.is() &&
- (xSeriesProp->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint) &&
+ if( xSeries.is() &&
+ // "VaryColorsByPoint"
+ (xSeries->getFastPropertyValue(PROP_DATASERIES_VARY_COLORS_BY_POINT) >>= bVaryColorsByPoint) &&
bVaryColorsByPoint )
{
- if( !ColorPerPointHelper::hasPointOwnColor( xSeriesProp, nPointIndex, xObjectProperties ) )
+ if( !ColorPerPointHelper::hasPointOwnColor( xSeries, nPointIndex, xObjectProperties ) )
{
bUseSpecialFillColor = true;
OSL_ASSERT( xDiagram.is());
@@ -237,7 +241,7 @@ wrapper::ItemConverter* createItemConverter(
pItemConverter = new wrapper::DataPointItemConverter( xChartModel, xContext,
xObjectProperties, xSeries, rDrawModel.GetItemPool(), rDrawModel,
xChartModel,
- eMapTo, pRefSize.get(), bDataSeries, bUseSpecialFillColor, nSpecialFillColor, true,
+ eMapTo, pRefSize, bDataSeries, bUseSpecialFillColor, nSpecialFillColor, true,
nNumberFormat, nPercentNumberFormat, nPointIndex );
break;
}
@@ -260,21 +264,21 @@ wrapper::ItemConverter* createItemConverter(
case OBJECTTYPE_DATA_CURVE:
pItemConverter = new wrapper::RegressionCurveItemConverter(
- xObjectProperties, uno::Reference< chart2::XRegressionCurveContainer >(
- ObjectIdentifier::getDataSeriesForCID( aObjectCID, xChartModel ), uno::UNO_QUERY ),
- rDrawModel.GetItemPool(), rDrawModel,
- xChartModel);
+ xObjectProperties,
+ ObjectIdentifier::getDataSeriesForCID( aObjectCID, xChartModel ),
+ rDrawModel.GetItemPool(), rDrawModel,
+ xChartModel);
break;
case OBJECTTYPE_DATA_CURVE_EQUATION:
{
- std::unique_ptr<awt::Size> pRefSize;
+ std::optional<awt::Size> pRefSize;
if (pRefSizeProvider)
- pRefSize.reset(new awt::Size(pRefSizeProvider->getPageSize()));
+ pRefSize.emplace(pRefSizeProvider->getPageSize());
pItemConverter = new wrapper::RegressionEquationItemConverter(
xObjectProperties, rDrawModel.GetItemPool(), rDrawModel,
xChartModel,
- pRefSize.get());
+ pRefSize);
break;
}
case OBJECTTYPE_DATA_STOCK_RANGE:
@@ -286,6 +290,13 @@ wrapper::ItemConverter* createItemConverter(
rDrawModel, xChartModel,
wrapper::GraphicObjectType::LineAndFillProperties );
break;
+ case OBJECTTYPE_DATA_TABLE:
+ {
+ pItemConverter = new wrapper::DataTableItemConverter(
+ xObjectProperties, rDrawModel.GetItemPool(),
+ rDrawModel, xChartModel);
+ }
+ break;
default: //OBJECTTYPE_UNKNOWN
break;
}
@@ -301,13 +312,13 @@ wrapper::ItemConverter* createItemConverter(
break;
case OBJECTTYPE_AXIS:
{
- std::unique_ptr<awt::Size> pRefSize;
+ std::optional<awt::Size> pRefSize;
if (pRefSizeProvider)
- pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
+ pRefSize.emplace( pRefSizeProvider->getPageSize() );
pItemConverter = new wrapper::AllAxisItemConverter(
xChartModel, rDrawModel.GetItemPool(),
- rDrawModel, pRefSize.get());
+ rDrawModel, pRefSize );
}
break;
case OBJECTTYPE_GRID:
@@ -342,7 +353,7 @@ OUString lcl_getTitleCIDForCommand( std::string_view rDispatchCommand, const rtl
else if( rDispatchCommand == "SecondaryYTitle" )
nTitleType = TitleHelper::SECONDARY_Y_AXIS_TITLE;
- uno::Reference< XTitle > xTitle( TitleHelper::getTitle( nTitleType, xChartModel ) );
+ rtl::Reference< Title > xTitle( TitleHelper::getTitle( nTitleType, xChartModel ) );
return ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, xChartModel );
}
@@ -374,14 +385,14 @@ OUString lcl_getAxisCIDForCommand( std::string_view rDispatchCommand, const rtl:
nDimensionIndex=1; bMainAxis=false;
}
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartModel );
- uno::Reference< XAxis > xAxis( AxisHelper::getAxis( nDimensionIndex, bMainAxis, xDiagram ) );
+ rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( nDimensionIndex, bMainAxis, xDiagram );
return ObjectIdentifier::createClassifiedIdentifierForObject( xAxis, xChartModel );
}
OUString lcl_getGridCIDForCommand( std::string_view rDispatchCommand, const rtl::Reference<::chart::ChartModel>& xChartModel )
{
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartModel );
+ rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
if( rDispatchCommand == "DiagramGridAll")
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_GRID, u"ALLELEMENTS" );
@@ -416,7 +427,7 @@ OUString lcl_getGridCIDForCommand( std::string_view rDispatchCommand, const rtl:
nDimensionIndex=2; bMainGrid=false;
}
- uno::Reference< XAxis > xAxis( AxisHelper::getAxis( nDimensionIndex, true/*bMainAxis*/, xDiagram ) );
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( nDimensionIndex, true/*bMainAxis*/, xDiagram );
sal_Int32 nSubGridIndex= bMainGrid ? -1 : 0;
OUString aCID( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel, nSubGridIndex ) );
@@ -436,8 +447,7 @@ OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const rt
ObjectType eObjectType = OBJECTTYPE_UNKNOWN;
const ObjectType eSelectedType = ObjectIdentifier::getObjectType( rSelectedCID );
- uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rSelectedCID, xChartDocument );
- uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt( xSeries, uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rSelectedCID, xChartDocument );
//legend
if( rDispatchCommand == "Legend" || rDispatchCommand == "FormatLegend" )
@@ -527,7 +537,7 @@ OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const rt
return rSelectedCID;
else
{
- sal_Int32 nPointIndex = ObjectIdentifier::getParticleID( rSelectedCID ).toInt32();
+ sal_Int32 nPointIndex = o3tl::toInt32(ObjectIdentifier::getParticleID( rSelectedCID ));
if( nPointIndex>=0 )
{
OUString aSeriesParticle = ObjectIdentifier::getSeriesParticleFromCID( rSelectedCID );
@@ -548,8 +558,8 @@ OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const rt
else
return ObjectIdentifier::createDataCurveCID(
ObjectIdentifier::getSeriesParticleFromCID( rSelectedCID ),
- RegressionCurveHelper::getRegressionCurveIndex( xRegCurveCnt,
- RegressionCurveHelper::getMeanValueLine( xRegCurveCnt ) ), true );
+ RegressionCurveHelper::getRegressionCurveIndex( xSeries,
+ RegressionCurveHelper::getMeanValueLine( xSeries ) ), true );
}
//trend line
else if( rDispatchCommand == "FormatTrendline" )
@@ -559,8 +569,8 @@ OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const rt
else
return ObjectIdentifier::createDataCurveCID(
ObjectIdentifier::getSeriesParticleFromCID( rSelectedCID ),
- RegressionCurveHelper::getRegressionCurveIndex( xRegCurveCnt,
- RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCurveCnt ) ), false );
+ RegressionCurveHelper::getRegressionCurveIndex( xSeries,
+ RegressionCurveHelper::getFirstCurveNotMeanValueLine( xSeries ) ), false );
}
//trend line equation
else if( rDispatchCommand == "FormatTrendlineEquation" )
@@ -570,8 +580,8 @@ OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const rt
else
return ObjectIdentifier::createDataCurveEquationCID(
ObjectIdentifier::getSeriesParticleFromCID( rSelectedCID ),
- RegressionCurveHelper::getRegressionCurveIndex( xRegCurveCnt,
- RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCurveCnt ) ) );
+ RegressionCurveHelper::getRegressionCurveIndex( xSeries,
+ RegressionCurveHelper::getFirstCurveNotMeanValueLine( xSeries ) ) );
}
// y error bars
else if( rDispatchCommand == "FormatXErrorBars" )
@@ -590,7 +600,7 @@ OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const rt
return rSelectedCID;
else
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( rSelectedCID, xChartDocument );
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( rSelectedCID, xChartDocument );
return ObjectIdentifier::createClassifiedIdentifierForObject( xAxis , xChartDocument );
}
}
@@ -601,7 +611,7 @@ OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const rt
return rSelectedCID;
else
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( rSelectedCID, xChartDocument );
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( rSelectedCID, xChartDocument );
return ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartDocument );
}
@@ -613,7 +623,7 @@ OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const rt
return rSelectedCID;
else
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( rSelectedCID, xChartDocument );
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( rSelectedCID, xChartDocument );
return ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartDocument, 0 /*sub grid index*/ );
}
}
@@ -674,7 +684,7 @@ OUString lcl_getFormatCIDforSelectedCID( const OUString& rSelectedCID )
// some legend entries are handled as if they were data series
if( eObjectType==OBJECTTYPE_LEGEND_ENTRY )
{
- OUString aParentParticle( ObjectIdentifier::getFullParentParticle( rSelectedCID ) );
+ std::u16string_view aParentParticle( ObjectIdentifier::getFullParentParticle( rSelectedCID ) );
aFormatCID = ObjectIdentifier::createClassifiedIdentifierForParticle( aParentParticle );
}
@@ -691,24 +701,22 @@ void ChartController::executeDlg_ObjectProperties( const OUString& rSelectedObje
{
OUString aObjectCID = lcl_getFormatCIDforSelectedCID( rSelectedObjectCID );
- UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription(
- ActionDescriptionProvider::ActionType::Format,
- ObjectNameProvider::getName( ObjectIdentifier::getObjectType( aObjectCID ))),
- m_xUndoManager );
+ auto xUndoGuard = std::make_shared<UndoGuard>(
+ ActionDescriptionProvider::createDescription(
+ ActionDescriptionProvider::ActionType::Format,
+ ObjectNameProvider::getName( ObjectIdentifier::getObjectType( aObjectCID ))),
+ m_xUndoManager );
- bool bSuccess = ChartController::executeDlg_ObjectProperties_withoutUndoGuard( aObjectCID, false );
- if( bSuccess )
- aUndoGuard.commit();
+ ChartController::executeDlg_ObjectProperties_withUndoGuard(std::move(xUndoGuard), aObjectCID, false );
}
-bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard(
- const OUString& rObjectCID, bool bSuccessOnUnchanged )
+void ChartController::executeDlg_ObjectProperties_withUndoGuard(
+ std::shared_ptr<UndoGuard> xUndoGuard, const OUString& rObjectCID, bool bSuccessOnUnchanged )
{
//return true if the properties were changed successfully
- bool bRet = false;
if( rObjectCID.isEmpty() )
{
- return bRet;
+ return;
}
try
{
@@ -716,26 +724,28 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard(
ObjectType eObjectType = ObjectIdentifier::getObjectType( rObjectCID );
if( eObjectType==OBJECTTYPE_UNKNOWN )
{
- return bRet;
+ return;
}
if( eObjectType==OBJECTTYPE_DIAGRAM_WALL || eObjectType==OBJECTTYPE_DIAGRAM_FLOOR )
{
- if( !DiagramHelper::isSupportingFloorAndWall( getFirstDiagram() ) )
- return bRet;
+ if( !getFirstDiagram()->isSupportingFloorAndWall() )
+ return;
}
//convert properties to ItemSet
- std::unique_ptr<ReferenceSizeProvider> pRefSizeProv(impl_createReferenceSizeProvider());
+ ReferenceSizeProvider aRefSizeProv(impl_createReferenceSizeProvider());
- std::unique_ptr<wrapper::ItemConverter> pItemConverter(
- createItemConverter( rObjectCID, getChartModel(), m_xCC,
+ rtl::Reference<::chart::ChartModel> xChartDoc(getChartModel());
+
+ std::shared_ptr<wrapper::ItemConverter> pItemConverter(
+ createItemConverter( rObjectCID, xChartDoc, m_xCC,
m_pDrawModelWrapper->getSdrModel(),
- comphelper::getFromUnoTunnel<ExplicitValueProvider>(m_xChartView),
- pRefSizeProv.get()));
+ m_xChartView.get(),
+ &aRefSizeProv));
if (!pItemConverter)
- return bRet;
+ return;
SfxItemSet aItemSet = pItemConverter->CreateEmptyItemSet();
@@ -746,52 +756,53 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard(
//prepare dialog
ObjectPropertiesDialogParameter aDialogParameter( rObjectCID );
- aDialogParameter.init( getChartModel() );
+ aDialogParameter.init(xChartDoc);
ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get() );
SolarMutexGuard aGuard;
- SchAttribTabDlg aDlg(
- GetChartFrame(), &aItemSet, &aDialogParameter,
- &aViewElementListProvider,
- uno::Reference< util::XNumberFormatsSupplier >(
- getModel(), uno::UNO_QUERY ) );
+ std::shared_ptr<SchAttribTabDlg> aDlgPtr = std::make_shared<SchAttribTabDlg>(
+ GetChartFrame(), &aItemSet, &aDialogParameter,
+ &aViewElementListProvider,
+ xChartDoc);
if(aDialogParameter.HasSymbolProperties())
{
uno::Reference< beans::XPropertySet > xObjectProperties =
- ObjectIdentifier::getObjectPropertySet( rObjectCID, getChartModel() );
- wrapper::DataPointItemConverter aSymbolItemConverter( getChartModel(), m_xCC
- , xObjectProperties, ObjectIdentifier::getDataSeriesForCID( rObjectCID, getChartModel() )
+ ObjectIdentifier::getObjectPropertySet( rObjectCID, xChartDoc );
+ wrapper::DataPointItemConverter aSymbolItemConverter( xChartDoc, m_xCC
+ , xObjectProperties, ObjectIdentifier::getDataSeriesForCID( rObjectCID, xChartDoc )
, m_pDrawModelWrapper->getSdrModel().GetItemPool()
, m_pDrawModelWrapper->getSdrModel()
- , getChartModel()
+ , xChartDoc
, wrapper::GraphicObjectType::FilledDataPoint );
SfxItemSet aSymbolShapeProperties(aSymbolItemConverter.CreateEmptyItemSet() );
aSymbolItemConverter.FillItemSet( aSymbolShapeProperties );
sal_Int32 const nStandardSymbol=0;//@todo get from somewhere
- std::unique_ptr<Graphic> pAutoSymbolGraphic(new Graphic( aViewElementListProvider.GetSymbolGraphic( nStandardSymbol, &aSymbolShapeProperties ) ));
+ std::optional<Graphic> oAutoSymbolGraphic(std::in_place, aViewElementListProvider.GetSymbolGraphic( nStandardSymbol, &aSymbolShapeProperties ) );
// note: the dialog takes the ownership of pSymbolShapeProperties and pAutoSymbolGraphic
- aDlg.setSymbolInformation( std::move(aSymbolShapeProperties), std::move(pAutoSymbolGraphic) );
+ aDlgPtr->setSymbolInformation( std::move(aSymbolShapeProperties), std::move(oAutoSymbolGraphic) );
}
if( aDialogParameter.HasStatisticProperties() )
{
- aDlg.SetAxisMinorStepWidthForErrorBarDecimals(
- InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getChartModel(), m_xChartView, rObjectCID ) );
+ aDlgPtr->SetAxisMinorStepWidthForErrorBarDecimals(
+ InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( xChartDoc, m_xChartView, rObjectCID ) );
}
//open the dialog
- if (aDlg.run() == RET_OK || (bSuccessOnUnchanged && aDlg.DialogWasClosedWithOK()))
+ SfxTabDialogController::runAsync(aDlgPtr, [aDlgPtr, xChartDoc, pItemConverter,bSuccessOnUnchanged,
+ xUndoGuard=std::move(xUndoGuard)] (int nResult)
{
- const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet();
- if(pOutItemSet)
- {
- ControllerLockGuardUNO aCLGuard( getChartModel());
- (void)pItemConverter->ApplyItemSet(*pOutItemSet); //model should be changed now
- bRet = true;
+ if (nResult == RET_OK || (bSuccessOnUnchanged && aDlgPtr->DialogWasClosedWithOK())) {
+ const SfxItemSet* pOutItemSet = aDlgPtr->GetOutputItemSet();
+ if(pOutItemSet) {
+ ControllerLockGuardUNO aCLGuard(xChartDoc);
+ (void)pItemConverter->ApplyItemSet(*pOutItemSet); //model should be changed now
+ xUndoGuard->commit();
+ }
}
- }
+ });
}
catch( const util::CloseVetoException& )
{
@@ -799,7 +810,6 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard(
catch( const uno::RuntimeException& )
{
}
- return bRet;
}
void ChartController::executeDispatch_View3D()
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 100d210c2e9e..600d46b434d0 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -26,9 +26,11 @@
#include <DrawViewWrapper.hxx>
#include <ChartWindow.hxx>
#include <ChartModel.hxx>
+#include <ChartView.hxx>
#include <TitleHelper.hxx>
#include <ObjectIdentifier.hxx>
#include <ControllerLockGuard.hxx>
+#include <comphelper/diagnose_ex.hxx>
#if !ENABLE_WASM_STRIP_ACCESSIBILITY
#include <AccessibleTextHelper.hxx>
#endif
@@ -42,9 +44,12 @@
#include <editeng/editids.hrc>
#include <vcl/svapp.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/chart2/XTitle.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/chart2/FormattedString.hpp>
#include <svl/stritem.hxx>
#include <editeng/fontitem.hxx>
+#include <editeng/section.hxx>
#include <memory>
namespace chart
@@ -72,9 +77,8 @@ void ChartController::StartTextEdit( const Point* pMousePixel )
SdrOutliner* pOutliner = m_pDrawViewWrapper->getOutliner();
//#i77362 change notification for changes on additional shapes are missing
- uno::Reference< beans::XPropertySet > xChartViewProps( m_xChartView, uno::UNO_QUERY );
- if( xChartViewProps.is() )
- xChartViewProps->setPropertyValue( "SdrViewIsInEditMode", uno::Any(true) );
+ if( m_xChartView.is() )
+ m_xChartView->setPropertyValue( "SdrViewIsInEditMode", uno::Any(true) );
auto pChartWindow(GetChartWindow());
@@ -117,25 +121,17 @@ bool ChartController::EndTextEdit()
m_pDrawViewWrapper->SdrEndTextEdit();
//#i77362 change notification for changes on additional shapes are missing
- uno::Reference< beans::XPropertySet > xChartViewProps( m_xChartView, uno::UNO_QUERY );
- if( xChartViewProps.is() )
- xChartViewProps->setPropertyValue( "SdrViewIsInEditMode", uno::Any(false) );
+ if( m_xChartView.is() )
+ m_xChartView->setPropertyValue( "SdrViewIsInEditMode", uno::Any(false) );
SdrObject* pTextObject = m_pDrawViewWrapper->getTextEditObject();
if(!pTextObject)
return false;
- SdrOutliner* pOutliner = m_pDrawViewWrapper->getOutliner();
OutlinerParaObject* pParaObj = pTextObject->GetOutlinerParaObject();
- if( !pParaObj || !pOutliner )
+ if( !pParaObj )
return true;
- pOutliner->SetText( *pParaObj );
-
- OUString aString = pOutliner->GetText(
- pOutliner->GetParagraph( 0 ),
- pOutliner->GetParagraphCount() );
-
OUString aObjectCID = m_aSelection.getSelectedCID();
if ( !aObjectCID.isEmpty() )
{
@@ -145,8 +141,11 @@ bool ChartController::EndTextEdit()
// lock controllers till end of block
ControllerLockGuardUNO aCLGuard( getChartModel() );
- TitleHelper::setCompleteString( aString, uno::Reference<
- css::chart2::XTitle >::query( xPropSet ), m_xCC );
+ uno::Sequence< uno::Reference< chart2::XFormattedString > > aNewFormattedTitle =
+ GetFormattedTitle(pParaObj->GetTextObject(), pTextObject->getUnoShape());
+
+ Title* pTitle = dynamic_cast<Title*>(xPropSet.get());
+ TitleHelper::setFormattedString(pTitle, aNewFormattedTitle);
OSL_ENSURE(m_pTextActionUndoGuard, "ChartController::EndTextEdit: no TextUndoGuard!");
if (m_pTextActionUndoGuard)
@@ -156,6 +155,70 @@ bool ChartController::EndTextEdit()
return true;
}
+uno::Sequence< uno::Reference< chart2::XFormattedString > > ChartController::GetFormattedTitle(
+ const EditTextObject& aEdit, const uno::Reference< drawing::XShape >& xShape )
+{
+ std::vector < uno::Reference< chart2::XFormattedString > > aNewStrings;
+ if (!xShape.is())
+ return comphelper::containerToSequence(aNewStrings);
+
+ uno::Reference< text::XText > xText(xShape, uno::UNO_QUERY);
+ if (!xText.is())
+ return comphelper::containerToSequence(aNewStrings);
+
+ uno::Reference< text::XTextCursor > xSelectionCursor(xText->createTextCursor());
+ if (!xSelectionCursor.is())
+ return comphelper::containerToSequence(aNewStrings);
+
+ xSelectionCursor->gotoStart(false);
+
+ std::vector<editeng::Section> aSecAttrs;
+ aEdit.GetAllSections(aSecAttrs);
+
+ for (editeng::Section const& rSection : aSecAttrs)
+ {
+ if (!xSelectionCursor->isCollapsed())
+ xSelectionCursor->collapseToEnd();
+
+ xSelectionCursor->goRight(rSection.mnEnd - rSection.mnStart, true);
+
+ OUString aNewString = xSelectionCursor->getString();
+
+ bool bNextPara = (aEdit.GetParagraphCount() > 1 && rSection.mnParagraph != aEdit.GetParagraphCount() - 1 &&
+ aEdit.GetTextLen(rSection.mnParagraph) <= rSection.mnEnd);
+
+ uno::Reference< chart2::XFormattedString2 > xFmtStr = chart2::FormattedString::create(m_xCC);
+ if (bNextPara)
+ aNewString = aNewString + OUStringChar('\n');
+ xFmtStr->setString(aNewString);
+ aNewStrings.emplace_back(xFmtStr);
+
+ uno::Reference< beans::XPropertySetInfo > xInfo = xFmtStr->getPropertySetInfo();
+ uno::Reference< beans::XPropertySet > xSelectionProp(xSelectionCursor, uno::UNO_QUERY);
+ try
+ {
+ for (const beans::Property& rProp : xSelectionProp->getPropertySetInfo()->getProperties())
+ {
+ if (xInfo.is() && xInfo->hasPropertyByName(rProp.Name))
+ {
+ const uno::Any aValue = xSelectionProp->getPropertyValue(rProp.Name);
+ xFmtStr->setPropertyValue(rProp.Name, aValue);
+ }
+ }
+ }
+ catch ( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ aNewStrings.clear();
+ }
+
+ if (bNextPara)
+ xSelectionCursor->goRight(1, false); // next paragraph
+ }
+
+ return comphelper::containerToSequence(aNewStrings);
+}
+
void ChartController::executeDispatch_InsertSpecialCharacter()
{
SolarMutexGuard aGuard;
@@ -178,55 +241,58 @@ void ChartController::executeDispatch_InsertSpecialCharacter()
vcl::Font aCurFont = m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont();
aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) );
- ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(GetChartFrame(), aSet, nullptr));
- if( pDlg->Execute() != RET_OK )
- return;
-
- const SfxItemSet* pSet = pDlg->GetOutputItemSet();
- const SfxPoolItem* pItem=nullptr;
- OUString aString;
- if (pSet && pSet->GetItemState(SID_CHARMAP, true, &pItem) == SfxItemState::SET)
- if (auto pStringItem = dynamic_cast<const SfxStringItem*>(pItem))
- aString = pStringItem->GetValue();
-
- OutlinerView* pOutlinerView = m_pDrawViewWrapper->GetTextEditOutlinerView();
- SdrOutliner* pOutliner = m_pDrawViewWrapper->getOutliner();
-
- if(!pOutliner || !pOutlinerView)
- return;
-
- // insert string to outliner
-
- // prevent flicker
- pOutlinerView->HideCursor();
- pOutliner->SetUpdateLayout(false);
-
- // delete current selection by inserting empty String, so current
- // attributes become unique (sel. has to be erased anyway)
- pOutlinerView->InsertText(OUString());
-
- pOutlinerView->InsertText(aString, true);
-
- ESelection aSel = pOutlinerView->GetSelection();
- aSel.nStartPara = aSel.nEndPara;
- aSel.nStartPos = aSel.nEndPos;
- pOutlinerView->SetSelection(aSel);
+ VclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(GetChartFrame(), aSet, nullptr));
+ pDlg->StartExecuteAsync(
+ [this, pDlg] (sal_Int32 nResult)->void
+ {
+ if (nResult == RET_OK)
+ {
+ const SfxItemSet* pSet = pDlg->GetOutputItemSet();
+ OUString aString;
+ if (pSet)
+ if (const SfxStringItem* pCharMapItem = pSet->GetItemIfSet(SID_CHARMAP))
+ aString = pCharMapItem->GetValue();
+
+ OutlinerView* pOutlinerView = m_pDrawViewWrapper->GetTextEditOutlinerView();
+ SdrOutliner* pOutliner = m_pDrawViewWrapper->getOutliner();
+
+ if(pOutliner && pOutlinerView)
+ {
+ // insert string to outliner
+
+ // prevent flicker
+ pOutlinerView->HideCursor();
+ pOutliner->SetUpdateLayout(false);
+
+ // delete current selection by inserting empty String, so current
+ // attributes become unique (sel. has to be erased anyway)
+ pOutlinerView->InsertText(OUString());
+
+ pOutlinerView->InsertText(aString, true);
+
+ ESelection aSel = pOutlinerView->GetSelection();
+ aSel.nStartPara = aSel.nEndPara;
+ aSel.nStartPos = aSel.nEndPos;
+ pOutlinerView->SetSelection(aSel);
+
+ // show changes
+ pOutliner->SetUpdateLayout(true);
+ pOutlinerView->ShowCursor();
+ }
+ }
+ pDlg->disposeOnce();
+ }
+ );
- // show changes
- pOutliner->SetUpdateLayout(true);
- pOutlinerView->ShowCursor();
}
-uno::Reference< css::accessibility::XAccessibleContext >
- ChartController::impl_createAccessibleTextContext()
+rtl::Reference< ::chart::AccessibleTextHelper >
+ ChartController::createAccessibleTextContext()
{
#if !ENABLE_WASM_STRIP_ACCESSIBILITY
- uno::Reference< css::accessibility::XAccessibleContext > xResult(
- new AccessibleTextHelper( m_pDrawViewWrapper.get() ));
-
- return xResult;
+ return new AccessibleTextHelper( m_pDrawViewWrapper.get() );
#else
- return uno::Reference< css::accessibility::XAccessibleContext >();
+ return {};
#endif
}
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 7b9c28de63e5..5774ff1350d4 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -21,8 +21,9 @@
#include <ChartWindow.hxx>
#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
+#include <ChartType.hxx>
#include <TitleHelper.hxx>
-#include <ThreeDHelper.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include "UndoGuard.hxx"
#include <ControllerLockGuard.hxx>
@@ -33,8 +34,11 @@
#include <chartview/DrawModelWrapper.hxx>
#include "ChartTransferable.hxx"
#include <DrawViewWrapper.hxx>
+#include <Legend.hxx>
#include <LegendHelper.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
+#include <RegressionCurveModel.hxx>
#include <RegressionCurveHelper.hxx>
#include "ShapeController.hxx"
#include <DiagramHelper.hxx>
@@ -42,15 +46,15 @@
#include <ObjectNameProvider.hxx>
#include <unonames.hxx>
+#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/chart2/DataPointLabel.hpp>
-#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <docmodel/uno/UnoGradientTools.hxx>
#include <editeng/editview.hxx>
#include <editeng/outliner.hxx>
#include <svx/ActionDescriptionProvider.hxx>
@@ -70,12 +74,11 @@
#include <svx/unoapi.hxx>
#include <svx/unopage.hxx>
#include <svx/unoshape.hxx>
-#include <svx/xgrad.hxx>
#include <PropertyHelper.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/UnitConversion.hxx>
#include <memory>
@@ -92,16 +95,16 @@ namespace
{
bool lcl_deleteDataSeries(
- const OUString & rCID,
+ std::u16string_view rCID,
const rtl::Reference<::chart::ChartModel> & xModel,
const Reference< document::XUndoManager > & xUndoManager )
{
bool bResult = false;
- uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( rCID, xModel ));
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rCID, xModel );
if( xSeries.is() && xModel.is())
{
- uno::Reference< chart2::XChartType > xChartType(
- DataSeriesHelper::getChartTypeOfSeries( xSeries, xModel->getFirstDiagram()));
+ rtl::Reference< ::chart::ChartType > xChartType =
+ DataSeriesHelper::getChartTypeOfSeries( xSeries, xModel->getFirstChartDiagram());
if( xChartType.is())
{
UndoGuard aUndoGuard(
@@ -109,8 +112,8 @@ bool lcl_deleteDataSeries(
ActionDescriptionProvider::ActionType::Delete, SchResId( STR_OBJECT_DATASERIES )),
xUndoManager );
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xModel );
- uno::Reference< chart2::XAxis > xAxis( DiagramHelper::getAttachedAxis( xSeries, xDiagram ) );
+ rtl::Reference< Diagram > xDiagram = xModel->getFirstChartDiagram();
+ rtl::Reference< Axis > xAxis = xDiagram->getAttachedAxis( xSeries );
DataSeriesHelper::deleteSeries( xSeries, xChartType );
@@ -124,7 +127,7 @@ bool lcl_deleteDataSeries(
}
bool lcl_deleteDataCurve(
- const OUString & rCID,
+ std::u16string_view rCID,
const rtl::Reference<::chart::ChartModel> & xModel,
const Reference< document::XUndoManager > & xUndoManager )
{
@@ -159,18 +162,16 @@ bool lcl_deleteDataCurve(
} // anonymous namespace
-std::unique_ptr<ReferenceSizeProvider> ChartController::impl_createReferenceSizeProvider()
+ReferenceSizeProvider ChartController::impl_createReferenceSizeProvider()
{
awt::Size aPageSize( ChartModelHelper::getPageSize( getChartModel() ) );
- return std::make_unique<ReferenceSizeProvider>(aPageSize, getChartModel());
+ return ReferenceSizeProvider(aPageSize, getChartModel());
}
void ChartController::impl_adaptDataSeriesAutoResize()
{
- std::unique_ptr<ReferenceSizeProvider> pRefSizeProvider(impl_createReferenceSizeProvider());
- if (pRefSizeProvider)
- pRefSizeProvider->setValuesAtAllDataSeries();
+ impl_createReferenceSizeProvider().setValuesAtAllDataSeries();
}
void ChartController::executeDispatch_NewArrangement()
@@ -181,7 +182,7 @@ void ChartController::executeDispatch_NewArrangement()
try
{
rtl::Reference<::chart::ChartModel> xModel( getChartModel() );
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xModel );
+ rtl::Reference< Diagram > xDiagram = xModel->getFirstChartDiagram();
if( xDiagram.is())
{
UndoGuard aUndoGuard(
@@ -195,15 +196,15 @@ void ChartController::executeDispatch_NewArrangement()
xDiagram->setPropertyToDefault( "PosSizeExcludeAxes");
// 3d rotation
- ThreeDHelper::set3DSettingsToDefault( xDiagram );
+ xDiagram->set3DSettingsToDefault();
// legend
- Reference< beans::XPropertyState > xLegendState( xDiagram->getLegend(), uno::UNO_QUERY );
- if( xLegendState.is())
+ rtl::Reference< Legend > xLegend = xDiagram->getLegend2();
+ if( xLegend.is())
{
- xLegendState->setPropertyToDefault( "RelativePosition");
- xLegendState->setPropertyToDefault( "RelativeSize");
- xLegendState->setPropertyToDefault( "AnchorPosition");
+ xLegend->setPropertyToDefault( "RelativePosition");
+ xLegend->setPropertyToDefault( "RelativeSize");
+ xLegend->setPropertyToDefault( "AnchorPosition");
}
// titles
@@ -211,16 +212,16 @@ void ChartController::executeDispatch_NewArrangement()
eType < TitleHelper::NORMAL_TITLE_END;
++eType )
{
- Reference< beans::XPropertyState > xTitleState(
+ rtl::Reference< Title > xTitleState =
TitleHelper::getTitle(
- static_cast< TitleHelper::eTitleType >( eType ), xModel ), uno::UNO_QUERY );
+ static_cast< TitleHelper::eTitleType >( eType ), xModel );
if( xTitleState.is())
xTitleState->setPropertyToDefault( "RelativePosition");
}
// regression curve equations
- std::vector< Reference< chart2::XRegressionCurve > > aRegressionCurves(
- RegressionCurveHelper::getAllRegressionCurvesNotMeanValueLine( xDiagram ));
+ std::vector< rtl::Reference< RegressionCurveModel > > aRegressionCurves =
+ xDiagram->getAllRegressionCurvesNotMeanValueLine();
// reset equation position
for( const auto& xCurve : aRegressionCurves )
@@ -243,10 +244,7 @@ void ChartController::executeDispatch_ScaleText()
m_xUndoManager );
ControllerLockGuardUNO aCtlLockGuard( getChartModel() );
- std::unique_ptr<ReferenceSizeProvider> pRefSizeProv(impl_createReferenceSizeProvider());
- OSL_ASSERT(pRefSizeProv);
- if (pRefSizeProv)
- pRefSizeProv->toggleAutoResizeState();
+ impl_createReferenceSizeProvider().toggleAutoResizeState();
aUndoGuard.commit();
}
@@ -260,7 +258,7 @@ void ChartController::executeDispatch_Paste()
Graphic aGraphic;
// paste location: center of window
- Point aPos = pChartWindow->PixelToLogic( tools::Rectangle( {}, pChartWindow->GetSizePixel()).Center());
+ Point aPos = pChartWindow->PixelToLogic( tools::Rectangle(Point{}, pChartWindow->GetSizePixel()).Center());
// handle different formats
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pChartWindow ));
@@ -268,8 +266,7 @@ void ChartController::executeDispatch_Paste()
{
if ( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) )
{
- tools::SvRef<SotTempStream> xStm;
- if ( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStm ) )
+ if (std::unique_ptr<SvStream> xStm = aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING) )
{
xStm->Seek( 0 );
Reference< io::XInputStream > xInputStream( new utl::OInputStreamWrapper( *xStm ) );
@@ -286,8 +283,7 @@ void ChartController::executeDispatch_Paste()
else if ( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) )
{
// graphic exchange format (graphic manager bitmap format?)
- tools::SvRef<SotTempStream> xStm;
- if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ))
+ if (std::unique_ptr<SvStream> xStm = aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB ))
{
TypeSerializer aSerializer(*xStm);
aSerializer.readGraphic(aGraphic);
@@ -315,8 +311,8 @@ void ChartController::executeDispatch_Paste()
if( m_pDrawViewWrapper )
{
OutlinerView* pOutlinerView = m_pDrawViewWrapper->GetTextEditOutlinerView();
- if( pOutlinerView )//in case of edit mode insert into edited string
- pOutlinerView->InsertText( aString );
+ if (pOutlinerView)//in case of edit mode insert the formatted string
+ pOutlinerView->PasteSpecial();
else
{
impl_PasteStringAsTextShape( aString, awt::Point( 0, 0 ) );
@@ -343,9 +339,9 @@ void ChartController::impl_PasteGraphic(
DBG_TESTSOLARMUTEX();
// note: the XPropertySet of the model is the old API. Also the property
// "AdditionalShapes" that is used there.
- uno::Reference< beans::XPropertySet > xModelProp( getModel(), uno::UNO_QUERY );
+ rtl::Reference< ChartModel > xModel = getChartModel();
DrawModelWrapper * pDrawModelWrapper( GetDrawModelWrapper());
- if( ! (xGraphic.is() && xModelProp.is()))
+ if( ! (xGraphic.is() && xModel.is()))
return;
rtl::Reference<SvxGraphicObject> xGraphicShape = new SvxGraphicObject(nullptr);
xGraphicShape->setShapeKind(SdrObjKind::Graphic);
@@ -355,11 +351,7 @@ void ChartController::impl_PasteGraphic(
{
xPage->add( xGraphicShape );
//need to change the model state manually
- {
- uno::Reference< util::XModifiable > xModifiable( getModel(), uno::UNO_QUERY );
- if( xModifiable.is() )
- xModifiable->setModified( true );
- }
+ xModel->setModified( true );
//select new shape
m_aSelection.setSelection( xGraphicShape );
m_aSelection.applySelection( m_pDrawViewWrapper.get() );
@@ -367,14 +359,30 @@ void ChartController::impl_PasteGraphic(
xGraphicShape->SvxShape::setPropertyValue( "Graphic", uno::Any( xGraphic ));
awt::Size aGraphicSize( 1000, 1000 );
+ bool bGotGraphicSize = false;
+ try
+ {
+ bGotGraphicSize = xGraphicShape->SvxShape::getPropertyValue( "Size100thMM") >>= aGraphicSize;
+ }
+ catch (css::beans::UnknownPropertyException& )
+ {}
auto pChartWindow(GetChartWindow());
// first try size in 100th mm, then pixel size
- if( ! ( xGraphicShape->SvxShape::getPropertyValue( "Size100thMM") >>= aGraphicSize ) &&
- ( ( xGraphicShape->SvxShape::getPropertyValue( "SizePixel") >>= aGraphicSize ) && pChartWindow ))
+ if( !bGotGraphicSize )
{
- ::Size aVCLSize( pChartWindow->PixelToLogic( Size( aGraphicSize.Width, aGraphicSize.Height )));
- aGraphicSize.Width = aVCLSize.getWidth();
- aGraphicSize.Height = aVCLSize.getHeight();
+ bool bGotSizePixel = false;
+ try
+ {
+ bGotSizePixel = xGraphicShape->SvxShape::getPropertyValue( "SizePixel") >>= aGraphicSize;
+ }
+ catch (css::beans::UnknownPropertyException& )
+ {}
+ if ( bGotSizePixel && pChartWindow )
+ {
+ ::Size aVCLSize( pChartWindow->PixelToLogic( Size( aGraphicSize.Width, aGraphicSize.Height )));
+ aGraphicSize.Width = aVCLSize.getWidth();
+ aGraphicSize.Height = aVCLSize.getHeight();
+ }
}
xGraphicShape->setSize( aGraphicSize );
xGraphicShape->setPosition( awt::Point( 0, 0 ) );
@@ -402,7 +410,9 @@ void ChartController::impl_PasteShapes( SdrModel* pModel )
{
SdrObject* pObj(aIter.Next());
// Clone to new SdrModel
- SdrObject* pNewObj(pObj ? pObj->CloneSdrObject(pDrawModelWrapper->getSdrModel()) : nullptr);
+ rtl::Reference<SdrObject> pNewObj;
+ if (pObj)
+ pNewObj = pObj->CloneSdrObject(pDrawModelWrapper->getSdrModel());
if ( pNewObj )
{
@@ -413,14 +423,14 @@ void ChartController::impl_PasteShapes( SdrModel* pModel )
xShape->setPosition( awt::Point( 0, 0 ) );
}
- pDestPage->InsertObject( pNewObj );
+ pDestPage->InsertObject( pNewObj.get() );
m_pDrawViewWrapper->AddUndo( std::make_unique<SdrUndoInsertObj>( *pNewObj ) );
xSelShape = xShape;
}
}
}
- Reference< util::XModifiable > xModifiable( getModel(), uno::UNO_QUERY );
+ rtl::Reference< ChartModel > xModifiable = getChartModel();
if ( xModifiable.is() )
{
xModifiable->setModified( true );
@@ -570,6 +580,13 @@ bool ChartController::isShapeContext() const
( m_pDrawViewWrapper->GetCurrentObjIdentifier() == SdrObjKind::Text ) );
}
+bool ChartController::IsTextEdit() const
+{
+ // only Title objects are editable textshapes
+ return m_aSelection.isTitleObjectSelected() &&
+ m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit();
+}
+
void ChartController::impl_ClearSelection()
{
if( m_aSelection.hasSelection())
@@ -591,7 +608,7 @@ bool ChartController::executeDispatch_Delete()
return false;
//remove chart object
- uno::Reference< chart2::XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY );
+ rtl::Reference< ChartModel > xChartDoc = getChartModel();
if( !xChartDoc.is() )
return false;
@@ -612,17 +629,17 @@ bool ChartController::executeDispatch_Delete()
}
case OBJECTTYPE_LEGEND:
{
- uno::Reference< chart2::XDiagram > xDiagram( xChartDoc->getFirstDiagram());
+ rtl::Reference< Diagram > xDiagram( xChartDoc->getFirstChartDiagram());
if( xDiagram.is())
{
- uno::Reference< beans::XPropertySet > xLegendProp( xDiagram->getLegend(), uno::UNO_QUERY );
- if( xLegendProp.is())
+ rtl::Reference< Legend > xLegend( xDiagram->getLegend2() );
+ if( xLegend.is())
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::ActionType::Delete, SchResId( STR_OBJECT_LEGEND )),
m_xUndoManager );
- xLegendProp->setPropertyValue( "Show", uno::Any( false ));
+ xLegend->setPropertyValue( "Show", uno::Any( false ));
bReturn = true;
aUndoGuard.commit();
}
@@ -762,7 +779,7 @@ bool ChartController::executeDispatch_Delete()
aLabel.ShowSeriesName = false;
if( aObjectType == OBJECTTYPE_DATA_LABELS )
{
- uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( aCID, getChartModel() ));
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( aCID, getChartModel() );
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, CHART_UNONAME_LABEL, uno::Any(aLabel) );
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, CHART_UNONAME_CUSTOM_LABEL_FIELDS, uno::Any() );
}
@@ -819,11 +836,10 @@ bool ChartController::executeDispatch_Delete()
void ChartController::executeDispatch_ToggleLegend()
{
- Reference< frame::XModel > xModel( getModel() );
+ rtl::Reference< ChartModel > xModel = getChartModel();
UndoGuard aUndoGuard(
SchResId( STR_ACTION_TOGGLE_LEGEND ), m_xUndoManager );
- ChartModel& rModel = dynamic_cast<ChartModel&>(*xModel);
- Reference< beans::XPropertySet > xLegendProp( LegendHelper::getLegend(rModel), uno::UNO_QUERY );
+ rtl::Reference< Legend > xLegendProp = LegendHelper::getLegend(*xModel);
bool bChanged = false;
if( xLegendProp.is())
{
@@ -843,7 +859,7 @@ void ChartController::executeDispatch_ToggleLegend()
}
else
{
- xLegendProp.set( LegendHelper::getLegend(rModel, m_xCC, true), uno::UNO_QUERY );
+ xLegendProp = LegendHelper::getLegend(*xModel, m_xCC, true);
if( xLegendProp.is())
bChanged = true;
}
@@ -938,10 +954,10 @@ void ChartController::executeDispatch_FillColor(sal_uInt32 nColor)
}
}
-void ChartController::executeDispatch_FillGradient(OUString sJSONGradient)
+void ChartController::executeDispatch_FillGradient(std::u16string_view sJSONGradient)
{
- XGradient aXGradient = XGradient::fromJSON(sJSONGradient);
- css::awt::Gradient aGradient = aXGradient.toGradientUNO();
+ basegfx::BGradient aBGradient = basegfx::BGradient::fromJSON(sJSONGradient);
+ css::awt::Gradient aGradient = model::gradient::createUnoGradient2(aBGradient);
try
{
@@ -955,9 +971,10 @@ void ChartController::executeDispatch_FillGradient(OUString sJSONGradient)
if( xPropSet.is() )
{
- OUString aPrefferedName = OUString::number(static_cast<sal_Int32>(aXGradient.GetStartColor()))
- + OUString::number(static_cast<sal_Int32>(aXGradient.GetEndColor()))
- + OUString::number(static_cast<sal_Int32>(aXGradient.GetAngle().get()));
+ OUString aPrefferedName =
+ OUString::number(static_cast<sal_Int32>(Color(aBGradient.GetColorStops().front().getStopColor())))
+ + OUString::number(static_cast<sal_Int32>(Color(aBGradient.GetColorStops().back().getStopColor())))
+ + OUString::number(static_cast<sal_Int32>(aBGradient.GetAngle().get()));
OUString aNewName = PropertyHelper::addGradientUniqueNameToTable(css::uno::Any(aGradient),
xChartModel,
@@ -994,7 +1011,7 @@ void ChartController::executeDispatch_LineColor(sal_uInt32 nColor)
}
if( xPropSet.is() )
- xPropSet->setPropertyValue( "LineColor", css::uno::makeAny( Color(ColorTransparency, nColor) ) );
+ xPropSet->setPropertyValue( "LineColor", css::uno::Any( Color(ColorTransparency, nColor) ) );
}
}
catch( const uno::Exception& )
@@ -1024,7 +1041,7 @@ void ChartController::executeDispatch_LineWidth(sal_uInt32 nWidth)
}
if( xPropSet.is() )
- xPropSet->setPropertyValue( "LineWidth", css::uno::makeAny( nWidth ) );
+ xPropSet->setPropertyValue( "LineWidth", css::uno::Any( nWidth ) );
}
}
catch( const uno::Exception& )
@@ -1099,8 +1116,7 @@ void ChartController::impl_switchDiagramPositioningToExcludingPositioning()
ActionDescriptionProvider::ActionType::PosSize,
ObjectNameProvider::getName( OBJECTTYPE_DIAGRAM)),
m_xUndoManager );
- ChartModel& rModel = dynamic_cast<ChartModel&>(*m_aModel->getModel());
- if (DiagramHelper::switchDiagramPositioningToExcludingPositioning(rModel, true, true))
+ if (DiagramHelper::switchDiagramPositioningToExcludingPositioning(*getChartModel(), true, true))
aUndoGuard.commit();
}
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index b8d925427736..375c2824a8a1 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -22,12 +22,14 @@
#include <string_view>
#include <ChartController.hxx>
+#include <ChartView.hxx>
#include <PositionAndSizeHelper.hxx>
#include <ObjectIdentifier.hxx>
#include <ChartWindow.hxx>
#include <ResId.hxx>
#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
+#include <ChartType.hxx>
#include <DiagramHelper.hxx>
#include <Diagram.hxx>
#include <TitleHelper.hxx>
@@ -42,8 +44,12 @@
#include <RelativePositionHelper.hxx>
#include <chartview/DrawModelWrapper.hxx>
#include <RegressionCurveHelper.hxx>
+#include <RegressionCurveModel.hxx>
#include <StatisticsHelper.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
+#include <DataSeriesProperties.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <LegendHelper.hxx>
#include <servicenames_charttypes.hxx>
@@ -53,24 +59,17 @@
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/chart2/RelativeSize.hpp>
-#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart2/data/XPivotTableDataProvider.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/awt/PopupMenuDirection.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
-#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
-#include <com/sun/star/qa/XDumper.hpp>
#include <comphelper/lok.hxx>
#include <comphelper/propertysequence.hxx>
#include <comphelper/propertyvalue.hxx>
-#include <comphelper/sequence.hxx>
-
-#include <toolkit/awt/vclxmenu.hxx>
#include <sfx2/viewsh.hxx>
#include <svx/ActionDescriptionProvider.hxx>
@@ -84,8 +83,10 @@
#include <vcl/weld.hxx>
#include <vcl/ptrstyle.hxx>
#include <svtools/acceleratorexecute.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <toolkit/awt/vclxmenu.hxx>
#include <sal/log.hxx>
+#include <o3tl/string_view.hxx>
#include <boost/property_tree/json_parser.hpp>
#include <sfx2/dispatch.hxx>
@@ -95,6 +96,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Reference;
namespace chart
@@ -148,7 +150,7 @@ void lcl_insertMenuCommand(
xMenu->setCommand( nId, rCommand );
}
-OUString lcl_getFormatCommandForObjectCID( const OUString& rCID )
+OUString lcl_getFormatCommandForObjectCID( std::u16string_view rCID )
{
OUString aDispatchCommand( ".uno:FormatSelection" );
@@ -265,8 +267,7 @@ void SAL_CALL ChartController::setPosSize(
pChartWindow->setPosSizePixel( X, Y, Width, Height, static_cast<PosSizeFlags>(Flags) );
//#i75867# poor quality of ole's alternative view with 3D scenes and zoomfactors besides 100%
- uno::Reference< beans::XPropertySet > xProp( m_xChartView, uno::UNO_QUERY );
- if( xProp.is() )
+ if( m_xChartView.is() )
{
auto aZoomFactors(::comphelper::InitPropertySequence({
{ "ScaleXNumerator", uno::Any( nScaleXNumerator ) },
@@ -274,7 +275,7 @@ void SAL_CALL ChartController::setPosSize(
{ "ScaleYNumerator", uno::Any( nScaleYNumerator ) },
{ "ScaleYDenominator", uno::Any( nScaleYDenominator ) }
}));
- xProp->setPropertyValue( "ZoomFactors", uno::Any( aZoomFactors ));
+ m_xChartView->setPropertyValue( "ZoomFactors", uno::Any( aZoomFactors ));
}
//a correct work area is at least necessary for correct values in the position and size dialog and for dragging area
@@ -461,14 +462,13 @@ void ChartController::execute_Paint(vcl::RenderContext& rRenderContext, const to
{
try
{
- uno::Reference<frame::XModel> xModel(getModel());
+ rtl::Reference<ChartModel> xModel(getChartModel());
//OSL_ENSURE( xModel.is(), "ChartController::execute_Paint: have no model to paint");
if (!xModel.is())
return;
//better performance for big data
- uno::Reference<beans::XPropertySet> xProp(m_xChartView, uno::UNO_QUERY);
- if (xProp.is())
+ if (m_xChartView.is())
{
awt::Size aResolution(1000, 1000);
{
@@ -480,12 +480,11 @@ void ChartController::execute_Paint(vcl::RenderContext& rRenderContext, const to
aResolution.Height = pChartWindow->GetSizePixel().Height();
}
}
- xProp->setPropertyValue( "Resolution", uno::Any( aResolution ));
+ m_xChartView->setPropertyValue( "Resolution", uno::Any( aResolution ));
}
- uno::Reference< util::XUpdatable > xUpdatable( m_xChartView, uno::UNO_QUERY );
- if (xUpdatable.is())
- xUpdatable->update();
+ if (m_xChartView.is())
+ m_xChartView->update();
{
SolarMutexGuard aGuard;
@@ -705,7 +704,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt )
}
else
{
- OUString aDragMethodServiceName( ObjectIdentifier::getDragMethodServiceName( m_aSelection.getSelectedCID() ) );
+ std::u16string_view aDragMethodServiceName( ObjectIdentifier::getDragMethodServiceName( m_aSelection.getSelectedCID() ) );
if( aDragMethodServiceName == ObjectIdentifier::getPieSegmentDragMethodServiceName() )
pDragMethod = new DragMethod_PieSegment( *pDrawViewWrapper, m_aSelection.getSelectedCID(), getChartModel() );
}
@@ -744,6 +743,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
bool bMouseUpWithoutMouseDown = !m_bWaitingForMouseUp;
m_bWaitingForMouseUp = false;
bool bNotifySelectionChange = false;
+ bool bEditText = false;
{
SolarMutexGuard aGuard;
@@ -843,7 +843,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
awt::Size aPageSize( ChartModelHelper::getPageSize( getChartModel() ) );
tools::Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height );
- const E3dObject* pE3dObject(dynamic_cast< const E3dObject*>(pObj));
+ const E3dObject* pE3dObject(DynCastE3dObject(pObj));
if(nullptr != pE3dObject)
{
E3dScene* pScene(pE3dObject->getRootE3dSceneFromE3dObject());
@@ -864,17 +864,15 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
m_xUndoManager );
bool bChanged = false;
- css::uno::Reference< css::frame::XModel > xModel = getModel();
- ChartModel* pModel = dynamic_cast<ChartModel*>(xModel.get());
- assert(pModel);
+ rtl::Reference< ChartModel > xModel = getChartModel();
if ( eObjectType == OBJECTTYPE_LEGEND )
- bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning( *pModel, false , true );
+ bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning( *xModel, false , true );
bool bMoved = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID()
- , getChartModel()
- , awt::Rectangle(aObjectRect.Left(),aObjectRect.Top(),aObjectRect.getWidth(),aObjectRect.getHeight())
+ , xModel
+ , awt::Rectangle(aObjectRect.Left(),aObjectRect.Top(),aObjectRect.getOpenWidth(),aObjectRect.getOpenHeight())
, awt::Rectangle(aOldObjectRect.Left(), aOldObjectRect.Top(), 0, 0)
- , awt::Rectangle(aPageRect.Left(),aPageRect.Top(),aPageRect.getWidth(),aPageRect.getHeight()) );
+ , awt::Rectangle(aPageRect.Left(),aPageRect.Top(),aPageRect.getOpenWidth(),aPageRect.getOpenHeight()) );
if( bMoved || bChanged )
{
@@ -922,7 +920,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
if( isDoubleClick(rMEvt) && !bMouseUpWithoutMouseDown /*#i106966#*/ )
{
Point aMousePixel = rMEvt.GetPosPixel();
- execute_DoubleClick( &aMousePixel );
+ execute_DoubleClick( &aMousePixel, bEditText );
}
if( m_aSelection.isSelectionDifferentFromBeforeMouseDown() )
@@ -931,18 +929,17 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
impl_SetMousePointer( rMEvt );
- if(bNotifySelectionChange)
+ if(bNotifySelectionChange || bEditText)
impl_notifySelectionChangeListeners();
}
-void ChartController::execute_DoubleClick( const Point* pMousePixel )
+void ChartController::execute_DoubleClick( const Point* pMousePixel, bool &bEditText )
{
const SfxViewShell* pViewShell = SfxViewShell::Current();
- bool isMobilePhone = pViewShell && pViewShell->isLOKMobilePhone();
- if (isMobilePhone)
+ bool notAllowed = pViewShell && (pViewShell->isLOKMobilePhone() || pViewShell->IsLokReadOnlyView());
+ if (notAllowed)
return;
- bool bEditText = false;
if ( m_aSelection.hasSelection() )
{
OUString aCID( m_aSelection.getSelectedCID() );
@@ -958,7 +955,7 @@ void ChartController::execute_DoubleClick( const Point* pMousePixel )
{
// #i12587# support for shapes in chart
SdrObject* pObj = DrawViewWrapper::getSdrObject( m_aSelection.getSelectedAdditionalShape() );
- if ( dynamic_cast< const SdrTextObj* >(pObj) != nullptr )
+ if ( DynCastSdrTextObj(pObj) != nullptr )
{
bEditText = true;
}
@@ -1006,8 +1003,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
if( m_aSelection.isSelectionDifferentFromBeforeMouseDown() )
impl_notifySelectionChangeListeners();
- css::uno::Reference< css::awt::XPopupMenu > xPopupMenu( m_xCC->getServiceManager()->createInstanceWithContext(
- "com.sun.star.awt.PopupMenu", m_xCC ), css::uno::UNO_QUERY );
+ rtl::Reference< VCLXPopupMenu > xPopupMenu = new VCLXPopupMenu();
Point aPos( rCEvt.GetMousePosPixel() );
if( !rCEvt.IsMouseEvent() )
@@ -1022,254 +1018,249 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
aMenuName = m_pDrawViewWrapper->IsTextEdit() ? std::u16string_view( u"drawtext" ) : std::u16string_view( u"draw" );
else
{
+ ObjectType eObjectType = ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() );
+
// todo: the context menu should be specified by an xml file in uiconfig
- if( xPopupMenu.is())
+ sal_Int16 nUniqueId = 1;
+ if (eObjectType != OBJECTTYPE_DATA_TABLE)
{
- sal_Int16 nUniqueId = 1;
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:Cut" );
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:Copy" );
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:Paste" );
xPopupMenu->insertSeparator( -1 );
+ }
- ObjectType eObjectType = ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() );
- rtl::Reference< Diagram > xDiagram = getFirstDiagram();
+ rtl::Reference< Diagram > xDiagram = getFirstDiagram();
- OUString aFormatCommand( lcl_getFormatCommandForObjectCID( m_aSelection.getSelectedCID() ) );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, aFormatCommand );
+ OUString aFormatCommand( lcl_getFormatCommandForObjectCID( m_aSelection.getSelectedCID() ) );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, aFormatCommand );
+ if (eObjectType == OBJECTTYPE_TITLE && m_pDrawViewWrapper->IsTextEdit())
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FontDialog" );
- //some commands for dataseries and points:
+ //some commands for dataseries and points:
- if( eObjectType == OBJECTTYPE_DATA_SERIES || eObjectType == OBJECTTYPE_DATA_POINT )
+ if( eObjectType == OBJECTTYPE_DATA_SERIES || eObjectType == OBJECTTYPE_DATA_POINT )
+ {
+ bool bIsPoint = ( eObjectType == OBJECTTYPE_DATA_POINT );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
+ rtl::Reference< RegressionCurveModel > xTrendline = RegressionCurveHelper::getFirstCurveNotMeanValueLine( xSeries );
+ bool bHasEquation = RegressionCurveHelper::hasEquation( xTrendline );
+ rtl::Reference< RegressionCurveModel > xMeanValue = RegressionCurveHelper::getMeanValueLine( xSeries );
+ bool bHasYErrorBars = StatisticsHelper::hasErrorBars( xSeries );
+ bool bHasXErrorBars = StatisticsHelper::hasErrorBars( xSeries, false );
+ bool bHasDataLabelsAtSeries = DataSeriesHelper::hasDataLabelsAtSeries( xSeries );
+ bool bHasDataLabelsAtPoints = DataSeriesHelper::hasDataLabelsAtPoints( xSeries );
+ bool bHasDataLabelAtPoint = false;
+ sal_Int32 nPointIndex = -1;
+ if( bIsPoint )
{
- bool bIsPoint = ( eObjectType == OBJECTTYPE_DATA_POINT );
- uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel() );
- uno::Reference< chart2::XRegressionCurveContainer > xCurveCnt( xSeries, uno::UNO_QUERY );
- Reference< chart2::XRegressionCurve > xTrendline( RegressionCurveHelper::getFirstCurveNotMeanValueLine( xCurveCnt ) );
- bool bHasEquation = RegressionCurveHelper::hasEquation( xTrendline );
- Reference< chart2::XRegressionCurve > xMeanValue( RegressionCurveHelper::getMeanValueLine( xCurveCnt ) );
- bool bHasYErrorBars = StatisticsHelper::hasErrorBars( xSeries );
- bool bHasXErrorBars = StatisticsHelper::hasErrorBars( xSeries, false );
- bool bHasDataLabelsAtSeries = DataSeriesHelper::hasDataLabelsAtSeries( xSeries );
- bool bHasDataLabelsAtPoints = DataSeriesHelper::hasDataLabelsAtPoints( xSeries );
- bool bHasDataLabelAtPoint = false;
- sal_Int32 nPointIndex = -1;
- if( bIsPoint )
- {
- nPointIndex = ObjectIdentifier::getIndexFromParticleOrCID( m_aSelection.getSelectedCID() );
- bHasDataLabelAtPoint = DataSeriesHelper::hasDataLabelAtPoint( xSeries, nPointIndex );
- }
- bool bSelectedPointIsFormatted = false;
- bool bHasFormattedDataPointsOtherThanSelected = false;
+ nPointIndex = ObjectIdentifier::getIndexFromParticleOrCID( m_aSelection.getSelectedCID() );
+ bHasDataLabelAtPoint = DataSeriesHelper::hasDataLabelAtPoint( xSeries, nPointIndex );
+ }
+ bool bSelectedPointIsFormatted = false;
+ bool bHasFormattedDataPointsOtherThanSelected = false;
- Reference< beans::XPropertySet > xSeriesProperties( xSeries, uno::UNO_QUERY );
- if( xSeriesProperties.is() )
+ if( xSeries.is() )
+ {
+ uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
- uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ if( aAttributedDataPointIndexList.hasElements() )
{
- if( aAttributedDataPointIndexList.hasElements() )
+ if( bIsPoint )
{
- if( bIsPoint )
- {
- auto aIndices( comphelper::sequenceToContainer<std::vector< sal_Int32 >>( aAttributedDataPointIndexList ) );
- std::vector< sal_Int32 >::iterator aIt = std::find( aIndices.begin(), aIndices.end(), nPointIndex );
- if( aIt != aIndices.end())
- bSelectedPointIsFormatted = true;
- else
- bHasFormattedDataPointsOtherThanSelected = true;
- }
+ auto aIt = std::find( aAttributedDataPointIndexList.begin(), aAttributedDataPointIndexList.end(), nPointIndex );
+ if (aIt != aAttributedDataPointIndexList.end())
+ bSelectedPointIsFormatted = true;
else
bHasFormattedDataPointsOtherThanSelected = true;
}
+ else
+ bHasFormattedDataPointsOtherThanSelected = true;
}
}
+ }
- if( bIsPoint )
- {
- if( bHasDataLabelAtPoint )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatDataLabel" );
- if( !bHasDataLabelAtPoint )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertDataLabel" );
- else
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteDataLabel" );
- if( bSelectedPointIsFormatted )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:ResetDataPoint" );
+ if( bIsPoint )
+ {
+ if( bHasDataLabelAtPoint )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatDataLabel" );
+ if( !bHasDataLabelAtPoint )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertDataLabel" );
+ else
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteDataLabel" );
+ if( bSelectedPointIsFormatted )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:ResetDataPoint" );
- xPopupMenu->insertSeparator( -1 );
+ xPopupMenu->insertSeparator( -1 );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatDataSeries" );
- }
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatDataSeries" );
+ }
- Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeOfSeries( xDiagram, xSeries ) );
- if( xChartType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
+ rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeOfSeries( xSeries ) );
+ if( xChartType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
+ {
+ try
{
- try
- {
- Reference< beans::XPropertySet > xChartTypeProp( xChartType, uno::UNO_QUERY );
- if( xChartTypeProp.is() )
- {
- bool bJapaneseStyle = false;
- xChartTypeProp->getPropertyValue( "Japanese" ) >>= bJapaneseStyle;
-
- if( bJapaneseStyle )
- {
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockLoss" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockGain" );
- }
- }
- }
- catch( const uno::Exception & )
+ bool bJapaneseStyle = false;
+ xChartType->getPropertyValue( "Japanese" ) >>= bJapaneseStyle;
+
+ if( bJapaneseStyle )
{
- DBG_UNHANDLED_EXCEPTION("chart2");
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockLoss" );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockGain" );
}
}
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+ }
- if( bHasDataLabelsAtSeries )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatDataLabels" );
- if( bHasEquation )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatTrendlineEquation" );
- if( xMeanValue.is() )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatMeanValue" );
- if( bHasXErrorBars )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatXErrorBars" );
- if( bHasYErrorBars )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatYErrorBars" );
+ if( bHasDataLabelsAtSeries )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatDataLabels" );
+ if( bHasEquation )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatTrendlineEquation" );
+ if( xMeanValue.is() )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatMeanValue" );
+ if( bHasXErrorBars )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatXErrorBars" );
+ if( bHasYErrorBars )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatYErrorBars" );
- xPopupMenu->insertSeparator( -1 );
+ xPopupMenu->insertSeparator( -1 );
- if( !bHasDataLabelsAtSeries )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertDataLabels" );
-
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTrendline" );
-
- if( !xMeanValue.is() )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertMeanValue" );
- if( !bHasXErrorBars )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertXErrorBars" );
- if( !bHasYErrorBars )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertYErrorBars" );
- if( bHasDataLabelsAtSeries || ( bHasDataLabelsAtPoints && bHasFormattedDataPointsOtherThanSelected ) )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteDataLabels" );
- if( bHasEquation )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteTrendlineEquation" );
- if( xMeanValue.is() )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteMeanValue" );
- if( bHasXErrorBars )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteXErrorBars" );
- if( bHasYErrorBars )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteYErrorBars" );
-
- if( bHasFormattedDataPointsOtherThanSelected )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:ResetAllDataPoints" );
+ if( !bHasDataLabelsAtSeries )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertDataLabels" );
+
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTrendline" );
+
+ if( !xMeanValue.is() )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertMeanValue" );
+ if( !bHasXErrorBars )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertXErrorBars" );
+ if( !bHasYErrorBars )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertYErrorBars" );
+ if( bHasDataLabelsAtSeries || ( bHasDataLabelsAtPoints && bHasFormattedDataPointsOtherThanSelected ) )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteDataLabels" );
+ if( bHasEquation )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteTrendlineEquation" );
+ if( xMeanValue.is() )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteMeanValue" );
+ if( bHasXErrorBars )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteXErrorBars" );
+ if( bHasYErrorBars )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteYErrorBars" );
+
+ if( bHasFormattedDataPointsOtherThanSelected )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:ResetAllDataPoints" );
- xPopupMenu->insertSeparator( -1 );
+ xPopupMenu->insertSeparator( -1 );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId, ".uno:ArrangeRow" );
- uno::Reference< awt::XPopupMenu > xArrangePopupMenu(
- m_xCC->getServiceManager()->createInstanceWithContext(
- "com.sun.star.awt.PopupMenu", m_xCC ), uno::UNO_QUERY );
- if( xArrangePopupMenu.is() )
- {
- sal_Int16 nSubId = nUniqueId + 1;
- lcl_insertMenuCommand( xArrangePopupMenu, nSubId++, ".uno:Forward" );
- lcl_insertMenuCommand( xArrangePopupMenu, nSubId, ".uno:Backward" );
- xPopupMenu->setPopupMenu( nUniqueId, xArrangePopupMenu );
- nUniqueId = nSubId;
- }
- ++nUniqueId;
- }
- else if( eObjectType == OBJECTTYPE_DATA_CURVE )
- {
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteTrendline" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatTrendlineEquation" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTrendlineEquation" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTrendlineEquationAndR2" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertR2Value" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteTrendlineEquation" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteR2Value" );
- }
- else if( eObjectType == OBJECTTYPE_DATA_CURVE_EQUATION )
- {
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertR2Value" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteR2Value" );
- }
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId, ".uno:ArrangeRow" );
+ rtl::Reference< VCLXPopupMenu > xArrangePopupMenu = new VCLXPopupMenu();
+ sal_Int16 nSubId = nUniqueId + 1;
+ lcl_insertMenuCommand( xArrangePopupMenu, nSubId++, ".uno:Forward" );
+ lcl_insertMenuCommand( xArrangePopupMenu, nSubId, ".uno:Backward" );
+ xPopupMenu->setPopupMenu( nUniqueId, xArrangePopupMenu );
+ nUniqueId = nSubId;
+ ++nUniqueId;
+ }
+ else if( eObjectType == OBJECTTYPE_DATA_CURVE )
+ {
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteTrendline" );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatTrendlineEquation" );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTrendlineEquation" );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTrendlineEquationAndR2" );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertR2Value" );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteTrendlineEquation" );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteR2Value" );
+ }
+ else if( eObjectType == OBJECTTYPE_DATA_CURVE_EQUATION )
+ {
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertR2Value" );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteR2Value" );
+ }
- //some commands for axes: and grids
+ //some commands for axes: and grids
- else if( eObjectType == OBJECTTYPE_AXIS || eObjectType == OBJECTTYPE_GRID || eObjectType == OBJECTTYPE_SUBGRID )
+ else if( eObjectType == OBJECTTYPE_AXIS || eObjectType == OBJECTTYPE_GRID || eObjectType == OBJECTTYPE_SUBGRID )
+ {
+ rtl::Reference< Axis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
+ if( xAxis.is() && xDiagram.is() )
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getChartModel() );
- if( xAxis.is() && xDiagram.is() )
- {
- sal_Int32 nDimensionIndex = -1;
- sal_Int32 nCooSysIndex = -1;
- sal_Int32 nAxisIndex = -1;
- AxisHelper::getIndicesForAxis( xAxis, xDiagram, nCooSysIndex, nDimensionIndex, nAxisIndex );
- bool bIsSecondaryAxis = nAxisIndex!=0;
- bool bIsAxisVisible = AxisHelper::isAxisVisible( xAxis );
- bool bIsMajorGridVisible = AxisHelper::isGridShown( nDimensionIndex, nCooSysIndex, true /*bMainGrid*/, xDiagram );
- bool bIsMinorGridVisible = AxisHelper::isGridShown( nDimensionIndex, nCooSysIndex, false /*bMainGrid*/, xDiagram );
- bool bHasTitle = false;
- uno::Reference< XTitled > xTitled( xAxis, uno::UNO_QUERY );
- if( xTitled.is())
- bHasTitle = !TitleHelper::getCompleteString( xTitled->getTitleObject() ).isEmpty();
-
- if( eObjectType != OBJECTTYPE_AXIS && bIsAxisVisible )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatAxis" );
- if( eObjectType != OBJECTTYPE_GRID && bIsMajorGridVisible && !bIsSecondaryAxis )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatMajorGrid" );
- if( eObjectType != OBJECTTYPE_SUBGRID && bIsMinorGridVisible && !bIsSecondaryAxis )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatMinorGrid" );
-
- xPopupMenu->insertSeparator( -1 );
-
- if( eObjectType != OBJECTTYPE_AXIS && !bIsAxisVisible )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertAxis" );
- if( eObjectType != OBJECTTYPE_GRID && !bIsMajorGridVisible && !bIsSecondaryAxis )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertMajorGrid" );
- if( eObjectType != OBJECTTYPE_SUBGRID && !bIsMinorGridVisible && !bIsSecondaryAxis )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertMinorGrid" );
- if( !bHasTitle )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertAxisTitle" );
-
- if( bIsAxisVisible )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteAxis" );
- if( bIsMajorGridVisible && !bIsSecondaryAxis )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteMajorGrid" );
- if( bIsMinorGridVisible && !bIsSecondaryAxis )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteMinorGrid" );
- }
- }
-
- if( eObjectType == OBJECTTYPE_DATA_STOCK_LOSS )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockGain" );
- else if( eObjectType == OBJECTTYPE_DATA_STOCK_GAIN )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockLoss" );
+ sal_Int32 nDimensionIndex = -1;
+ sal_Int32 nCooSysIndex = -1;
+ sal_Int32 nAxisIndex = -1;
+ AxisHelper::getIndicesForAxis( xAxis, xDiagram, nCooSysIndex, nDimensionIndex, nAxisIndex );
+ bool bIsSecondaryAxis = nAxisIndex!=0;
+ bool bIsAxisVisible = AxisHelper::isAxisVisible( xAxis );
+ bool bIsMajorGridVisible = AxisHelper::isGridShown( nDimensionIndex, nCooSysIndex, true /*bMainGrid*/, xDiagram );
+ bool bIsMinorGridVisible = AxisHelper::isGridShown( nDimensionIndex, nCooSysIndex, false /*bMainGrid*/, xDiagram );
+ bool bHasTitle = !TitleHelper::getCompleteString( xAxis->getTitleObject2() ).isEmpty();
+
+ if( eObjectType != OBJECTTYPE_AXIS && bIsAxisVisible )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatAxis" );
+ if( eObjectType != OBJECTTYPE_GRID && bIsMajorGridVisible && !bIsSecondaryAxis )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatMajorGrid" );
+ if( eObjectType != OBJECTTYPE_SUBGRID && bIsMinorGridVisible && !bIsSecondaryAxis )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatMinorGrid" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:TransformDialog" );
+ xPopupMenu->insertSeparator( -1 );
- if( eObjectType == OBJECTTYPE_PAGE || eObjectType == OBJECTTYPE_DIAGRAM
- || eObjectType == OBJECTTYPE_DIAGRAM_WALL
- || eObjectType == OBJECTTYPE_DIAGRAM_FLOOR
- || eObjectType == OBJECTTYPE_UNKNOWN )
- {
- if( eObjectType != OBJECTTYPE_UNKNOWN )
- xPopupMenu->insertSeparator( -1 );
- bool bHasLegend = LegendHelper::hasLegend( xDiagram );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTitles" );
- if( !bHasLegend )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertLegend" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertRemoveAxes" );
- if( bHasLegend )
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteLegend" );
+ if( eObjectType != OBJECTTYPE_AXIS && !bIsAxisVisible )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertAxis" );
+ if( eObjectType != OBJECTTYPE_GRID && !bIsMajorGridVisible && !bIsSecondaryAxis )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertMajorGrid" );
+ if( eObjectType != OBJECTTYPE_SUBGRID && !bIsMinorGridVisible && !bIsSecondaryAxis )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertMinorGrid" );
+ if( !bHasTitle )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertAxisTitle" );
+
+ if( bIsAxisVisible )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteAxis" );
+ if( bIsMajorGridVisible && !bIsSecondaryAxis )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteMajorGrid" );
+ if( bIsMinorGridVisible && !bIsSecondaryAxis )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteMinorGrid" );
+ if (bIsAxisVisible)
+ lcl_insertMenuCommand(xPopupMenu, nUniqueId++, ".uno:InsertDataTable");
}
+ }
+ else if (eObjectType == OBJECTTYPE_DATA_TABLE)
+ {
+ lcl_insertMenuCommand(xPopupMenu, nUniqueId++, ".uno:DeleteDataTable");
+ }
- xPopupMenu->insertSeparator( -1 );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DiagramType" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DataRanges" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DiagramData" );
- lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:View3D" );
+ if( eObjectType == OBJECTTYPE_DATA_STOCK_LOSS )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockGain" );
+ else if( eObjectType == OBJECTTYPE_DATA_STOCK_GAIN )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockLoss" );
+
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:TransformDialog" );
+
+ if( eObjectType == OBJECTTYPE_PAGE || eObjectType == OBJECTTYPE_DIAGRAM
+ || eObjectType == OBJECTTYPE_DIAGRAM_WALL
+ || eObjectType == OBJECTTYPE_DIAGRAM_FLOOR
+ || eObjectType == OBJECTTYPE_UNKNOWN )
+ {
+ if( eObjectType != OBJECTTYPE_UNKNOWN )
+ xPopupMenu->insertSeparator( -1 );
+ bool bHasLegend = LegendHelper::hasLegend( xDiagram );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTitles" );
+ if( !bHasLegend )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertLegend" );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertRemoveAxes" );
+ if( bHasLegend )
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteLegend" );
}
+
+ xPopupMenu->insertSeparator( -1 );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DiagramType" );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DataRanges" );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DiagramData" );
+ lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:View3D" );
}
css::uno::Sequence< css::uno::Any > aArgs{
@@ -1303,14 +1294,13 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
}
}
- Menu* pPopupMenu = comphelper::getFromUnoTunnel<VCLXMenu>(xPopupMenu)->GetMenu();
- boost::property_tree::ptree aMenu = SfxDispatcher::fillPopupMenu(pPopupMenu);
+ boost::property_tree::ptree aMenu = SfxDispatcher::fillPopupMenu(xPopupMenu);
boost::property_tree::ptree aRoot;
aRoot.add_child("menu", aMenu);
std::stringstream aStream;
boost::property_tree::write_json(aStream, aRoot, true);
- pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CONTEXT_MENU, aStream.str().c_str());
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CONTEXT_MENU, OString(aStream.str()));
}
}
else
@@ -1330,8 +1320,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
( rCEvt.GetCommand() == CommandEventId::InputContextChange ) )
{
//#i84417# enable editing with IME
- if( m_pDrawViewWrapper )
- m_pDrawViewWrapper->Command( rCEvt, pChartWindow );
+ m_pDrawViewWrapper->Command( rCEvt, pChartWindow );
}
}
@@ -1384,7 +1373,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
{
// Navigation (Tab/F3/Home/End)
rtl::Reference<::chart::ChartModel> xChartDoc( getChartModel() );
- ObjectKeyNavigation aObjNav( m_aSelection.getSelectedOID(), xChartDoc, comphelper::getFromUnoTunnel<ExplicitValueProvider>( m_xChartView ));
+ ObjectKeyNavigation aObjNav( m_aSelection.getSelectedOID(), xChartDoc, m_xChartView.get() );
awt::KeyEvent aKeyEvent( ::svt::AcceleratorExecute::st_VCLKey2AWTKey( aKeyCode ));
bReturn = aObjNav.handleKeyEvent( aKeyEvent );
if( bReturn )
@@ -1427,7 +1416,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
nCode == KEY_DOWN )
{
bDrag = true;
- OUString aParameter( ObjectIdentifier::getDragParameterString( m_aSelection.getSelectedCID() ));
+ std::u16string_view aParameter( ObjectIdentifier::getDragParameterString( m_aSelection.getSelectedCID() ));
sal_Int32 nOffsetPercentDummy( 0 );
awt::Point aMinimumPosition( 0, 0 );
awt::Point aMaximumPosition( 0, 0 );
@@ -1532,7 +1521,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
else
bReturn = PositionAndSizeHelper::moveObject(
m_aSelection.getSelectedCID(), getChartModel(),
- awt::Rectangle(aRect.Left() + fShiftAmountX, aRect.Top() + fShiftAmountY, aRect.getWidth(), aRect.getHeight()),
+ awt::Rectangle(aRect.Left() + fShiftAmountX, aRect.Top() + fShiftAmountY, aRect.getOpenWidth(), aRect.getOpenHeight()),
awt::Rectangle(aRect.Left(), aRect.Top(), 0, 0),
awt::Rectangle(0, 0, aPageSize.Width, aPageSize.Height));
}
@@ -1572,10 +1561,10 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
// dumping the shape
if( !bReturn && bCtrl && nCode == KEY_F12)
{
- uno::Reference< qa::XDumper > xChartModel( getModel(), uno::UNO_QUERY );
+ rtl::Reference< ChartModel > xChartModel = getChartModel();
if(xChartModel.is())
{
- OUString aDump = xChartModel->dump();
+ OUString aDump = xChartModel->dump("shapes");
SAL_WARN("chart2", aDump);
}
}
@@ -1613,10 +1602,10 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
bReturn = executeDispatch_Delete();
if( ! bReturn )
{
- std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pChartWindow->GetFrameWeld(),
+ std::shared_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pChartWindow->GetFrameWeld(),
VclMessageType::Info, VclButtonsType::Ok,
SchResId(STR_ACTION_NOTPOSSIBLE)));
- xInfoBox->run();
+ xInfoBox->runAsync(xInfoBox, [] (int) {});
}
}
@@ -1650,10 +1639,8 @@ bool ChartController::requestQuickHelp(
rOutQuickHelpText = ObjectNameProvider::getHelpText( aCID, xChartModel, bIsBalloonHelp /* bVerbose */ );
// set rectangle
- ExplicitValueProvider * pValueProvider(
- comphelper::getFromUnoTunnel<ExplicitValueProvider>( m_xChartView ));
- if( pValueProvider )
- rOutEqualRect = pValueProvider->getRectangleOfObject( aCID, true );
+ if( m_xChartView )
+ rOutEqualRect = m_xChartView->getRectangleOfObject( aCID, true );
}
return bResult;
@@ -1738,7 +1725,8 @@ void SAL_CALL ChartController::addSelectionChangeListener( const uno::Reference<
return; //behave passive if already disposed or suspended
//--add listener
- m_aLifeTimeManager.m_aListenerContainer.addInterface( cppu::UnoType<view::XSelectionChangeListener>::get(), xListener );
+ std::unique_lock aGuard2(m_aLifeTimeManager.m_aAccessMutex);
+ m_aLifeTimeManager.m_aSelectionChangeListeners.addInterface( aGuard2, xListener );
}
void SAL_CALL ChartController::removeSelectionChangeListener( const uno::Reference<view::XSelectionChangeListener> & xListener )
@@ -1748,22 +1736,18 @@ void SAL_CALL ChartController::removeSelectionChangeListener( const uno::Referen
return; //behave passive if already disposed or suspended
//--remove listener
- m_aLifeTimeManager.m_aListenerContainer.removeInterface( cppu::UnoType<view::XSelectionChangeListener>::get(), xListener );
+ std::unique_lock aGuard2(m_aLifeTimeManager.m_aAccessMutex);
+ m_aLifeTimeManager.m_aSelectionChangeListeners.removeInterface( aGuard2, xListener );
}
void ChartController::impl_notifySelectionChangeListeners()
{
- ::comphelper::OInterfaceContainerHelper2* pIC = m_aLifeTimeManager.m_aListenerContainer
- .getContainer( cppu::UnoType<view::XSelectionChangeListener>::get() );
- if( pIC )
+ std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex);
+ if( m_aLifeTimeManager.m_aSelectionChangeListeners.getLength(aGuard) )
{
uno::Reference< view::XSelectionSupplier > xSelectionSupplier(this);
lang::EventObject aEvent( xSelectionSupplier );
- ::comphelper::OInterfaceIteratorHelper2 aIt( *pIC );
- while( aIt.hasMoreElements() )
- {
- static_cast< view::XSelectionChangeListener* >( aIt.next() )->selectionChanged( aEvent );
- }
+ m_aLifeTimeManager.m_aSelectionChangeListeners.notifyEach(aGuard, &view::XSelectionChangeListener::selectionChanged, aEvent);
}
}
@@ -1805,8 +1789,7 @@ bool ChartController::impl_moveOrResizeObject(
if( ( bDeterminePos || bDetermineSize ) &&
( aRefSize.Width > 0 && aRefSize.Height > 0 ) )
{
- ExplicitValueProvider * pValueProvider(
- comphelper::getFromUnoTunnel<ExplicitValueProvider>( m_xChartView ));
+ ExplicitValueProvider * pValueProvider( m_xChartView.get() );
if( pValueProvider )
{
awt::Rectangle aRect( pValueProvider->getRectangleOfObject( rCID ));
@@ -1863,15 +1846,15 @@ bool ChartController::impl_moveOrResizeObject(
return bResult;
}
-bool ChartController::impl_DragDataPoint( const OUString & rCID, double fAdditionalOffset )
+bool ChartController::impl_DragDataPoint( std::u16string_view rCID, double fAdditionalOffset )
{
bool bResult = false;
if( fAdditionalOffset < -1.0 || fAdditionalOffset > 1.0 || fAdditionalOffset == 0.0 )
return bResult;
sal_Int32 nDataPointIndex = ObjectIdentifier::getIndexFromParticleOrCID( rCID );
- uno::Reference< chart2::XDataSeries > xSeries(
- ObjectIdentifier::getDataSeriesForCID( rCID, getChartModel() ));
+ rtl::Reference< DataSeries > xSeries =
+ ObjectIdentifier::getDataSeriesForCID( rCID, getChartModel() );
if( xSeries.is())
{
try
@@ -2073,12 +2056,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
pChartWindow->SetPointer( PointerStyle::Arrow );
}
-css::uno::Reference<css::uno::XInterface> const & ChartController::getChartView() const
-{
- return m_xChartView;
-}
-
-void ChartController::sendPopupRequest(OUString const & rCID, tools::Rectangle aRectangle)
+void ChartController::sendPopupRequest(std::u16string_view rCID, tools::Rectangle aRectangle)
{
ChartModel* pChartModel = m_aModel->getModel().get();
if (!pChartModel)
@@ -2097,11 +2075,11 @@ void ChartController::sendPopupRequest(OUString const & rCID, tools::Rectangle a
return;
// Get dimension index from CID
- sal_Int32 nStartPos = rCID.lastIndexOf('.');
+ size_t nStartPos = rCID.rfind('.');
nStartPos++;
- sal_Int32 nEndPos = rCID.getLength();
- OUString sDimensionIndex = rCID.copy(nStartPos, nEndPos - nStartPos);
- sal_Int32 nDimensionIndex = sDimensionIndex.toInt32();
+ sal_Int32 nEndPos = rCID.size();
+ std::u16string_view sDimensionIndex = rCID.substr(nStartPos, nEndPos - nStartPos);
+ sal_Int32 nDimensionIndex = o3tl::toInt32(sDimensionIndex);
awt::Rectangle xRectangle {
sal_Int32(aRectangle.Left()),
@@ -2112,12 +2090,12 @@ void ChartController::sendPopupRequest(OUString const & rCID, tools::Rectangle a
uno::Sequence<beans::PropertyValue> aCallbackData = comphelper::InitPropertySequence(
{
- {"Rectangle", uno::makeAny<awt::Rectangle>(xRectangle)},
- {"DimensionIndex", uno::makeAny<sal_Int32>(nDimensionIndex)},
- {"PivotTableName", uno::makeAny<OUString>(sPivotTableName)},
+ {"Rectangle", uno::Any(xRectangle)},
+ {"DimensionIndex", uno::Any(sal_Int32(nDimensionIndex))},
+ {"PivotTableName", uno::Any(sPivotTableName)},
});
- pPopupRequest->getCallback()->notify(uno::makeAny(aCallbackData));
+ pPopupRequest->getCallback()->notify(uno::Any(aCallbackData));
}
} //namespace chart
diff --git a/chart2/source/controller/main/ChartDropTargetHelper.cxx b/chart2/source/controller/main/ChartDropTargetHelper.cxx
index ceb599569e16..fc6762598a68 100644
--- a/chart2/source/controller/main/ChartDropTargetHelper.cxx
+++ b/chart2/source/controller/main/ChartDropTargetHelper.cxx
@@ -18,14 +18,15 @@
*/
#include "ChartDropTargetHelper.hxx"
+#include <DataSource.hxx>
#include <DataSourceHelper.hxx>
#include <ChartModel.hxx>
+#include <Diagram.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
-#include <com/sun/star/container/XChild.hpp>
#include <sot/formats.hxx>
+#include <utility>
#include <vector>
using namespace ::com::sun::star;
@@ -61,9 +62,9 @@ namespace chart
ChartDropTargetHelper::ChartDropTargetHelper(
const Reference< datatransfer::dnd::XDropTarget >& rxDropTarget,
- const rtl::Reference<::chart::ChartModel> & xChartDocument ) :
+ rtl::Reference<::chart::ChartModel> xChartDocument ) :
DropTargetHelper( rxDropTarget ),
- m_xChartDocument( xChartDocument )
+ m_xChartDocument(std::move( xChartDocument ))
{}
ChartDropTargetHelper::~ChartDropTargetHelper()
@@ -119,15 +120,15 @@ sal_Int8 ChartDropTargetHelper::ExecuteDrop( const ExecuteDropEvent& rEvt )
// @todo: get the title somehow and compare it to
// aDocName if successful (the document is the
// parent)
- Reference< chart2::XDiagram > xDiagram( m_xChartDocument->getFirstDiagram() );
+ rtl::Reference< Diagram > xDiagram = m_xChartDocument->getFirstChartDiagram();
Reference< chart2::data::XDataProvider > xDataProvider( m_xChartDocument->getDataProvider());
if( xDataProvider.is() && xDiagram.is() &&
DataSourceHelper::allArgumentsForRectRangeDetected( m_xChartDocument ))
{
- Reference< chart2::data::XDataSource > xDataSource(
- DataSourceHelper::pressUsedDataIntoRectangularFormat( m_xChartDocument ));
+ rtl::Reference< DataSource > xDataSource1 =
+ DataSourceHelper::pressUsedDataIntoRectangularFormat( m_xChartDocument );
Sequence< beans::PropertyValue > aArguments(
- xDataProvider->detectArguments( xDataSource ));
+ xDataProvider->detectArguments( xDataSource1 ));
OUString aOldRange;
beans::PropertyValue * pCellRange = nullptr;
@@ -155,8 +156,9 @@ sal_Int8 ChartDropTargetHelper::ExecuteDrop( const ExecuteDropEvent& rEvt )
pCellRange->Value <<= aRangeString;
}
- xDataSource.set( xDataProvider->createDataSource( aArguments ));
- xDiagram->setDiagramData( xDataSource, aArguments );
+ Reference< chart2::data::XDataSource > xDataSource2 =
+ xDataProvider->createDataSource( aArguments );
+ xDiagram->setDiagramData( xDataSource2, aArguments );
// always return copy state to avoid deletion of the dragged range
nResult = DND_ACTION_COPY;
diff --git a/chart2/source/controller/main/ChartDropTargetHelper.hxx b/chart2/source/controller/main/ChartDropTargetHelper.hxx
index 4955d6eaea43..ab573f1cd694 100644
--- a/chart2/source/controller/main/ChartDropTargetHelper.hxx
+++ b/chart2/source/controller/main/ChartDropTargetHelper.hxx
@@ -37,7 +37,7 @@ public:
ChartDropTargetHelper() = delete;
explicit ChartDropTargetHelper(
const css::uno::Reference< css::datatransfer::dnd::XDropTarget >& rxDropTarget,
- const rtl::Reference<::chart::ChartModel> & xChartDocument );
+ rtl::Reference<::chart::ChartModel> xChartDocument );
virtual ~ChartDropTargetHelper() override;
protected:
diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx
index 991c6a87e00f..2ff45588002b 100644
--- a/chart2/source/controller/main/ChartFrameloader.cxx
+++ b/chart2/source/controller/main/ChartFrameloader.cxx
@@ -20,11 +20,14 @@
#include "ChartFrameloader.hxx"
#include <servicenames.hxx>
#include <MediaDescriptorHelper.hxx>
+#include <ChartController.hxx>
+#include <ChartModel.hxx>
+#include <unotools/fcm.hxx>
#include <unotools/mediadescriptor.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
@@ -93,44 +96,22 @@ sal_Bool SAL_CALL ChartFrameLoader::load( const uno::Sequence< beans::PropertyVa
if( ! xModel.is())
{
//@todo?? load mechanism to cancel during loading of document
- xModel.set(
- m_xCC->getServiceManager()->createInstanceWithContext(
- CHART_MODEL_SERVICE_IMPLEMENTATION_NAME, m_xCC )
- , uno::UNO_QUERY );
+ xModel = new ChartModel(m_xCC);
if( impl_checkCancel() )
return false;
}
//create the controller(+XWindow)
- uno::Reference< frame::XController > xController;
- uno::Reference< awt::XWindow > xComponentWindow;
- {
- xController.set(
- m_xCC->getServiceManager()->createInstanceWithContext(
- CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME,m_xCC )
- , uno::UNO_QUERY );
-
- //!!!it is a special characteristic of the example application
- //that the controller simultaneously provides the XWindow controller functionality
- xComponentWindow =
- uno::Reference< awt::XWindow >( xController, uno::UNO_QUERY );
+ rtl::Reference< ChartController > xController = new ChartController(m_xCC);
- if( impl_checkCancel() )
- return false;
- }
+ if( impl_checkCancel() )
+ return false;
//connect frame, controller and model one to each other:
- if(xController.is()&&xModel.is())
+ if(xModel.is())
{
- xModel->connectController(xController);
- xModel->setCurrentController(xController);
- xController->attachModel(xModel);
- if(xFrame.is())
- xFrame->setComponent(xComponentWindow,xController);
- //creates the view and menu
- //for correct menu creation the initialized component must be already set into the frame
- xController->attachFrame(xFrame);
+ utl::ConnectFrameControllerModel(xFrame, xController, xModel);
}
// call initNew() or load() at XLoadable
@@ -167,8 +148,9 @@ sal_Bool SAL_CALL ChartFrameLoader::load( const uno::Sequence< beans::PropertyVa
xLoadable->load( aCompleteMediaDescriptor );
//resize standalone files to get correct size:
- if( xComponentWindow.is() && aMDHelper.ISSET_FilterName && aMDHelper.FilterName == "StarChart 5.0" )
+ if( aMDHelper.ISSET_FilterName && aMDHelper.FilterName == "StarChart 5.0" )
{
+ uno::Reference<awt::XWindow> xComponentWindow = xController->getComponentWindow();
awt::Rectangle aRect( xComponentWindow->getPosSize() );
xComponentWindow->setPosSize( aRect.X, aRect.Y, aRect.Width, aRect.Height, 0 );
}
diff --git a/chart2/source/controller/main/ChartModelClone.cxx b/chart2/source/controller/main/ChartModelClone.cxx
index dfb089d566e8..b1228cd383a3 100644
--- a/chart2/source/controller/main/ChartModelClone.cxx
+++ b/chart2/source/controller/main/ChartModelClone.cxx
@@ -21,6 +21,7 @@
#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
#include <ControllerLockGuard.hxx>
+#include <DataSource.hxx>
#include <DataSourceHelper.hxx>
#include <com/sun/star/chart2/XAnyDescriptionAccess.hpp>
@@ -28,14 +29,10 @@
#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/chart2/XTitled.hpp>
-#include <com/sun/star/util/XModifiable.hpp>
-#include <com/sun/star/chart2/data/XDataSource.hpp>
#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
#include <comphelper/property.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
@@ -51,10 +48,6 @@ namespace chart
using ::com::sun::star::chart2::XInternalDataProvider;
using ::com::sun::star::chart2::XAnyDescriptionAccess;
using ::com::sun::star::view::XSelectionSupplier;
- using ::com::sun::star::lang::XComponent;
- using ::com::sun::star::chart2::XTitled;
- using ::com::sun::star::util::XModifiable;
- using ::com::sun::star::chart2::data::XDataSource;
using ::com::sun::star::chart2::data::XLabeledDataSequence;
// = helper
@@ -201,7 +194,7 @@ namespace chart
if ( i_model->hasInternalDataProvider() )
{
Reference< XInternalDataProvider > xNewDataProvider( i_model->getDataProvider(), UNO_QUERY );
- Reference< XDataSource > xUsedData( DataSourceHelper::getUsedData( *i_model ) );
+ rtl::Reference< DataSource > xUsedData = DataSourceHelper::getUsedData( *i_model );
if ( xUsedData.is() && xNewDataProvider.is() )
{
const Sequence< Reference< XLabeledDataSequence > > aData( xUsedData->getDataSequences() );
diff --git a/chart2/source/controller/main/ChartTransferable.cxx b/chart2/source/controller/main/ChartTransferable.cxx
index 322e73be3aa8..7c8eb12041f6 100644
--- a/chart2/source/controller/main/ChartTransferable.cxx
+++ b/chart2/source/controller/main/ChartTransferable.cxx
@@ -49,20 +49,19 @@ ChartTransferable::ChartTransferable(
SdrModel& rSdrModel,
SdrObject* pSelectedObj,
bool bDrawing)
-: m_pMarkedObjModel( nullptr )
- ,m_bDrawing( bDrawing )
+ : m_bDrawing(bDrawing)
{
- std::unique_ptr<SdrExchangeView> pExchgView(std::make_unique<SdrView>( rSdrModel ));
- SdrPageView* pPv = pExchgView->ShowSdrPage( rSdrModel.GetPage( 0 ));
+ SdrView aExchgView( rSdrModel );
+ SdrPageView* pPv = aExchgView.ShowSdrPage( rSdrModel.GetPage( 0 ));
if( pSelectedObj )
- pExchgView->MarkObj( pSelectedObj, pPv );
+ aExchgView.MarkObj( pSelectedObj, pPv );
else
- pExchgView->MarkAllObj( pPv );
- Graphic aGraphic( pExchgView->GetMarkedObjMetaFile(true));
+ aExchgView.MarkAllObj( pPv );
+ Graphic aGraphic( aExchgView.GetMarkedObjMetaFile(true));
m_xMetaFileGraphic.set( aGraphic.GetXGraphic());
if ( m_bDrawing )
{
- m_pMarkedObjModel = pExchgView->CreateMarkedObjModel().release();
+ m_xMarkedObjModel = aExchgView.CreateMarkedObjModel();
}
}
@@ -89,7 +88,7 @@ bool ChartTransferable::GetData( const css::datatransfer::DataFlavor& rFlavor, c
{
if ( nFormat == SotClipboardFormatId::DRAWING )
{
- bResult = SetObject( m_pMarkedObjModel, CHARTTRANSFER_OBJECTTYPE_DRAWMODEL, rFlavor );
+ bResult = SetObject(m_xMarkedObjModel.get(), CHARTTRANSFER_OBJECTTYPE_DRAWMODEL, rFlavor);
}
else if ( nFormat == SotClipboardFormatId::GDIMETAFILE )
{
@@ -106,7 +105,7 @@ bool ChartTransferable::GetData( const css::datatransfer::DataFlavor& rFlavor, c
return bResult;
}
-bool ChartTransferable::WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId,
+bool ChartTransferable::WriteObject( SvStream& rOStm, void* pUserObject, sal_uInt32 nUserObjectId,
const datatransfer::DataFlavor& /* rFlavor */ )
{
// called from SetObject, put data into stream
@@ -119,12 +118,12 @@ bool ChartTransferable::WriteObject( tools::SvRef<SotTempStream>& rxOStm, void*
SdrModel* pMarkedObjModel = static_cast< SdrModel* >( pUserObject );
if ( pMarkedObjModel )
{
- rxOStm->SetBufferSize( 0xff00 );
+ rOStm.SetBufferSize( 0xff00 );
// for the changed pool defaults from drawing layer pool set those
// attributes as hard attributes to preserve them for saving
const SfxItemPool& rItemPool = pMarkedObjModel->GetItemPool();
- const SvxFontHeightItem& rDefaultFontHeight = rItemPool.GetDefaultItem( EE_CHAR_FONTHEIGHT );
+ const SvxFontHeightItem& rDefaultFontHeight = rItemPool.GetUserOrPoolDefaultItem( EE_CHAR_FONTHEIGHT );
sal_uInt16 nCount = pMarkedObjModel->GetPageCount();
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
@@ -141,10 +140,10 @@ bool ChartTransferable::WriteObject( tools::SvRef<SotTempStream>& rxOStm, void*
}
}
- Reference< io::XOutputStream > xDocOut( new utl::OOutputStreamWrapper( *rxOStm ) );
+ Reference< io::XOutputStream > xDocOut( new utl::OOutputStreamWrapper( rOStm ) );
SvxDrawingLayerExport( pMarkedObjModel, xDocOut );
- bRet = ( rxOStm->GetError() == ERRCODE_NONE );
+ bRet = ( rOStm.GetError() == ERRCODE_NONE );
}
}
break;
diff --git a/chart2/source/controller/main/ChartTransferable.hxx b/chart2/source/controller/main/ChartTransferable.hxx
index 34567dceb6a9..486fdb48c5a9 100644
--- a/chart2/source/controller/main/ChartTransferable.hxx
+++ b/chart2/source/controller/main/ChartTransferable.hxx
@@ -46,12 +46,12 @@ protected:
// implementation of TransferableHelper methods
virtual void AddSupportedFormats() override;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
- virtual bool WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId,
+ virtual bool WriteObject( SvStream& rOStm, void* pUserObject, sal_uInt32 nUserObjectId,
const css::datatransfer::DataFlavor& rFlavor ) override;
private:
css::uno::Reference< css::graphic::XGraphic > m_xMetaFileGraphic;
- SdrModel* m_pMarkedObjModel;
+ std::unique_ptr<SdrModel> m_xMarkedObjModel;
bool m_bDrawing;
};
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index b3d2c8db4df6..60ab7eb0ed2d 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -209,7 +209,6 @@ void ChartWindow::RequestHelp( const HelpEvent& rHEvt )
if( ( rHEvt.GetMode() & HelpEventMode::QUICK ) &&
m_pWindowController )
{
-// Point aLogicHitPos = PixelToLogic( rHEvt.GetMousePosPixel()); // old chart: GetPointerPosPixel()
Point aLogicHitPos = PixelToLogic( GetPointerPosPixel());
OUString aQuickHelpText;
awt::Rectangle aHelpRect;
@@ -218,12 +217,14 @@ void ChartWindow::RequestHelp( const HelpEvent& rHEvt )
if( bHelpHandled )
{
+ tools::Rectangle aPixelRect(LogicToPixel(lcl_AWTRectToVCLRect(aHelpRect)));
+ tools::Rectangle aScreenRect(OutputToScreenPixel(aPixelRect.TopLeft()),
+ OutputToScreenPixel(aPixelRect.BottomRight()));
+
if( bIsBalloonHelp )
- Help::ShowBalloon(
- this, rHEvt.GetMousePosPixel(), lcl_AWTRectToVCLRect( aHelpRect ), aQuickHelpText );
+ Help::ShowBalloon(this, rHEvt.GetMousePosPixel(), aScreenRect, aQuickHelpText);
else
- Help::ShowQuickHelp(
- this, lcl_AWTRectToVCLRect( aHelpRect ), aQuickHelpText );
+ Help::ShowQuickHelp(this, aScreenRect, aQuickHelpText);
}
}
@@ -231,21 +232,6 @@ void ChartWindow::RequestHelp( const HelpEvent& rHEvt )
vcl::Window::RequestHelp( rHEvt );
}
-void ChartWindow::LogicMouseButtonDown(const MouseEvent& rEvent)
-{
- MouseButtonDown(rEvent);
-}
-
-void ChartWindow::LogicMouseButtonUp(const MouseEvent& rEvent)
-{
- MouseButtonUp(rEvent);
-}
-
-void ChartWindow::LogicMouseMove(const MouseEvent& rEvent)
-{
- MouseMove(rEvent);
-}
-
void ChartWindow::adjustHighContrastMode()
{
static const DrawModeFlags nContrastMode =
@@ -260,23 +246,11 @@ void ChartWindow::ForceInvalidate()
{
vcl::Window::Invalidate();
}
-void ChartWindow::Invalidate( InvalidateFlags nFlags )
-{
- if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts"
- return;
- vcl::Window::Invalidate( nFlags );
-}
-void ChartWindow::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags )
-{
- if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts"
- return;
- vcl::Window::Invalidate( rRect, nFlags );
-}
-void ChartWindow::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
+void ChartWindow::ImplInvalidate( const vcl::Region* rRegion, InvalidateFlags nFlags )
{
if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts"
return;
- vcl::Window::Invalidate( rRegion, nFlags );
+ vcl::Window::ImplInvalidate( rRegion, nFlags );
}
void ChartWindow::LogicInvalidate(const tools::Rectangle* pRectangle)
diff --git a/chart2/source/controller/main/CommandDispatch.cxx b/chart2/source/controller/main/CommandDispatch.cxx
index 9a16fbb73b8b..2cb25f68d5bf 100644
--- a/chart2/source/controller/main/CommandDispatch.cxx
+++ b/chart2/source/controller/main/CommandDispatch.cxx
@@ -19,7 +19,6 @@
#include "CommandDispatch.hxx"
#include <com/sun/star/util/URLTransformer.hpp>
-#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
@@ -31,7 +30,6 @@ namespace chart
CommandDispatch::CommandDispatch(
const Reference< uno::XComponentContext > & xContext ) :
- impl::CommandDispatch_Base( m_aMutex ),
m_xContext( xContext )
{
}
@@ -44,17 +42,11 @@ void CommandDispatch::initialize()
// ____ WeakComponentImplHelperBase ____
/// is called when this is disposed
-void SAL_CALL CommandDispatch::disposing()
+void CommandDispatch::disposing(std::unique_lock<std::mutex>& rGuard)
{
Reference< uno::XInterface > xEventSource(static_cast< cppu::OWeakObject* >( this ));
for( auto& rElement : m_aListeners )
- {
- if( rElement.second )
- {
- rElement.second->disposeAndClear( xEventSource );
- rElement.second.reset();
- }
- }
+ rElement.second.disposeAndClear( rGuard, xEventSource );
m_aListeners.clear();
}
@@ -64,24 +56,29 @@ void SAL_CALL CommandDispatch::dispatch( const util::URL& /* URL */, const Seque
void SAL_CALL CommandDispatch::addStatusListener( const Reference< frame::XStatusListener >& Control, const util::URL& URL )
{
- tListenerMap::iterator aIt( m_aListeners.find( URL.Complete ));
- if( aIt == m_aListeners.end())
{
- aIt = m_aListeners.insert(
- m_aListeners.begin(),
- tListenerMap::value_type( URL.Complete, new ::comphelper::OInterfaceContainerHelper3<css::frame::XStatusListener>( m_aMutex )));
- }
- OSL_ASSERT( aIt != m_aListeners.end());
+ std::unique_lock g(m_aMutex);
+ tListenerMap::iterator aIt( m_aListeners.find( URL.Complete ));
+ if( aIt == m_aListeners.end())
+ {
+ aIt = m_aListeners.emplace(
+ std::piecewise_construct,
+ std::forward_as_tuple(URL.Complete),
+ std::forward_as_tuple()).first;
+ }
+ assert( aIt != m_aListeners.end());
- aIt->second->addInterface( Control );
+ aIt->second.addInterface( g, Control );
+ }
fireStatusEvent( URL.Complete, Control );
}
void SAL_CALL CommandDispatch::removeStatusListener( const Reference< frame::XStatusListener >& Control, const util::URL& URL )
{
+ std::unique_lock g(m_aMutex);
tListenerMap::iterator aIt( m_aListeners.find( URL.Complete ));
if( aIt != m_aListeners.end())
- (*aIt).second->removeInterface( Control );
+ (*aIt).second.removeInterface( g, Control );
}
// ____ XModifyListener ____
@@ -132,22 +129,8 @@ void CommandDispatch::fireStatusEventForURL(
tListenerMap::iterator aIt( m_aListeners.find( aURL.Complete ));
if( aIt != m_aListeners.end())
{
- if( aIt->second )
- {
- ::comphelper::OInterfaceIteratorHelper3 aIntfIt( *((*aIt).second) );
-
- while( aIntfIt.hasMoreElements())
- {
- try
- {
- aIntfIt.next()->statusChanged( aEventToSend );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
- }
- }
+ std::unique_lock g(m_aMutex);
+ aIt->second.notifyEach(g, &css::frame::XStatusListener::statusChanged, aEventToSend);
}
}
}
diff --git a/chart2/source/controller/main/CommandDispatch.hxx b/chart2/source/controller/main/CommandDispatch.hxx
index 16e0b5ab72bc..feb1c2183af5 100644
--- a/chart2/source/controller/main/CommandDispatch.hxx
+++ b/chart2/source/controller/main/CommandDispatch.hxx
@@ -18,14 +18,12 @@
*/
#pragma once
-#include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/compbase.hxx>
-#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/compbase.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
#include <map>
-#include <memory>
namespace com::sun::star::uno { class XComponentContext; }
namespace com::sun::star::util { class XURLTransformer; }
@@ -35,7 +33,7 @@ namespace chart
namespace impl
{
-typedef ::cppu::WeakComponentImplHelper<
+typedef ::comphelper::WeakComponentImplHelper<
css::frame::XDispatch,
css::util::XModifyListener >
CommandDispatch_Base;
@@ -43,9 +41,7 @@ typedef ::cppu::WeakComponentImplHelper<
/** This is the base class for an XDispatch.
*/
-class CommandDispatch :
- public cppu::BaseMutex,
- public impl::CommandDispatch_Base
+class CommandDispatch : public impl::CommandDispatch_Base
{
public:
explicit CommandDispatch( const css::uno::Reference< css::uno::XComponentContext > & xContext );
@@ -107,7 +103,7 @@ protected:
// ____ WeakComponentImplHelperBase ____
/// is called when this is disposed
- virtual void SAL_CALL disposing() override;
+ virtual void disposing(std::unique_lock<std::mutex>& rGuard) override;
// ____ XModifyListener ____
virtual void SAL_CALL modified(
@@ -121,7 +117,7 @@ private:
css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer;
- typedef std::map< OUString, std::unique_ptr<::comphelper::OInterfaceContainerHelper3<css::frame::XStatusListener>> >
+ typedef std::map< OUString, ::comphelper::OInterfaceContainerHelper4<css::frame::XStatusListener> >
tListenerMap;
tListenerMap m_aListeners;
diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx
index 05eea58de66d..c16a0e45be37 100644
--- a/chart2/source/controller/main/CommandDispatchContainer.cxx
+++ b/chart2/source/controller/main/CommandDispatchContainer.cxx
@@ -26,8 +26,8 @@
#include <ChartModel.hxx>
#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <osl/diagnose.h>
#include <rtl/ref.hxx>
#include <o3tl/sorted_vector.hxx>
diff --git a/chart2/source/controller/main/ConfigurationAccess.cxx b/chart2/source/controller/main/ConfigurationAccess.cxx
deleted file mode 100644
index f6dfecc60113..000000000000
--- a/chart2/source/controller/main/ConfigurationAccess.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- 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 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 .
- */
-
-#include <ConfigurationAccess.hxx>
-
-#include <unotools/syslocale.hxx>
-#include <unotools/configitem.hxx>
-#include <unotools/localedatawrapper.hxx>
-
-namespace chart
-{
-using namespace ::com::sun::star;
-
-namespace
-{
-bool lcl_IsMetric()
-{
- SvtSysLocale aSysLocale;
- MeasurementSystem eSys = aSysLocale.GetLocaleData().getMeasurementSystemEnum();
-
- return ( eSys == MeasurementSystem::Metric );
-}
-
-class CalcConfigItem : public ::utl::ConfigItem
-{
-private:
- virtual void ImplCommit() override;
-
-public:
- CalcConfigItem();
-
- FieldUnit getFieldUnit();
- virtual void Notify( const uno::Sequence<OUString>& aPropertyNames) override;
-};
-
-}//end anonymous namespace
-
-CalcConfigItem::CalcConfigItem()
- : ConfigItem( "Office.Calc/Layout" )
-{
-}
-
-void CalcConfigItem::ImplCommit() {}
-void CalcConfigItem::Notify( const uno::Sequence<OUString>& ) {}
-
-FieldUnit CalcConfigItem::getFieldUnit()
-{
- FieldUnit eResult( FieldUnit::CM );
-
- uno::Sequence< OUString > aNames;
- if( lcl_IsMetric() )
- aNames = { "Other/MeasureUnit/Metric" };
- else
- aNames = { "Other/MeasureUnit/NonMetric" };
-
- uno::Sequence< uno::Any > aResult( GetProperties( aNames ));
- sal_Int32 nValue = 0;
- if( aResult[ 0 ] >>= nValue )
- eResult = static_cast< FieldUnit >( nValue );
-
- return eResult;
-}
-
-namespace ConfigurationAccess
-{
- FieldUnit getFieldUnit()
- {
- //a CalcConfigItem Singleton
- static CalcConfigItem SINGLETON;
- FieldUnit aUnit( SINGLETON.getFieldUnit() );
- return aUnit;
- }
-} //namespace ConfigurationAccess
-
-} //namespace chart
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 9da88ea5d6c7..8d7bc490e569 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -18,17 +18,18 @@
*/
#include "ControllerCommandDispatch.hxx"
-#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <TitleHelper.hxx>
#include <LegendHelper.hxx>
#include <ObjectIdentifier.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <ChartController.hxx>
#include <RegressionCurveHelper.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <StatisticsHelper.hxx>
#include <ReferenceSizeProvider.hxx>
@@ -36,16 +37,12 @@
#include <vcl/svapp.hxx>
#include <sal/log.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <comphelper/lok.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/objsh.hxx>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
-#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XRegressionCurve.hpp>
-#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart2/XDataProviderAccess.hpp>
// only needed until #i68864# is fixed
@@ -194,24 +191,22 @@ void ControllerState::update(
bIsPositionableObject = (aObjectType != OBJECTTYPE_DATA_POINT) && aSelOID.isDragableObject();
bIsTextObject = aObjectType == OBJECTTYPE_TITLE;
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xModel );
+ rtl::Reference< Diagram > xDiagram = xModel->getFirstChartDiagram();
bIsFormateableObjectSelected = bHasSelectedObject && aSelOID.isAutoGeneratedObject();
if( aObjectType==OBJECTTYPE_DIAGRAM || aObjectType==OBJECTTYPE_DIAGRAM_WALL || aObjectType==OBJECTTYPE_DIAGRAM_FLOOR )
- bIsFormateableObjectSelected = DiagramHelper::isSupportingFloorAndWall( xDiagram );
+ bIsFormateableObjectSelected = xDiagram->isSupportingFloorAndWall();
- uno::Reference< chart2::XDataSeries > xGivenDataSeries(
+ rtl::Reference< DataSeries > xGivenDataSeries =
ObjectIdentifier::getDataSeriesForCID(
- aSelObjCID, xModel ) );
+ aSelObjCID, xModel );
bIsDeleteableObjectSelected = ChartController::isObjectDeleteable( aSelObj );
- bMayMoveSeriesForward = (aObjectType!=OBJECTTYPE_DATA_POINT) && DiagramHelper::isSeriesMoveable(
- ChartModelHelper::findDiagram( xModel ),
+ bMayMoveSeriesForward = (aObjectType!=OBJECTTYPE_DATA_POINT) && xDiagram && xDiagram->isSeriesMoveable(
xGivenDataSeries,
MOVE_SERIES_FORWARD );
- bMayMoveSeriesBackward = (aObjectType!=OBJECTTYPE_DATA_POINT) && DiagramHelper::isSeriesMoveable(
- ChartModelHelper::findDiagram( xModel ),
+ bMayMoveSeriesBackward = (aObjectType!=OBJECTTYPE_DATA_POINT) && xDiagram && xDiagram->isSeriesMoveable(
xGivenDataSeries,
MOVE_SERIES_BACKWARD );
@@ -239,24 +234,20 @@ void ControllerState::update(
if( xGivenDataSeries.is())
{
bMayAddMenuTrendline = true;
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
- uno::Reference< chart2::XChartType > xFirstChartType(
+ sal_Int32 nDimensionCount = xDiagram->getDimension();
+ rtl::Reference< ::chart::ChartType > xFirstChartType(
DataSeriesHelper::getChartTypeOfSeries( xGivenDataSeries, xDiagram ));
// trend lines/mean value line
if( (aObjectType == OBJECTTYPE_DATA_SERIES || aObjectType == OBJECTTYPE_DATA_POINT)
&& ChartTypeHelper::isSupportingRegressionProperties( xFirstChartType, nDimensionCount ))
{
- uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt( xGivenDataSeries, uno::UNO_QUERY );
- if( xRegCurveCnt.is())
- {
- // Trendline
- bMayAddTrendline = true;
+ // Trendline
+ bMayAddTrendline = true;
- // Mean Value
- bMayFormatMeanValue = bMayDeleteMeanValue = RegressionCurveHelper::hasMeanValueLine( xRegCurveCnt );
- bMayAddMeanValue = ! bMayDeleteMeanValue;
- }
+ // Mean Value
+ bMayFormatMeanValue = bMayDeleteMeanValue = RegressionCurveHelper::hasMeanValueLine( xGivenDataSeries );
+ bMayAddMeanValue = ! bMayDeleteMeanValue;
}
// error bars
@@ -290,23 +281,28 @@ void ControllerState::update(
// Trendline Equation
bMayFormatTrendlineEquation = bMayDeleteTrendlineEquation = RegressionCurveHelper::hasEquation( xRegCurve );
bMayAddTrendlineEquation = !bMayDeleteTrendlineEquation;
+ bMayAddR2Value = RegressionCurveHelper::MayHaveCorrelationCoefficient( xRegCurve ) && bMayAddTrendlineEquation;
}
else if( aObjectType == OBJECTTYPE_DATA_CURVE_EQUATION )
{
bMayFormatTrendlineEquation = true;
bool bHasR2Value = false;
+ bool bMayHaveR2 = true;
try
{
uno::Reference< beans::XPropertySet > xEquationProperties =
ObjectIdentifier::getObjectPropertySet( aSelObjCID, xModel );
if( xEquationProperties.is() )
+ {
xEquationProperties->getPropertyValue( "ShowCorrelationCoefficient" ) >>= bHasR2Value;
+ xEquationProperties->getPropertyValue( "MayHaveCorrelationCoefficient" ) >>= bMayHaveR2;
+ }
}
catch(const uno::RuntimeException&)
{
TOOLS_WARN_EXCEPTION("chart2", "" );
}
- bMayAddR2Value = !bHasR2Value;
+ bMayAddR2Value = !bHasR2Value && bMayHaveR2;
bMayDeleteR2Value = bHasR2Value;
}
}
@@ -365,6 +361,8 @@ struct ModelState
bool bSupportsStatistics;
bool bSupportsAxes;
+
+ bool bDataTable = false;
};
ModelState::ModelState() :
@@ -400,13 +398,17 @@ ModelState::ModelState() :
void ModelState::update( const rtl::Reference<::chart::ChartModel> & xModel )
{
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xModel );
+ rtl::Reference< Diagram > xDiagram = xModel->getFirstChartDiagram();
bIsReadOnly = xModel->isReadonly();
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
+ sal_Int32 nDimensionCount = 0;
+ if (xDiagram)
+ nDimensionCount = xDiagram->getDimension();
- uno::Reference< chart2::XChartType > xFirstChartType( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) );
+ rtl::Reference< ChartType > xFirstChartType;
+ if (xDiagram)
+ xFirstChartType = xDiagram->getChartTypeByIndex( 0 );
bSupportsStatistics = ChartTypeHelper::isSupportingStatisticProperties( xFirstChartType, nDimensionCount );
bSupportsAxes = ChartTypeHelper::isSupportingMainAxis( xFirstChartType, nDimensionCount, 0 );
@@ -443,8 +445,10 @@ void ModelState::update( const rtl::Reference<::chart::ChartModel> & xModel )
ReferenceSizeProvider::AUTO_RESIZE_YES);
bHasLegend = LegendHelper::hasLegend( xDiagram );
- bHasWall = DiagramHelper::isSupportingFloorAndWall( xDiagram );
+ bHasWall = xDiagram && xDiagram->isSupportingFloorAndWall();
bHasFloor = bHasWall && bIsThreeD;
+
+ bDataTable = xDiagram.is() && xDiagram->getDataTable().is();
}
bool ModelState::HasAnyAxis() const
@@ -527,6 +531,7 @@ void ControllerCommandDispatch::updateCommandAvailability()
// read-only
bool bIsWritable = bModelStateIsValid && (! m_apModelState->bIsReadOnly);
bool bShapeContext = m_xChartController.is() && m_xChartController->isShapeContext();
+ bool bIsTextEdit = m_xChartController.is() && m_xChartController->IsTextEdit();
bool bEnableDataTableDialog = false;
bool bCanCreateDataProvider = false;
@@ -546,12 +551,11 @@ void ControllerCommandDispatch::updateCommandAvailability()
}
}
- Reference< chart2::XChartDocument > xChartDoc(m_xChartController->getModel(), uno::UNO_QUERY);
- OSL_ENSURE(xChartDoc.is(), "Invalid XChartDocument");
- if ( xChartDoc.is() )
+ rtl::Reference< ChartModel > xChartModel = m_xChartController->getChartModel();
+ OSL_ENSURE(xChartModel.is(), "Invalid XChartDocument");
+ if ( xChartModel.is() )
{
- ChartModel& rModel = dynamic_cast<ChartModel&>(*xChartDoc);
- css::uno::Reference< com::sun::star::chart2::XDataProviderAccess > xCreatorDoc(rModel.getParent(), uno::UNO_QUERY);
+ css::uno::Reference< com::sun::star::chart2::XDataProviderAccess > xCreatorDoc(xChartModel->getParent(), uno::UNO_QUERY);
bCanCreateDataProvider = xCreatorDoc.is();
}
}
@@ -563,12 +567,12 @@ void ControllerCommandDispatch::updateCommandAvailability()
// toolbar commands
m_aCommandAvailability[ ".uno:ToggleGridHorizontal" ] = bIsWritable;
- m_aCommandArguments[ ".uno:ToggleGridHorizontal" ] <<= m_apModelState->bHasMainYGrid;
+ m_aCommandArguments[ ".uno:ToggleGridHorizontal" ] <<= bModelStateIsValid && m_apModelState->bHasMainYGrid;
m_aCommandAvailability[ ".uno:ToggleGridVertical" ] = bIsWritable;
- m_aCommandArguments[ ".uno:ToggleGridVertical" ] <<= m_apModelState->bHasMainXGrid;
+ m_aCommandArguments[ ".uno:ToggleGridVertical" ] <<= bModelStateIsValid && m_apModelState->bHasMainXGrid;
m_aCommandAvailability[ ".uno:ToggleLegend" ] = bIsWritable;
- m_aCommandArguments[ ".uno:ToggleLegend" ] <<= m_apModelState->bHasLegend;
+ m_aCommandArguments[ ".uno:ToggleLegend" ] <<= bModelStateIsValid && m_apModelState->bHasLegend;
m_aCommandAvailability[ ".uno:NewArrangement" ] = bIsWritable;
m_aCommandAvailability[ ".uno:Update" ] = bIsWritable;
@@ -585,17 +589,19 @@ void ControllerCommandDispatch::updateCommandAvailability()
m_aCommandAvailability[ ".uno:InsertMenuDataLabels" ] = bIsWritable;
m_aCommandAvailability[ ".uno:InsertRemoveAxes" ] = m_aCommandAvailability[ ".uno:InsertMenuAxes" ] = bIsWritable && m_apModelState->bSupportsAxes;
m_aCommandAvailability[ ".uno:InsertMenuGrids" ] = bIsWritable && m_apModelState->bSupportsAxes;
- m_aCommandAvailability[ ".uno:InsertMenuTrendlines" ] = bIsWritable && m_apModelState->bSupportsStatistics && m_apControllerState->bMayAddMenuTrendline;
+ m_aCommandAvailability[ ".uno:InsertMenuTrendlines" ] = bIsWritable && m_apModelState->bSupportsStatistics && bControllerStateIsValid && m_apControllerState->bMayAddMenuTrendline;
m_aCommandAvailability[ ".uno:InsertMenuMeanValues" ] = bIsWritable && m_apModelState->bSupportsStatistics;
m_aCommandAvailability[ ".uno:InsertMenuXErrorBars" ] = bIsWritable && m_apModelState->bSupportsStatistics;
m_aCommandAvailability[ ".uno:InsertMenuYErrorBars" ] = bIsWritable && m_apModelState->bSupportsStatistics;
- m_aCommandAvailability[ ".uno:InsertSymbol" ] = bIsWritable && m_apControllerState->bIsTextObject;
+ m_aCommandAvailability[ ".uno:InsertSymbol" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsTextObject;
+ m_aCommandAvailability[ ".uno:InsertMenuDataTable" ] = bIsWritable;
// format objects
bool bFormatObjectAvailable = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsFormateableObjectSelected;
- m_aCommandAvailability[ ".uno:FormatSelection" ] = bFormatObjectAvailable;
+ m_aCommandAvailability[ ".uno:FormatSelection" ] = bFormatObjectAvailable && !bIsTextEdit;
+ m_aCommandAvailability[ ".uno:FontDialog" ] = bFormatObjectAvailable && bIsTextEdit;
m_aCommandAvailability[ ".uno:FormatAxis" ] = bFormatObjectAvailable;
- m_aCommandAvailability[ ".uno:FormatTitle" ] = bFormatObjectAvailable;
+ m_aCommandAvailability[ ".uno:FormatTitle" ] = bFormatObjectAvailable && !bIsTextEdit;
m_aCommandAvailability[ ".uno:FormatDataSeries" ] = bFormatObjectAvailable;
m_aCommandAvailability[ ".uno:FormatDataPoint" ] = bFormatObjectAvailable;
m_aCommandAvailability[ ".uno:FormatDataLabels" ] = bFormatObjectAvailable;
@@ -642,7 +648,7 @@ void ControllerCommandDispatch::updateCommandAvailability()
// text
m_aCommandAvailability[ ".uno:ScaleText" ] = bIsWritable && bModelStateIsValid ;
- m_aCommandArguments[ ".uno:ScaleText" ] <<= m_apModelState->bHasAutoScaledText;
+ m_aCommandArguments[ ".uno:ScaleText" ] <<= bModelStateIsValid && m_apModelState->bHasAutoScaledText;
// axes
m_aCommandAvailability[ ".uno:DiagramAxisX" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasXAxis;
@@ -672,9 +678,11 @@ void ControllerCommandDispatch::updateCommandAvailability()
m_aCommandAvailability[ ".uno:InsertDataLabel" ] = bIsWritable;
m_aCommandAvailability[ ".uno:InsertMeanValue" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddMeanValue;
m_aCommandAvailability[ ".uno:InsertTrendline" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendline;
- m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendlineEquation;
- m_aCommandAvailability[ ".uno:InsertTrendlineEquationAndR2" ] = m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ];
- m_aCommandAvailability[ ".uno:InsertR2Value" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddR2Value;
+ const bool bInsertTrendlineEquation = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendlineEquation;
+ m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ] = bInsertTrendlineEquation;
+ m_aCommandAvailability[ ".uno:InsertTrendlineEquationAndR2" ] = bInsertTrendlineEquation && m_apControllerState->bMayAddR2Value;
+ m_aCommandAvailability[ ".uno:InsertR2Value" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddR2Value
+ && !m_apControllerState->bMayAddTrendlineEquation;
m_aCommandAvailability[ ".uno:DeleteR2Value" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteR2Value;
m_aCommandAvailability[ ".uno:InsertXErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddXErrorBars;
@@ -700,6 +708,10 @@ void ControllerCommandDispatch::updateCommandAvailability()
m_aCommandAvailability[ ".uno:FormatMinorGrid" ] = bIsWritable;
m_aCommandAvailability[ ".uno:InsertMinorGrid" ] = bIsWritable;
m_aCommandAvailability[ ".uno:DeleteMinorGrid" ] = bIsWritable;
+
+ // data table
+ m_aCommandAvailability[ ".uno:InsertDataTable" ] = bIsWritable && bModelStateIsValid && !m_apModelState->bDataTable;
+ m_aCommandAvailability[ ".uno:DeleteDataTable" ] = bIsWritable && bModelStateIsValid && m_apModelState->bDataTable;
}
bool ControllerCommandDispatch::commandAvailable( const OUString & rCommand )
@@ -767,7 +779,7 @@ void SAL_CALL ControllerCommandDispatch::dispatch(
// ____ WeakComponentImplHelperBase ____
/// is called when this is disposed
-void SAL_CALL ControllerCommandDispatch::disposing()
+void ControllerCommandDispatch::disposing(std::unique_lock<std::mutex>& /*rGuard*/)
{
m_xChartController.clear();
m_xDispatch.clear();
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.hxx b/chart2/source/controller/main/ControllerCommandDispatch.hxx
index 38b00c48d8f0..6a5e441e8e3c 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.hxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.hxx
@@ -74,7 +74,7 @@ protected:
// ____ WeakComponentImplHelperBase ____
/// is called when this is disposed
- virtual void SAL_CALL disposing() override;
+ virtual void disposing(std::unique_lock<std::mutex>& rGuard) override;
// ____ XEventListener (base of XModifyListener) ____
virtual void SAL_CALL disposing(
diff --git a/chart2/source/controller/main/DragMethod_Base.cxx b/chart2/source/controller/main/DragMethod_Base.cxx
index d1885e333077..5e46dc327b19 100644
--- a/chart2/source/controller/main/DragMethod_Base.cxx
+++ b/chart2/source/controller/main/DragMethod_Base.cxx
@@ -24,23 +24,21 @@
#include <ObjectIdentifier.hxx>
#include <svx/ActionDescriptionProvider.hxx>
-#include <com/sun/star/frame/XModel.hpp>
+#include <utility>
#include <vcl/ptrstyle.hxx>
namespace chart
{
using namespace ::com::sun::star;
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::WeakReference;
DragMethod_Base::DragMethod_Base( DrawViewWrapper& rDrawViewWrapper
- , const OUString& rObjectCID
+ , OUString aObjectCID
, const rtl::Reference<::chart::ChartModel>& xChartModel
, ActionDescriptionProvider::ActionType eActionType )
: SdrDragMethod( rDrawViewWrapper )
, m_rDrawViewWrapper(rDrawViewWrapper)
- , m_aObjectCID(rObjectCID)
+ , m_aObjectCID(std::move(aObjectCID))
, m_eActionType( eActionType )
, m_xChartModel( xChartModel.get() )
{
diff --git a/chart2/source/controller/main/DragMethod_Base.hxx b/chart2/source/controller/main/DragMethod_Base.hxx
index 497b31f6e88d..1a6593889066 100644
--- a/chart2/source/controller/main/DragMethod_Base.hxx
+++ b/chart2/source/controller/main/DragMethod_Base.hxx
@@ -32,7 +32,7 @@ class ChartModel;
class DragMethod_Base : public SdrDragMethod
{
public:
- DragMethod_Base( DrawViewWrapper& rDrawViewWrapper, const OUString& rObjectCID
+ DragMethod_Base( DrawViewWrapper& rDrawViewWrapper, OUString aObjectCID
, const rtl::Reference<::chart::ChartModel>& xChartModel
, ActionDescriptionProvider::ActionType eActionType = ActionDescriptionProvider::ActionType::Move );
virtual ~DragMethod_Base() override;
diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx
index c2c5db234bd7..5bd85faaf959 100644
--- a/chart2/source/controller/main/DragMethod_PieSegment.cxx
+++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx
@@ -25,9 +25,8 @@
#include <ObjectIdentifier.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/Point.hpp>
-#include <com/sun/star/frame/XModel.hpp>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
@@ -46,7 +45,7 @@ DragMethod_PieSegment::DragMethod_PieSegment( DrawViewWrapper& rDrawViewWrapper
, m_aDragDirection(1000.0,1000.0)
, m_fDragRange( 1.0 )
{
- OUString aParameter( ObjectIdentifier::getDragParameterString( m_aObjectCID ) );
+ std::u16string_view aParameter( ObjectIdentifier::getDragParameterString( m_aObjectCID ) );
sal_Int32 nOffsetPercent(0);
awt::Point aMinimumPosition(0,0);
@@ -128,7 +127,7 @@ bool DragMethod_PieSegment::EndSdrDrag(bool /*bCopy*/)
return true;
}
-basegfx::B2DHomMatrix DragMethod_PieSegment::getCurrentTransformation()
+basegfx::B2DHomMatrix DragMethod_PieSegment::getCurrentTransformation() const
{
basegfx::B2DHomMatrix aRetval;
@@ -143,8 +142,8 @@ void DragMethod_PieSegment::createSdrDragEntries()
if( pObj && pPV )
{
- const basegfx::B2DPolyPolygon aNewPolyPolygon(pObj->TakeXorPoly());
- addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPolyPolygon(aNewPolyPolygon)));
+ basegfx::B2DPolyPolygon aNewPolyPolygon(pObj->TakeXorPoly());
+ addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPolyPolygon(std::move(aNewPolyPolygon))));
}
}
} //namespace chart
diff --git a/chart2/source/controller/main/DragMethod_PieSegment.hxx b/chart2/source/controller/main/DragMethod_PieSegment.hxx
index 8a36dbd4c876..8cb498373f33 100644
--- a/chart2/source/controller/main/DragMethod_PieSegment.hxx
+++ b/chart2/source/controller/main/DragMethod_PieSegment.hxx
@@ -36,7 +36,7 @@ public:
virtual void MoveSdrDrag(const Point& rPnt) override;
virtual bool EndSdrDrag(bool bCopy) override;
- virtual basegfx::B2DHomMatrix getCurrentTransformation() override;
+ virtual basegfx::B2DHomMatrix getCurrentTransformation() const override;
protected:
virtual void createSdrDragEntries() override;
diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
index 030fcd0bf8bc..6172a25edad2 100644
--- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
+++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
@@ -21,10 +21,9 @@
#include <DrawViewWrapper.hxx>
#include <SelectionHelper.hxx>
-#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <ThreeDHelper.hxx>
#include <defines.hxx>
@@ -32,8 +31,6 @@
#include <svx/scene3d.hxx>
#include <basegfx/matrix/b3dhommatrix.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/frame/XModel.hpp>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <svx/sdr/contact/viewcontactofe3dscene.hxx>
#include <drawinglayer/geometry/viewinformation3d.hxx>
@@ -42,7 +39,6 @@ namespace chart
{
using namespace ::com::sun::star;
-using ::com::sun::star::uno::Reference;
DragMethod_RotateDiagram::DragMethod_RotateDiagram( DrawViewWrapper& rDrawViewWrapper
, const OUString& rObjectCID
@@ -74,18 +70,18 @@ DragMethod_RotateDiagram::DragMethod_RotateDiagram( DrawViewWrapper& rDrawViewWr
m_aWireframePolyPolygon = m_pScene->CreateWireframe();
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram(getChartModel());
+ rtl::Reference< Diagram > xDiagram = getChartModel()->getFirstChartDiagram();
if( !xDiagram.is() )
return;
- ThreeDHelper::getRotationFromDiagram( xDiagram
- , m_nInitialHorizontalAngleDegree, m_nInitialVerticalAngleDegree );
+ xDiagram->getRotation(
+ m_nInitialHorizontalAngleDegree, m_nInitialVerticalAngleDegree );
- ThreeDHelper::getRotationAngleFromDiagram( xDiagram
- , m_fInitialXAngleRad, m_fInitialYAngleRad, m_fInitialZAngleRad );
+ xDiagram->getRotationAngle(
+ m_fInitialXAngleRad, m_fInitialYAngleRad, m_fInitialZAngleRad );
if( ChartTypeHelper::isSupportingRightAngledAxes(
- DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) ) )
+ xDiagram->getChartTypeByIndex( 0 ) ) )
xDiagram->getPropertyValue("RightAngledAxes") >>= m_bRightAngledAxes;
if(m_bRightAngledAxes)
{
@@ -161,13 +157,16 @@ bool DragMethod_RotateDiagram::EndSdrDrag(bool /*bCopy*/)
if(m_bRightAngledAxes)
ThreeDHelper::adaptRadAnglesForRightAngledAxes( fResultX, fResultY );
- ThreeDHelper::setRotationAngleToDiagram( ChartModelHelper::findDiagram( getChartModel() )
- , fResultX, fResultY, fResultZ );
+ rtl::Reference<Diagram> xDiagram = getChartModel()->getFirstChartDiagram();
+ if (xDiagram)
+ xDiagram->setRotationAngle( fResultX, fResultY, fResultZ );
}
else
{
- ThreeDHelper::setRotationToDiagram( ChartModelHelper::findDiagram( getChartModel() )
- , m_nInitialHorizontalAngleDegree+m_nAdditionalHorizontalAngleDegree, m_nInitialVerticalAngleDegree+m_nAdditionalVerticalAngleDegree );
+ rtl::Reference<Diagram> xDiagram = getChartModel()->getFirstChartDiagram();
+ if (xDiagram)
+ xDiagram->setRotation(
+ m_nInitialHorizontalAngleDegree+m_nAdditionalHorizontalAngleDegree, m_nInitialVerticalAngleDegree+m_nAdditionalVerticalAngleDegree );
}
return true;
@@ -217,7 +216,7 @@ void DragMethod_RotateDiagram::CreateOverlayGeometry(
std::unique_ptr<sdr::overlay::OverlayPolyPolygonStripedAndFilled> pNew(
new sdr::overlay::OverlayPolyPolygonStripedAndFilled(
- aPolyPolygon));
+ std::move(aPolyPolygon)));
insertNewlyCreatedOverlayObjectForSdrDragMethod(
std::move(pNew),
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index a20d2ba1a7fb..516c2d2ec5f3 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -18,15 +18,14 @@
*/
#include "DrawCommandDispatch.hxx"
-#include "DrawCommandDispatch.h"
#include <ChartController.hxx>
#include <DrawViewWrapper.hxx>
#include <chartview/DrawModelWrapper.hxx>
#include <com/sun/star/frame/CommandGroup.hpp>
#include <o3tl/unsafe_downcast.hxx>
+#include <o3tl/string_view.hxx>
#include <vcl/svapp.hxx>
-#include <svl/itempool.hxx>
#include <editeng/eeitem.hxx>
#include <svx/strings.hrc>
#include <svx/dialmgr.hxx>
@@ -67,7 +66,7 @@ DrawCommandDispatch::~DrawCommandDispatch()
bool DrawCommandDispatch::isFeatureSupported( const OUString& rCommandURL )
{
- sal_uInt16 nFeatureId = 0;
+ ChartCommandID nFeatureId = ChartCommandID::NONE;
OUString aBaseCommand;
OUString aCustomShapeType;
return parseCommandURL( rCommandURL, &nFeatureId, &aBaseCommand, &aCustomShapeType );
@@ -115,8 +114,6 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj )
if ( aObjList[ i ].equalsIgnoreAsciiCase( m_aCustomShapeType ) )
{
FmFormModel aModel;
- SfxItemPool& rPool(aModel.GetItemPool());
- rPool.FreezeIdRanges();
if ( GalleryExplorer::GetSdrObj( GALLERY_THEME_POWERPOINT, i, &aModel ) )
{
@@ -164,7 +161,7 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj )
void DrawCommandDispatch::setLineEnds( SfxItemSet& rAttr )
{
- if ( !(m_nFeatureId == COMMAND_ID_LINE_ARROW_END && m_pChartController) )
+ if ( !(m_nFeatureId == ChartCommandID::DrawLineArrowEnd && m_pChartController) )
return;
DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
@@ -183,11 +180,11 @@ void DrawCommandDispatch::setLineEnds( SfxItemSet& rAttr )
aArrow.append( aNewArrow );
}
- SfxItemSet aSet( pDrawViewWrapper->GetModel()->GetItemPool() );
+ SfxItemSet aSet(pDrawViewWrapper->GetModel().GetItemPool());
pDrawViewWrapper->GetAttributes( aSet );
tools::Long nWidth = 300; // (1/100th mm)
- if ( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE )
+ if ( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::INVALID )
{
tools::Long nValue = aSet.Get( XATTR_LINEWIDTH ).GetValue();
if ( nValue > 0 )
@@ -201,7 +198,7 @@ void DrawCommandDispatch::setLineEnds( SfxItemSet& rAttr )
}
// WeakComponentImplHelperBase
-void DrawCommandDispatch::disposing()
+void DrawCommandDispatch::disposing(std::unique_lock<std::mutex>& /*rGuard*/)
{
}
@@ -216,27 +213,27 @@ FeatureState DrawCommandDispatch::getState( const OUString& rCommand )
aReturn.bEnabled = false;
aReturn.aState <<= false;
- sal_uInt16 nFeatureId = 0;
+ ChartCommandID nFeatureId = ChartCommandID::NONE;
OUString aBaseCommand;
OUString aCustomShapeType;
if ( parseCommandURL( rCommand, &nFeatureId, &aBaseCommand, &aCustomShapeType ) )
{
switch ( nFeatureId )
{
- case COMMAND_ID_OBJECT_SELECT:
- case COMMAND_ID_DRAW_LINE:
- case COMMAND_ID_LINE_ARROW_END:
- case COMMAND_ID_DRAW_RECT:
- case COMMAND_ID_DRAW_ELLIPSE:
- case COMMAND_ID_DRAW_FREELINE_NOFILL:
- case COMMAND_ID_DRAW_TEXT:
- case COMMAND_ID_DRAW_CAPTION:
- case COMMAND_ID_DRAWTBX_CS_BASIC:
- case COMMAND_ID_DRAWTBX_CS_SYMBOL:
- case COMMAND_ID_DRAWTBX_CS_ARROW:
- case COMMAND_ID_DRAWTBX_CS_FLOWCHART:
- case COMMAND_ID_DRAWTBX_CS_CALLOUT:
- case COMMAND_ID_DRAWTBX_CS_STAR:
+ case ChartCommandID::DrawObjectSelect:
+ case ChartCommandID::DrawLine:
+ case ChartCommandID::DrawLineArrowEnd:
+ case ChartCommandID::DrawRect:
+ case ChartCommandID::DrawEllipse:
+ case ChartCommandID::DrawFreelineNoFill:
+ case ChartCommandID::DrawText:
+ case ChartCommandID::DrawCaption:
+ case ChartCommandID::DrawToolboxCsBasic:
+ case ChartCommandID::DrawToolboxCsSymbol:
+ case ChartCommandID::DrawToolboxCsArrow:
+ case ChartCommandID::DrawToolboxCsFlowchart:
+ case ChartCommandID::DrawToolboxCsCallout:
+ case ChartCommandID::DrawToolboxCsStar:
{
aReturn.bEnabled = true;
aReturn.aState <<= false;
@@ -259,7 +256,7 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea
ChartDrawMode eDrawMode = CHARTDRAW_SELECT;
SdrObjKind eKind = SdrObjKind::NONE;
- sal_uInt16 nFeatureId = 0;
+ ChartCommandID nFeatureId = ChartCommandID::NONE;
OUString aBaseCommand;
OUString aCustomShapeType;
if ( !parseCommandURL( rCommand, &nFeatureId, &aBaseCommand, &aCustomShapeType ) )
@@ -271,56 +268,56 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea
switch ( nFeatureId )
{
- case COMMAND_ID_OBJECT_SELECT:
+ case ChartCommandID::DrawObjectSelect:
{
eDrawMode = CHARTDRAW_SELECT;
eKind = SdrObjKind::NONE;
}
break;
- case COMMAND_ID_DRAW_LINE:
- case COMMAND_ID_LINE_ARROW_END:
+ case ChartCommandID::DrawLine:
+ case ChartCommandID::DrawLineArrowEnd:
{
eDrawMode = CHARTDRAW_INSERT;
eKind = SdrObjKind::Line;
}
break;
- case COMMAND_ID_DRAW_RECT:
+ case ChartCommandID::DrawRect:
{
eDrawMode = CHARTDRAW_INSERT;
eKind = SdrObjKind::Rectangle;
}
break;
- case COMMAND_ID_DRAW_ELLIPSE:
+ case ChartCommandID::DrawEllipse:
{
eDrawMode = CHARTDRAW_INSERT;
eKind = SdrObjKind::CircleOrEllipse;
}
break;
- case COMMAND_ID_DRAW_FREELINE_NOFILL:
+ case ChartCommandID::DrawFreelineNoFill:
{
eDrawMode = CHARTDRAW_INSERT;
eKind = SdrObjKind::FreehandLine;
}
break;
- case COMMAND_ID_DRAW_TEXT:
+ case ChartCommandID::DrawText:
{
eDrawMode = CHARTDRAW_INSERT;
eKind = SdrObjKind::Text;
bCreate = true;
}
break;
- case COMMAND_ID_DRAW_CAPTION:
+ case ChartCommandID::DrawCaption:
{
eDrawMode = CHARTDRAW_INSERT;
eKind = SdrObjKind::Caption;
}
break;
- case COMMAND_ID_DRAWTBX_CS_BASIC:
- case COMMAND_ID_DRAWTBX_CS_SYMBOL:
- case COMMAND_ID_DRAWTBX_CS_ARROW:
- case COMMAND_ID_DRAWTBX_CS_FLOWCHART:
- case COMMAND_ID_DRAWTBX_CS_CALLOUT:
- case COMMAND_ID_DRAWTBX_CS_STAR:
+ case ChartCommandID::DrawToolboxCsBasic:
+ case ChartCommandID::DrawToolboxCsSymbol:
+ case ChartCommandID::DrawToolboxCsArrow:
+ case ChartCommandID::DrawToolboxCsFlowchart:
+ case ChartCommandID::DrawToolboxCsCallout:
+ case ChartCommandID::DrawToolboxCsStar:
{
eDrawMode = CHARTDRAW_INSERT;
eKind = SdrObjKind::CustomShape;
@@ -349,25 +346,23 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea
pDrawViewWrapper->SetCreateMode();
}
- const beans::PropertyValue* pIter = rArgs.getConstArray();
- const beans::PropertyValue* pEnd = pIter + rArgs.getLength();
- const beans::PropertyValue* pKeyModifier = std::find_if(pIter, pEnd,
+ const beans::PropertyValue* pKeyModifier = std::find_if(rArgs.begin(), rArgs.end(),
[](const beans::PropertyValue& lhs)
{return lhs.Name == "KeyModifier";} );
sal_Int16 nKeyModifier = 0;
- if ( !(pKeyModifier != pEnd && ( pKeyModifier->Value >>= nKeyModifier ) && nKeyModifier == KEY_MOD1) )
+ if ( !(pKeyModifier != rArgs.end() && ( pKeyModifier->Value >>= nKeyModifier ) && nKeyModifier == KEY_MOD1) )
return;
if ( eDrawMode != CHARTDRAW_INSERT )
return;
- SdrObject* pObj = createDefaultObject( nFeatureId );
+ rtl::Reference<SdrObject> pObj = createDefaultObject( nFeatureId );
if ( pObj )
{
SdrPageView* pPageView = pDrawViewWrapper->GetSdrPageView();
- if (pDrawViewWrapper->InsertObjectAtView(pObj, *pPageView))
+ if (pDrawViewWrapper->InsertObjectAtView(pObj.get(), *pPageView))
m_pChartController->SetAndApplySelection(Reference<drawing::XShape>(pObj->getUnoShape(), uno::UNO_QUERY));
- if ( nFeatureId == COMMAND_ID_DRAW_TEXT )
+ if ( nFeatureId == ChartCommandID::DrawText )
{
m_pChartController->StartTextEdit();
}
@@ -376,20 +371,20 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea
void DrawCommandDispatch::describeSupportedFeatures()
{
- implDescribeSupportedFeature( ".uno:SelectObject", COMMAND_ID_OBJECT_SELECT, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:Line", COMMAND_ID_DRAW_LINE, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:LineArrowEnd", COMMAND_ID_LINE_ARROW_END, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:Rect", COMMAND_ID_DRAW_RECT, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:Ellipse", COMMAND_ID_DRAW_ELLIPSE, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:Freeline_Unfilled", COMMAND_ID_DRAW_FREELINE_NOFILL, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DrawText", COMMAND_ID_DRAW_TEXT, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DrawCaption", COMMAND_ID_DRAW_CAPTION, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:BasicShapes", COMMAND_ID_DRAWTBX_CS_BASIC, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:SymbolShapes", COMMAND_ID_DRAWTBX_CS_SYMBOL, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:ArrowShapes", COMMAND_ID_DRAWTBX_CS_ARROW, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:FlowChartShapes", COMMAND_ID_DRAWTBX_CS_FLOWCHART, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:CalloutShapes", COMMAND_ID_DRAWTBX_CS_CALLOUT, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:StarShapes", COMMAND_ID_DRAWTBX_CS_STAR, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:SelectObject", ChartCommandID::DrawObjectSelect, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:Line", ChartCommandID::DrawLine, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:LineArrowEnd", ChartCommandID::DrawLineArrowEnd, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:Rect", ChartCommandID::DrawRect, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:Ellipse", ChartCommandID::DrawEllipse, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:Freeline_Unfilled", ChartCommandID::DrawFreelineNoFill, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:DrawText", ChartCommandID::DrawText, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:DrawCaption", ChartCommandID::DrawCaption, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:BasicShapes", ChartCommandID::DrawToolboxCsBasic, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:SymbolShapes", ChartCommandID::DrawToolboxCsSymbol, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:ArrowShapes", ChartCommandID::DrawToolboxCsArrow, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:FlowChartShapes", ChartCommandID::DrawToolboxCsFlowchart, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:CalloutShapes", ChartCommandID::DrawToolboxCsCallout, CommandGroup::INSERT );
+ implDescribeSupportedFeature( ".uno:StarShapes", ChartCommandID::DrawToolboxCsStar, CommandGroup::INSERT );
}
void DrawCommandDispatch::setInsertObj(SdrObjKind eObj)
@@ -401,9 +396,9 @@ void DrawCommandDispatch::setInsertObj(SdrObjKind eObj)
}
}
-SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
+rtl::Reference<SdrObject> DrawCommandDispatch::createDefaultObject( const ChartCommandID nID )
{
- SdrObject* pObj = nullptr;
+ rtl::Reference<SdrObject> pObj;
DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : nullptr );
DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : nullptr );
@@ -431,10 +426,10 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
switch ( nID )
{
- case COMMAND_ID_DRAW_LINE:
- case COMMAND_ID_LINE_ARROW_END:
+ case ChartCommandID::DrawLine:
+ case ChartCommandID::DrawLineArrowEnd:
{
- if ( auto const pathObj = dynamic_cast<SdrPathObj*>( pObj) )
+ if ( auto const pathObj = dynamic_cast<SdrPathObj*>( pObj.get()) )
{
Point aStart = aRect.TopLeft();
Point aEnd = aRect.BottomRight();
@@ -449,9 +444,9 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
}
}
break;
- case COMMAND_ID_DRAW_FREELINE_NOFILL:
+ case ChartCommandID::DrawFreelineNoFill:
{
- if ( auto const pathObj = dynamic_cast<SdrPathObj*>( pObj) )
+ if ( auto const pathObj = dynamic_cast<SdrPathObj*>( pObj.get()) )
{
basegfx::B2DPolygon aInnerPoly;
aInnerPoly.append( basegfx::B2DPoint( aRect.Left(), aRect.Bottom() ) );
@@ -469,13 +464,13 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
}
}
break;
- case COMMAND_ID_DRAW_TEXT:
- case COMMAND_ID_DRAW_TEXT_VERTICAL:
+ case ChartCommandID::DrawText:
+ case ChartCommandID::DrawTextVertical:
{
- if ( SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( pObj) )
+ if ( SdrTextObj* pTextObj = DynCastSdrTextObj( pObj.get()) )
{
pTextObj->SetLogicRect( aRect );
- bool bVertical = ( nID == COMMAND_ID_DRAW_TEXT_VERTICAL );
+ bool bVertical = ( nID == ChartCommandID::DrawTextVertical );
pTextObj->SetVerticalWriting( bVertical );
if ( bVertical )
{
@@ -489,12 +484,12 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
}
}
break;
- case COMMAND_ID_DRAW_CAPTION:
- case COMMAND_ID_DRAW_CAPTION_VERTICAL:
+ case ChartCommandID::DrawCaption:
+ case ChartCommandID::DrawCaptionVertical:
{
- if ( SdrCaptionObj* pCaptionObj = dynamic_cast<SdrCaptionObj*>( pObj) )
+ if ( SdrCaptionObj* pCaptionObj = dynamic_cast<SdrCaptionObj*>( pObj.get()) )
{
- bool bIsVertical( nID == COMMAND_ID_DRAW_CAPTION_VERTICAL );
+ bool bIsVertical( nID == ChartCommandID::DrawCaptionVertical );
pCaptionObj->SetVerticalWriting( bIsVertical );
if ( bIsVertical )
{
@@ -513,7 +508,7 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
{
pObj->SetLogicRect( aRect );
SfxItemSet aSet( pDrawModelWrapper->GetItemPool() );
- setAttributes( pObj );
+ setAttributes( pObj.get() );
pObj->SetMergedItemSet( aSet );
}
break;
@@ -525,17 +520,17 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
return pObj;
}
-bool DrawCommandDispatch::parseCommandURL( const OUString& rCommandURL, sal_uInt16* pnFeatureId,
+bool DrawCommandDispatch::parseCommandURL( const OUString& rCommandURL, ChartCommandID* pnFeatureId,
OUString* pBaseCommand, OUString* pCustomShapeType )
{
bool bFound = true;
- sal_uInt16 nFeatureId = 0;
+ ChartCommandID nFeatureId = ChartCommandID::NONE;
OUString aBaseCommand;
OUString aType;
- sal_Int32 nIndex = 1;
- OUString aToken = rCommandURL.getToken( 0, '.', nIndex );
- if ( nIndex == -1 || aToken.isEmpty() )
+ sal_Int32 nIndex = std::min(sal_Int32(1), rCommandURL.getLength());
+ std::u16string_view aToken = o3tl::getToken(rCommandURL, 0, '.', nIndex );
+ if ( nIndex == -1 || aToken.empty() )
{
aBaseCommand = rCommandURL;
SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( aBaseCommand );
@@ -545,32 +540,32 @@ bool DrawCommandDispatch::parseCommandURL( const OUString& rCommandURL, sal_uInt
switch ( nFeatureId )
{
- case COMMAND_ID_DRAWTBX_CS_BASIC:
+ case ChartCommandID::DrawToolboxCsBasic:
{
aType = "diamond";
}
break;
- case COMMAND_ID_DRAWTBX_CS_SYMBOL:
+ case ChartCommandID::DrawToolboxCsSymbol:
{
aType = "smiley";
}
break;
- case COMMAND_ID_DRAWTBX_CS_ARROW:
+ case ChartCommandID::DrawToolboxCsArrow:
{
aType = "left-right-arrow";
}
break;
- case COMMAND_ID_DRAWTBX_CS_FLOWCHART:
+ case ChartCommandID::DrawToolboxCsFlowchart:
{
aType = "flowchart-internal-storage";
}
break;
- case COMMAND_ID_DRAWTBX_CS_CALLOUT:
+ case ChartCommandID::DrawToolboxCsCallout:
{
aType = "round-rectangular-callout";
}
break;
- case COMMAND_ID_DRAWTBX_CS_STAR:
+ case ChartCommandID::DrawToolboxCsStar:
{
aType = "star5";
}
diff --git a/chart2/source/controller/main/DrawCommandDispatch.h b/chart2/source/controller/main/DrawCommandDispatch.h
deleted file mode 100644
index faf70bde1047..000000000000
--- a/chart2/source/controller/main/DrawCommandDispatch.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- 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 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 .
- */
-#ifndef CHART_DRAWCOMMANDDISPATCH_HRC
-#define CHART_DRAWCOMMANDDISPATCH_HRC
-
-//Command Ids:
-#define COMMAND_ID_OBJECT_SELECT 1
-#define COMMAND_ID_DRAW_LINE 2
-#define COMMAND_ID_LINE_ARROW_END 3
-#define COMMAND_ID_DRAW_RECT 4
-#define COMMAND_ID_DRAW_ELLIPSE 5
-#define COMMAND_ID_DRAW_FREELINE_NOFILL 6
-#define COMMAND_ID_DRAW_TEXT 7
-#define COMMAND_ID_DRAW_TEXT_VERTICAL 8
-#define COMMAND_ID_DRAW_CAPTION 9
-#define COMMAND_ID_DRAW_CAPTION_VERTICAL 10
-#define COMMAND_ID_DRAWTBX_CS_BASIC 11
-#define COMMAND_ID_DRAWTBX_CS_SYMBOL 12
-#define COMMAND_ID_DRAWTBX_CS_ARROW 13
-#define COMMAND_ID_DRAWTBX_CS_FLOWCHART 14
-#define COMMAND_ID_DRAWTBX_CS_CALLOUT 15
-#define COMMAND_ID_DRAWTBX_CS_STAR 16
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/main/DrawCommandDispatch.hxx b/chart2/source/controller/main/DrawCommandDispatch.hxx
index febfa8338d40..65200cca6323 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.hxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.hxx
@@ -20,6 +20,7 @@
#include <svx/svdobjkind.hxx>
#include "FeatureCommandDispatchBase.hxx"
+#include <rtl/ref.hxx>
class SfxItemSet;
class SdrObject;
@@ -44,7 +45,7 @@ public:
protected:
// WeakComponentImplHelperBase
- virtual void SAL_CALL disposing() override;
+ virtual void disposing( std::unique_lock<std::mutex>& rGuard ) override;
// XEventListener
virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
@@ -60,9 +61,9 @@ protected:
private:
void setInsertObj(SdrObjKind eObj);
- SdrObject* createDefaultObject( const sal_uInt16 nID );
+ rtl::Reference<SdrObject> createDefaultObject( const ChartCommandID nID );
- bool parseCommandURL( const OUString& rCommandURL, sal_uInt16* pnFeatureId, OUString* pBaseCommand, OUString* pCustomShapeType );
+ bool parseCommandURL( const OUString& rCommandURL, ChartCommandID* pnFeatureId, OUString* pBaseCommand, OUString* pCustomShapeType );
ChartController* m_pChartController;
OUString m_aCustomShapeType;
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index e56da4fc6173..d538108ae8e9 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -33,10 +33,6 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/svapp.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
namespace chart { class ExplicitValueProvider; }
namespace chart
@@ -120,7 +116,7 @@ void SelectorListBox::UpdateChartElementsListAndSelection()
bAddSelectionToList = true;
Reference< uno::XInterface > xChartView;
- Reference< lang::XMultiServiceFactory > xFact( xChartController->getModel(), uno::UNO_QUERY );
+ rtl::Reference< ChartModel > xFact = xChartController->getChartModel();
if( xFact.is() )
xChartView = xFact->createInstance( CHART_VIEW_SERVICE_NAME );
ExplicitValueProvider* pExplicitValueProvider = nullptr; //ExplicitValueProvider::getExplicitValueProvider(xChartView); this creates all visible data points, that's too much
@@ -162,7 +158,8 @@ void SelectorListBox::UpdateChartElementsListAndSelection()
sal_uInt16 nN=0;
for (auto const& entry : m_aEntries)
{
- m_xWidget->append_text(entry.UIName);
+ // tdf#152087 strip any newlines from the entry
+ m_xWidget->append_text(entry.UIName.replaceAll("\n", " "));
if ( !bSelectionFound && aSelectedOID == entry.OID )
{
nEntryPosToSelect = nN;
@@ -288,7 +285,7 @@ void SAL_CALL ElementSelectorToolbarController::statusChanged( const frame::Feat
Reference< frame::XController > xChartController;
rEvent.State >>= xChartController;
::chart::ChartController* pController = dynamic_cast<::chart::ChartController*>(xChartController.get());
- assert(pController);
+ assert(!xChartController || pController);
m_apSelectorListBox->SetChartController( pController );
m_apSelectorListBox->UpdateChartElementsListAndSelection();
}
diff --git a/chart2/source/controller/main/ElementSelector.hxx b/chart2/source/controller/main/ElementSelector.hxx
index 5467dd161299..fb1e4e0527ff 100644
--- a/chart2/source/controller/main/ElementSelector.hxx
+++ b/chart2/source/controller/main/ElementSelector.hxx
@@ -20,7 +20,6 @@
#include <ObjectIdentifier.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/frame/XController.hpp>
#include <cppuhelper/implbase1.hxx>
#include <svtools/toolboxcontroller.hxx>
diff --git a/chart2/source/controller/main/FeatureCommandDispatchBase.cxx b/chart2/source/controller/main/FeatureCommandDispatchBase.cxx
index 90dcf77b2482..b1c5f72d1d5b 100644
--- a/chart2/source/controller/main/FeatureCommandDispatchBase.cxx
+++ b/chart2/source/controller/main/FeatureCommandDispatchBase.cxx
@@ -29,7 +29,7 @@ namespace chart
FeatureCommandDispatchBase::FeatureCommandDispatchBase( const Reference< uno::XComponentContext >& rxContext )
:CommandDispatch( rxContext )
- ,m_nFeatureId( 0 )
+ ,m_nFeatureId( ChartCommandID::NONE )
{
}
@@ -79,7 +79,7 @@ void FeatureCommandDispatchBase::dispatch( const util::URL& URL,
}
void FeatureCommandDispatchBase::implDescribeSupportedFeature( const char* pAsciiCommandURL,
- sal_uInt16 nId, sal_Int16 nGroup )
+ ChartCommandID nId, sal_Int16 nGroup )
{
ControllerFeature aFeature;
aFeature.Command = OUString::createFromAscii( pAsciiCommandURL );
diff --git a/chart2/source/controller/main/FeatureCommandDispatchBase.hxx b/chart2/source/controller/main/FeatureCommandDispatchBase.hxx
index 0c291a684d79..3ceb35ad1268 100644
--- a/chart2/source/controller/main/FeatureCommandDispatchBase.hxx
+++ b/chart2/source/controller/main/FeatureCommandDispatchBase.hxx
@@ -22,12 +22,50 @@
#include <com/sun/star/frame/DispatchInformation.hpp>
+enum class ChartCommandID
+{
+ NONE = 0,
+
+ //Draw Command Ids:
+ DrawObjectSelect = 1,
+ DrawLine = 2,
+ DrawLineArrowEnd = 3,
+ DrawRect = 4,
+ DrawEllipse = 5,
+ DrawFreelineNoFill = 6,
+ DrawText = 7,
+ DrawTextVertical = 8,
+ DrawCaption = 9,
+ DrawCaptionVertical = 10,
+ DrawToolboxCsBasic = 11,
+ DrawToolboxCsSymbol = 12,
+ DrawToolboxCsArrow = 13,
+ DrawToolboxCsFlowchart = 14,
+ DrawToolboxCsCallout = 15,
+ DrawToolboxCsStar = 16,
+
+ //Shape Controller Command Ids:
+ ShapeFormatLine = 21,
+ ShapeFormatArea = 22,
+ ShapeTextAttributes = 23,
+ ShapeTransformDialog = 24,
+ ShapeObjectTitleDescription = 25,
+ ShapeRenameObject = 26,
+ ShapeBringToFront = 28,
+ ShapeForward = 29,
+ ShapeBackward = 30,
+ ShapeSendToBack = 31,
+ ShapeFontDialog = 35,
+ ShapeParagraphDialog = 36
+};
+
+
namespace chart
{
struct ControllerFeature: public css::frame::DispatchInformation
{
- sal_uInt16 nFeatureId;
+ ChartCommandID nFeatureId;
};
typedef std::map< OUString,
@@ -84,12 +122,12 @@ protected:
the command group of the feature. This is important for configuring the controller UI
by the user, see also <type scope="css::frame">CommandGroup</type>.
*/
- void implDescribeSupportedFeature( const char* pAsciiCommandURL, sal_uInt16 nId,
+ void implDescribeSupportedFeature( const char* pAsciiCommandURL, ChartCommandID nId,
sal_Int16 nGroup );
mutable SupportedFeatures m_aSupportedFeatures;
- sal_uInt16 m_nFeatureId;
+ ChartCommandID m_nFeatureId;
};
} // namespace chart
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index 326d43461d9f..3a215ac99522 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -19,38 +19,35 @@
#include <ObjectHierarchy.hxx>
#include <ObjectIdentifier.hxx>
-#include <ChartModelHelper.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
#include <RegressionCurveHelper.hxx>
+#include <RegressionCurveModel.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <chartview/ExplicitValueProvider.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <ChartModel.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
+#include <GridProperties.hxx>
#include <LegendHelper.hxx>
#include <chartview/DrawModelWrapper.hxx>
#include <unonames.hxx>
+#include <BaseCoordinateSystem.hxx>
#include <map>
#include <algorithm>
-#include <iterator>
+#include <cstddef>
#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/chart2/XTitled.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
-#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/awt/Key.hpp>
-#include <com/sun/star/awt/KeyEvent.hpp>
#include <com/sun/star/awt/KeyModifier.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
@@ -61,21 +58,6 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-struct lcl_ObjectToOID
-{
- explicit lcl_ObjectToOID( const rtl::Reference<::chart::ChartModel> & xChartDoc ) :
- m_xModel( xChartDoc )
- {}
-
- ::chart::ObjectIdentifier operator() ( const Reference< uno::XInterface > & xObj )
- {
- return ::chart::ObjectIdentifier( ::chart::ObjectIdentifier::createClassifiedIdentifierForObject( xObj, m_xModel ) );
- }
-
-private:
- rtl::Reference<::chart::ChartModel> m_xModel;
-};
-
void lcl_getChildOIDs(
::chart::ObjectHierarchy::tChildContainer& rOutChildren,
const Reference< container::XIndexAccess >& xShapes )
@@ -106,12 +88,11 @@ void lcl_getChildOIDs(
}
}
-void lcl_addAxisTitle( const Reference< XAxis >& xAxis, ::chart::ObjectHierarchy::tChildContainer& rContainer, const rtl::Reference<::chart::ChartModel>& xChartModel )
+void lcl_addAxisTitle( const rtl::Reference< ::chart::Axis >& xAxis, ::chart::ObjectHierarchy::tChildContainer& rContainer, const rtl::Reference<::chart::ChartModel>& xChartModel )
{
- Reference< XTitled > xAxisTitled( xAxis, uno::UNO_QUERY );
- if( xAxisTitled.is())
+ if( xAxis.is())
{
- Reference< XTitle > xAxisTitle( xAxisTitled->getTitleObject());
+ Reference< XTitle > xAxisTitle( xAxis->getTitleObject());
if( xAxisTitle.is())
rContainer.emplace_back( ::chart::ObjectIdentifier::createClassifiedIdentifierForObject( xAxisTitle, xChartModel ) );
}
@@ -124,17 +105,17 @@ namespace chart
void ObjectHierarchy::createTree( const rtl::Reference<::chart::ChartModel>& xChartDocument )
{
- m_aChildMap = tChildMap();//clear tree
+ m_aChildMap.clear();
if( !xChartDocument.is() )
return;
//@todo: change ObjectIdentifier to take an XChartDocument rather than XModel
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartDocument );
+ rtl::Reference< Diagram > xDiagram = xChartDocument->getFirstChartDiagram();
ObjectIdentifier aDiaOID;
if( xDiagram.is() )
aDiaOID = ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForObject( static_cast<cppu::OWeakObject*>(xDiagram.get()), xChartDocument ) );
- ObjectHierarchy::tChildContainer aTopLevelContainer;
+ tChildContainer aTopLevelContainer;
// First Level
@@ -165,8 +146,8 @@ void ObjectHierarchy::createTree( const rtl::Reference<::chart::ChartModel>& xCh
if( !m_bOrderingForElementSelector )
{
// Axis Titles. Note: These are interpreted of being top level
- const Sequence< Reference< XAxis > > aAxes( AxisHelper::getAllAxesOfDiagram( xDiagram ) );
- for( Reference< XAxis > const & axis : aAxes )
+ const std::vector< rtl::Reference< Axis > > aAxes = AxisHelper::getAllAxesOfDiagram( xDiagram );
+ for( rtl::Reference< Axis > const & axis : aAxes )
lcl_addAxisTitle( axis, aTopLevelContainer, xChartDocument );
// Diagram
@@ -177,7 +158,7 @@ void ObjectHierarchy::createTree( const rtl::Reference<::chart::ChartModel>& xCh
createDiagramTree( aTopLevelContainer, xChartDocument, xDiagram );
else
{
- ObjectHierarchy::tChildContainer aSubContainer;
+ tChildContainer aSubContainer;
createDiagramTree( aSubContainer, xChartDocument, xDiagram );
if( !aSubContainer.empty() )
m_aChildMap[ aDiaOID ] = aSubContainer;
@@ -198,13 +179,13 @@ void ObjectHierarchy::createTree( const rtl::Reference<::chart::ChartModel>& xCh
aTopLevelContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, u"" ) );
if( ! aTopLevelContainer.empty())
- m_aChildMap[ ObjectHierarchy::getRootNodeOID() ] = aTopLevelContainer;
+ m_aChildMap[ObjectHierarchy::getRootNodeOID()] = aTopLevelContainer;
}
void ObjectHierarchy::createLegendTree(
- ObjectHierarchy::tChildContainer & rContainer,
+ tChildContainer & rContainer,
const rtl::Reference<::chart::ChartModel> & xChartDoc,
- const Reference< XDiagram > & xDiagram )
+ const rtl::Reference< Diagram > & xDiagram )
{
if( !(xDiagram.is() && LegendHelper::hasLegend( xDiagram )) )
return;
@@ -215,9 +196,10 @@ void ObjectHierarchy::createLegendTree(
// iterate over child shapes of legend and search for matching CIDs
if( m_pExplicitValueProvider )
{
- Reference< container::XIndexAccess > xLegendShapeContainer(
- m_pExplicitValueProvider->getShapeForCID( aLegendOID.getObjectCID() ), uno::UNO_QUERY );
- ObjectHierarchy::tChildContainer aLegendEntryOIDs;
+ rtl::Reference< SvxShapeGroupAnyD > xLegendShapeContainer =
+ dynamic_cast<SvxShapeGroupAnyD*>(
+ m_pExplicitValueProvider->getShapeForCID( aLegendOID.getObjectCID() ).get() );
+ tChildContainer aLegendEntryOIDs;
lcl_getChildOIDs( aLegendEntryOIDs, xLegendShapeContainer );
m_aChildMap[ aLegendOID ] = aLegendEntryOIDs;
@@ -225,27 +207,35 @@ void ObjectHierarchy::createLegendTree(
}
void ObjectHierarchy::createAxesTree(
- ObjectHierarchy::tChildContainer & rContainer,
+ tChildContainer & rContainer,
const rtl::Reference<::chart::ChartModel> & xChartDoc,
- const Reference< XDiagram > & xDiagram )
+ const rtl::Reference< Diagram > & xDiagram )
{
- Reference< XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY_THROW );
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
- uno::Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) );
+ sal_Int32 nDimensionCount = xDiagram->getDimension();
+ rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeByIndex( 0 ) );
bool bSupportsAxesGrids = ChartTypeHelper::isSupportingMainAxis( xChartType, nDimensionCount, 0 );
if( !bSupportsAxesGrids )
return;
- Sequence< Reference< XAxis > > aAxes( AxisHelper::getAllAxesOfDiagram( xDiagram, /* bOnlyVisible = */ true ) );
+ // Data Table
+ uno::Reference<chart2::XDataTable> xDataTable = xDiagram->getDataTable();
+ if (xDataTable.is())
+ {
+ rContainer.push_back(ObjectIdentifier::createClassifiedIdentifierForObject(xDataTable, xChartDoc));
+ }
+
+ // Axes
+ std::vector< rtl::Reference< Axis > > aAxes = AxisHelper::getAllAxesOfDiagram( xDiagram, /* bOnlyVisible = */ true );
if( !m_bOrderingForElementSelector )
- std::transform( std::cbegin(aAxes), std::cend(aAxes),
- std::back_inserter( rContainer ),
- lcl_ObjectToOID( xChartDoc ));
+ {
+ for (const auto& rAxis : aAxes)
+ rContainer.push_back( ObjectIdentifier::createClassifiedIdentifierForObject( rAxis, xChartDoc ) );
+ }
// get all axes, also invisible ones
aAxes = AxisHelper::getAllAxesOfDiagram( xDiagram );
// Grids
- for( Reference< XAxis > const & xAxis : std::as_const(aAxes) )
+ for( rtl::Reference< Axis > const & xAxis : aAxes )
{
if(!xAxis.is())
continue;
@@ -267,19 +257,17 @@ void ObjectHierarchy::createAxesTree(
lcl_addAxisTitle( xAxis, rContainer, xChartDoc );
}
- Reference< beans::XPropertySet > xGridProperties( xAxis->getGridProperties() );
+ rtl::Reference< ::chart::GridProperties > xGridProperties( xAxis->getGridProperties2() );
if( AxisHelper::isGridVisible( xGridProperties ) )
{
//main grid
rContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartDoc ) );
}
- Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );
- sal_Int32 nSubGrid = 0;
- for( nSubGrid = 0; nSubGrid < aSubGrids.getLength(); ++nSubGrid )
+ std::vector< rtl::Reference< ::chart::GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
+ for( size_t nSubGrid = 0; nSubGrid < aSubGrids.size(); ++nSubGrid )
{
- Reference< beans::XPropertySet > xSubGridProperties( aSubGrids[nSubGrid] );
- if( AxisHelper::isGridVisible( xSubGridProperties ) )
+ if( AxisHelper::isGridVisible( aSubGrids[nSubGrid] ) )
{
//sub grid
rContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartDoc, nSubGrid ) );
@@ -289,12 +277,12 @@ void ObjectHierarchy::createAxesTree(
}
void ObjectHierarchy::createWallAndFloor(
- ObjectHierarchy::tChildContainer & rContainer,
- const Reference< XDiagram > & xDiagram )
+ tChildContainer & rContainer,
+ const rtl::Reference< Diagram > & xDiagram )
{
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
+ sal_Int32 nDimensionCount = xDiagram->getDimension();
bool bIsThreeD = ( nDimensionCount == 3 );
- bool bHasWall = DiagramHelper::isSupportingFloorAndWall( xDiagram );
+ bool bHasWall = xDiagram->isSupportingFloorAndWall();
if( bHasWall && bIsThreeD )
{
rContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, u"" ) );
@@ -307,9 +295,9 @@ void ObjectHierarchy::createWallAndFloor(
}
void ObjectHierarchy::createDiagramTree(
- ObjectHierarchy::tChildContainer & rContainer,
+ tChildContainer & rContainer,
const rtl::Reference<::chart::ChartModel> & xChartDoc,
- const Reference< XDiagram > & xDiagram )
+ const rtl::Reference< Diagram > & xDiagram )
{
if( !m_bOrderingForElementSelector )
{
@@ -325,27 +313,23 @@ void ObjectHierarchy::createDiagramTree(
}
void ObjectHierarchy::createDataSeriesTree(
- ObjectHierarchy::tChildContainer & rOutDiagramSubContainer,
- const Reference< XDiagram > & xDiagram )
+ tChildContainer & rOutDiagramSubContainer,
+ const rtl::Reference< Diagram > & xDiagram )
{
- Reference< XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY_THROW );
-
try
{
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
- Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
- xCooSysCnt->getCoordinateSystems());
- for( sal_Int32 nCooSysIdx=0; nCooSysIdx<aCooSysSeq.getLength(); ++nCooSysIdx )
+ sal_Int32 nDimensionCount = xDiagram->getDimension();
+ std::vector< rtl::Reference< BaseCoordinateSystem > > aCooSysSeq(
+ xDiagram->getBaseCoordinateSystems());
+ for( std::size_t nCooSysIdx=0; nCooSysIdx<aCooSysSeq.size(); ++nCooSysIdx )
{
- Reference< XChartTypeContainer > xCTCnt( aCooSysSeq[nCooSysIdx], uno::UNO_QUERY_THROW );
- Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes());
- for( sal_Int32 nCTIdx=0; nCTIdx<aChartTypeSeq.getLength(); ++nCTIdx )
+ std::vector< rtl::Reference< ChartType > > aChartTypeSeq( aCooSysSeq[nCooSysIdx]->getChartTypes2());
+ for( std::size_t nCTIdx=0; nCTIdx<aChartTypeSeq.size(); ++nCTIdx )
{
- Reference< XChartType > xChartType( aChartTypeSeq[nCTIdx] );
- Reference< XDataSeriesContainer > xDSCnt( xChartType, uno::UNO_QUERY_THROW );
- Sequence< Reference< XDataSeries > > aSeriesSeq( xDSCnt->getDataSeries() );
+ rtl::Reference< ChartType > xChartType( aChartTypeSeq[nCTIdx] );
+ std::vector< rtl::Reference< DataSeries > > aSeriesSeq( xChartType->getDataSeries2() );
const sal_Int32 nNumberOfSeries =
- ChartTypeHelper::getNumberOfDisplayedSeries( xChartType, aSeriesSeq.getLength());
+ ChartTypeHelper::getNumberOfDisplayedSeries( xChartType, aSeriesSeq.size());
for( sal_Int32 nSeriesIdx=0; nSeriesIdx<nNumberOfSeries; ++nSeriesIdx )
{
@@ -356,9 +340,9 @@ void ObjectHierarchy::createDataSeriesTree(
ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForParticle( aSeriesParticle ) ) );
rOutDiagramSubContainer.push_back( aSeriesOID );
- ObjectHierarchy::tChildContainer aSeriesSubContainer;
+ tChildContainer aSeriesSubContainer;
- Reference< chart2::XDataSeries > const & xSeries = aSeriesSeq[nSeriesIdx];
+ rtl::Reference< DataSeries > const & xSeries = aSeriesSeq[nSeriesIdx];
// data labels
if( DataSeriesHelper::hasDataLabelsAtSeries( xSeries ) )
@@ -370,45 +354,38 @@ void ObjectHierarchy::createDataSeriesTree(
// Statistics
if( ChartTypeHelper::isSupportingStatisticProperties( xChartType, nDimensionCount ) )
{
- Reference< chart2::XRegressionCurveContainer > xCurveCnt( xSeries, uno::UNO_QUERY );
- if( xCurveCnt.is())
+ const std::vector< rtl::Reference< RegressionCurveModel > > & rCurves( xSeries->getRegressionCurves2());
+ for( size_t nCurveIdx=0; nCurveIdx<rCurves.size(); ++nCurveIdx )
{
- Sequence< Reference< chart2::XRegressionCurve > > aCurves( xCurveCnt->getRegressionCurves());
- for( sal_Int32 nCurveIdx=0; nCurveIdx<aCurves.getLength(); ++nCurveIdx )
+ bool bIsAverageLine = RegressionCurveHelper::isMeanValueLine( rCurves[nCurveIdx] );
+ aSeriesSubContainer.emplace_back( ObjectIdentifier::createDataCurveCID( aSeriesParticle, nCurveIdx, bIsAverageLine ) );
+ if( RegressionCurveHelper::hasEquation( rCurves[nCurveIdx] ) )
{
- bool bIsAverageLine = RegressionCurveHelper::isMeanValueLine( aCurves[nCurveIdx] );
- aSeriesSubContainer.emplace_back( ObjectIdentifier::createDataCurveCID( aSeriesParticle, nCurveIdx, bIsAverageLine ) );
- if( RegressionCurveHelper::hasEquation( aCurves[nCurveIdx] ) )
- {
- aSeriesSubContainer.emplace_back( ObjectIdentifier::createDataCurveEquationCID( aSeriesParticle, nCurveIdx ) );
- }
+ aSeriesSubContainer.emplace_back( ObjectIdentifier::createDataCurveEquationCID( aSeriesParticle, nCurveIdx ) );
}
- Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY );
- Reference< beans::XPropertySet > xErrorBarProp;
- if( xSeriesProp.is() &&
- (xSeriesProp->getPropertyValue( CHART_UNONAME_ERRORBAR_Y) >>= xErrorBarProp) &&
- xErrorBarProp.is())
+ }
+ Reference< beans::XPropertySet > xErrorBarProp;
+ if( (xSeries->getPropertyValue( CHART_UNONAME_ERRORBAR_Y) >>= xErrorBarProp) &&
+ xErrorBarProp.is())
+ {
+ sal_Int32 nStyle = css::chart::ErrorBarStyle::NONE;
+ if( ( xErrorBarProp->getPropertyValue( "ErrorBarStyle") >>= nStyle ) &&
+ ( nStyle != css::chart::ErrorBarStyle::NONE ) )
{
- sal_Int32 nStyle = css::chart::ErrorBarStyle::NONE;
- if( ( xErrorBarProp->getPropertyValue( "ErrorBarStyle") >>= nStyle ) &&
- ( nStyle != css::chart::ErrorBarStyle::NONE ) )
- {
- aSeriesSubContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierWithParent(
- OBJECTTYPE_DATA_ERRORS_Y, u"", aSeriesParticle ) );
- }
+ aSeriesSubContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierWithParent(
+ OBJECTTYPE_DATA_ERRORS_Y, u"", aSeriesParticle ) );
}
+ }
- if( xSeriesProp.is() &&
- (xSeriesProp->getPropertyValue(CHART_UNONAME_ERRORBAR_X) >>= xErrorBarProp) &&
- xErrorBarProp.is())
+ if( (xSeries->getPropertyValue(CHART_UNONAME_ERRORBAR_X) >>= xErrorBarProp) &&
+ xErrorBarProp.is())
+ {
+ sal_Int32 nStyle = css::chart::ErrorBarStyle::NONE;
+ if( ( xErrorBarProp->getPropertyValue( "ErrorBarStyle") >>= nStyle ) &&
+ ( nStyle != css::chart::ErrorBarStyle::NONE ) )
{
- sal_Int32 nStyle = css::chart::ErrorBarStyle::NONE;
- if( ( xErrorBarProp->getPropertyValue( "ErrorBarStyle") >>= nStyle ) &&
- ( nStyle != css::chart::ErrorBarStyle::NONE ) )
- {
- aSeriesSubContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierWithParent(
- OBJECTTYPE_DATA_ERRORS_X, u"", aSeriesParticle ) );
- }
+ aSeriesSubContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierWithParent(
+ OBJECTTYPE_DATA_ERRORS_X, u"", aSeriesParticle ) );
}
}
}
@@ -417,8 +394,9 @@ void ObjectHierarchy::createDataSeriesTree(
// iterate over child shapes of legend and search for matching CIDs
if( m_pExplicitValueProvider )
{
- Reference< container::XIndexAccess > xSeriesShapeContainer(
- m_pExplicitValueProvider->getShapeForCID( aSeriesOID.getObjectCID() ), uno::UNO_QUERY );
+ rtl::Reference< SvxShapeGroupAnyD > xSeriesShapeContainer =
+ dynamic_cast<SvxShapeGroupAnyD*>(
+ m_pExplicitValueProvider->getShapeForCID( aSeriesOID.getObjectCID() ).get() );
lcl_getChildOIDs( aSeriesSubContainer, xSeriesShapeContainer );
}
@@ -434,7 +412,7 @@ void ObjectHierarchy::createDataSeriesTree(
}
}
-void ObjectHierarchy::createAdditionalShapesTree( ObjectHierarchy::tChildContainer& rContainer )
+void ObjectHierarchy::createAdditionalShapesTree(tChildContainer& rContainer)
{
try
{
@@ -481,7 +459,7 @@ const ObjectHierarchy::tChildContainer & ObjectHierarchy::getChildren( const Obj
if( aIt != m_aChildMap.end())
return aIt->second;
}
- static const ObjectHierarchy::tChildContainer EMPTY;
+ static const tChildContainer EMPTY;
return EMPTY;
}
@@ -491,13 +469,13 @@ const ObjectHierarchy::tChildContainer & ObjectHierarchy::getSiblings( const Obj
{
for (auto const& child : m_aChildMap)
{
- ObjectHierarchy::tChildContainer::const_iterator aElemIt(
+ tChildContainer::const_iterator aElemIt(
std::find( child.second.begin(), child.second.end(), rNode ));
if( aElemIt != child.second.end())
return child.second;
}
}
- static const ObjectHierarchy::tChildContainer EMPTY;
+ static const tChildContainer EMPTY;
return EMPTY;
}
@@ -506,8 +484,8 @@ ObjectIdentifier ObjectHierarchy::getParentImpl(
const ObjectIdentifier & rOID ) const
{
// search children
- ObjectHierarchy::tChildContainer aChildren( getChildren( rParentOID ));
- ObjectHierarchy::tChildContainer::const_iterator aIt(
+ tChildContainer aChildren( getChildren( rParentOID ));
+ tChildContainer::const_iterator aIt(
std::find( aChildren.begin(), aChildren.end(), rOID ));
// recursion end
if( aIt != aChildren.end())
@@ -582,11 +560,11 @@ sal_Int32 ObjectHierarchy::getIndexInParent(
}
ObjectKeyNavigation::ObjectKeyNavigation(
- const ObjectIdentifier & rCurrentOID,
- const rtl::Reference<::chart::ChartModel> & xChartDocument,
+ ObjectIdentifier aCurrentOID,
+ rtl::Reference<::chart::ChartModel> xChartDocument,
ExplicitValueProvider * pExplicitValueProvider /* = 0 */ ) :
- m_aCurrentOID( rCurrentOID ),
- m_xChartDocument( xChartDocument ),
+ m_aCurrentOID(std::move( aCurrentOID )),
+ m_xChartDocument(std::move( xChartDocument )),
m_pExplicitValueProvider( pExplicitValueProvider )
{
if ( !m_aCurrentOID.isValid() )
diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx
index ec744633ca0c..8cad36404fdc 100644
--- a/chart2/source/controller/main/PositionAndSizeHelper.cxx
+++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx
@@ -20,12 +20,9 @@
#include <PositionAndSizeHelper.hxx>
#include <ControllerLockGuard.hxx>
#include <com/sun/star/chart/ChartLegendExpansion.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/chart2/RelativeSize.hpp>
-#include <com/sun/star/frame/XModel.hpp>
#include <tools/gen.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
#include <ChartModel.hxx>
#include <Diagram.hxx>
@@ -48,7 +45,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
tools::Rectangle aPageRect( Point(rPageRectangle.X,rPageRectangle.Y), Size(rPageRectangle.Width,rPageRectangle.Height) );
// every following branch divides by width and height
- if (aPageRect.getWidth() == 0 || aPageRect.getHeight() == 0)
+ if (aPageRect.getOpenWidth() == 0 || aPageRect.getOpenHeight() == 0)
return false;
if( eObjectType==OBJECTTYPE_TITLE )
@@ -58,16 +55,16 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
aRelativePosition.Anchor = drawing::Alignment_CENTER;
//the anchor point at the title object is top/middle
Point aPos = aObjectRect.TopLeft();
- aRelativePosition.Primary = (double(aPos.X())+double(aObjectRect.getWidth())/2.0)/double(aPageRect.getWidth());
- aRelativePosition.Secondary = (double(aPos.Y())+double(aObjectRect.getHeight())/2.0)/double(aPageRect.getHeight());
+ aRelativePosition.Primary = (double(aPos.X())+double(aObjectRect.getOpenWidth())/2.0)/double(aPageRect.getOpenWidth());
+ aRelativePosition.Secondary = (double(aPos.Y())+double(aObjectRect.getOpenHeight())/2.0)/double(aPageRect.getOpenHeight());
xObjectProp->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) );
}
else if( eObjectType == OBJECTTYPE_DATA_LABEL )
{
RelativePosition aAbsolutePosition;
RelativePosition aCustomLabelPosition;
- aAbsolutePosition.Primary = double(rOldPositionAndSize.X) / double(aPageRect.getWidth());
- aAbsolutePosition.Secondary = double(rOldPositionAndSize.Y) / double(aPageRect.getHeight());
+ aAbsolutePosition.Primary = double(rOldPositionAndSize.X) / double(aPageRect.getOpenWidth());
+ aAbsolutePosition.Secondary = double(rOldPositionAndSize.Y) / double(aPageRect.getOpenHeight());
if( xObjectProp->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition )
{
@@ -84,8 +81,8 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
else if( fRotation == 270.0 )
aPos = aObjectRect.TopRight();
- aCustomLabelPosition.Primary = double(aPos.X()) / double(aPageRect.getWidth()) - aAbsolutePosition.Primary;
- aCustomLabelPosition.Secondary = double(aPos.Y()) / double(aPageRect.getHeight()) - aAbsolutePosition.Secondary;
+ aCustomLabelPosition.Primary = double(aPos.X()) / double(aPageRect.getOpenWidth()) - aAbsolutePosition.Primary;
+ aCustomLabelPosition.Secondary = double(aPos.Y()) / double(aPageRect.getOpenHeight()) - aAbsolutePosition.Secondary;
xObjectProp->setPropertyValue("CustomLabelPosition", uno::Any(aCustomLabelPosition));
}
else if( eObjectType==OBJECTTYPE_DATA_CURVE_EQUATION )
@@ -95,8 +92,8 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
aRelativePosition.Anchor = drawing::Alignment_TOP_LEFT;
//the anchor point at the title object is top/middle
Point aPos = aObjectRect.TopLeft();
- aRelativePosition.Primary = double(aPos.X())/double(aPageRect.getWidth());
- aRelativePosition.Secondary = double(aPos.Y())/double(aPageRect.getHeight());
+ aRelativePosition.Primary = double(aPos.X())/double(aPageRect.getOpenWidth());
+ aRelativePosition.Secondary = double(aPos.Y())/double(aPageRect.getOpenHeight());
xObjectProp->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) );
}
else if(eObjectType==OBJECTTYPE_LEGEND)
@@ -108,21 +105,21 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
aRelativePosition.Primary =
static_cast< double >( aAnchor.X()) /
- static_cast< double >( aPageRect.getWidth() );
+ static_cast< double >( aPageRect.getOpenWidth() );
aRelativePosition.Secondary =
static_cast< double >( aAnchor.Y()) /
- static_cast< double >( aPageRect.getHeight());
+ static_cast< double >( aPageRect.getOpenHeight());
xObjectProp->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) );
aRelativeSize.Primary =
- static_cast< double >( aObjectRect.getWidth()) /
- static_cast< double >( aPageRect.getWidth() );
+ static_cast< double >( aObjectRect.getOpenWidth()) /
+ static_cast< double >( aPageRect.getOpenWidth() );
if (aRelativeSize.Primary > 1.0)
aRelativeSize.Primary = 1.0;
aRelativeSize.Secondary =
- static_cast< double >( aObjectRect.getHeight()) /
- static_cast< double >( aPageRect.getHeight());
+ static_cast< double >( aObjectRect.getOpenHeight()) /
+ static_cast< double >( aPageRect.getOpenHeight());
if (aRelativeSize.Secondary > 1.0)
aRelativeSize.Secondary = 1.0;
@@ -137,16 +134,16 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
aRelativePosition.Anchor = drawing::Alignment_CENTER;
Point aPos = aObjectRect.Center();
- aRelativePosition.Primary = double(aPos.X())/double(aPageRect.getWidth());
- aRelativePosition.Secondary = double(aPos.Y())/double(aPageRect.getHeight());
+ aRelativePosition.Primary = double(aPos.X())/double(aPageRect.getOpenWidth());
+ aRelativePosition.Secondary = double(aPos.Y())/double(aPageRect.getOpenHeight());
xObjectProp->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) );
//set size:
RelativeSize aRelativeSize;
//the anchor points for the diagram are in the middle of the diagram
//and in the middle of the page
- aRelativeSize.Primary = double(aObjectRect.getWidth())/double(aPageRect.getWidth());
- aRelativeSize.Secondary = double(aObjectRect.getHeight())/double(aPageRect.getHeight());
+ aRelativeSize.Primary = double(aObjectRect.getOpenWidth())/double(aPageRect.getOpenWidth());
+ aRelativeSize.Secondary = double(aObjectRect.getOpenHeight())/double(aPageRect.getOpenHeight());
xObjectProp->setPropertyValue( "RelativeSize", uno::Any(aRelativeSize) );
}
else
@@ -154,7 +151,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
return true;
}
-bool PositionAndSizeHelper::moveObject( const OUString& rObjectCID
+bool PositionAndSizeHelper::moveObject( std::u16string_view rObjectCID
, const rtl::Reference<::chart::ChartModel>& xChartModel
, const awt::Rectangle& rNewPositionAndSize
, const awt::Rectangle& rOldPositionAndSize
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index 433a157ba828..de2ad664abe5 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -19,12 +19,9 @@
#include <SelectionHelper.hxx>
#include <ObjectIdentifier.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
-#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
-#include <com/sun/star/frame/XModel.hpp>
#include <svx/svdpage.hxx>
#include <svx/svditer.hxx>
#include <svx/obj3d.hxx>
@@ -315,6 +312,11 @@ bool Selection::isDragableObjectSelected() const
return m_aSelectedOID.isDragableObject();
}
+bool Selection::isTitleObjectSelected() const
+{
+ return m_aSelectedOID.getObjectType() == OBJECTTYPE_TITLE;
+}
+
bool Selection::isAdditionalShapeSelected() const
{
return m_aSelectedOID.isAdditionalShape();
@@ -433,8 +435,7 @@ OUString SelectionHelper::getHitObjectCID(
if( aRet == aWallCID )
{
- OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) );
- aRet = aDiagramCID;
+ aRet = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) );
}
}
}
@@ -443,13 +444,13 @@ OUString SelectionHelper::getHitObjectCID(
// \\- solar mutex
}
-bool SelectionHelper::isRotateableObject( const OUString& rCID
+bool SelectionHelper::isRotateableObject( std::u16string_view rCID
, const rtl::Reference<::chart::ChartModel>& xChartModel )
{
if( !ObjectIdentifier::isRotateableObject( rCID ) )
return false;
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( ChartModelHelper::findDiagram( xChartModel ) );
+ sal_Int32 nDimensionCount = xChartModel->getFirstChartDiagram()->getDimension();
return nDimensionCount == 3;
}
@@ -466,7 +467,7 @@ SelectionHelper::~SelectionHelper()
bool SelectionHelper::getFrameDragSingles()
{
//true == green == surrounding handles
- return dynamic_cast<const E3dObject*>( m_pSelectedObj) == nullptr;
+ return DynCastE3dObject( m_pSelectedObj) == nullptr;
}
SdrObject* SelectionHelper::getMarkHandlesObject( SdrObject* pObj )
@@ -533,7 +534,7 @@ E3dScene* SelectionHelper::getSceneToRotate( SdrObject* pObj )
if(pObj)
{
- pRotateable = dynamic_cast<E3dObject*>(pObj);
+ pRotateable = DynCastE3dObject(pObj);
if( !pRotateable )
{
SolarMutexGuard aSolarGuard;
@@ -543,8 +544,7 @@ E3dScene* SelectionHelper::getSceneToRotate( SdrObject* pObj )
SdrObjListIter aIterator(pSubList, SdrIterMode::DeepWithGroups);
while( aIterator.IsMore() && !pRotateable )
{
- SdrObject* pSubObj = aIterator.Next();
- pRotateable = dynamic_cast<E3dObject*>(pSubObj);
+ pRotateable = DynCastE3dObject(aIterator.Next());
}
}
}
@@ -598,7 +598,7 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList )
for( sal_uInt32 nM = 0; nM < aPolygon.count(); nM++)
{
const ::basegfx::B2DPoint aPoint(aPolygon.getB2DPoint(nM));
- rHdlList.AddHdl(std::make_unique<SdrHdl>(Point(basegfx::fround(aPoint.getX()), basegfx::fround(aPoint.getY())), SdrHdlKind::Poly));
+ rHdlList.AddHdl(std::make_unique<SdrHdl>(Point(basegfx::fround<tools::Long>(aPoint.getX()), basegfx::fround<tools::Long>(aPoint.getY())), SdrHdlKind::Poly));
}
}
return true;
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index acdcb78ce045..c440a7d97925 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -18,15 +18,14 @@
*/
#include "ShapeController.hxx"
-#include <ShapeController.h>
#include <ChartController.hxx>
#include <ViewElementListProvider.hxx>
#include <dlg_ShapeFont.hxx>
#include <dlg_ShapeParagraph.hxx>
+#include <ChartModel.hxx>
#include <chartview/DrawModelWrapper.hxx>
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/frame/CommandGroup.hpp>
-#include <com/sun/star/frame/XStorable.hpp>
#include <vcl/svapp.hxx>
#include <editeng/formatbreakitem.hxx>
@@ -37,7 +36,7 @@
#include <editeng/spltitem.hxx>
#include <svx/svxdlg.hxx>
#include <editeng/widwitem.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::frame;
@@ -60,7 +59,7 @@ ShapeController::~ShapeController()
}
// WeakComponentImplHelperBase
-void ShapeController::disposing()
+void ShapeController::disposing(std::unique_lock<std::mutex>& /*rGuard*/)
{
}
@@ -78,7 +77,7 @@ FeatureState ShapeController::getState( const OUString& rCommand )
bool bWritable = false;
if ( m_pChartController )
{
- Reference< frame::XStorable > xStorable( m_pChartController->getModel(), uno::UNO_QUERY );
+ rtl::Reference< ChartModel > xStorable = m_pChartController->getChartModel();
if ( xStorable.is() )
{
bWritable = !xStorable->isReadonly();
@@ -88,37 +87,37 @@ FeatureState ShapeController::getState( const OUString& rCommand )
SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( rCommand );
if ( aIter != m_aSupportedFeatures.end() )
{
- sal_uInt16 nFeatureId = aIter->second.nFeatureId;
+ ChartCommandID nFeatureId = aIter->second.nFeatureId;
switch ( nFeatureId )
{
- case COMMAND_ID_FORMAT_LINE:
- case COMMAND_ID_FORMAT_AREA:
- case COMMAND_ID_TEXT_ATTRIBUTES:
- case COMMAND_ID_TRANSFORM_DIALOG:
- case COMMAND_ID_OBJECT_TITLE_DESCRIPTION:
- case COMMAND_ID_RENAME_OBJECT:
+ case ChartCommandID::ShapeFormatLine:
+ case ChartCommandID::ShapeFormatArea:
+ case ChartCommandID::ShapeTextAttributes:
+ case ChartCommandID::ShapeTransformDialog:
+ case ChartCommandID::ShapeObjectTitleDescription:
+ case ChartCommandID::ShapeRenameObject:
{
aReturn.bEnabled = bWritable;
aReturn.aState <<= false;
}
break;
- case COMMAND_ID_BRING_TO_FRONT:
- case COMMAND_ID_FORWARD:
+ case ChartCommandID::ShapeBringToFront:
+ case ChartCommandID::ShapeForward:
{
aReturn.bEnabled = ( bWritable && isForwardPossible() );
aReturn.aState <<= false;
}
break;
- case COMMAND_ID_BACKWARD:
- case COMMAND_ID_SEND_TO_BACK:
+ case ChartCommandID::ShapeBackward:
+ case ChartCommandID::ShapeSendToBack:
{
aReturn.bEnabled = ( bWritable && isBackwardPossible() );
aReturn.aState <<= false;
}
break;
- case COMMAND_ID_FONT_DIALOG:
- case COMMAND_ID_PARAGRAPH_DIALOG:
+ case ChartCommandID::ShapeFontDialog:
+ case ChartCommandID::ShapeParagraphDialog:
{
aReturn.bEnabled = bWritable;
aReturn.aState <<= false;
@@ -142,53 +141,53 @@ void ShapeController::execute( const OUString& rCommand, const Sequence< beans::
if ( aIter == m_aSupportedFeatures.end() )
return;
- sal_uInt16 nFeatureId = aIter->second.nFeatureId;
+ ChartCommandID nFeatureId = aIter->second.nFeatureId;
switch ( nFeatureId )
{
- case COMMAND_ID_FORMAT_LINE:
+ case ChartCommandID::ShapeFormatLine:
{
executeDispatch_FormatLine();
}
break;
- case COMMAND_ID_FORMAT_AREA:
+ case ChartCommandID::ShapeFormatArea:
{
executeDispatch_FormatArea();
}
break;
- case COMMAND_ID_TEXT_ATTRIBUTES:
+ case ChartCommandID::ShapeTextAttributes:
{
executeDispatch_TextAttributes();
}
break;
- case COMMAND_ID_TRANSFORM_DIALOG:
+ case ChartCommandID::ShapeTransformDialog:
{
executeDispatch_TransformDialog();
}
break;
- case COMMAND_ID_OBJECT_TITLE_DESCRIPTION:
+ case ChartCommandID::ShapeObjectTitleDescription:
{
executeDispatch_ObjectTitleDescription();
}
break;
- case COMMAND_ID_RENAME_OBJECT:
+ case ChartCommandID::ShapeRenameObject:
{
executeDispatch_RenameObject();
}
break;
- case COMMAND_ID_BRING_TO_FRONT:
- case COMMAND_ID_FORWARD:
- case COMMAND_ID_BACKWARD:
- case COMMAND_ID_SEND_TO_BACK:
+ case ChartCommandID::ShapeBringToFront:
+ case ChartCommandID::ShapeForward:
+ case ChartCommandID::ShapeBackward:
+ case ChartCommandID::ShapeSendToBack:
{
executeDispatch_ChangeZOrder( nFeatureId );
}
break;
- case COMMAND_ID_FONT_DIALOG:
+ case ChartCommandID::ShapeFontDialog:
{
executeDispatch_FontDialog();
}
break;
- case COMMAND_ID_PARAGRAPH_DIALOG:
+ case ChartCommandID::ShapeParagraphDialog:
{
executeDispatch_ParagraphDialog();
}
@@ -202,24 +201,23 @@ void ShapeController::execute( const OUString& rCommand, const Sequence< beans::
void ShapeController::describeSupportedFeatures()
{
- implDescribeSupportedFeature( ".uno:FormatLine", COMMAND_ID_FORMAT_LINE, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:FormatArea", COMMAND_ID_FORMAT_AREA, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:TextAttributes", COMMAND_ID_TEXT_ATTRIBUTES, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:TransformDialog", COMMAND_ID_TRANSFORM_DIALOG, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:ObjectTitleDescription", COMMAND_ID_OBJECT_TITLE_DESCRIPTION, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:RenameObject", COMMAND_ID_RENAME_OBJECT, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:BringToFront", COMMAND_ID_BRING_TO_FRONT, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:Forward", COMMAND_ID_FORWARD, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:Backward", COMMAND_ID_BACKWARD, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:SendToBack", COMMAND_ID_SEND_TO_BACK, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:FontDialog", COMMAND_ID_FONT_DIALOG, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:ParagraphDialog", COMMAND_ID_PARAGRAPH_DIALOG, CommandGroup::EDIT );
+ implDescribeSupportedFeature( ".uno:FormatLine", ChartCommandID::ShapeFormatLine, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:FormatArea", ChartCommandID::ShapeFormatArea, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:TextAttributes", ChartCommandID::ShapeTextAttributes, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:TransformDialog", ChartCommandID::ShapeTransformDialog, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:ObjectTitleDescription", ChartCommandID::ShapeObjectTitleDescription, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:RenameObject", ChartCommandID::ShapeRenameObject, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:BringToFront", ChartCommandID::ShapeBringToFront, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:Forward", ChartCommandID::ShapeForward, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:Backward", ChartCommandID::ShapeBackward, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:SendToBack", ChartCommandID::ShapeSendToBack, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:FontDialog", ChartCommandID::ShapeFontDialog, CommandGroup::EDIT );
+ implDescribeSupportedFeature( ".uno:ParagraphDialog", ChartCommandID::ShapeParagraphDialog, CommandGroup::EDIT );
}
IMPL_LINK( ShapeController, CheckNameHdl, AbstractSvxObjectNameDialog&, rDialog, bool )
{
- OUString aName;
- rDialog.GetName( aName );
+ OUString aName = rDialog.GetName();
if ( !aName.isEmpty() )
{
@@ -289,7 +287,7 @@ void ShapeController::executeDispatch_FormatArea()
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr< AbstractSvxAreaTabDialog > pDlg(
- pFact->CreateSvxAreaTabDialog(pChartWindow, &aAttr, &pDrawModelWrapper->getSdrModel(), true));
+ pFact->CreateSvxAreaTabDialog(pChartWindow, &aAttr, &pDrawModelWrapper->getSdrModel(), true, false));
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
@@ -322,20 +320,26 @@ void ShapeController::executeDispatch_TextAttributes()
pDrawViewWrapper->MergeAttrFromMarked( aAttr, false );
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr< SfxAbstractTabDialog > pDlg(
+ VclPtr< SfxAbstractTabDialog > pDlg(
pFact->CreateTextTabDialog(pChartWindow, &aAttr, pDrawViewWrapper));
- if ( pDlg->Execute() == RET_OK )
- {
- const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
- if ( bHasMarked )
- {
- pDrawViewWrapper->SetAttributes( *pOutAttr );
- }
- else
+ pDlg->StartExecuteAsync(
+ [pDlg, bHasMarked, pDrawViewWrapper] (sal_Int32 nResult)->void
{
- pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
+ if ( RET_OK == nResult )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->SetAttributes( *pOutAttr );
+ }
+ else
+ {
+ pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
+ }
+ }
+ pDlg->disposeOnce();
}
- }
+ );
}
void ShapeController::executeDispatch_TransformDialog()
@@ -353,7 +357,7 @@ void ShapeController::executeDispatch_TransformDialog()
if ( pSelectedObj && pSelectedObj->GetObjIdentifier() == SdrObjKind::Caption )
{
// item set for caption
- SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
+ SfxItemSet aAttr(pDrawViewWrapper->GetModel().GetItemPool());
pDrawViewWrapper->GetAttributes( aAttr );
// item set for position and size
SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
@@ -402,17 +406,23 @@ void ShapeController::executeDispatch_ObjectTitleDescription()
OUString aTitle( pSelectedObj->GetTitle() );
OUString aDescription( pSelectedObj->GetDescription() );
+ bool isDecorative(pSelectedObj->IsDecorative());
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
weld::Window* pChartWindow(m_pChartController->GetChartFrame());
- ScopedVclPtr< AbstractSvxObjectTitleDescDialog > pDlg(
- pFact->CreateSvxObjectTitleDescDialog(pChartWindow, aTitle, aDescription));
- if ( pDlg->Execute() == RET_OK )
- {
- pDlg->GetTitle( aTitle );
- pDlg->GetDescription( aDescription );
- pSelectedObj->SetTitle( aTitle );
- pSelectedObj->SetDescription( aDescription );
- }
+ VclPtr< AbstractSvxObjectTitleDescDialog > pDlg(
+ pFact->CreateSvxObjectTitleDescDialog(pChartWindow, aTitle, aDescription, isDecorative));
+ pDlg->StartExecuteAsync(
+ [pDlg, pSelectedObj] (sal_Int32 nResult)->void
+ {
+ if (nResult == RET_OK)
+ {
+ pSelectedObj->SetTitle( pDlg->GetTitle() );
+ pSelectedObj->SetDescription( pDlg->GetDescription() );
+ pSelectedObj->SetDecorative(pDlg->IsDecorative());
+ }
+ pDlg->disposeOnce();
+ }
+ );
}
void ShapeController::executeDispatch_RenameObject()
@@ -429,23 +439,28 @@ void ShapeController::executeDispatch_RenameObject()
if ( !pSelectedObj )
return;
- OUString aName = pSelectedObj->GetName();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
weld::Window* pChartWindow(m_pChartController->GetChartFrame());
- ScopedVclPtr< AbstractSvxObjectNameDialog > pDlg(
- pFact->CreateSvxObjectNameDialog(pChartWindow, aName));
+ VclPtr< AbstractSvxObjectNameDialog > pDlg(
+ pFact->CreateSvxObjectNameDialog(pChartWindow, pSelectedObj->GetName()));
pDlg->SetCheckNameHdl( LINK( this, ShapeController, CheckNameHdl ) );
- if ( pDlg->Execute() == RET_OK )
- {
- pDlg->GetName(aName);
- if (pSelectedObj->GetName() == aName)
+ pDlg->StartExecuteAsync(
+ [pDlg, pSelectedObj] (sal_Int32 nResult)->void
{
- pSelectedObj->SetName( aName );
+ if (nResult == RET_OK)
+ {
+ OUString aName = pDlg->GetName();
+ if (pSelectedObj->GetName() != aName)
+ {
+ pSelectedObj->SetName( aName );
+ }
+ }
+ pDlg->disposeOnce();
}
- }
+ );
}
-void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
+void ShapeController::executeDispatch_ChangeZOrder( ChartCommandID nId )
{
SolarMutexGuard aGuard;
DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : nullptr );
@@ -454,7 +469,7 @@ void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
switch ( nId )
{
- case COMMAND_ID_BRING_TO_FRONT:
+ case ChartCommandID::ShapeBringToFront:
{
if ( isForwardPossible() )
{
@@ -462,7 +477,7 @@ void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
}
}
break;
- case COMMAND_ID_FORWARD:
+ case ChartCommandID::ShapeForward:
{
if ( isForwardPossible() )
{
@@ -470,7 +485,7 @@ void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
}
}
break;
- case COMMAND_ID_BACKWARD:
+ case ChartCommandID::ShapeBackward:
{
if ( isBackwardPossible() )
{
@@ -478,7 +493,7 @@ void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
}
}
break;
- case COMMAND_ID_SEND_TO_BACK:
+ case ChartCommandID::ShapeSendToBack:
{
if ( isBackwardPossible() )
{
@@ -505,7 +520,7 @@ void ShapeController::executeDispatch_FontDialog()
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pChartWindow && pDrawModelWrapper && pDrawViewWrapper )
{
- SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
+ SfxItemSet aAttr(pDrawViewWrapper->GetModel().GetItemPool());
pDrawViewWrapper->GetAttributes( aAttr );
ViewElementListProvider aViewElementListProvider( pDrawModelWrapper );
ShapeFontDialog aDlg(pChartWindow, &aAttr, &aViewElementListProvider);
@@ -528,7 +543,7 @@ void ShapeController::executeDispatch_ParagraphDialog()
if ( !(pChartWindow && pDrawViewWrapper) )
return;
- SfxItemPool& rPool = pDrawViewWrapper->GetModel()->GetItemPool();
+ SfxItemPool& rPool = pDrawViewWrapper->GetModel().GetItemPool();
SfxItemSet aAttr( rPool );
pDrawViewWrapper->GetAttributes( aAttr );
diff --git a/chart2/source/controller/main/ShapeController.hxx b/chart2/source/controller/main/ShapeController.hxx
index 3d65c49e504c..cdd8002ce2d8 100644
--- a/chart2/source/controller/main/ShapeController.hxx
+++ b/chart2/source/controller/main/ShapeController.hxx
@@ -41,7 +41,7 @@ public:
protected:
// WeakComponentImplHelperBase
- virtual void SAL_CALL disposing() override;
+ virtual void disposing(std::unique_lock<std::mutex>& rGuard) override;
// XEventListener
virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
@@ -64,7 +64,7 @@ private:
void executeDispatch_TransformDialog();
void executeDispatch_ObjectTitleDescription();
void executeDispatch_RenameObject();
- void executeDispatch_ChangeZOrder( sal_uInt16 nId );
+ void executeDispatch_ChangeZOrder( ChartCommandID nId );
void executeDispatch_FontDialog();
void executeDispatch_ParagraphDialog();
diff --git a/chart2/source/controller/main/StatusBarCommandDispatch.cxx b/chart2/source/controller/main/StatusBarCommandDispatch.cxx
index 1b867cb562f8..e3c1f038b0ac 100644
--- a/chart2/source/controller/main/StatusBarCommandDispatch.cxx
+++ b/chart2/source/controller/main/StatusBarCommandDispatch.cxx
@@ -19,10 +19,9 @@
#include "StatusBarCommandDispatch.hxx"
#include <ObjectNameProvider.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/util/XModifiable.hpp>
#include <ChartModel.hxx>
+#include <utility>
using namespace ::com::sun::star;
@@ -34,10 +33,10 @@ namespace chart
StatusBarCommandDispatch::StatusBarCommandDispatch(
const Reference< uno::XComponentContext > & xContext,
- const rtl::Reference<::chart::ChartModel> & xModel,
+ rtl::Reference<::chart::ChartModel> xModel,
const Reference< view::XSelectionSupplier > & xSelSupp ) :
impl::StatusBarCommandDispatch_Base( xContext ),
- m_xChartModel( xModel ),
+ m_xChartModel(std::move( xModel )),
m_xSelectionSupplier( xSelSupp ),
m_bIsModified( false )
{}
@@ -66,7 +65,7 @@ void StatusBarCommandDispatch::fireStatusEvent(
bool bFireContext( bFireAll || rURL == ".uno:Context" );
bool bFireModified( bFireAll || rURL == ".uno:ModifiedStatus" );
- if( bFireContext )
+ if( bFireContext && m_xChartModel.is())
{
uno::Any aArg;
aArg <<= ObjectNameProvider::getSelectedObjectText( m_aSelectedOID.getObjectCID(), m_xChartModel );
@@ -91,7 +90,7 @@ void SAL_CALL StatusBarCommandDispatch::dispatch(
// ____ WeakComponentImplHelperBase ____
/// is called when this is disposed
-void SAL_CALL StatusBarCommandDispatch::disposing()
+void StatusBarCommandDispatch::disposing(std::unique_lock<std::mutex>& /*rGuard*/)
{
m_xChartModel.clear();
m_xSelectionSupplier.clear();
diff --git a/chart2/source/controller/main/StatusBarCommandDispatch.hxx b/chart2/source/controller/main/StatusBarCommandDispatch.hxx
index c123475c037f..ae9dcaf4f67a 100644
--- a/chart2/source/controller/main/StatusBarCommandDispatch.hxx
+++ b/chart2/source/controller/main/StatusBarCommandDispatch.hxx
@@ -49,7 +49,7 @@ class StatusBarCommandDispatch : public impl::StatusBarCommandDispatch_Base
public:
explicit StatusBarCommandDispatch(
const css::uno::Reference< css::uno::XComponentContext > & xContext,
- const rtl::Reference<::chart::ChartModel> & xModel,
+ rtl::Reference<::chart::ChartModel> xModel,
const css::uno::Reference< css::view::XSelectionSupplier > & xSelSupp );
virtual ~StatusBarCommandDispatch() override;
@@ -64,7 +64,7 @@ protected:
// ____ WeakComponentImplHelperBase ____
/// is called when this is disposed
- virtual void SAL_CALL disposing() override;
+ virtual void disposing(std::unique_lock<std::mutex>& rGuard) override;
// ____ XModifyListener (override from CommandDispatch) ____
virtual void SAL_CALL modified(
diff --git a/chart2/source/controller/main/UndoActions.cxx b/chart2/source/controller/main/UndoActions.cxx
index 6d043137d464..a3c899253295 100644
--- a/chart2/source/controller/main/UndoActions.cxx
+++ b/chart2/source/controller/main/UndoActions.cxx
@@ -26,19 +26,18 @@
#include <svx/svdundo.hxx>
#include <memory>
+#include <utility>
using namespace ::com::sun::star;
namespace chart::impl
{
- using ::com::sun::star::uno::Reference;
- using ::com::sun::star::frame::XModel;
using ::com::sun::star::lang::DisposedException;
-UndoElement::UndoElement( const OUString& i_actionString, const rtl::Reference<::chart::ChartModel>& i_documentModel, const std::shared_ptr< ChartModelClone >& i_modelClone )
- :m_sActionString( i_actionString )
- ,m_xDocumentModel( i_documentModel )
- ,m_pModelClone( i_modelClone )
+UndoElement::UndoElement( OUString i_actionString, rtl::Reference<::chart::ChartModel> i_documentModel, std::shared_ptr< ChartModelClone > i_modelClone )
+ :m_sActionString(std::move( i_actionString ))
+ ,m_xDocumentModel(std::move( i_documentModel ))
+ ,m_pModelClone(std::move( i_modelClone ))
{
}
@@ -66,7 +65,7 @@ void UndoElement::impl_toggleModelState()
// apply the previous snapshot to our model
m_pModelClone->applyToModel( m_xDocumentModel );
// remember the new snapshot, for the next toggle
- m_pModelClone = pNewClone;
+ m_pModelClone = std::move(pNewClone);
}
void SAL_CALL UndoElement::undo( )
diff --git a/chart2/source/controller/main/UndoActions.hxx b/chart2/source/controller/main/UndoActions.hxx
index 3291a72be649..a86479e167ce 100644
--- a/chart2/source/controller/main/UndoActions.hxx
+++ b/chart2/source/controller/main/UndoActions.hxx
@@ -53,9 +53,9 @@ public:
is the cloned model from before the changes, which the Undo action represents, have been applied.
Upon <member>invoking</member>, the clone model is applied to the document model.
*/
- UndoElement( const OUString & i_actionString,
- const rtl::Reference<::chart::ChartModel>& i_documentModel,
- const std::shared_ptr< ChartModelClone >& i_modelClone
+ UndoElement( OUString i_actionString,
+ rtl::Reference<::chart::ChartModel> i_documentModel,
+ std::shared_ptr< ChartModelClone > i_modelClone
);
virtual ~UndoElement() override;
diff --git a/chart2/source/controller/main/UndoCommandDispatch.cxx b/chart2/source/controller/main/UndoCommandDispatch.cxx
index 3a05412d1670..c90fac3f4045 100644
--- a/chart2/source/controller/main/UndoCommandDispatch.cxx
+++ b/chart2/source/controller/main/UndoCommandDispatch.cxx
@@ -20,13 +20,12 @@
#include "UndoCommandDispatch.hxx"
#include <ChartModel.hxx>
-#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/document/UndoFailedException.hpp>
-#include <com/sun/star/document/XUndoManagerSupplier.hpp>
+#include <utility>
#include <vcl/svapp.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <svtools/strings.hrc>
#include <svtools/svtresid.hxx>
@@ -41,9 +40,9 @@ namespace chart
UndoCommandDispatch::UndoCommandDispatch(
const Reference< uno::XComponentContext > & xContext,
- const rtl::Reference<::chart::ChartModel> & xModel ) :
+ rtl::Reference<::chart::ChartModel> xModel ) :
CommandDispatch( xContext ),
- m_xModel( xModel )
+ m_xModel(std::move( xModel ))
{
m_xUndoManager.set( m_xModel->getUndoManager(), uno::UNO_SET_THROW );
}
@@ -122,7 +121,7 @@ void SAL_CALL UndoCommandDispatch::dispatch(
// ____ WeakComponentImplHelperBase ____
/// is called when this is disposed
-void SAL_CALL UndoCommandDispatch::disposing()
+void UndoCommandDispatch::disposing(std::unique_lock<std::mutex>& /*rGuard*/)
{
Reference< util::XModifyBroadcaster > xBroadcaster( m_xUndoManager, uno::UNO_QUERY );
OSL_ENSURE( xBroadcaster.is(), "UndoCommandDispatch::initialize: missing modification broadcaster interface!" );
diff --git a/chart2/source/controller/main/UndoCommandDispatch.hxx b/chart2/source/controller/main/UndoCommandDispatch.hxx
index 7be241a5fbc3..f872387c761b 100644
--- a/chart2/source/controller/main/UndoCommandDispatch.hxx
+++ b/chart2/source/controller/main/UndoCommandDispatch.hxx
@@ -35,7 +35,7 @@ class UndoCommandDispatch : public CommandDispatch
public:
explicit UndoCommandDispatch(
const css::uno::Reference< css::uno::XComponentContext > & xContext,
- const rtl::Reference<::chart::ChartModel> & xModel );
+ rtl::Reference<::chart::ChartModel> xModel );
virtual ~UndoCommandDispatch() override;
// late initialisation, especially for adding as listener
@@ -49,7 +49,7 @@ protected:
// ____ WeakComponentImplHelperBase ____
/// is called when this is disposed
- virtual void SAL_CALL disposing() override;
+ virtual void disposing(std::unique_lock<std::mutex>& rGuard) override;
// ____ XEventListener (base of XModifyListener) ____
virtual void SAL_CALL disposing(
diff --git a/chart2/source/controller/main/UndoGuard.cxx b/chart2/source/controller/main/UndoGuard.cxx
index 420347eb40d4..4e870c36d07d 100644
--- a/chart2/source/controller/main/UndoGuard.cxx
+++ b/chart2/source/controller/main/UndoGuard.cxx
@@ -23,9 +23,9 @@
#include <ChartModel.hxx>
#include <com/sun/star/document/XUndoManager.hpp>
-#include <com/sun/star/frame/XModel.hpp>
+#include <utility>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
@@ -34,10 +34,10 @@ using ::com::sun::star::uno::Reference;
namespace chart
{
-UndoGuard::UndoGuard( const OUString& i_undoString, const uno::Reference< document::XUndoManager > & i_undoManager,
+UndoGuard::UndoGuard( OUString i_undoString, const uno::Reference< document::XUndoManager > & i_undoManager,
const ModelFacet i_facet )
:m_xUndoManager( i_undoManager )
- ,m_aUndoString( i_undoString )
+ ,m_aUndoString(std::move( i_undoString ))
,m_bActionPosted( false )
{
m_xChartModel = dynamic_cast<::chart::ChartModel*>(i_undoManager->getParent().get());
diff --git a/chart2/source/controller/main/UndoGuard.hxx b/chart2/source/controller/main/UndoGuard.hxx
index 9808da8bc1ad..90443a247af4 100644
--- a/chart2/source/controller/main/UndoGuard.hxx
+++ b/chart2/source/controller/main/UndoGuard.hxx
@@ -37,7 +37,7 @@ class UndoGuard
{
public:
explicit UndoGuard(
- const OUString& i_undoMessage,
+ OUString i_undoMessage,
const css::uno::Reference< css::document::XUndoManager > & i_undoManager,
const ModelFacet i_facet = E_MODEL
);
diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index f13f2390debc..cb660661c140 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -19,7 +19,6 @@
#include <PropertyHelper.hxx>
#include <chartview/DrawModelWrapper.hxx>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <sfx2/weldutils.hxx>
@@ -409,6 +408,12 @@ void ChartAreaPanel::setFillStyleAndBitmap(const XFillStyleItem* pStyleItem,
xPropSet->setPropertyValue("FillBitmapName", aBitmap);
}
+void ChartAreaPanel::setFillUseBackground(const XFillStyleItem* pStyleItem,
+ const XFillUseSlideBackgroundItem& /*rItem*/)
+{
+ setFillStyle(*pStyleItem);
+}
+
void ChartAreaPanel::updateData()
{
if (!mbUpdate || !mbModelValid)
@@ -507,7 +512,7 @@ void ChartAreaPanel::selectionChanged(bool bCorrectType)
updateData();
}
-void ChartAreaPanel::doUpdateModel(rtl::Reference<::chart::ChartModel> xModel)
+void ChartAreaPanel::doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel)
{
if (mbModelValid)
{
diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.hxx b/chart2/source/controller/sidebar/ChartAreaPanel.hxx
index 132513412518..e1edd3d832e8 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.hxx
@@ -57,6 +57,7 @@ public:
virtual void setFillStyleAndGradient(const XFillStyleItem* pStyleItem, const XFillGradientItem& rGradientItem) override;
virtual void setFillStyleAndHatch(const XFillStyleItem* pStyleItem, const XFillHatchItem& rHatchItem) override;
virtual void setFillStyleAndBitmap(const XFillStyleItem* pStyleItem, const XFillBitmapItem& rBitmapItem) override;
+ virtual void setFillUseBackground(const XFillStyleItem* pStyleItem, const XFillUseSlideBackgroundItem& rItem) override;
virtual void updateData() override;
virtual void modelInvalid() override;
@@ -72,7 +73,7 @@ private:
rtl::Reference<ChartSidebarSelectionListener> mxSelectionListener;
void Initialize();
- void doUpdateModel(rtl::Reference<::chart::ChartModel> xModel);
+ void doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel);
bool mbUpdate;
bool mbModelValid;
diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.cxx b/chart2/source/controller/sidebar/ChartAxisPanel.cxx
index 2b6bc5535b27..48a4620684b3 100644
--- a/chart2/source/controller/sidebar/ChartAxisPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAxisPanel.cxx
@@ -17,11 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
#include <com/sun/star/chart2/AxisOrientation.hpp>
-#include <com/sun/star/chart2/XAxis.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <vcl/svapp.hxx>
#include <sal/log.hxx>
@@ -29,6 +26,7 @@
#include "ChartAxisPanel.hxx"
#include <ChartController.hxx>
#include <ChartModel.hxx>
+#include <Axis.hxx>
using namespace css;
using namespace css::uno;
@@ -38,10 +36,9 @@ namespace chart::sidebar {
namespace {
bool isLabelShown(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID)
+ std::u16string_view rCID)
{
- css::uno::Reference< css::beans::XPropertySet > xAxis(
- ObjectIdentifier::getAxisForCID(rCID, xModel), uno::UNO_QUERY );
+ rtl::Reference< ::chart::Axis > xAxis = ObjectIdentifier::getAxisForCID(rCID, xModel);
if (!xAxis.is())
return false;
@@ -56,10 +53,9 @@ bool isLabelShown(const rtl::Reference<::chart::ChartModel>& xModel,
}
void setLabelShown(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID, bool bVisible)
+ std::u16string_view rCID, bool bVisible)
{
- css::uno::Reference< css::beans::XPropertySet > xAxis(
- ObjectIdentifier::getAxisForCID(rCID, xModel), uno::UNO_QUERY );
+ rtl::Reference< ::chart::Axis > xAxis = ObjectIdentifier::getAxisForCID(rCID, xModel);
if (!xAxis.is())
return;
@@ -81,10 +77,9 @@ AxisLabelPosMap const aLabelPosMap[] = {
};
sal_Int32 getLabelPosition(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID)
+ std::u16string_view rCID)
{
- css::uno::Reference< css::beans::XPropertySet > xAxis(
- ObjectIdentifier::getAxisForCID(rCID, xModel), uno::UNO_QUERY );
+ rtl::Reference< ::chart::Axis > xAxis = ObjectIdentifier::getAxisForCID(rCID, xModel);
if (!xAxis.is())
return 0;
@@ -105,10 +100,9 @@ sal_Int32 getLabelPosition(const rtl::Reference<::chart::ChartModel>& xModel,
}
void setLabelPosition(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID, sal_Int32 nPos)
+ std::u16string_view rCID, sal_Int32 nPos)
{
- css::uno::Reference< css::beans::XPropertySet > xAxis(
- ObjectIdentifier::getAxisForCID(rCID, xModel), uno::UNO_QUERY );
+ rtl::Reference< ::chart::Axis > xAxis = ObjectIdentifier::getAxisForCID(rCID, xModel);
if (!xAxis.is())
return;
@@ -124,9 +118,9 @@ void setLabelPosition(const rtl::Reference<::chart::ChartModel>& xModel,
}
bool isReverse(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID)
+ std::u16string_view rCID)
{
- css::uno::Reference< css::chart2::XAxis > xAxis =
+ rtl::Reference< Axis > xAxis =
ObjectIdentifier::getAxisForCID(rCID, xModel);
if (!xAxis.is())
@@ -138,9 +132,9 @@ bool isReverse(const rtl::Reference<::chart::ChartModel>& xModel,
}
void setReverse(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID, bool bReverse)
+ std::u16string_view rCID, bool bReverse)
{
- css::uno::Reference< css::chart2::XAxis > xAxis =
+ rtl::Reference< Axis > xAxis =
ObjectIdentifier::getAxisForCID(rCID, xModel);
if (!xAxis.is())
@@ -176,10 +170,10 @@ OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel)
}
void setAxisRotation(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID, double nVal)
+ std::u16string_view rCID, double nVal)
{
- css::uno::Reference< css::beans::XPropertySet > xAxis(
- ObjectIdentifier::getAxisForCID(rCID, xModel), uno::UNO_QUERY );
+ rtl::Reference< ::chart::Axis > xAxis =
+ ObjectIdentifier::getAxisForCID(rCID, xModel);
if (!xAxis.is())
return;
@@ -188,10 +182,10 @@ void setAxisRotation(const rtl::Reference<::chart::ChartModel>& xModel,
}
double getAxisRotation(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID)
+ std::u16string_view rCID)
{
- css::uno::Reference< css::beans::XPropertySet > xAxis(
- ObjectIdentifier::getAxisForCID(rCID, xModel), uno::UNO_QUERY );
+ rtl::Reference< ::chart::Axis > xAxis =
+ ObjectIdentifier::getAxisForCID(rCID, xModel);
if (!xAxis.is())
return 0;
@@ -306,7 +300,7 @@ void ChartAxisPanel::modelInvalid()
mbModelValid = false;
}
-void ChartAxisPanel::doUpdateModel(rtl::Reference<::chart::ChartModel> xModel)
+void ChartAxisPanel::doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel)
{
if (mbModelValid)
{
diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.hxx b/chart2/source/controller/sidebar/ChartAxisPanel.hxx
index 32f3c0b3331e..e5ed4b5ebcc6 100644
--- a/chart2/source/controller/sidebar/ChartAxisPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartAxisPanel.hxx
@@ -81,7 +81,7 @@ private:
bool mbModelValid;
void Initialize();
- void doUpdateModel(rtl::Reference<::chart::ChartModel> xModel);
+ void doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel);
DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
DECL_LINK(ListBoxHdl, weld::ComboBox&, void);
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index ed94c0b0fa45..f5c79133434c 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -30,6 +30,7 @@
#include <comphelper/lok.hxx>
#include <sal/log.hxx>
#include <sfx2/viewsh.hxx>
+#include <utility>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
namespace chart::sidebar {
@@ -38,6 +39,9 @@ namespace {
OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel)
{
+ if (!xModel.is())
+ return OUString();
+
css::uno::Reference<css::frame::XController> xController(xModel->getCurrentController());
css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(xController, css::uno::UNO_QUERY);
if (!xSelectionSupplier.is())
@@ -77,16 +81,16 @@ css::uno::Reference<css::beans::XPropertySet> getPropSet(
}
ChartColorWrapper::ChartColorWrapper(
- rtl::Reference<::chart::ChartModel> const & xModel,
+ rtl::Reference<::chart::ChartModel> xModel,
SvxColorToolBoxControl* pControl,
- const OUString& rName):
- mxModel(xModel),
+ OUString aName):
+ mxModel(std::move(xModel)),
mpControl(pControl),
- maPropertyName(rName)
+ maPropertyName(std::move(aName))
{
}
-void ChartColorWrapper::operator()([[maybe_unused]] const OUString& , const svx::NamedThemedColor& rColor)
+void ChartColorWrapper::operator()([[maybe_unused]] const OUString& , const NamedColor& rColor)
{
css::uno::Reference<css::beans::XPropertySet> xPropSet = getPropSet(mxModel);
@@ -96,7 +100,7 @@ void ChartColorWrapper::operator()([[maybe_unused]] const OUString& , const svx:
return;
}
- xPropSet->setPropertyValue(maPropertyName, css::uno::makeAny(rColor.m_aColor));
+ xPropSet->setPropertyValue(maPropertyName, css::uno::Any(rColor.m_aColor));
}
void ChartColorWrapper::updateModel(const rtl::Reference<::chart::ChartModel>& xModel)
@@ -106,7 +110,7 @@ void ChartColorWrapper::updateModel(const rtl::Reference<::chart::ChartModel>& x
void ChartColorWrapper::updateData()
{
- static constexpr OUStringLiteral aLineColor = u"LineColor";
+ static constexpr OUString aLineColor = u"LineColor"_ustr;
static const std::u16string_view aCommands[2] = {u".uno:XLineColor", u".uno:FillColor"};
css::uno::Reference<css::beans::XPropertySet> xPropSet = getPropSet(mxModel);
@@ -125,18 +129,18 @@ void ChartColorWrapper::updateData()
SfxViewShell* pViewShell = SfxViewShell::Current();
if (comphelper::LibreOfficeKit::isActive() && pViewShell && (maPropertyName == aLineColor))
{
- std::string sCommand = OUStringToOString(aUrl.Complete, RTL_TEXTENCODING_ASCII_US).getStr();
+ OString sCommand = OUStringToOString(aUrl.Complete, RTL_TEXTENCODING_ASCII_US);
sal_Int32 nColor = -1;
aEvent.State >>= nColor;
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
- (sCommand + "=" + std::to_string(nColor)).c_str());
+ sCommand + "=" + OString::number(nColor));
}
}
ChartLineStyleWrapper::ChartLineStyleWrapper(
- rtl::Reference<::chart::ChartModel> const & xModel,
+ rtl::Reference<::chart::ChartModel> xModel,
SvxLineStyleToolBoxControl* pControl)
- : mxModel(xModel)
+ : mxModel(std::move(xModel))
, mpControl(pControl)
{
}
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.hxx b/chart2/source/controller/sidebar/ChartColorWrapper.hxx
index 861f1e1628ea..70b3ce8fa47c 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.hxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.hxx
@@ -9,8 +9,9 @@
#pragma once
-#include <com/sun/star/uno/Reference.hxx>
-#include <svx/Palette.hxx>
+#include <ChartModel.hxx>
+
+#include <sfx2/namedcolor.hxx>
#include <rtl/ref.hxx>
namespace com::sun::star::frame { class XModel; }
@@ -23,11 +24,11 @@ namespace chart::sidebar {
class ChartColorWrapper
{
public:
- ChartColorWrapper(rtl::Reference<::chart::ChartModel> const & xModel,
+ ChartColorWrapper(rtl::Reference<::chart::ChartModel> xModel,
SvxColorToolBoxControl* pControl,
- const OUString& rPropertyName);
+ OUString rPropertyName);
- void operator()(const OUString& rCommand, const svx::NamedThemedColor& rColor);
+ void operator()(const OUString& rCommand, const NamedColor& rColor);
// ColorSelectFunction signature
void updateModel(const rtl::Reference<::chart::ChartModel>& xModel);
@@ -46,7 +47,7 @@ private:
class ChartLineStyleWrapper
{
public:
- ChartLineStyleWrapper(rtl::Reference<::chart::ChartModel> const & xModel,
+ ChartLineStyleWrapper(rtl::Reference<::chart::ChartModel> xModel,
SvxLineStyleToolBoxControl* pControl);
bool operator()(std::u16string_view rCommand, const css::uno::Any& rValue);
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 572ea7de4bd3..1e5e6e9403fa 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -19,8 +19,6 @@
#include <com/sun/star/chart2/LegendPosition.hpp>
#include <com/sun/star/chart/ChartLegendExpansion.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <vcl/svapp.hxx>
@@ -28,11 +26,11 @@
#include <ChartController.hxx>
#include <comphelper/processfactory.hxx>
+#include <Legend.hxx>
#include <LegendHelper.hxx>
-#include <ChartModelHelper.hxx>
#include <AxisHelper.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <ChartModel.hxx>
#include <BaseCoordinateSystem.hxx>
@@ -75,7 +73,7 @@ bool isLegendVisible(const css::uno::Reference<css::frame::XModel>& xModel)
if (!pModel)
return false;
- Reference< beans::XPropertySet > xLegendProp( LegendHelper::getLegend(*pModel), uno::UNO_QUERY );
+ rtl::Reference< Legend > xLegendProp = LegendHelper::getLegend(*pModel);
if( xLegendProp.is())
{
try
@@ -112,7 +110,7 @@ bool isLegendOverlay(const css::uno::Reference<css::frame::XModel>& xModel)
if (!pModel)
return false;
- Reference< beans::XPropertySet > xLegendProp(LegendHelper::getLegend(*pModel), uno::UNO_QUERY);
+ rtl::Reference< Legend > xLegendProp = LegendHelper::getLegend(*pModel);
if( xLegendProp.is())
{
try
@@ -137,7 +135,7 @@ void setLegendOverlay(const css::uno::Reference<css::frame::XModel>& xModel, boo
if (!pModel)
return;
- Reference<beans::XPropertySet> xLegendProp(LegendHelper::getLegend(*pModel), uno::UNO_QUERY);
+ rtl::Reference<Legend> xLegendProp = LegendHelper::getLegend(*pModel);
if (!xLegendProp.is())
return;
@@ -146,19 +144,18 @@ void setLegendOverlay(const css::uno::Reference<css::frame::XModel>& xModel, boo
bool isTitleVisible(const rtl::Reference<::chart::ChartModel>& xModel, TitleHelper::eTitleType eTitle)
{
- css::uno::Reference<css::uno::XInterface> xTitle = TitleHelper::getTitle(eTitle, xModel);
+ rtl::Reference<Title> xTitle = TitleHelper::getTitle(eTitle, xModel);
if (!xTitle.is())
return false;
- css::uno::Reference<css::beans::XPropertySet> xPropSet(xTitle, css::uno::UNO_QUERY_THROW);
- css::uno::Any aAny = xPropSet->getPropertyValue("Visible");
+ css::uno::Any aAny = xTitle->getPropertyValue("Visible");
bool bVisible = aAny.get<bool>();
return bVisible;
}
bool isGridVisible(const rtl::Reference<::chart::ChartModel>& xModel, GridType eType)
{
- rtl::Reference< Diagram > xDiagram(ChartModelHelper::findDiagram(xModel));
+ rtl::Reference< Diagram > xDiagram(xModel->getFirstChartDiagram());
if(xDiagram.is())
{
sal_Int32 nDimensionIndex = 0;
@@ -175,7 +172,7 @@ bool isGridVisible(const rtl::Reference<::chart::ChartModel>& xModel, GridType e
void setGridVisible(const rtl::Reference<::chart::ChartModel>& xModel, GridType eType, bool bVisible)
{
- rtl::Reference< Diagram > xDiagram(ChartModelHelper::findDiagram(xModel));
+ rtl::Reference< Diagram > xDiagram(xModel->getFirstChartDiagram());
if(!xDiagram.is())
return;
@@ -195,7 +192,7 @@ void setGridVisible(const rtl::Reference<::chart::ChartModel>& xModel, GridType
bool isAxisVisible(const rtl::Reference<::chart::ChartModel>& xModel, AxisType eType)
{
- rtl::Reference< Diagram > xDiagram(ChartModelHelper::findDiagram(xModel));
+ rtl::Reference< Diagram > xDiagram(xModel->getFirstChartDiagram());
if(xDiagram.is())
{
sal_Int32 nDimensionIndex = 0;
@@ -214,7 +211,7 @@ bool isAxisVisible(const rtl::Reference<::chart::ChartModel>& xModel, AxisType e
void setAxisVisible(const rtl::Reference<::chart::ChartModel>& xModel, AxisType eType, bool bVisible)
{
- rtl::Reference< Diagram > xDiagram(ChartModelHelper::findDiagram(xModel));
+ rtl::Reference< Diagram > xDiagram(xModel->getFirstChartDiagram());
if(!xDiagram.is())
return;
@@ -238,7 +235,7 @@ sal_Int32 getLegendPos(const css::uno::Reference<css::frame::XModel>& xModel)
if (!pModel)
return -1;
- Reference< beans::XPropertySet > xLegendProp( LegendHelper::getLegend(*pModel), uno::UNO_QUERY );
+ rtl::Reference< Legend > xLegendProp = LegendHelper::getLegend(*pModel);
if (!xLegendProp.is())
return -1;
@@ -265,7 +262,7 @@ void setLegendPos(const css::uno::Reference<css::frame::XModel>& xModel, sal_Int
if (!pModel)
return;
- Reference< beans::XPropertySet > xLegendProp( LegendHelper::getLegend(*pModel), uno::UNO_QUERY );
+ rtl::Reference< Legend > xLegendProp = LegendHelper::getLegend(*pModel);
if (!xLegendProp.is())
return;
@@ -406,21 +403,21 @@ void ChartElementsPanel::Initialize()
namespace {
-css::uno::Reference<css::chart2::XChartType> getChartType(const rtl::Reference<ChartModel>& xModel)
+rtl::Reference<ChartType> getChartType(const rtl::Reference<ChartModel>& xModel)
{
rtl::Reference<Diagram > xDiagram = xModel->getFirstChartDiagram();
if (!xDiagram.is())
- return css::uno::Reference<css::chart2::XChartType>();
+ return nullptr;
const std::vector<rtl::Reference<BaseCoordinateSystem>> & xCooSysSequence(xDiagram->getBaseCoordinateSystems());
if (xCooSysSequence.empty())
- return css::uno::Reference<css::chart2::XChartType>();
+ return nullptr;
- css::uno::Sequence<css::uno::Reference<css::chart2::XChartType>> xChartTypeSequence(xCooSysSequence[0]->getChartTypes());
+ const std::vector<rtl::Reference<ChartType>> & xChartTypeSequence(xCooSysSequence[0]->getChartTypes2());
- if (!xChartTypeSequence.hasElements())
- return css::uno::Reference<css::chart2::XChartType>();
+ if (xChartTypeSequence.empty())
+ return nullptr;
return xChartTypeSequence[0];
}
@@ -432,8 +429,10 @@ void ChartElementsPanel::updateData()
if (!mbModelValid)
return;
- rtl::Reference< Diagram > xDiagram(ChartModelHelper::findDiagram(mxModel));
- sal_Int32 nDimension = DiagramHelper::getDimension(xDiagram);
+ rtl::Reference< Diagram > xDiagram(mxModel->getFirstChartDiagram());
+ sal_Int32 nDimension = 0;
+ if (xDiagram)
+ nDimension = xDiagram->getDimension();
SolarMutexGuard aGuard;
mxCBLegend->set_active(isLegendVisible(mxModel));
@@ -556,7 +555,7 @@ void ChartElementsPanel::modelInvalid()
mbModelValid = false;
}
-void ChartElementsPanel::doUpdateModel(rtl::Reference<::chart::ChartModel> xModel)
+void ChartElementsPanel::doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel)
{
if (mbModelValid)
{
@@ -635,7 +634,8 @@ IMPL_LINK(ChartElementsPanel, EditHdl, weld::Entry&, rEdit, void)
// set it
OUString aText(rEdit.get_text());
- TitleHelper::setCompleteString(aText, TitleHelper::getTitle(aTitleType, mxModel), comphelper::getProcessComponentContext());
+ TitleHelper::setCompleteString(aText, TitleHelper::getTitle(aTitleType, mxModel),
+ comphelper::getProcessComponentContext(), nullptr, true);
}
IMPL_LINK_NOARG(ChartElementsPanel, LegendPosHdl, weld::ComboBox&, void)
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.hxx b/chart2/source/controller/sidebar/ChartElementsPanel.hxx
index 07c7ee19c3db..2e0dee28b68f 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.hxx
@@ -102,7 +102,7 @@ private:
OUString maTextSubTitle;
void Initialize();
- void doUpdateModel(rtl::Reference<::chart::ChartModel> xModel);
+ void doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel);
void setTitleVisible(TitleHelper::eTitleType eTitle, bool bVisible);
diff --git a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
index 0db870b8bcc5..c9430791b3c9 100644
--- a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
@@ -18,7 +18,6 @@
*/
#include <com/sun/star/chart/ErrorBarStyle.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include "ChartErrorBarPanel.hxx"
@@ -42,13 +41,13 @@ enum class ErrorBarDirection
};
css::uno::Reference<css::beans::XPropertySet> getErrorBarPropSet(
- const rtl::Reference<::chart::ChartModel>& xModel, const OUString& rCID)
+ const rtl::Reference<::chart::ChartModel>& xModel, std::u16string_view rCID)
{
return ObjectIdentifier::getObjectPropertySet(rCID, xModel);
}
bool showPositiveError(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID)
+ std::u16string_view rCID)
{
css::uno::Reference<css::beans::XPropertySet> xPropSet =
getErrorBarPropSet(xModel, rCID);
@@ -67,7 +66,7 @@ bool showPositiveError(const rtl::Reference<::chart::ChartModel>& xModel,
}
bool showNegativeError(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID)
+ std::u16string_view rCID)
{
css::uno::Reference<css::beans::XPropertySet> xPropSet =
getErrorBarPropSet(xModel, rCID);
@@ -86,7 +85,7 @@ bool showNegativeError(const rtl::Reference<::chart::ChartModel>& xModel,
}
void setShowPositiveError(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID, bool bShow)
+ std::u16string_view rCID, bool bShow)
{
css::uno::Reference<css::beans::XPropertySet> xPropSet =
getErrorBarPropSet(xModel, rCID);
@@ -98,7 +97,7 @@ void setShowPositiveError(const rtl::Reference<::chart::ChartModel>& xModel,
}
void setShowNegativeError(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID, bool bShow)
+ std::u16string_view rCID, bool bShow)
{
css::uno::Reference<css::beans::XPropertySet> xPropSet =
getErrorBarPropSet(xModel, rCID);
@@ -126,7 +125,7 @@ ErrorBarTypeMap const aErrorBarType[] = {
};
sal_Int32 getTypePos(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID)
+ std::u16string_view rCID)
{
css::uno::Reference<css::beans::XPropertySet> xPropSet =
getErrorBarPropSet(xModel, rCID);
@@ -152,7 +151,7 @@ sal_Int32 getTypePos(const rtl::Reference<::chart::ChartModel>& xModel,
}
void setTypePos(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID, sal_Int32 nPos)
+ std::u16string_view rCID, sal_Int32 nPos)
{
css::uno::Reference<css::beans::XPropertySet> xPropSet =
getErrorBarPropSet(xModel, rCID);
@@ -171,7 +170,7 @@ void setTypePos(const rtl::Reference<::chart::ChartModel>& xModel,
}
double getValue(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID, ErrorBarDirection eDir)
+ std::u16string_view rCID, ErrorBarDirection eDir)
{
css::uno::Reference<css::beans::XPropertySet> xPropSet =
getErrorBarPropSet(xModel, rCID);
@@ -195,7 +194,7 @@ double getValue(const rtl::Reference<::chart::ChartModel>& xModel,
}
void setValue(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID, double nVal, ErrorBarDirection eDir)
+ std::u16string_view rCID, double nVal, ErrorBarDirection eDir)
{
css::uno::Reference<css::beans::XPropertySet> xPropSet =
getErrorBarPropSet(xModel, rCID);
@@ -370,7 +369,7 @@ void ChartErrorBarPanel::modelInvalid()
mbModelValid = false;
}
-void ChartErrorBarPanel::doUpdateModel(rtl::Reference<::chart::ChartModel> xModel)
+void ChartErrorBarPanel::doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel)
{
if (mbModelValid)
{
diff --git a/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx b/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx
index 1613006b7ea5..92f7afb0ad53 100644
--- a/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx
@@ -79,7 +79,7 @@ private:
bool mbModelValid;
void Initialize();
- void doUpdateModel(rtl::Reference<::chart::ChartModel> xModel);
+ void doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel);
DECL_LINK(RadioBtnHdl, weld::Toggleable&, void);
DECL_LINK(ListBoxHdl, weld::ComboBox&, void);
diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx
index 94658d26ed2d..46cec9695f4d 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx
@@ -13,7 +13,6 @@
#include <ChartModel.hxx>
#include <svx/xlnwtit.hxx>
-#include <svx/xlinjoit.hxx>
#include <svx/xlntrit.hxx>
#include <svx/linectrl.hxx>
@@ -22,7 +21,6 @@
#include <vcl/svapp.hxx>
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <comphelper/lok.hxx>
@@ -56,10 +54,7 @@ OUString getCID(const rtl::Reference<::chart::ChartModel>& xModel)
css::uno::Any aAny = xSelectionSupplier->getSelection();
if (!aAny.hasValue())
- {
- xSelectionSupplier->select(css::uno::makeAny(OUString("CID/Page=")));
- aAny = xSelectionSupplier->getSelection();
- }
+ return OUString();
OUString aCID;
aAny >>= aCID;
@@ -200,7 +195,7 @@ void ChartLinePanel::selectionChanged(bool bCorrectType)
updateData();
}
-void ChartLinePanel::doUpdateModel(rtl::Reference<::chart::ChartModel> xModel)
+void ChartLinePanel::doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel)
{
if (mbModelValid)
{
@@ -236,23 +231,6 @@ void ChartLinePanel::updateModel(css::uno::Reference<css::frame::XModel> xModel)
doUpdateModel(pModel);
}
-void ChartLinePanel::setLineJoint(const XLineJointItem* pItem)
-{
- css::uno::Reference<css::beans::XPropertySet> xPropSet =
- getPropSet(mxModel);
-
- if (!xPropSet.is())
- return;
-
- PreventUpdate aPreventUpdate(mbUpdate);
- if (pItem)
- xPropSet->setPropertyValue("LineJoint", css::uno::Any(pItem->GetValue()));
-}
-
-void ChartLinePanel::setLineCap(const XLineCapItem* /*pItem*/)
-{
-}
-
void ChartLinePanel::setLineTransparency(const XLineTransparenceItem& rItem)
{
css::uno::Reference<css::beans::XPropertySet> xPropSet =
@@ -285,7 +263,7 @@ void ChartLinePanel::updateLineWidth(bool bDisabled, bool bSetOrDefault, const S
if (comphelper::LibreOfficeKit::isActive() && pViewShell)
{
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
- (".uno:LineWidth=" + std::to_string(mnWidthCoreValue)).c_str());
+ ".uno:LineWidth=" + OString::number(mnWidthCoreValue));
}
}
diff --git a/chart2/source/controller/sidebar/ChartLinePanel.hxx b/chart2/source/controller/sidebar/ChartLinePanel.hxx
index 10bfd5a4cf0d..ca3d8be14244 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.hxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.hxx
@@ -16,10 +16,8 @@
#include "ChartSidebarSelectionListener.hxx"
#include "ChartColorWrapper.hxx"
-class XLineCapItem;
class XLineDashItem;
class XLineEndItem;
-class XLineJointItem;
class XLineStartItem;
class XLineStyleItem;
class XLineTransparenceItem;
@@ -62,8 +60,6 @@ public:
protected:
virtual void setLineTransparency(const XLineTransparenceItem& rItem) override;
- virtual void setLineJoint(const XLineJointItem* pItem) override;
- virtual void setLineCap(const XLineCapItem* pItem) override;
virtual void updateLineWidth(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem) override;
@@ -74,7 +70,7 @@ private:
rtl::Reference<ChartSidebarSelectionListener> mxSelectionListener;
void Initialize();
- void doUpdateModel(rtl::Reference<::chart::ChartModel> xModel);
+ void doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel);
bool mbUpdate;
bool mbModelValid;
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 27878f8926cc..9e94ac005ecb 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -18,14 +18,7 @@
*/
#include <com/sun/star/chart/ErrorBarStyle.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <vcl/svapp.hxx>
#include <sal/log.hxx>
@@ -33,10 +26,12 @@
#include "ChartSeriesPanel.hxx"
#include <ChartController.hxx>
#include <ChartModel.hxx>
+#include <ChartType.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
#include <RegressionCurveHelper.hxx>
+#include <RegressionCurveModel.hxx>
#include <StatisticsHelper.hxx>
#include <BaseCoordinateSystem.hxx>
@@ -49,9 +44,9 @@ namespace chart::sidebar {
namespace {
-bool isDataLabelVisible(const rtl::Reference<::chart::ChartModel>& xModel, const OUString& rCID)
+bool isDataLabelVisible(const rtl::Reference<::chart::ChartModel>& xModel, std::u16string_view rCID)
{
- css::uno::Reference< css::chart2::XDataSeries > xSeries =
+ rtl::Reference< DataSeries > xSeries =
ObjectIdentifier::getDataSeriesForCID(rCID, xModel);
if (!xSeries.is())
@@ -60,9 +55,9 @@ bool isDataLabelVisible(const rtl::Reference<::chart::ChartModel>& xModel, const
return DataSeriesHelper::hasDataLabelsAtSeries(xSeries);
}
-void setDataLabelVisible(const rtl::Reference<::chart::ChartModel>& xModel, const OUString& rCID, bool bVisible)
+void setDataLabelVisible(const rtl::Reference<::chart::ChartModel>& xModel, std::u16string_view rCID, bool bVisible)
{
- css::uno::Reference< css::chart2::XDataSeries > xSeries =
+ rtl::Reference< DataSeries > xSeries =
ObjectIdentifier::getDataSeriesForCID(rCID, xModel);
if (!xSeries.is())
@@ -90,10 +85,10 @@ LabelPlacementMap const aLabelPlacementMap[] = {
};
sal_Int32 getDataLabelPlacement(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID)
+ std::u16string_view rCID)
{
- css::uno::Reference< css::beans::XPropertySet > xSeries(
- ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xSeries =
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel);
if (!xSeries.is())
return 0;
@@ -115,10 +110,10 @@ sal_Int32 getDataLabelPlacement(const rtl::Reference<::chart::ChartModel>& xMode
}
void setDataLabelPlacement(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID, sal_Int32 nPos)
+ std::u16string_view rCID, sal_Int32 nPos)
{
- css::uno::Reference< css::beans::XPropertySet > xSeries(
- ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xSeries =
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel);
if (!xSeries.is())
return;
@@ -137,22 +132,22 @@ void setDataLabelPlacement(const rtl::Reference<::chart::ChartModel>& xModel,
}
bool isTrendlineVisible(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID)
+ std::u16string_view rCID)
{
- css::uno::Reference< css::chart2::XRegressionCurveContainer > xRegressionCurveContainer(
- ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xRegressionCurveContainer =
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel);
if (!xRegressionCurveContainer.is())
return false;
- return xRegressionCurveContainer->getRegressionCurves().hasElements();
+ return !xRegressionCurveContainer->getRegressionCurves2().empty();
}
void setTrendlineVisible(const rtl::Reference<::chart::ChartModel>&
- xModel, const OUString& rCID, bool bVisible)
+ xModel, std::u16string_view rCID, bool bVisible)
{
- css::uno::Reference< css::chart2::XRegressionCurveContainer > xRegressionCurveContainer(
- ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xRegressionCurveContainer =
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel);
if (!xRegressionCurveContainer.is())
return;
@@ -170,9 +165,9 @@ void setTrendlineVisible(const rtl::Reference<::chart::ChartModel>&
}
bool isErrorBarVisible(const rtl::Reference<::chart::ChartModel>& xModel,
- const OUString& rCID, bool bYError)
+ std::u16string_view rCID, bool bYError)
{
- css::uno::Reference< css::chart2::XDataSeries > xSeries =
+ rtl::Reference< DataSeries > xSeries =
ObjectIdentifier::getDataSeriesForCID(rCID, xModel);
if (!xSeries.is())
@@ -182,9 +177,9 @@ bool isErrorBarVisible(const rtl::Reference<::chart::ChartModel>& xModel,
}
void setErrorBarVisible(const rtl::Reference<::chart::ChartModel>&
- xModel, const OUString& rCID, bool bYError, bool bVisible)
+ xModel, std::u16string_view rCID, bool bYError, bool bVisible)
{
- css::uno::Reference< css::chart2::XDataSeries > xSeries =
+ rtl::Reference< DataSeries > xSeries =
ObjectIdentifier::getDataSeriesForCID(rCID, xModel);
if (!xSeries.is())
@@ -203,9 +198,9 @@ void setErrorBarVisible(const rtl::Reference<::chart::ChartModel>&
}
bool isPrimaryAxis(const rtl::Reference<::chart::ChartModel>&
- xModel, const OUString& rCID)
+ xModel, std::u16string_view rCID)
{
- css::uno::Reference< css::chart2::XDataSeries > xSeries =
+ rtl::Reference< DataSeries > xSeries =
ObjectIdentifier::getDataSeriesForCID(rCID, xModel);
if (!xSeries.is())
@@ -215,36 +210,35 @@ bool isPrimaryAxis(const rtl::Reference<::chart::ChartModel>&
}
void setAttachedAxisType(const rtl::Reference<::chart::ChartModel>&
- xModel, const OUString& rCID, bool bPrimary)
+ xModel, std::u16string_view rCID, bool bPrimary)
{
- const uno::Reference<chart2::XDataSeries>& xDataSeries = ObjectIdentifier::getDataSeriesForCID(rCID, xModel);
+ const rtl::Reference<DataSeries> xDataSeries = ObjectIdentifier::getDataSeriesForCID(rCID, xModel);
if (!xDataSeries.is())
return;
- uno::Reference<chart2::XDiagram> xDiagram = xModel->getFirstDiagram();
- DiagramHelper::attachSeriesToAxis(bPrimary, xDataSeries, xDiagram, comphelper::getProcessComponentContext());
+ rtl::Reference<Diagram> xDiagram = xModel->getFirstChartDiagram();
+ xDiagram->attachSeriesToAxis(bPrimary, xDataSeries, comphelper::getProcessComponentContext());
}
-css::uno::Reference<css::chart2::XChartType> getChartType(
+rtl::Reference<ChartType> getChartType(
const rtl::Reference<::chart::ChartModel>& xModel)
{
rtl::Reference<Diagram> xDiagram = xModel->getFirstChartDiagram();
- const std::vector< rtl::Reference< BaseCoordinateSystem > > xCooSysSequence( xDiagram->getBaseCoordinateSystems());
- css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > > xChartTypeSequence( xCooSysSequence[0]->getChartTypes() );
- return xChartTypeSequence[0];
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & xCooSysSequence( xDiagram->getBaseCoordinateSystems());
+ return xCooSysSequence[0]->getChartTypes2()[0];
}
-OUString getSeriesLabel(const rtl::Reference<::chart::ChartModel>& xModel, const OUString& rCID)
+OUString getSeriesLabel(const rtl::Reference<::chart::ChartModel>& xModel, std::u16string_view rCID)
{
- css::uno::Reference< css::chart2::XDataSeries > xSeries =
+ rtl::Reference< DataSeries > xSeries =
ObjectIdentifier::getDataSeriesForCID(rCID, xModel);
if (!xSeries.is())
return OUString();
- css::uno::Reference<css::chart2::XChartType> xChartType = getChartType(xModel);
- return DataSeriesHelper::getDataSeriesLabel(xSeries, xChartType->getRoleOfSequenceForSeriesLabel());
+ rtl::Reference<ChartType> xChartType = getChartType(xModel);
+ return xSeries->getLabelForRole(xChartType->getRoleOfSequenceForSeriesLabel());
}
OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel)
@@ -405,7 +399,7 @@ void ChartSeriesPanel::modelInvalid()
mbModelValid = false;
}
-void ChartSeriesPanel::doUpdateModel(rtl::Reference<::chart::ChartModel> xModel)
+void ChartSeriesPanel::doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel)
{
if (mbModelValid)
{
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
index b457667ec257..5b69cc3b959f 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -98,7 +98,7 @@ private:
bool mbModelValid;
void Initialize();
- void doUpdateModel(rtl::Reference<::chart::ChartModel> xModel);
+ void doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel);
DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
DECL_LINK(RadioBtnHdl, weld::Toggleable&, void);
diff --git a/chart2/source/controller/sidebar/ChartTypePanel.cxx b/chart2/source/controller/sidebar/ChartTypePanel.cxx
index d1d73fb3bd10..40423aa62ea1 100644
--- a/chart2/source/controller/sidebar/ChartTypePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartTypePanel.cxx
@@ -21,22 +21,16 @@
#include <TimerTriggeredControllerLock.hxx>
#include <ChartController.hxx>
-#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
#include <ChartResourceGroups.hxx>
#include <ChartTypeDialogController.hxx>
#include <ChartTypeManager.hxx>
#include <ChartTypeTemplate.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
#include <unonames.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
-
#include <svtools/valueset.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace css;
using namespace css::uno;
@@ -161,9 +155,10 @@ void ChartTypePanel::Initialize()
if (!m_xChartModel.is())
return;
rtl::Reference<::chart::ChartTypeManager> xChartTypeManager = m_xChartModel->getTypeManager();
- rtl::Reference<Diagram> xDiagram = ChartModelHelper::findDiagram(m_xChartModel);
- DiagramHelper::tTemplateWithServiceName aTemplate
- = DiagramHelper::getTemplateForDiagram(xDiagram, xChartTypeManager);
+ rtl::Reference<Diagram> xDiagram = m_xChartModel->getFirstChartDiagram();
+ Diagram::tTemplateWithServiceName aTemplate;
+ if (xDiagram)
+ aTemplate = xDiagram->getTemplate(xChartTypeManager);
OUString aServiceName(aTemplate.sServiceName);
bool bFound = false;
@@ -185,7 +180,7 @@ void ChartTypePanel::Initialize()
m_pCurrentMainType = getSelectedMainType();
//set ThreeDLookScheme
- aParameter.eThreeDLookScheme = ThreeDHelper::detectScheme(xDiagram);
+ aParameter.eThreeDLookScheme = xDiagram->detectScheme();
if (!aParameter.b3DLook
&& aParameter.eThreeDLookScheme != ThreeDLookScheme::ThreeDLookScheme_Realistic)
aParameter.eThreeDLookScheme = ThreeDLookScheme::ThreeDLookScheme_Realistic;
@@ -225,12 +220,13 @@ void ChartTypePanel::updateData()
if (!m_xChartModel.is())
return;
rtl::Reference<::chart::ChartTypeManager> xChartTypeManager = m_xChartModel->getTypeManager();
- rtl::Reference<Diagram> xDiagram = ChartModelHelper::findDiagram(m_xChartModel);
- DiagramHelper::tTemplateWithServiceName aTemplate
- = DiagramHelper::getTemplateForDiagram(xDiagram, xChartTypeManager);
+ rtl::Reference<Diagram> xDiagram = m_xChartModel->getFirstChartDiagram();
+ Diagram::tTemplateWithServiceName aTemplate;
+ if (xDiagram)
+ aTemplate = xDiagram->getTemplate(xChartTypeManager);
OUString aServiceName(aTemplate.sServiceName);
- sal_uInt16 nM = 0;
+ //sal_uInt16 nM = 0;
for (auto const& elem : m_aChartTypeDialogControllerList)
{
if (elem->isSubType(aServiceName))
@@ -239,7 +235,7 @@ void ChartTypePanel::updateData()
//m_pMainTypeList->select_entry_region(nM, nM);
break;
}
- ++nM;
+ //++nM;
}
}
@@ -263,7 +259,7 @@ void ChartTypePanel::HandleContextChange(const vcl::EnumContext& rContext)
void ChartTypePanel::modelInvalid() { mbModelValid = false; }
-void ChartTypePanel::doUpdateModel(rtl::Reference<::chart::ChartModel> xModel)
+void ChartTypePanel::doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel)
{
if (mbModelValid)
{
@@ -371,8 +367,8 @@ void ChartTypePanel::stateChanged()
commitToModel(aParameter);
//detect the new ThreeDLookScheme
- rtl::Reference<Diagram> xDiagram = ChartModelHelper::findDiagram(m_xChartModel);
- aParameter.eThreeDLookScheme = ThreeDHelper::detectScheme(xDiagram);
+ rtl::Reference<Diagram> xDiagram = m_xChartModel->getFirstChartDiagram();
+ aParameter.eThreeDLookScheme = xDiagram->detectScheme();
try
{
xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
@@ -415,13 +411,12 @@ void ChartTypePanel::selectMainType()
m_pCurrentMainType->adjustParameterToMainType(aParameter);
commitToModel(aParameter);
//detect the new ThreeDLookScheme
- aParameter.eThreeDLookScheme
- = ThreeDHelper::detectScheme(ChartModelHelper::findDiagram(m_xChartModel));
+ aParameter.eThreeDLookScheme = m_xChartModel->getFirstChartDiagram()->detectScheme();
if (!aParameter.b3DLook
&& aParameter.eThreeDLookScheme != ThreeDLookScheme::ThreeDLookScheme_Realistic)
aParameter.eThreeDLookScheme = ThreeDLookScheme::ThreeDLookScheme_Realistic;
- rtl::Reference<Diagram> xDiagram = ChartModelHelper::findDiagram(m_xChartModel);
+ rtl::Reference<Diagram> xDiagram = m_xChartModel->getFirstChartDiagram();
try
{
xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
diff --git a/chart2/source/controller/sidebar/ChartTypePanel.hxx b/chart2/source/controller/sidebar/ChartTypePanel.hxx
index 5555eba2f464..8df0020431db 100644
--- a/chart2/source/controller/sidebar/ChartTypePanel.hxx
+++ b/chart2/source/controller/sidebar/ChartTypePanel.hxx
@@ -94,7 +94,7 @@ private:
bool mbModelValid;
void Initialize();
- void doUpdateModel(rtl::Reference<::chart::ChartModel> xModel);
+ void doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel);
std::unique_ptr<Dim3DLookResourceGroup> m_pDim3DLookResourceGroup;
std::unique_ptr<StackingResourceGroup> m_pStackingResourceGroup;
diff --git a/chart2/source/controller/uitest/uiobject.cxx b/chart2/source/controller/uitest/uiobject.cxx
index ef4f4d7112c8..c75f15c3885c 100644
--- a/chart2/source/controller/uitest/uiobject.cxx
+++ b/chart2/source/controller/uitest/uiobject.cxx
@@ -11,22 +11,21 @@
#include <uiobject.hxx>
#include <ChartWindow.hxx>
+#include <ChartView.hxx>
#include <ChartController.hxx>
#include <ChartModel.hxx>
#include <ObjectHierarchy.hxx>
#include <chartview/ExplicitValueProvider.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-
-#include <comphelper/servicehelper.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <algorithm>
#include <iterator>
ChartUIObject::ChartUIObject(const VclPtr<chart::ChartWindow>& xChartWindow,
- const OUString& rCID):
- maCID(rCID),
+ OUString aCID):
+ maCID(std::move(aCID)),
mxChartWindow(xChartWindow)
{
}
@@ -96,6 +95,14 @@ OUString ChartUIObject::get_type() const
return "ChartUIObject for type: ";
}
+bool ChartUIObject::equals(const UIObject& rOther) const
+{
+ const ChartUIObject* pOther = dynamic_cast<const ChartUIObject*>(&rOther);
+ if (!pOther)
+ return false;
+ return mxChartWindow.get() == pOther->mxChartWindow.get();
+}
+
ChartWindowUIObject::ChartWindowUIObject(const VclPtr<chart::ChartWindow>& xChartWindow):
WindowUIObject(xChartWindow),
mxChartWindow(xChartWindow)
@@ -173,10 +180,9 @@ std::set<OUString> ChartWindowUIObject::get_children() const
if (!pController)
return aChildren;
- rtl::Reference<::chart::ChartModel> xChartDoc( pController->getChartModel() );
-
- css::uno::Reference<css::uno::XInterface> xChartView = pController->getChartView();
- chart::ExplicitValueProvider* pValueProvider = comphelper::getFromUnoTunnel<chart::ExplicitValueProvider>( xChartView );
+ rtl::Reference<::chart::ChartModel> xChartDoc = pController->getChartModel();
+ rtl::Reference<::chart::ChartView> xChartView = pController->getChartView();
+ chart::ExplicitValueProvider* pValueProvider = xChartView.get();
chart::ObjectHierarchy aHierarchy(xChartDoc, pValueProvider);
chart::ObjectIdentifier aIdentifier = chart::ObjectHierarchy::getRootNodeOID();
aChildren.insert(aIdentifier.getObjectCID());
diff --git a/chart2/source/model/main/Axis.hxx b/chart2/source/inc/Axis.hxx
index b85930a23456..e36acdbad7aa 100644
--- a/chart2/source/model/main/Axis.hxx
+++ b/chart2/source/inc/Axis.hxx
@@ -18,8 +18,7 @@
*/
#pragma once
-#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
+#include "OPropertySet.hxx"
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
@@ -27,10 +26,14 @@
#include <com/sun/star/chart2/XAxis.hpp>
#include <com/sun/star/chart2/XTitled.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <ModifyListenerHelper.hxx>
+#include "ModifyListenerHelper.hxx"
+#include "charttoolsdllapi.hxx"
+#include "PropertyHelper.hxx"
namespace chart
{
+class GridProperties;
+class Title;
namespace impl
{
@@ -44,8 +47,7 @@ typedef ::cppu::WeakImplHelper<
Axis_Base;
}
-class Axis final :
- public cppu::BaseMutex,
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) Axis final :
public impl::Axis_Base,
public ::property::OPropertySet
{
@@ -75,6 +77,7 @@ private:
// ____ OPropertySet ____
virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+public:
// ____ XPropertySet ____
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
@@ -101,6 +104,13 @@ private:
virtual void SAL_CALL removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+ rtl::Reference< ::chart::Title > getTitleObject2() const;
+ void setTitleObject( const rtl::Reference< ::chart::Title >& xNewTitle );
+
+ rtl::Reference< ::chart::GridProperties > getGridProperties2();
+ std::vector< rtl::Reference< ::chart::GridProperties > > getSubGridProperties2();
+
+private:
// ____ XModifyListener ____
virtual void SAL_CALL modified(
const css::lang::EventObject& aEvent ) override;
@@ -121,13 +131,15 @@ private:
css::chart2::ScaleData m_aScaleData;
- css::uno::Reference< css::beans::XPropertySet > m_xGrid;
+ rtl::Reference< ::chart::GridProperties > m_xGrid;
- css::uno::Sequence< css::uno::Reference< css::beans::XPropertySet > > m_aSubGridProperties;
+ std::vector< rtl::Reference< ::chart::GridProperties > > m_aSubGridProperties;
- css::uno::Reference< css::chart2::XTitle > m_xTitle;
+ rtl::Reference< ::chart::Title > m_xTitle;
};
+OOO_DLLPUBLIC_CHARTTOOLS const ::chart::tPropertyValueMap & StaticAxisDefaults();
+
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/AxisHelper.hxx b/chart2/source/inc/AxisHelper.hxx
index abe9ee1e257e..f39e54c1fc00 100644
--- a/chart2/source/inc/AxisHelper.hxx
+++ b/chart2/source/inc/AxisHelper.hxx
@@ -18,9 +18,11 @@
*/
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
#include <com/sun/star/chart2/ScaleData.hpp>
#include <rtl/ref.hxx>
+#include "GridProperties.hxx"
#include <vector>
@@ -38,9 +40,12 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
+class Axis;
class BaseCoordinateSystem;
+class ChartType;
+class Diagram;
-class OOO_DLLPUBLIC_CHARTTOOLS AxisHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) AxisHelper
{
public:
static css::uno::Reference< css::chart2::XScaling > createLinearScaling();
@@ -53,152 +58,151 @@ public:
static bool isLogarithmic( const css::uno::Reference< css::chart2::XScaling >& xScaling );
static void checkDateAxis( css::chart2::ScaleData& rScale, ExplicitCategoriesProvider* pExplicitCategoriesProvider, bool bChartTypeAllowsDateAxis );
- static css::chart2::ScaleData getDateCheckedScale( const css::uno::Reference< css::chart2::XAxis >& xAxis, ChartModel& rModel );
+ static css::chart2::ScaleData getDateCheckedScale( const rtl::Reference< ::chart::Axis >& xAxis, ChartModel& rModel );
static sal_Int32 getExplicitNumberFormatKeyForAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XCoordinateSystem >& xCorrespondingCoordinateSystem
- , const css::uno::Reference< css::chart2::XChartDocument>& xChartDoc
+ const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCorrespondingCoordinateSystem
+ , const rtl::Reference< ::chart::ChartModel>& xChartDoc
, bool bSearchForParallelAxisIfNothingIsFound );
- static css::uno::Reference<
- css::chart2::XAxis >
+ static rtl::Reference< ::chart::Axis >
createAxis( sal_Int32 nDimensionIndex, bool bMainAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ , const rtl::Reference< ::chart::Diagram >& xDiagram
, const css::uno::Reference< css::uno::XComponentContext >& xContext
, ReferenceSizeProvider * pRefSizeProvider = nullptr );
- static css::uno::Reference< css::chart2::XAxis >
+ static rtl::Reference< ::chart::Axis >
createAxis(
sal_Int32 nDimensionIndex
, sal_Int32 nAxisIndex // 0==main or 1==secondary axis
- , const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
+ , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys
, const css::uno::Reference< css::uno::XComponentContext > & xContext
, ReferenceSizeProvider * pRefSizeProvider = nullptr );
static void showAxis( sal_Int32 nDimensionIndex, bool bMainAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ , const rtl::Reference< ::chart::Diagram >& xDiagram
, const css::uno::Reference< css::uno::XComponentContext >& xContext
, ReferenceSizeProvider * pRefSizeProvider = nullptr );
static void showGrid( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
static void hideAxis( sal_Int32 nDimensionIndex, bool bMainAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
static void hideGrid( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
static bool isAxisShown( sal_Int32 nDimensionIndex, bool bMainAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
static bool isGridShown( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
- static void makeAxisVisible( const css::uno::Reference< css::chart2::XAxis >& xAxis );
- static void makeGridVisible( const css::uno::Reference< css::beans::XPropertySet >& xGridProperties );
+ static void makeAxisVisible( const rtl::Reference< ::chart::Axis >& xAxis );
+ static void makeGridVisible( const rtl::Reference< ::chart::GridProperties >& xGridProperties );
- static void makeAxisInvisible( const css::uno::Reference< css::chart2::XAxis >& xAxis );
- static void makeGridInvisible( const css::uno::Reference< css::beans::XPropertySet >& xGridProperties );
+ static void makeAxisInvisible( const rtl::Reference< ::chart::Axis >& xAxis );
+ static void makeGridInvisible( const rtl::Reference< ::chart::GridProperties >& xGridProperties );
- static void hideAxisIfNoDataIsAttached( const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram);
+ static void hideAxisIfNoDataIsAttached( const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::Diagram >& xDiagram);
- SAL_DLLPRIVATE static bool areAxisLabelsVisible( const css::uno::Reference< css::beans::XPropertySet >& xAxisProperties );
- static bool isAxisVisible( const css::uno::Reference< css::chart2::XAxis >& xAxis );
- static bool isGridVisible( const css::uno::Reference< css::beans::XPropertySet >& xGridProperties );
+ SAL_DLLPRIVATE static bool areAxisLabelsVisible( const rtl::Reference< ::chart::Axis >& xAxisProperties );
+ static bool isAxisVisible( const rtl::Reference< ::chart::Axis >& xAxis );
+ static bool isGridVisible( const rtl::Reference< ::chart::GridProperties >& xGridProperties );
static rtl::Reference< ::chart::BaseCoordinateSystem >
getCoordinateSystemByIndex(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ const rtl::Reference< ::chart::Diagram >& xDiagram
, sal_Int32 nIndex );
static rtl::Reference< ::chart::BaseCoordinateSystem >
getCoordinateSystemOfAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
- static css::uno::Reference< css::chart2::XAxis >
+ static rtl::Reference< ::chart::Axis >
getAxis( sal_Int32 nDimensionIndex, bool bMainAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
- static css::uno::Reference< css::chart2::XAxis >
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
+ static rtl::Reference< ::chart::Axis >
getAxis( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex
- , const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys );
+ , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys );
- static css::uno::Reference< css::chart2::XAxis >
- getCrossingMainAxis( const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys );
+ static rtl::Reference< ::chart::Axis >
+ getCrossingMainAxis( const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys );
- static css::uno::Reference< css::chart2::XAxis >
- getParallelAxis( const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ static rtl::Reference< ::chart::Axis >
+ getParallelAxis( const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
- static css::uno::Reference< css::beans::XPropertySet >
- getGridProperties( const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
+ static rtl::Reference< ::chart::GridProperties >
+ getGridProperties( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys
, sal_Int32 nDimensionIndex
, sal_Int32 nAxisIndex //0: Primary axis, 1: secondary axis
, sal_Int32 nSubGridIndex //-1: Main Grid; 0: First SubGrid etc
);
static sal_Int32 getDimensionIndexOfAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
static bool getIndicesForAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
+ const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys
, sal_Int32& rOutDimensionIndex, sal_Int32& rOutAxisIndex );
static bool getIndicesForAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::Diagram >& xDiagram
, sal_Int32& rOutCooSysIndex, sal_Int32& rOutDimensionIndex, sal_Int32& rOutAxisIndex );
/** @param bOnlyVisible if </TRUE>, only axes with property "Show" set to
</sal_True> are returned
*/
- static css::uno::Sequence< css::uno::Reference< css::chart2::XAxis > >
- getAllAxesOfDiagram( const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ static std::vector< rtl::Reference< ::chart::Axis > >
+ getAllAxesOfDiagram( const rtl::Reference< ::chart::Diagram >& xDiagram
, bool bOnlyVisible = false );
/** @param bOnlyVisible if </TRUE>, only axes with property "Show" set to
</sal_True> are returned
*/
- SAL_DLLPRIVATE static std::vector< css::uno::Reference< css::chart2::XAxis > >
- getAllAxesOfCoordinateSystem( const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
+ SAL_DLLPRIVATE static std::vector< rtl::Reference< ::chart::Axis > >
+ getAllAxesOfCoordinateSystem( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys
, bool bOnlyVisible = false );
- static css::uno::Sequence< css::uno::Reference< css::beans::XPropertySet > >
- getAllGrids( const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ static std::vector< rtl::Reference< ::chart::GridProperties > >
+ getAllGrids( const rtl::Reference< ::chart::Diagram >& xDiagram );
static void getAxisOrGridPossibilities( css::uno::Sequence< sal_Bool >& rPossibilityList
- , const css::uno::Reference< css::chart2::XDiagram>& xDiagram, bool bAxis=true );
+ , const rtl::Reference< ::chart::Diagram>& xDiagram, bool bAxis=true );
static void getAxisOrGridExistence( css::uno::Sequence< sal_Bool >& rExistenceList
- , const css::uno::Reference< css::chart2::XDiagram>& xDiagram, bool bAxis=true );
+ , const rtl::Reference< ::chart::Diagram>& xDiagram, bool bAxis=true );
- static bool changeVisibilityOfGrids( const css::uno::Reference< css::chart2::XDiagram>& xDiagram
+ static bool changeVisibilityOfGrids( const rtl::Reference< ::chart::Diagram>& xDiagram
, const css::uno::Sequence< sal_Bool >& rOldExistenceList
, const css::uno::Sequence< sal_Bool >& rNewExistenceList );
- static bool changeVisibilityOfAxes( const css::uno::Reference< css::chart2::XDiagram>& xDiagram
+ static bool changeVisibilityOfAxes( const rtl::Reference< ::chart::Diagram>& xDiagram
, const css::uno::Sequence< sal_Bool >& rOldExistenceList
, const css::uno::Sequence< sal_Bool >& rNewExistenceList
, const css::uno::Reference< css::uno::XComponentContext >& xContext
, ReferenceSizeProvider * pRefSizeProvider );
- static bool shouldAxisBeDisplayed( const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys );
- static bool isSecondaryYAxisNeeded( const css::uno::Reference<
- css::chart2::XCoordinateSystem >& xCooSys );
+ static bool shouldAxisBeDisplayed( const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys );
+ static bool isSecondaryYAxisNeeded( const rtl::Reference<
+ ::chart::BaseCoordinateSystem >& xCooSys );
- static css::uno::Reference< css::chart2::XChartType >
- getChartTypeByIndex( const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys,
+ static rtl::Reference< ::chart::ChartType >
+ getChartTypeByIndex( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys,
sal_Int32 nIndex );
- static void setRTLAxisLayout( const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys );
+ static void setRTLAxisLayout( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys );
- static css::uno::Reference< css::chart2::XChartType >
- getFirstChartTypeWithSeriesAttachedToAxisIndex( const css::uno::Reference< css::chart2::XDiagram >& xDiagram, const sal_Int32 nAttachedAxisIndex );
+ static rtl::Reference< ::chart::ChartType >
+ getFirstChartTypeWithSeriesAttachedToAxisIndex( const rtl::Reference< ::chart::Diagram >& xDiagram, const sal_Int32 nAttachedAxisIndex );
static bool isAxisPositioningEnabled();
};
diff --git a/chart2/source/inc/BaseCoordinateSystem.hxx b/chart2/source/inc/BaseCoordinateSystem.hxx
index 4cfa7ab42c80..71f226abcd51 100644
--- a/chart2/source/inc/BaseCoordinateSystem.hxx
+++ b/chart2/source/inc/BaseCoordinateSystem.hxx
@@ -19,7 +19,6 @@
#pragma once
#include "OPropertySet.hxx"
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -27,12 +26,13 @@
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/util/XCloneable.hpp>
#include "ModifyListenerHelper.hxx"
-#include "charttoolsdllapi.hxx"
#include <vector>
namespace chart
{
+class Axis;
+class ChartType;
namespace impl
{
@@ -48,7 +48,6 @@ typedef ::cppu::WeakImplHelper
class SAL_DLLPUBLIC_RTTI BaseCoordinateSystem :
public impl::BaseCoordinateSystem_Base,
- public cppu::BaseMutex,
public ::property::OPropertySet
{
public:
@@ -87,7 +86,7 @@ public:
const css::uno::Reference< css::chart2::XChartType >& aChartType ) override;
virtual css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > > SAL_CALL getChartTypes() override;
virtual void SAL_CALL setChartTypes(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aChartTypes ) override;
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aChartTypes ) final override;
// ____ XModifyBroadcaster ____
virtual void SAL_CALL addModifyListener(
@@ -95,6 +94,12 @@ public:
virtual void SAL_CALL removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+ void setAxisByDimension( sal_Int32 nDimension, const rtl::Reference< ::chart::Axis >& xAxis, sal_Int32 nIndex );
+ const rtl::Reference< ::chart::Axis > & getAxisByDimension2(sal_Int32 nDimension, sal_Int32 nIndex ) const;
+
+ void setChartTypes( const std::vector< rtl::Reference< ::chart::ChartType > >& aChartTypes );
+ const std::vector< rtl::Reference<::chart::ChartType > > & getChartTypes2() const { return m_aChartTypes; }
+
protected:
// ____ XModifyListener ____
@@ -111,14 +116,12 @@ protected:
void fireModifyEvent();
-protected:
- rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
-
private:
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
sal_Int32 m_nDimensionCount;
- typedef std::vector< std::vector< css::uno::Reference< css::chart2::XAxis > > > tAxisVecVecType;
+ typedef std::vector< std::vector< rtl::Reference< ::chart::Axis > > > tAxisVecVecType;
tAxisVecVecType m_aAllAxis; //outer sequence is the dimension; inner sequence is the axis index that indicates main or secondary axis
- std::vector< css::uno::Reference< css::chart2::XChartType > > m_aChartTypes;
+ std::vector< rtl::Reference<::chart::ChartType > > m_aChartTypes;
};
} // namespace chart
diff --git a/chart2/source/inc/BaseGFXHelper.hxx b/chart2/source/inc/BaseGFXHelper.hxx
index fd24fa2b45b6..4ba4a65c8250 100644
--- a/chart2/source/inc/BaseGFXHelper.hxx
+++ b/chart2/source/inc/BaseGFXHelper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include <basegfx/matrix/b3dhommatrix.hxx>
#include <basegfx/range/b2irectangle.hxx>
#include <basegfx/tuple/b3dtuple.hxx>
@@ -36,22 +37,24 @@ namespace com::sun::star::drawing { struct PolyPolygonShape3D; }
namespace chart::BaseGFXHelper
{
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DRange getBoundVolume( const css::drawing::PolyPolygonShape3D& rPolyPoly );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B3DRange getBoundVolume( const css::drawing::PolyPolygonShape3D& rPolyPoly );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DRange getBoundVolume( const std::vector<std::vector<css::drawing::Position3D>>& rPolyPoly );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B3DRange getBoundVolume( const std::vector<std::vector<css::drawing::Position3D>>& rPolyPoly );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B2IRectangle makeRectangle(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B2IRectangle makeRectangle(
const css::awt::Point& rPosition,
const css::awt::Size& rSize );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B2IRectangle makeRectangle( const css::awt::Rectangle& rRect );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B2IRectangle makeRectangle( const css::awt::Rectangle& rRect );
-OOO_DLLPUBLIC_CHARTTOOLS css::awt::Point B2IRectangleToAWTPoint(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::awt::Point B2IRectangleToAWTPoint(
const ::basegfx::B2IRectangle& rB2IRectangle );
-OOO_DLLPUBLIC_CHARTTOOLS css::awt::Size B2IRectangleToAWTSize(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::awt::Size B2IRectangleToAWTSize(
const ::basegfx::B2IRectangle& rB2IRectangle );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::awt::Rectangle toAwtRectangle(const basegfx::B2IRectangle& rB2IRectangle);
+
::basegfx::B3DVector Direction3DToB3DVector(
const css::drawing::Direction3D& rDirection );
@@ -64,17 +67,17 @@ css::drawing::Direction3D B3DVectorToDirection3D(
css::drawing::Position3D B3DVectorToPosition3D(
const ::basegfx::B3DVector& rB3DVector );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DHomMatrix HomogenMatrixToB3DHomMatrix(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B3DHomMatrix HomogenMatrixToB3DHomMatrix(
const css::drawing::HomogenMatrix & rHomogenMatrix );
-OOO_DLLPUBLIC_CHARTTOOLS
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
css::drawing::HomogenMatrix B3DHomMatrixToHomogenMatrix(
const ::basegfx::B3DHomMatrix & rB3DMatrix );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple GetRotationFromMatrix(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B3DTuple GetRotationFromMatrix(
const ::basegfx::B3DHomMatrix & rB3DMatrix );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple GetScaleFromMatrix(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B3DTuple GetScaleFromMatrix(
const ::basegfx::B3DHomMatrix & rB3DMatrix );
void ReduceToRotationMatrix( ::basegfx::B3DHomMatrix & rB3DMatrix );
diff --git a/chart2/source/inc/CachedDataSequence.hxx b/chart2/source/inc/CachedDataSequence.hxx
index e9c1b9d50d25..513907c2429d 100644
--- a/chart2/source/inc/CachedDataSequence.hxx
+++ b/chart2/source/inc/CachedDataSequence.hxx
@@ -19,10 +19,9 @@
#pragma once
// helper classes
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
#include <comphelper/uno3.hxx>
-#include <comphelper/broadcasthelper.hxx>
-#include <comphelper/propertycontainer.hxx>
+#include <comphelper/propertycontainer2.hxx>
#include <comphelper/proparrhlp.hxx>
// interfaces and types
@@ -41,7 +40,7 @@ namespace chart
namespace impl
{
-typedef ::cppu::WeakComponentImplHelper<
+typedef ::comphelper::WeakComponentImplHelper<
css::chart2::data::XDataSequence,
css::chart2::data::XNumericalDataSequence,
css::chart2::data::XTextualDataSequence,
@@ -56,8 +55,7 @@ typedef ::cppu::WeakComponentImplHelper<
* This sequence object does store actual values within, hence "cached".
*/
class CachedDataSequence final :
- public ::comphelper::OMutexAndBroadcastHelper,
- public ::comphelper::OPropertyContainer,
+ public ::comphelper::OPropertyContainer2,
public ::comphelper::OPropertyArrayUsageHelper< CachedDataSequence >,
public impl::CachedDataSequence_Base
{
@@ -93,7 +91,7 @@ private:
/// @see css::beans::XPropertySet
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
/// @see ::comphelper::OPropertySetHelper
- virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+ virtual ::cppu::IPropertyArrayHelper& getInfoHelper() override;
/// @see ::comphelper::OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override;
diff --git a/chart2/source/inc/CharacterProperties.hxx b/chart2/source/inc/CharacterProperties.hxx
index 4dd7a4fbd113..40367f9b943d 100644
--- a/chart2/source/inc/CharacterProperties.hxx
+++ b/chart2/source/inc/CharacterProperties.hxx
@@ -120,14 +120,14 @@ namespace CharacterProperties
FAST_PROPERTY_ID_END_CHAR_PROP
};
- OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddPropertiesToVector(
std::vector< css::beans::Property > & rOutProperties );
- OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
- OOO_DLLPUBLIC_CHARTTOOLS bool IsCharacterPropertyHandle( sal_Int32 nHandle );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool IsCharacterPropertyHandle( sal_Int32 nHandle );
- OOO_DLLPUBLIC_CHARTTOOLS css::awt::FontDescriptor createFontDescriptorFromPropertySet(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::awt::FontDescriptor createFontDescriptorFromPropertySet(
const css::uno::Reference< css::beans::XMultiPropertySet > & xMultiPropSet );
}
diff --git a/chart2/source/inc/ChartModelHelper.hxx b/chart2/source/inc/ChartModelHelper.hxx
index dfe864eeb0d4..ec904ce8a7be 100644
--- a/chart2/source/inc/ChartModelHelper.hxx
+++ b/chart2/source/inc/ChartModelHelper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include <com/sun/star/awt/Size.hpp>
#include "charttoolsdllapi.hxx"
#include <rtl/ref.hxx>
@@ -38,57 +39,38 @@ namespace com::sun::star::view { class XSelectionSupplier; }
namespace chart
{
class BaseCoordinateSystem;
+class ChartType;
+class DataSeries;
class Diagram;
class InternalDataProvider;
-class OOO_DLLPUBLIC_CHARTTOOLS ChartModelHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ChartModelHelper
{
public:
- static css::uno::Reference< css::chart2::data::XRangeHighlighter > createRangeHighlighter(
- const css::uno::Reference< css::view::XSelectionSupplier >& xSelectionSupplier );
-
static rtl::Reference< InternalDataProvider > createInternalDataProvider(
- const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc, bool bConnectToModel );
-
- static rtl::Reference< Diagram >
- findDiagram( const css::uno::Reference< css::frame::XModel >& xModel );
-
- static rtl::Reference< Diagram >
- findDiagram( const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc );
-
- static rtl::Reference< Diagram >
- findDiagram( const rtl::Reference<::chart::ChartModel>& xChartDoc );
+ const rtl::Reference<::chart::ChartModel>& xChartDoc, bool bConnectToModel );
static rtl::Reference< ::chart::BaseCoordinateSystem >
- getFirstCoordinateSystem( ChartModel& rModel );
+ getFirstCoordinateSystem( const rtl::Reference<::chart::ChartModel>& xModel );
- static rtl::Reference< ::chart::BaseCoordinateSystem >
- getFirstCoordinateSystem( const css::uno::Reference< css::frame::XModel >& xModel );
-
- SAL_DLLPRIVATE static std::vector< css::uno::Reference< css::chart2::XDataSeries > >
- getDataSeries( ChartModel& rModel );
-
- SAL_DLLPRIVATE static std::vector< css::uno::Reference< css::chart2::XDataSeries > >
- getDataSeries( const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc );
- static std::vector< css::uno::Reference< css::chart2::XDataSeries > >
- getDataSeries( const css::uno::Reference< css::frame::XModel > & xModel );
- static std::vector< css::uno::Reference< css::chart2::XDataSeries > >
+ static std::vector< rtl::Reference< ::chart::DataSeries > >
getDataSeries( const rtl::Reference< ::chart::ChartModel > & xModel );
- static css::uno::Reference< css::chart2::XChartType >
+ static rtl::Reference< ChartType >
getChartTypeOfSeries(
- const css::uno::Reference< css::frame::XModel >& xModel
- , const css::uno::Reference< css::chart2::XDataSeries >& xGivenDataSeries );
+ const rtl::Reference<::chart::ChartModel>& xModel
+ , const rtl::Reference< ::chart::DataSeries >& xGivenDataSeries );
static css::awt::Size getDefaultPageSize();
- static css::awt::Size getPageSize( const css::uno::Reference< css::frame::XModel >& xModel );
+ static css::awt::Size getPageSize( const rtl::Reference<::chart::ChartModel>& xModel );
- static void triggerRangeHighlighting( const css::uno::Reference< css::frame::XModel >& xModel );
+ static void triggerRangeHighlighting( const rtl::Reference<::chart::ChartModel>& xModel );
- static bool isIncludeHiddenCells( const css::uno::Reference< css::frame::XModel >& xChartModel );
+ static bool isIncludeHiddenCells( const rtl::Reference<::chart::ChartModel>& xChartModel );
static bool setIncludeHiddenCells( bool bIncludeHiddenCells, ChartModel& rModel);
+
};
} //namespace chart
diff --git a/chart2/source/inc/ChartResourceGroups.hxx b/chart2/source/inc/ChartResourceGroups.hxx
index 8c263a7a6a75..ecb886f194af 100644
--- a/chart2/source/inc/ChartResourceGroups.hxx
+++ b/chart2/source/inc/ChartResourceGroups.hxx
@@ -27,7 +27,6 @@
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
class SplinePropertiesDialog;
class SteppedPropertiesDialog;
@@ -113,16 +112,16 @@ private:
DECL_LINK(LineTypeChangeHdl, weld::ComboBox&, void);
DECL_LINK(SplineDetailsDialogHdl, weld::Button&, void);
DECL_LINK(SteppedDetailsDialogHdl, weld::Button&, void);
- SplinePropertiesDialog& getSplinePropertiesDialog();
- SteppedPropertiesDialog& getSteppedPropertiesDialog();
+ std::shared_ptr<SplinePropertiesDialog> getSplinePropertiesDialog();
+ std::shared_ptr<SteppedPropertiesDialog> getSteppedPropertiesDialog();
private:
weld::Window* m_pParent;
std::unique_ptr<weld::Label> m_xFT_LineType;
std::unique_ptr<weld::ComboBox> m_xLB_LineType;
std::unique_ptr<weld::Button> m_xPB_DetailsDialog;
- std::unique_ptr<SplinePropertiesDialog> m_xSplinePropertiesDialog;
- std::unique_ptr<SteppedPropertiesDialog> m_xSteppedPropertiesDialog;
+ std::shared_ptr<SplinePropertiesDialog> m_xSplinePropertiesDialog;
+ std::shared_ptr<SteppedPropertiesDialog> m_xSteppedPropertiesDialog;
};
class GeometryResourceGroup final : public ChangingResource
diff --git a/chart2/source/model/template/ChartType.hxx b/chart2/source/inc/ChartType.hxx
index 74e8bcb14300..fa55cf05694f 100644
--- a/chart2/source/model/template/ChartType.hxx
+++ b/chart2/source/inc/ChartType.hxx
@@ -18,8 +18,7 @@
*/
#pragma once
-#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
+#include "OPropertySet.hxx"
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -28,11 +27,25 @@
#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
+#include <rtl/ref.hxx>
#include <vector>
+#include "charttoolsdllapi.hxx"
namespace chart
{
+class BaseCoordinateSystem;
+class DataSeries;
+class ModifyEventForwarder;
+
+enum
+{
+ PROP_PIECHARTTYPE_USE_RINGS,
+ PROP_PIECHARTTYPE_3DRELATIVEHEIGHT,
+ PROP_PIECHARTTYPE_SUBTYPE // none, of-bar, of-pie
+};
+
+
namespace impl
{
@@ -46,8 +59,7 @@ typedef ::cppu::WeakImplHelper<
ChartType_Base;
}
-class ChartType :
- public cppu::BaseMutex,
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ChartType :
public impl::ChartType_Base,
public ::property::OPropertySet
{
@@ -58,14 +70,13 @@ public:
/// merge XInterface implementations
DECLARE_XINTERFACE()
-protected:
explicit ChartType( const ChartType & rOther );
// ____ XChartType ____
// still abstract ! implement !
virtual OUString SAL_CALL getChartType() override = 0;
virtual css::uno::Reference< css::chart2::XCoordinateSystem > SAL_CALL
- createCoordinateSystem( ::sal_Int32 DimensionCount ) override;
+ createCoordinateSystem( ::sal_Int32 DimensionCount ) final override;
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedMandatoryRoles() override;
virtual css::uno::Sequence< OUString > SAL_CALL
@@ -88,6 +99,21 @@ protected:
const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
virtual void SAL_CALL removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+
+ virtual rtl::Reference<ChartType> cloneChartType() const = 0;
+
+ void addDataSeries(
+ const rtl::Reference< ::chart::DataSeries >& aDataSeries );
+ void removeDataSeries(
+ const rtl::Reference< ::chart::DataSeries >& aDataSeries );
+ void setDataSeries(
+ const std::vector< rtl::Reference< ::chart::DataSeries > >& aDataSeries );
+ const std::vector< rtl::Reference< ::chart::DataSeries > > & getDataSeries2() const { return m_aDataSeries; }
+
+ virtual rtl::Reference< ::chart::BaseCoordinateSystem >
+ createCoordinateSystem2( sal_Int32 DimensionCount );
+
+protected:
// ____ XModifyListener ____
virtual void SAL_CALL modified(
@@ -114,16 +140,15 @@ protected:
DECLARE_XTYPEPROVIDER()
protected:
- css::uno::Reference< css::util::XModifyListener >
- const m_xModifyEventForwarder;
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
private:
void impl_addDataSeriesWithoutNotification(
- const css::uno::Reference< css::chart2::XDataSeries >& aDataSeries );
+ const rtl::Reference< ::chart::DataSeries >& aDataSeries );
private:
typedef
- std::vector< css::uno::Reference< css::chart2::XDataSeries > > tDataSeriesContainerType;
+ std::vector< rtl::Reference< ::chart::DataSeries > > tDataSeriesContainerType;
// --- mutable members: the following members need mutex guard ---
diff --git a/chart2/source/inc/ChartTypeDialogController.hxx b/chart2/source/inc/ChartTypeDialogController.hxx
index a027c99d7ac5..4c03ff269e1f 100644
--- a/chart2/source/inc/ChartTypeDialogController.hxx
+++ b/chart2/source/inc/ChartTypeDialogController.hxx
@@ -37,10 +37,6 @@ namespace com::sun::star::chart2
{
class XChartDocument;
}
-namespace com::sun::star::chart2
-{
-class XChartTypeTemplate;
-}
namespace com::sun::star::lang
{
class XMultiServiceFactory;
diff --git a/chart2/source/inc/ChartTypeHelper.hxx b/chart2/source/inc/ChartTypeHelper.hxx
index d4917be283fb..7366e4689773 100644
--- a/chart2/source/inc/ChartTypeHelper.hxx
+++ b/chart2/source/inc/ChartTypeHelper.hxx
@@ -19,67 +19,72 @@
#pragma once
+#include <config_options.h>
#include <com/sun/star/drawing/Direction3D.hpp>
#include "charttoolsdllapi.hxx"
+#include "ChartType.hxx"
+#include <rtl/ref.hxx>
namespace com::sun::star::chart2 { class XChartType; }
namespace com::sun::star::chart2 { class XDataSeries; }
namespace chart
{
+class ChartType;
+class DataSeries;
-class OOO_DLLPUBLIC_CHARTTOOLS ChartTypeHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ChartTypeHelper
{
public:
- static bool isSupportingGeometryProperties( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingStatisticProperties( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingRegressionProperties(const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingMainAxis( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex );
- static bool isSupportingSecondaryAxis( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingAreaProperties( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingSymbolProperties( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingOverlapAndGapWidthProperties( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingBarConnectors( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingRightAngledAxes( const css::uno::Reference< css::chart2::XChartType >& xChartType );
- static bool isSupportingAxisSideBySide( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingStartingAngle( const css::uno::Reference< css::chart2::XChartType >& xChartType );
+ static bool isSupportingGeometryProperties( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingStatisticProperties( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingRegressionProperties(const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingMainAxis( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex );
+ static bool isSupportingSecondaryAxis( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingAreaProperties( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingSymbolProperties( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingOverlapAndGapWidthProperties( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingBarConnectors( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingRightAngledAxes( const rtl::Reference< ::chart::ChartType >& xChartType );
+ static bool isSupportingAxisSideBySide( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingStartingAngle( const rtl::Reference< ::chart::ChartType >& xChartType );
//starting value for bars or baseline for areas for example
- static bool isSupportingBaseValue( const css::uno::Reference< css::chart2::XChartType >& xChartType );
- static bool isSupportingAxisPositioning( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex );
- static bool isSupportingDateAxis( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionIndex );
- static bool isSupportingComplexCategory( const css::uno::Reference< css::chart2::XChartType >& xChartType );
- static bool isSupportingCategoryPositioning( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool shiftCategoryPosAtXAxisPerDefault( const css::uno::Reference< css::chart2::XChartType >& xChartType );
+ static bool isSupportingBaseValue( const rtl::Reference< ::chart::ChartType >& xChartType );
+ static bool isSupportingAxisPositioning( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex );
+ static bool isSupportingDateAxis( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionIndex );
+ static bool isSupportingComplexCategory( const rtl::Reference< ::chart::ChartType >& xChartType );
+ static bool isSupportingCategoryPositioning( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool shiftCategoryPosAtXAxisPerDefault( const rtl::Reference< ::chart::ChartType >& xChartType );
//returns sequence of css::chart::DataLabelPlacement
static css::uno::Sequence < sal_Int32 > getSupportedLabelPlacements(
- const css::uno::Reference< css::chart2::XChartType >& xChartType, bool bSwapXAndY
- , const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+ const rtl::Reference< ::chart::ChartType >& xChartType, bool bSwapXAndY
+ , const rtl::Reference< ::chart::DataSeries >& xSeries );
//returns sequence of css::chart::MissingValueTreatment
static css::uno::Sequence < sal_Int32 > getSupportedMissingValueTreatments(
- const css::uno::Reference< css::chart2::XChartType >& xChartType );
+ const rtl::Reference< ::chart::ChartType >& xChartType );
- SAL_DLLPRIVATE static css::drawing::Direction3D getDefaultSimpleLightDirection( const css::uno::Reference< css::chart2::XChartType >& xChartType );
- SAL_DLLPRIVATE static css::drawing::Direction3D getDefaultRealisticLightDirection( const css::uno::Reference< css::chart2::XChartType >& xChartType );
- SAL_DLLPRIVATE static sal_Int32 getDefaultDirectLightColor( bool bSimple, const css::uno::Reference< css::chart2::XChartType >& xChartType );
- SAL_DLLPRIVATE static sal_Int32 getDefaultAmbientLightColor( bool bSimple, const css::uno::Reference< css::chart2::XChartType >& xChartType );
- static sal_Int32 getNumberOfDisplayedSeries( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nNumberOfSeries );
- SAL_DLLPRIVATE static bool noBordersForSimpleScheme( const css::uno::Reference< css::chart2::XChartType >& xChartType );
+ SAL_DLLPRIVATE static css::drawing::Direction3D getDefaultSimpleLightDirection( const rtl::Reference< ::chart::ChartType >& xChartType );
+ SAL_DLLPRIVATE static css::drawing::Direction3D getDefaultRealisticLightDirection( const rtl::Reference< ::chart::ChartType >& xChartType );
+ SAL_DLLPRIVATE static sal_Int32 getDefaultDirectLightColor( bool bSimple, const rtl::Reference< ::chart::ChartType >& xChartType );
+ SAL_DLLPRIVATE static sal_Int32 getDefaultAmbientLightColor( bool bSimple, const rtl::Reference< ::chart::ChartType >& xChartType );
+ static sal_Int32 getNumberOfDisplayedSeries( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nNumberOfSeries );
+ SAL_DLLPRIVATE static bool noBordersForSimpleScheme( const rtl::Reference< ::chart::ChartType >& xChartType );
- static bool isSeriesInFrontOfAxisLine( const css::uno::Reference< css::chart2::XChartType >& xChartType );
+ static bool isSeriesInFrontOfAxisLine( const rtl::Reference< ::chart::ChartType >& xChartType );
static sal_Int32 //one of css::chart2::AxisType
- getAxisType( const css::uno::Reference< css::chart2::XChartType >& xChartType
+ getAxisType( const rtl::Reference< ::chart::ChartType >& xChartType
, sal_Int32 nDimensionIndex );
- static OUString getRoleOfSequenceForYAxisNumberFormatDetection( const css::uno::Reference<
- css::chart2::XChartType >& xChartType );
+ static OUString getRoleOfSequenceForYAxisNumberFormatDetection( const rtl::Reference<
+ ::chart::ChartType >& xChartType );
- static OUString getRoleOfSequenceForDataLabelNumberFormatDetection( const css::uno::Reference<
- css::chart2::XChartType >& xChartType );
+ static OUString getRoleOfSequenceForDataLabelNumberFormatDetection( const rtl::Reference<
+ ::chart::ChartType >& xChartType );
- static bool isSupportingOnlyDeepStackingFor3D( const css::uno::Reference< css::chart2::XChartType >& xChartType );
+ static bool isSupportingOnlyDeepStackingFor3D( const rtl::Reference< ::chart::ChartType >& xChartType );
};
} //namespace chart
diff --git a/chart2/source/inc/ChartTypeTemplate.hxx b/chart2/source/inc/ChartTypeTemplate.hxx
index 560fc32fd167..ffd7cca26599 100644
--- a/chart2/source/inc/ChartTypeTemplate.hxx
+++ b/chart2/source/inc/ChartTypeTemplate.hxx
@@ -19,18 +19,31 @@
#pragma once
#include <cppuhelper/implbase.hxx>
+#include "DataInterpreter.hxx"
#include "StackMode.hxx"
#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
#include "charttoolsdllapi.hxx"
+#include <rtl/ref.hxx>
+#include <vector>
+namespace com::sun::star::beans { struct PropertyValue; }
namespace com::sun::star::chart2 { class XChartType; }
+namespace com::sun::star::chart2 { class XCoordinateSystem; }
namespace com::sun::star::chart2 { class XCoordinateSystemContainer; }
namespace com::sun::star::chart2 { class XDataSeries; }
+namespace com::sun::star::chart2 { class XDiagram; }
+namespace com::sun::star::chart2::data { class XDataSource; }
+namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
+class BaseCoordinateSystem;
+class ChartType;
+class DataSeries;
+class Diagram;
+class LabeledDataSequence;
/** For creating diagrams and modifying existing diagrams. A base class that
implements XChartTypeTemplate and offers some tooling for classes that
@@ -66,45 +79,69 @@ namespace chart
* create an XLegend via the global service factory, set it at the diagram.
*/
-class SAL_DLLPUBLIC_RTTI ChartTypeTemplate : public ::cppu::WeakImplHelper<
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ChartTypeTemplate : public ::cppu::WeakImplHelper<
css::chart2::XChartTypeTemplate,
css::lang::XServiceName >
{
public:
explicit ChartTypeTemplate( css::uno::Reference< css::uno::XComponentContext > const & xContext,
- const OUString & rServiceName );
+ OUString aServiceName );
virtual ~ChartTypeTemplate() override;
+ rtl::Reference< ::chart::Diagram > createDiagramByDataSource2(
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments );
+
// ____ XChartTypeTemplate ____
virtual css::uno::Reference< css::chart2::XDiagram > SAL_CALL createDiagramByDataSource(
const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
- const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override;
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override final;
/// denotes if the chart needs categories at the first scale
virtual sal_Bool SAL_CALL supportsCategories() override;
-
virtual void SAL_CALL changeDiagram(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override final;
virtual void SAL_CALL changeDiagramData(
const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
- const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override;
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override final;
virtual sal_Bool SAL_CALL matchesTemplate(
- const css::uno::Reference<
- css::chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties ) override;
- // still abstract: getChartTypeForNewSeries()
- virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override;
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
+ sal_Bool bAdaptProperties ) override final;
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getDataInterpreter() override final;
+ virtual css::uno::Reference< ::css::chart2::XChartType > SAL_CALL getChartTypeForNewSeries(
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override final;
virtual void SAL_CALL applyStyle(
const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
- ::sal_Int32 nSeriesCount ) override;
+ ::sal_Int32 nSeriesCount ) override final;
virtual void SAL_CALL resetStyles(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override final;
+
+ void changeDiagram(
+ const rtl::Reference< ::chart::Diagram >& xDiagram );
+ void changeDiagramData(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments );
+ virtual bool matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties );
+ virtual rtl::Reference< ::chart::ChartType >
+ getChartTypeForNewSeries2( const std::vector<
+ rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) = 0;
+ virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter2();
+ virtual void applyStyle2(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
+ ::sal_Int32 nChartTypeIndex,
+ ::sal_Int32 nSeriesIndex,
+ ::sal_Int32 nSeriesCount );
+ virtual void resetStyles2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram );
/// @throws css::uno::RuntimeException
void applyStyles(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ const rtl::Reference< ::chart::Diagram >& xDiagram );
// ____ XServiceName ____
virtual OUString SAL_CALL getServiceName() override;
@@ -124,7 +161,7 @@ public:
*/
virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const;
- virtual css::uno::Reference< css::chart2::XChartType >
+ virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) = 0;
virtual bool isSwapXAndY() const;
@@ -137,7 +174,7 @@ public:
changeDiagram
*/
virtual void adaptDiagram(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
/** Creates a 2d or 3d cartesian coordinate system with mathematically
oriented, linear scales with auto-min/max. If the given
@@ -147,7 +184,7 @@ public:
<p>The dimension depends on the value returned by getDimension().</p>
*/
virtual void createCoordinateSystems(
- const css::uno::Reference< css::chart2::XCoordinateSystemContainer > & xOutCooSysCnt );
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
/** Sets categories at the scales of dimension 0 and the percent stacking at
the scales of dimension 1 of all given coordinate systems.
@@ -155,7 +192,7 @@ public:
<p>Called by FillDiagram.</p>
*/
virtual void adaptScales(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XCoordinateSystem > > & aCooSysSeq,
+ const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > & aCooSysSeq,
const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & xCategories );
/** create a data series tree, that fits the requirements of the chart type.
@@ -184,16 +221,14 @@ public:
empty.</p>
*/
virtual void createChartTypes(
- const css::uno::Sequence<
- css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XDataSeries > > > & aSeriesSeq,
- const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XCoordinateSystem > > & rCoordSys,
- const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XChartType > > & aOldChartTypesSeq
+ const std::vector<
+ std::vector<
+ rtl::Reference<
+ ::chart::DataSeries > > > & aSeriesSeq,
+ const std::vector<
+ rtl::Reference<
+ ::chart::BaseCoordinateSystem > > & rCoordSys,
+ const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq
);
/** create axes and add them to the given container. If there are already
@@ -205,7 +240,7 @@ public:
requesting a secondary axes a secondary y axes is added</p>
*/
void createAxes(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XCoordinateSystem > > & rCoordSys );
+ const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > & rCoordSys );
/** Give the number of requested axis per dimension here. Default is one
axis for each dimension
@@ -215,18 +250,18 @@ public:
/** adapt properties of existing axes and remove superfluous axes
*/
virtual void adaptAxes(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XCoordinateSystem > > & rCoordSys );
+ const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > & rCoordSys );
const css::uno::Reference< css::uno::XComponentContext >&
GetComponentContext() const { return m_xContext;}
static void copyPropertiesFromOldToNewCoordinateSystem(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > > & rOldChartTypesSeq,
- const css::uno::Reference< css::chart2::XChartType > & xNewChartType );
+ const std::vector< rtl::Reference< ChartType > > & rOldChartTypesSeq,
+ const rtl::Reference< ChartType > & xNewChartType );
protected:
css::uno::Reference< css::uno::XComponentContext > m_xContext;
- mutable css::uno::Reference< css::chart2::XDataInterpreter > m_xDataInterpreter;
+ mutable rtl::Reference< ::chart::DataInterpreter > m_xDataInterpreter;
private:
const OUString m_aServiceName;
@@ -234,17 +269,13 @@ private:
private:
/** modifies the given diagram
*/
- void FillDiagram( const css::uno::Reference<
- css::chart2::XDiagram > & xDiagram,
- const css::uno::Sequence<
- css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XDataSeries > > > & aSeriesSeq,
- const css::uno::Reference<
- css::chart2::data::XLabeledDataSequence >& xCategories,
- const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XChartType > > & aOldChartTypesSeq);
+ void FillDiagram( const rtl::Reference< ::chart::Diagram >& xDiagram,
+ const std::vector<
+ std::vector<
+ rtl::Reference<
+ ::chart::DataSeries > > > & aSeriesSeq,
+ const css::uno::Reference< css::chart2::data::XLabeledDataSequence >& xCategories,
+ const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq);
};
} // namespace chart
diff --git a/chart2/source/inc/ChartViewHelper.hxx b/chart2/source/inc/ChartViewHelper.hxx
index 54d23e8107a0..0ffe60220f60 100644
--- a/chart2/source/inc/ChartViewHelper.hxx
+++ b/chart2/source/inc/ChartViewHelper.hxx
@@ -18,23 +18,28 @@
*/
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
+#include <rtl/ref.hxx>
-namespace com::sun::star::uno
-{
-template <class interface_type> class Reference;
-}
-namespace com::sun::star::frame
+#include <com/sun/star/uno/Reference.hxx>
+
+namespace com::sun::star::chart2
{
-class XModel;
+class XChartDocument;
}
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS ChartViewHelper
+class ChartModel;
+
+namespace ChartViewHelper
{
-public:
- static void setViewToDirtyState(const css::uno::Reference<css::frame::XModel>& xChartModel);
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void setViewToDirtyState(const rtl::Reference<ChartModel>& xChartModel);
+
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void setViewToDirtyState_UNO(const css::uno::Reference<css::chart2::XChartDocument>& xChartModel);
};
} //namespace chart
diff --git a/chart2/source/inc/CloneHelper.hxx b/chart2/source/inc/CloneHelper.hxx
index d9771a2681f2..cabcdb58366f 100644
--- a/chart2/source/inc/CloneHelper.hxx
+++ b/chart2/source/inc/CloneHelper.hxx
@@ -19,8 +19,7 @@
#pragma once
#include <com/sun/star/util/XCloneable.hpp>
-
-#include <algorithm>
+#include <rtl/ref.hxx>
#include <iterator>
#include <vector>
@@ -54,6 +53,15 @@ template< class Interface >
CreateRefClone< Interface >());
}
+template< class T >
+ void CloneRefVector(
+ const std::vector< rtl::Reference< T > > & rSource,
+ std::vector< rtl::Reference< T > > & rDestination )
+{
+ for (const auto & rSourceItem : rSource)
+ rDestination.push_back(static_cast<T*>(rSourceItem->createClone().get()));
+}
+
/// clones a UNO-sequence of UNO-References
template< class Interface >
void CloneRefSequence(
diff --git a/chart2/source/inc/ColorPerPointHelper.hxx b/chart2/source/inc/ColorPerPointHelper.hxx
index f1665123b800..575019e9bbb2 100644
--- a/chart2/source/inc/ColorPerPointHelper.hxx
+++ b/chart2/source/inc/ColorPerPointHelper.hxx
@@ -19,19 +19,22 @@
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
+#include <rtl/ref.hxx>
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::uno { template <class interface_type> class Reference; }
namespace chart
{
+class DataSeries;
-class OOO_DLLPUBLIC_CHARTTOOLS ColorPerPointHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ColorPerPointHelper
{
public:
static bool hasPointOwnColor(
- const css::uno::Reference< css::beans::XPropertySet >& xDataSeriesProperties
+ const rtl::Reference< ::chart::DataSeries >& xDataSeries
, sal_Int32 nPointIndex
, const css::uno::Reference< css::beans::XPropertySet >& xDataPointProperties //may be NULL this is just for performance
);
@@ -39,7 +42,7 @@ public:
// returns true if AttributedDataPoints contains nPointIndex and the
// property Color is DEFAULT
SAL_DLLPRIVATE static bool hasPointOwnProperties(
- const css::uno::Reference< css::beans::XPropertySet >& xSeriesProperties
+ const rtl::Reference< ::chart::DataSeries >& xDataSeries
, sal_Int32 nPointIndex );
};
diff --git a/chart2/source/inc/CommonConverters.hxx b/chart2/source/inc/CommonConverters.hxx
index d10bf91984c8..c6dc7b2ecd1d 100644
--- a/chart2/source/inc/CommonConverters.hxx
+++ b/chart2/source/inc/CommonConverters.hxx
@@ -133,7 +133,7 @@ basegfx::B2DPolyPolygon PolyToB2DPolyPolygon(
*/
OOO_DLLPUBLIC_CHARTTOOLS
void appendPointSequence( css::drawing::PointSequenceSequence& rTarget
- , css::drawing::PointSequenceSequence& rAdd );
+ , const css::drawing::PointSequenceSequence& rAdd );
/** Position3D + Direction3D == Position3D
*/
@@ -179,25 +179,24 @@ OOO_DLLPUBLIC_CHARTTOOLS
css::uno::Sequence< OUString > DataSequenceToStringSequence(
const css::uno::Reference< css::chart2::data::XDataSequence > & xDataSequence );
-/** uno::Sequence< uno::Sequence< T > > -> uno::Sequence< T >
+/** std::vector< std::vector< T > > -> std::vector< T >
*/
template< typename T >
-css::uno::Sequence< T >
- FlattenSequence( const css::uno::Sequence< css::uno::Sequence< T > > & aSeqSeq )
+std::vector< T >
+ FlattenSequence( const std::vector< std::vector< T > > & aSeqSeq )
{
sal_Int32 nOuter, nInner, nCount = 0,
nResultSize = 0;
- const sal_Int32 nOuterSize = aSeqSeq.getLength();
+ const sal_Int32 nOuterSize = aSeqSeq.size();
for( nOuter=0; nOuter<nOuterSize; ++nOuter )
- nResultSize += aSeqSeq[nOuter].getLength();
- css::uno::Sequence< T > aResult( nResultSize );
- auto aResultRange = asNonConstRange(aResult);
+ nResultSize += aSeqSeq[nOuter].size();
+ std::vector< T > aResult( nResultSize );
for( nOuter=0; nOuter<nOuterSize; ++nOuter )
{
- const sal_Int32 nInnerSize = aSeqSeq[nOuter].getLength();
+ const sal_Int32 nInnerSize = aSeqSeq[nOuter].size();
for( nInner=0; nInner<nInnerSize; ++nInner, ++nCount )
- aResultRange[nCount] = aSeqSeq[nOuter][nInner];
+ aResult[nCount] = aSeqSeq[nOuter][nInner];
}
return aResult;
}
@@ -212,7 +211,7 @@ sal_Int16 getShortForLongAlso( const css::uno::Any& rAny );
OOO_DLLPUBLIC_CHARTTOOLS
bool replaceParamterInString( OUString & rInOutResourceString,
- const OUString & rParamToReplace,
+ std::u16string_view rParamToReplace,
std::u16string_view rReplaceWith );
} //namespace chart
diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx
index 0340c82b692e..2d01e7ad27ae 100644
--- a/chart2/source/inc/CommonFunctors.hxx
+++ b/chart2/source/inc/CommonFunctors.hxx
@@ -21,9 +21,11 @@
#include <o3tl/any.hxx>
#include <rtl/math.hxx>
#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
#include <rtl/ustring.hxx>
#include "charttoolsdllapi.hxx"
+#include <algorithm>
#include <limits>
namespace chart::CommonFunctors
@@ -34,20 +36,21 @@ namespace chart::CommonFunctors
<p>uno::makeAny is an inline function. Thus is cannot be taken directly
(via mem_fun_ptr)</p>
*/
-template< typename T >
- struct makeAny
+struct makeAny
{
+ template< typename T >
css::uno::Any operator() ( const T & aVal )
{
- return css::uno::makeAny( aVal );
+ return css::uno::Any( aVal );
}
};
-/** unary function to convert css::uno::Any into a double number.
+/** unary function to convert an OUString or css::uno::Any into a double number.
+ <p>For conversion of OUString, rtl::math::StringToDouble is used.</p>
<p>In case no number can be generated from the Any, NaN is returned.</p>
-*/
-struct OOO_DLLPUBLIC_CHARTTOOLS AnyToDouble
+ */
+struct OOO_DLLPUBLIC_CHARTTOOLS ToDouble
{
double operator() ( const css::uno::Any & rAny )
{
@@ -55,12 +58,24 @@ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToDouble
rAny >>= fResult;
return fResult;
}
+
+ double operator() ( std::u16string_view rStr )
+ {
+ rtl_math_ConversionStatus eConversionStatus;
+ double fResult = ::rtl::math::stringToDouble( rStr, '.', ',', & eConversionStatus );
+
+ if( eConversionStatus != rtl_math_ConversionStatus_Ok )
+ return std::numeric_limits<double>::quiet_NaN();
+
+ return fResult;
+ }
};
-/** unary function to convert css::uno::Any into an
- OUString.
-*/
-struct OOO_DLLPUBLIC_CHARTTOOLS AnyToString
+/** unary function to convert a double number or css::uno::Any into an OUString.
+
+ <p>For conversion of doubles, rtl::math::DoubleToOUString is used.</p>
+ */
+struct OOO_DLLPUBLIC_CHARTTOOLS ToString
{
OUString operator() ( const css::uno::Any & rAny )
{
@@ -83,32 +98,7 @@ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToString
return OUString();
}
-};
-/** unary function to convert an OUString into a double number.
-
- <p>For conversion rtl::math::StringToDouble is used.</p>
- */
-struct OOO_DLLPUBLIC_CHARTTOOLS OUStringToDouble
-{
- double operator() ( const OUString & rStr )
- {
- rtl_math_ConversionStatus eConversionStatus;
- double fResult = ::rtl::math::stringToDouble( rStr, '.', ',', & eConversionStatus );
-
- if( eConversionStatus != rtl_math_ConversionStatus_Ok )
- return std::numeric_limits<double>::quiet_NaN();
-
- return fResult;
- }
-};
-
-/** unary function to convert a double number into an OUString.
-
- <p>For conversion rtl::math::DoubleToOUString is used.</p>
- */
-struct OOO_DLLPUBLIC_CHARTTOOLS DoubleToOUString
-{
OUString operator() ( double fNumber )
{
return ::rtl::math::doubleToUString(
@@ -121,6 +111,13 @@ struct OOO_DLLPUBLIC_CHARTTOOLS DoubleToOUString
}
};
+template <class Container, class Func> auto convertToSequence(const Container& container, Func f)
+{
+ css::uno::Sequence<decltype(f(container[0]))> result(container.size());
+ std::transform(container.begin(), container.end(), result.getArray(), f);
+ return result;
+}
+
} // namespace chart::CommonFunctors
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ConfigColorScheme.hxx b/chart2/source/inc/ConfigColorScheme.hxx
index 0cf65d0307ec..fe73dc671bb6 100644
--- a/chart2/source/inc/ConfigColorScheme.hxx
+++ b/chart2/source/inc/ConfigColorScheme.hxx
@@ -24,7 +24,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <memory>
-#include <string_view>
namespace com::sun::star::uno { class XComponentContext; }
@@ -54,7 +53,7 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// ____ ConfigItemListener ____
- void notify( std::u16string_view rPropertyName );
+ void notify();
protected:
// ____ XColorScheme ____
diff --git a/chart2/source/inc/ControllerLockGuard.hxx b/chart2/source/inc/ControllerLockGuard.hxx
index c84e87af36ad..b9da29954a02 100644
--- a/chart2/source/inc/ControllerLockGuard.hxx
+++ b/chart2/source/inc/ControllerLockGuard.hxx
@@ -18,8 +18,9 @@
*/
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
-#include <com/sun/star/uno/Reference.h>
+#include <rtl/ref.hxx>
namespace chart
{
@@ -36,14 +37,14 @@ namespace chart
unlockControllers in the DTOR. Using this ensures that controllers do not
remain locked when leaving a function even in case an exception is thrown.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS ControllerLockGuardUNO
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ControllerLockGuardUNO
{
public:
- explicit ControllerLockGuardUNO(const css::uno::Reference<css::frame::XModel>& xModel);
+ explicit ControllerLockGuardUNO(rtl::Reference<::chart::ChartModel> xModel);
~ControllerLockGuardUNO();
private:
- css::uno::Reference<css::frame::XModel> mxModel;
+ rtl::Reference<::chart::ChartModel> mxModel;
};
class ControllerLockGuard
@@ -62,17 +63,17 @@ private:
Use the ControllerLockHelperGuard to lock/unlock the model during a block of
instructions.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS ControllerLockHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ControllerLockHelper
{
public:
- explicit ControllerLockHelper(const css::uno::Reference<css::frame::XModel>& xModel);
+ explicit ControllerLockHelper(rtl::Reference<::chart::ChartModel> xModel);
~ControllerLockHelper();
SAL_DLLPRIVATE void lockControllers();
SAL_DLLPRIVATE void unlockControllers();
private:
- css::uno::Reference<css::frame::XModel> m_xModel;
+ rtl::Reference<::chart::ChartModel> m_xModel;
};
/** This guard calls lockControllers at the given ControllerLockHelper in the
@@ -80,7 +81,7 @@ private:
do not remain locked when leaving a function even in case an exception is
thrown.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS ControllerLockHelperGuard
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ControllerLockHelperGuard
{
public:
explicit ControllerLockHelperGuard(ControllerLockHelper& rHelper);
diff --git a/chart2/source/inc/DataInterpreter.hxx b/chart2/source/inc/DataInterpreter.hxx
new file mode 100644
index 000000000000..7638e5ccee3e
--- /dev/null
+++ b/chart2/source/inc/DataInterpreter.hxx
@@ -0,0 +1,154 @@
+/* -*- 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 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 .
+ */
+#pragma once
+
+#include "DataSeries.hxx"
+#include <cppuhelper/implbase.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/chart2/data/XDataSource.hpp>
+#include <rtl/ref.hxx>
+#include <vector>
+
+namespace chart
+{
+class DataSeries;
+class DataSource;
+class LabeledDataSequence;
+
+/** offers tooling to interpret different data sources in a structural
+ and chart-type-dependent way.
+ */
+struct InterpretedData
+{
+ std::vector< std::vector< rtl::Reference<::chart::DataSeries> > > Series;
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence > Categories;
+};
+
+/** offers tooling to interpret different data sources in a structural
+ and chart-type-dependent way.
+ */
+class SAL_DLLPUBLIC_RTTI DataInterpreter : public ::cppu::WeakImplHelper<
+ css::lang::XServiceInfo >
+{
+public:
+ explicit DataInterpreter();
+ virtual ~DataInterpreter() override;
+
+ /// XServiceInfo declarations
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
+ // convenience methods
+ static OUString GetRole( const css::uno::Reference< css::chart2::data::XDataSequence > & xSeq );
+
+ static void SetRole(
+ const css::uno::Reference< css::chart2::data::XDataSequence > & xSeq,
+ const OUString & rRole );
+
+ static css::uno::Any GetProperty(
+ const css::uno::Sequence<css::beans::PropertyValue > & aArguments,
+ std::u16string_view rName );
+
+ static bool HasCategories(
+ const css::uno::Sequence< css::beans::PropertyValue > & rArguments,
+ const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rData );
+
+ static bool UseCategoriesAsX(
+ const css::uno::Sequence< css::beans::PropertyValue > & rArguments );
+
+ static std::vector<css::uno::Reference< css::chart2::data::XLabeledDataSequence >> getDataSequences(
+ const css::uno::Reference< css::chart2::data::XDataSource >& xSource);
+
+ // ____ DataInterpreter ____
+ /** Interprets the given data.
+
+ @param xSource
+ the data source.
+
+ @param aArguments
+ Arguments that tell the template how to slice the given
+ range. The properties should be defined in a separate
+ service.
+
+ <p>For standard parameters that may be used, see the
+ service StandardDiagramCreationParameters.
+ </p>
+
+ @param aSeriesToReUse
+ use all the data series given here for the result before
+ creating new ones.
+ */
+ virtual InterpretedData interpretDataSource(
+ const css::uno::Reference< css::chart2::data::XDataSource >& xSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments,
+ const std::vector< rtl::Reference< ::chart::DataSeries > >& aSeriesToReUse );
+
+ /** Re-interprets the data given in <code>aInterpretedData</code>
+ while keeping the number of data series and the categories.
+ */
+ virtual InterpretedData reinterpretDataSeries(
+ const InterpretedData& aInterpretedData );
+
+ /** parses the given data and states, if a
+ reinterpretDataSeries() call can be done
+ without data loss.
+
+ @return
+ `TRUE`, if the data given in
+ <code>aInterpretedData</code> has a similar structure than
+ the one required is used as output of the data interpreter.
+ */
+ virtual bool isDataCompatible(
+ const InterpretedData& aInterpretedData );
+
+ /** Try to reverse the operation done in
+ interpretDataSource().
+
+ <p>In case <code>aInterpretedData</code> is the result of
+ interpretDataSource()( <code>xSource</code> ),
+ the result of this method should be <code>xSource</code>.</p>
+ */
+ static rtl::Reference< ::chart::DataSource > mergeInterpretedData(
+ const InterpretedData& aInterpretedData );
+
+ /** Get chart information that is specific to a particular chart
+ type, by key.
+
+ @param sKey
+ name of the piece of data to retrieve.
+
+ <p>Supported key strings:</p>
+ <ul>
+ <li><tt>"stock variant"</tt>: stock chart variant,
+ with 0 = neither Open Values nor volume, 1 = Open Values,
+ 2 = volume, 3 = both. Valid for candlestick charts.</li>
+ </ul>
+
+ @return
+ The value requested, or nothing if not present.
+ */
+ virtual css::uno::Any getChartTypeSpecificData(
+ const OUString& sKey );
+};
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/inc/DataSeries.hxx b/chart2/source/inc/DataSeries.hxx
index eae00d7da153..3705ea3fdab4 100644
--- a/chart2/source/model/inc/DataSeries.hxx
+++ b/chart2/source/inc/DataSeries.hxx
@@ -27,21 +27,24 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
// helper classes
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
-#include <ModifyListenerHelper.hxx>
+#include "ModifyListenerHelper.hxx"
+#include "PropertyHelper.hxx"
// STL
#include <vector>
#include <map>
-#include <OPropertySet.hxx>
+#include "OPropertySet.hxx"
+#include "charttoolsdllapi.hxx"
namespace com::sun::star::beans { class XPropertySet; }
namespace chart
{
+class LabeledDataSequence;
+class RegressionCurveModel;
namespace impl
{
@@ -57,10 +60,10 @@ typedef ::cppu::WeakImplHelper<
DataSeries_Base;
}
-class DataSeries final :
- public cppu::BaseMutex,
- public impl::DataSeries_Base,
- public ::property::OPropertySet
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) DataSeries
+ final
+ : public impl::DataSeries_Base
+ , public ::property::OPropertySet
{
public:
explicit DataSeries();
@@ -76,12 +79,8 @@ public:
/// merge XTypeProvider implementations
DECLARE_XTYPEPROVIDER()
-private:
explicit DataSeries( const DataSeries & rOther );
- // late initialization to call after copy-constructing
- void Init( const DataSeries & rOther );
-
// ____ XDataSeries ____
/// @see css::chart2::XDataSeries
virtual css::uno::Reference< css::beans::XPropertySet >
@@ -133,6 +132,32 @@ private:
virtual void SAL_CALL removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+ typedef std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tDataSequenceContainer;
+
+ void setData( const tDataSequenceContainer& aData );
+ const tDataSequenceContainer & getDataSequences2() const { return m_aDataSequences; }
+
+ typedef
+ std::vector< rtl::Reference< ::chart::RegressionCurveModel > >
+ tRegressionCurveContainerType;
+
+ const tRegressionCurveContainerType & getRegressionCurves2() const { return m_aRegressionCurves; }
+
+ /** Get the label of a series (e.g. for the legend)
+
+ @param rLabelSequenceRole
+ The data sequence contained in xSeries that has this role will be used
+ to take its label.
+ */
+ OUString getLabelForRole( const OUString & rLabelSequenceRole );
+
+ bool hasUnhiddenData();
+
+private:
+
+ // late initialization to call after copy-constructing
+ void Init( const DataSeries & rOther );
+
// ____ XModifyListener ____
virtual void SAL_CALL modified(
const css::lang::EventObject& aEvent ) override;
@@ -147,21 +172,19 @@ private:
void fireModifyEvent();
- typedef std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tDataSequenceContainer;
tDataSequenceContainer m_aDataSequences;
typedef std::map< sal_Int32,
css::uno::Reference< css::beans::XPropertySet > > tDataPointAttributeContainer;
tDataPointAttributeContainer m_aAttributedDataPoints;
- typedef
- std::vector< css::uno::Reference< css::chart2::XRegressionCurve > >
- tRegressionCurveContainerType;
tRegressionCurveContainerType m_aRegressionCurves;
rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
};
+OOO_DLLPUBLIC_CHARTTOOLS const tPropertyValueMap & StaticDataSeriesDefaults();
+
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/DataSeriesHelper.hxx b/chart2/source/inc/DataSeriesHelper.hxx
index bda6d4f0796c..2015398a7681 100644
--- a/chart2/source/inc/DataSeriesHelper.hxx
+++ b/chart2/source/inc/DataSeriesHelper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include "StackMode.hxx"
#include "charttoolsdllapi.hxx"
#include <com/sun/star/uno/Reference.h>
@@ -37,12 +38,17 @@ namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
namespace com::sun::star::uno { class Any; }
namespace com::sun::star::uno { template <class E> class Sequence; }
namespace chart { class BaseCoordinateSystem; }
+namespace chart { class ChartType; }
+namespace chart { class DataSource; }
+namespace chart { class Diagram; }
+namespace chart { class DataSeries; }
+namespace chart { class LabeledDataSequence; }
namespace chart::DataSeriesHelper
{
-OOO_DLLPUBLIC_CHARTTOOLS OUString
- getRole( const css::uno::Reference<css::chart2::data::XLabeledDataSequence>& xLabeledDataSequence );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+OUString getRole( const css::uno::Reference<css::chart2::data::XLabeledDataSequence>& xLabeledDataSequence );
/** Retrieves the data sequence in the given data source that matches the
given role. If more than one sequences match the role, the first match
@@ -54,7 +60,8 @@ OOO_DLLPUBLIC_CHARTTOOLS OUString
@param aRole
The role that is to be filtered out.
*/
-OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+css::uno::Reference< css::chart2::data::XLabeledDataSequence >
getDataSequenceByRole( const css::uno::Reference< css::chart2::data::XDataSource > & xSource,
const OUString& aRole,
bool bMatchPrefix = false );
@@ -68,110 +75,115 @@ OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSeq
@param aRole
The role that is to be filtered out.
*/
-OOO_DLLPUBLIC_CHARTTOOLS std::vector<
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+std::vector<
css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
getAllDataSequencesByRole( const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & aDataSequences,
const OUString& aRole );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+std::vector<
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
+ getAllDataSequencesByRole( const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & aDataSequences,
+ const OUString& aRole );
-OOO_DLLPUBLIC_CHARTTOOLS
-std::vector<css::uno::Reference<css::chart2::data::XLabeledDataSequence> >
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
getAllDataSequences(
- const css::uno::Sequence<css::uno::Reference<css::chart2::XDataSeries> >& aSeries );
+ const std::vector<rtl::Reference<::chart::DataSeries> >& aSeries );
/** Retrieves all data sequences found in the given data series and puts them
into a data source. The order of sequences will match the order of the data
series.
*/
-OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XDataSource >
- getDataSource( const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > > & aSeries );
-
-/** Get the label of a series (e.g. for the legend)
-
- @param rLabelSequenceRole
- The data sequence contained in xSeries that has this role will be used
- to take its label.
- */
-OOO_DLLPUBLIC_CHARTTOOLS OUString getDataSeriesLabel(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const OUString & rLabelSequenceRole );
-
-/** Get the label of a labeled sequence including necessary automatic generation
- */
-OOO_DLLPUBLIC_CHARTTOOLS OUString getLabelForLabeledDataSequence(
- const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & xLabeledSeq );
-
-OOO_DLLPUBLIC_CHARTTOOLS void setStackModeAtSeries(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > > & aSeries,
- const css::uno::Reference< css::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem,
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+rtl::Reference< ::chart::DataSource >
+ getDataSource( const std::vector< rtl::Reference< ::chart::DataSeries > > & aSeries );
+
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void setStackModeAtSeries(
+ const std::vector< rtl::Reference< ::chart::DataSeries > > & aSeries,
+ const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
StackMode eStackMode );
-OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getAttachedAxisIndex(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+sal_Int32 getAttachedAxisIndex(
+ const rtl::Reference< ::chart::DataSeries > & xSeries );
/// @param nAxisIndex, if -1 it is determined by the given data series via getAttachedAxisIndex
-OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getNumberFormatKeyFromAxis(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const css::uno::Reference< css::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem,
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+sal_Int32 getNumberFormatKeyFromAxis(
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
+ const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
sal_Int32 nDimensionIndex,
sal_Int32 nAxisIndex = -1 );
-OOO_DLLPUBLIC_CHARTTOOLS
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
rtl::Reference< ::chart::BaseCoordinateSystem >
getCoordinateSystemOfSeries(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
-OOO_DLLPUBLIC_CHARTTOOLS
-css::uno::Reference< css::chart2::XChartType >
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+rtl::Reference< ::chart::ChartType >
getChartTypeOfSeries(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
-OOO_DLLPUBLIC_CHARTTOOLS void deleteSeries(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const css::uno::Reference< css::chart2::XChartType > & xChartType );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void deleteSeries(
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
+ const rtl::Reference< ::chart::ChartType > & xChartType );
-OOO_DLLPUBLIC_CHARTTOOLS void switchSymbolsOnOrOff(
- const css::uno::Reference< css::beans::XPropertySet > & xSeriesProperties,
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void switchSymbolsOnOrOff(
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
bool bSymbolsOn, sal_Int32 nSeriesIndex );
-OOO_DLLPUBLIC_CHARTTOOLS void switchLinesOnOrOff(
- const css::uno::Reference< css::beans::XPropertySet > & xSeriesProperties,
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void switchLinesOnOrOff(
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
bool bLinesOn );
-OOO_DLLPUBLIC_CHARTTOOLS
-void makeLinesThickOrThin( const css::uno::Reference< css::beans::XPropertySet > & xSeriesProperties, bool bThick );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void makeLinesThickOrThin( const rtl::Reference< ::chart::DataSeries > & xSeries, bool bThick );
-OOO_DLLPUBLIC_CHARTTOOLS void setPropertyAlsoToAllAttributedDataPoints(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void setPropertyAlsoToAllAttributedDataPoints(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
const OUString& rPropertyName,
const css::uno::Any& rPropertyValue );
-OOO_DLLPUBLIC_CHARTTOOLS bool hasAttributedDataPointDifferentValue(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+bool hasAttributedDataPointDifferentValue(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
const OUString& rPropertyName,
const css::uno::Any& rPropertyValue );
-OOO_DLLPUBLIC_CHARTTOOLS bool hasUnhiddenData( const css::uno::Reference<
- css::chart2::XDataSeries >& xSeries );
-
-OOO_DLLPUBLIC_CHARTTOOLS
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nClippedIndex, const css::uno::Reference<
css::chart2::data::XDataSequence >& xDataSequence, bool bTranslate );
-OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelsAtSeries( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+bool hasDataLabelsAtSeries( const rtl::Reference< ::chart::DataSeries >& xSeries );
-OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelsAtPoints( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+bool hasDataLabelsAtPoints( const rtl::Reference< ::chart::DataSeries >& xSeries );
-OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelAtPoint( const css::uno::Reference< css::chart2::XDataSeries >& xSeries, sal_Int32 nPointIndex );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+bool hasDataLabelAtPoint( const rtl::Reference< ::chart::DataSeries >& xSeries, sal_Int32 nPointIndex );
-OOO_DLLPUBLIC_CHARTTOOLS void insertDataLabelsToSeriesAndAllPoints( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void insertDataLabelsToSeriesAndAllPoints( const rtl::Reference< ::chart::DataSeries >& xSeries );
-OOO_DLLPUBLIC_CHARTTOOLS void insertDataLabelToPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void insertDataLabelToPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
-OOO_DLLPUBLIC_CHARTTOOLS void deleteDataLabelsFromSeriesAndAllPoints( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void deleteDataLabelsFromSeriesAndAllPoints( const rtl::Reference< ::chart::DataSeries >& xSeries );
-OOO_DLLPUBLIC_CHARTTOOLS void deleteDataLabelsFromPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void deleteDataLabelsFromPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
} // namespace chart::DataSeriesHelper
diff --git a/chart2/source/model/main/DataSeriesProperties.hxx b/chart2/source/inc/DataSeriesProperties.hxx
index 13636d442fb5..7d36721ef066 100644
--- a/chart2/source/model/main/DataSeriesProperties.hxx
+++ b/chart2/source/inc/DataSeriesProperties.hxx
@@ -18,8 +18,8 @@
*/
#pragma once
-#include <PropertyHelper.hxx>
-#include <FastPropertyIdRanges.hxx>
+#include "PropertyHelper.hxx"
+#include "FastPropertyIdRanges.hxx"
#include <vector>
diff --git a/chart2/source/inc/DataSource.hxx b/chart2/source/inc/DataSource.hxx
index 56c740bc0d2c..9b976e439a66 100644
--- a/chart2/source/inc/DataSource.hxx
+++ b/chart2/source/inc/DataSource.hxx
@@ -18,15 +18,19 @@
*/
#pragma once
+#include <config_options.h>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <cppuhelper/implbase.hxx>
+#include <vector>
+#include "charttoolsdllapi.hxx"
namespace chart
{
+class LabeledDataSequence;
-class DataSource final : public
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) DataSource final : public
::cppu::WeakImplHelper<
css::lang::XServiceInfo,
css::chart2::data::XDataSource,
@@ -36,6 +40,8 @@ public:
explicit DataSource();
explicit DataSource(
const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rSequences );
+ explicit DataSource(
+ const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rSequences );
virtual ~DataSource() override;
@@ -44,7 +50,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
-protected:
// ____ XDataSource ____
virtual css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > SAL_CALL
getDataSequences() override;
diff --git a/chart2/source/inc/DataSourceHelper.hxx b/chart2/source/inc/DataSourceHelper.hxx
index 2c866091b21a..7b08cafc22a7 100644
--- a/chart2/source/inc/DataSourceHelper.hxx
+++ b/chart2/source/inc/DataSourceHelper.hxx
@@ -19,9 +19,11 @@
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Sequence.h>
+#include <rtl/ref.hxx>
namespace chart { class ChartModel; }
namespace com::sun::star::beans { struct PropertyValue; }
@@ -34,30 +36,29 @@ namespace com::sun::star::frame { class XModel; }
namespace chart
{
+class DataSource;
+class Diagram;
+class LabeledDataSequence;
-class OOO_DLLPUBLIC_CHARTTOOLS DataSourceHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) DataSourceHelper
{
public:
- static css::uno::Reference< css::chart2::data::XDataSource >
- createDataSource( const css::uno::Sequence<
- css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rSequences );
-
static css::uno::Reference< css::chart2::data::XDataSequence >
createCachedDataSequence();
static css::uno::Reference< css::chart2::data::XDataSequence >
createCachedDataSequence( const OUString & rSingleText );
- static css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ static rtl::Reference< LabeledDataSequence >
createLabeledDataSequence(
const css::uno::Reference< css::chart2::data::XDataSequence >& xValues ,
const css::uno::Reference< css::chart2::data::XDataSequence >& xLabels );
- static css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ static rtl::Reference< LabeledDataSequence >
createLabeledDataSequence(
const css::uno::Reference< css::chart2::data::XDataSequence >& xValues );
- static css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ static rtl::Reference< LabeledDataSequence >
createLabeledDataSequence();
static css::uno::Sequence< css::beans::PropertyValue >
@@ -74,26 +75,20 @@ public:
, OUString & rRangeRepresentation, css::uno::Sequence< sal_Int32 >& rSequenceMapping
, bool& bUseColumns, bool& bFirstCellAsLabel, bool& bHasCategories );
- static css::uno::Reference< css::chart2::data::XDataSource >
- pressUsedDataIntoRectangularFormat( const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc );
+ static rtl::Reference< ::chart::DataSource >
+ pressUsedDataIntoRectangularFormat( const rtl::Reference< ::chart::ChartModel >& xChartDoc );
SAL_DLLPRIVATE static css::uno::Sequence< OUString > getUsedDataRanges(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
static css::uno::Sequence< OUString > getUsedDataRanges(
- const css::uno::Reference< css::frame::XModel > & xChartModel );
+ const rtl::Reference<::chart::ChartModel> & xChartModel );
- static css::uno::Reference< css::chart2::data::XDataSource > getUsedData(
+ static rtl::Reference< ::chart::DataSource > getUsedData(
ChartModel& rModel );
- static css::uno::Reference< css::chart2::data::XDataSource > getUsedData(
- const css::uno::Reference< css::frame::XModel >& xChartModel );
-
- static css::uno::Reference< css::chart2::data::XDataSource > getUsedData(
- const css::uno::Reference<css::chart2::XChartDocument >& xChartDoc );
-
static bool detectRangeSegmentation(
- const css::uno::Reference< css::frame::XModel >& xChartModel
+ const rtl::Reference<::chart::ChartModel>& xChartModel
, OUString& rOutRangeString
, css::uno::Sequence< sal_Int32 >& rSequenceMapping
, bool& rOutUseColumns
@@ -101,7 +96,7 @@ public:
, bool& rOutHasCategories );
static void setRangeSegmentation(
- const css::uno::Reference< css::frame::XModel >& xChartModel
+ const rtl::Reference<::chart::ChartModel>& xChartModel
, const css::uno::Sequence< sal_Int32 >& rSequenceMapping
, bool bUseColumns
, bool bFirstCellAsLabel
@@ -115,7 +110,7 @@ public:
HasCategories and FirstCellAsLabel.
*/
static bool allArgumentsForRectRangeDetected(
- const css::uno::Reference< css::chart2::XChartDocument >& xChartDocument );
+ const rtl::Reference<::chart::ChartModel>& xChartDocument );
SAL_DLLPRIVATE static css::uno::Sequence< OUString > getRangesFromLabeledDataSequence(
const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & xLSeq );
diff --git a/chart2/source/inc/DataTable.hxx b/chart2/source/inc/DataTable.hxx
new file mode 100644
index 000000000000..fdebc6f1751a
--- /dev/null
+++ b/chart2/source/inc/DataTable.hxx
@@ -0,0 +1,87 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include "OPropertySet.hxx"
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+
+#include "charttoolsdllapi.hxx"
+#include <com/sun/star/chart2/XDataTable.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include "ModifyListenerHelper.hxx"
+
+namespace chart
+{
+typedef cppu::WeakImplHelper<css::chart2::XDataTable, css::lang::XServiceInfo,
+ css::util::XCloneable, css::util::XModifyBroadcaster,
+ css::util::XModifyListener>
+ DataTable_Base;
+
+/** Data table implementation */
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) DataTable final : public DataTable_Base,
+ public ::property::OPropertySet
+{
+public:
+ explicit DataTable();
+ virtual ~DataTable() override;
+
+ /// XServiceInfo declarations
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+
+ /// merge XInterface implementations
+ DECLARE_XINTERFACE()
+
+ /// merge XTypeProvider implementations
+ DECLARE_XTYPEPROVIDER()
+
+ explicit DataTable(DataTable const& rOther);
+
+private:
+ // ____ OPropertySet ____
+ virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any& rAny) const override;
+
+ // ____ OPropertySet ____
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+
+public:
+ // ____ XPropertySet ____
+ virtual css::uno::Reference<css::beans::XPropertySetInfo>
+ SAL_CALL getPropertySetInfo() override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference<css::util::XCloneable> SAL_CALL createClone() override;
+
+ // ____ XModifyBroadcaster ____
+ virtual void SAL_CALL
+ addModifyListener(const css::uno::Reference<css::util::XModifyListener>& aListener) override;
+ virtual void SAL_CALL
+ removeModifyListener(const css::uno::Reference<css::util::XModifyListener>& aListener) override;
+
+private:
+ // ____ XModifyListener ____
+ virtual void SAL_CALL modified(const css::lang::EventObject& aEvent) override;
+
+ // ____ XEventListener (base of XModifyListener) ____
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+ // ____ OPropertySet ____
+ virtual void firePropertyChangeEvent() override;
+ using OPropertySet::disposing;
+
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+};
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 5d6dc79a1ee1..62e9eeeac69a 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -19,28 +19,44 @@
#pragma once
#include "OPropertySet.hxx"
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XTitled.hpp>
#include <com/sun/star/chart/X3DDefaultSetter.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
#include "ModifyListenerHelper.hxx"
#include "charttoolsdllapi.hxx"
#include <vector>
namespace com::sun::star::beans { struct PropertyValue; }
+namespace com::sun::star::chart2 { class XDataSeries; }
namespace com::sun::star::chart2::data { class XDataSource; }
namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
-class Wall;
+class Axis;
class BaseCoordinateSystem;
+class ChartType;
+class ChartTypeManager;
+class ChartTypeTemplate;
+class DataSeries;
+class Legend;
+class DataTable;
+class RegressionCurveModel;
+enum class StackMode;
+class Wall;
+enum class ThreeDLookScheme;
+
+enum class DiagramPositioningMode
+{
+ Auto, Excluding, Including
+};
+
namespace impl
{
@@ -56,13 +72,13 @@ typedef ::cppu::WeakImplHelper<
Diagram_Base;
}
-class OOO_DLLPUBLIC_CHARTTOOLS Diagram final :
- public cppu::BaseMutex,
- public impl::Diagram_Base,
- public ::property::OPropertySet
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) Diagram
+ final
+ : public impl::Diagram_Base
+ , public ::property::OPropertySet
{
public:
- Diagram( css::uno::Reference< css::uno::XComponentContext > const & xContext );
+ Diagram( css::uno::Reference< css::uno::XComponentContext > xContext );
virtual ~Diagram() override;
/// XServiceInfo declarations
@@ -88,7 +104,7 @@ public:
getPropertySetInfo() override;
// ____ XFastPropertySet ____
- virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const css::uno::Any& rValue ) override;
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue ) override;
/// make original interface function visible again
using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue;
@@ -109,6 +125,9 @@ public:
const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override;
+ virtual css::uno::Reference<css::chart2::XDataTable> SAL_CALL getDataTable() override;
+ virtual void SAL_CALL setDataTable(const css::uno::Reference<css::chart2::XDataTable>& xDataTable) override;
+
// ____ XCoordinateSystemContainer ____
virtual void SAL_CALL addCoordinateSystem(
const css::uno::Reference< css::chart2::XCoordinateSystem >& aCoordSys ) override;
@@ -142,10 +161,192 @@ public:
std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > >
tCoordinateSystemContainerType;
- const tCoordinateSystemContainerType & getBaseCoordinateSystems() { return m_aCoordSystems; }
+ tCoordinateSystemContainerType getBaseCoordinateSystems() const;
+ void setCoordinateSystems(
+ const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > >& aCoordinateSystems );
+
+ rtl::Reference< ::chart::Legend > getLegend2() const;
+ void setLegend(const rtl::Reference< ::chart::Legend > &);
+
+ void setDataTable(const rtl::Reference<::chart::DataTable>& xNewDataTable);
+ rtl::Reference<::chart::DataTable> getDataTableRef() const;
+
+ DiagramPositioningMode getDiagramPositioningMode();
+
+ //returns integer from constant group css::chart::MissingValueTreatment
+ sal_Int32 getCorrectedMissingValueTreatment(
+ const rtl::Reference< ::chart::ChartType >& xChartType );
+
+ void setGeometry3D( sal_Int32 nNewGeometry );
+
+ sal_Int32 getGeometry3D( bool& rbFound, bool& rbAmbiguous );
+
+ bool isPieOrDonutChart();
+
+ bool isSupportingFloorAndWall();
+
+ /**
+ * Move a series forward or backward.
+ *
+ * @param xDiagram
+ * Reference to the diagram that contains the series.
+ *
+ * @param xGivenDataSeries
+ * Reference to the series that should be moved.
+ *
+ * @param bForward
+ * Direction in which the series should be moved.
+ *
+ * @returns </sal_True> if the series was moved successfully.
+ *
+ */
+ bool moveSeries(
+ const rtl::Reference< DataSeries >& xGivenDataSeries,
+ bool bForward );
+
+ /**
+ * Test if a series can be moved.
+ *
+ * @param xDiagram
+ * Reference to the diagram that contains the series.
+ *
+ * @param xGivenDataSeries
+ * Reference to the series that should be tested for moving.
+ *
+ * @param bForward
+ * Direction of the move to be checked.
+ *
+ * @returns </sal_True> if the series can be moved.
+ *
+ */
+ bool isSeriesMoveable(
+ const rtl::Reference< DataSeries >& xGivenDataSeries,
+ bool bForward );
+
+ std::vector< rtl::Reference< ChartType > > getChartTypes();
+
+ rtl::Reference< ChartType > getChartTypeByIndex( sal_Int32 nIndex );
+
+ bool isSupportingDateAxis();
+
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ getCategories();
+
+ void setCategories(
+ const css::uno::Reference< css::chart2::data::XLabeledDataSequence >& xCategories,
+ bool bSetAxisType = false, // when this flag is true ...
+ bool bCategoryAxis = true);// set the AxisType to CATEGORY or back to REALNUMBER
+
+ bool isCategory();
+
+ /** return all data series in this diagram grouped by chart-types
+ */
+ std::vector<
+ std::vector<
+ rtl::Reference< ::chart::DataSeries > > >
+ getDataSeriesGroups();
+
+ std::vector< rtl::Reference< ::chart::DataSeries > >
+ getDataSeries();
+
+ rtl::Reference< ChartType >
+ getChartTypeOfSeries( const rtl::Reference< DataSeries >& xSeries );
+
+ rtl::Reference< ::chart::Axis > getAttachedAxis(
+ const rtl::Reference< ::chart::DataSeries >& xSeries );
+
+ bool attachSeriesToAxis( bool bMainAxis,
+ const rtl::Reference< DataSeries >& xSeries,
+ const css::uno::Reference< css::uno::XComponentContext > & xContext,
+ bool bAdaptAxes=true );
+
+ /** Replaces all occurrences of xCooSysToReplace in the tree with
+ xReplacement in the diagram's tree
+ */
+ SAL_DLLPRIVATE void replaceCoordinateSystem(
+ const rtl::Reference< ::chart::BaseCoordinateSystem > & xCooSysToReplace,
+ const rtl::Reference< ::chart::BaseCoordinateSystem > & xReplacement );
+
+
+ /** Returns the dimension found for all chart types in the tree. If the
+ dimension is not unique, 0 is returned.
+ */
+ sal_Int32 getDimension();
+
+ /** Sets the dimension of the diagram given.
+
+ 1. Sets the dimension of all used ChartTypes
+ 2. Adapts the DataSeriesTree to reflect the new dimension
+ 3. If new coordinate-systems have to be created, adapts the
+ XCoordinateSystemContainer of the diagram.
+ */
+ void setDimension( sal_Int32 nNewDimensionCount );
+
+
+ StackMode getStackMode(bool& rbFound, bool& rbAmbiguous);
+
+ /** The stacking mode is only set at the series found inside
+ the first chart type. This is the standard for all current
+ templates (the only template that has more than one chart-type and
+ allows stacking is bar/line combi, and for this the stacking only
+ applies to the first chart type/the bars)
+ */
+ void setStackMode(StackMode eStackMode);
+
+
+ /** Sets the "SwapXAndYAxis" property at all coordinate systems found in the
+ given diagram.
+
+ "vertical==true" for bar charts, "vertical==false" for column charts
+ */
+ void setVertical( bool bVertical );
+
+ /** Gets the "SwapXAndYAxis" property at all coordinate systems found in the
+ given diagram.
-private:
+ "vertical==true" for bar charts, "vertical==false" for column charts
+ */
+ bool getVertical( bool& rbOutFoundResult, bool& rbOutAmbiguousResult );
+
+ struct tTemplateWithServiceName {
+ rtl::Reference< ::chart::ChartTypeTemplate > xChartTypeTemplate;
+ OUString sServiceName;
+ };
+
+ /** tries to find a template in the chart-type manager that matches this
+ diagram.
+
+ @return
+ A pair containing a template with the correct properties set as
+ first entry and the service name of the templates second entry. If
+ no template was found both elements are empty.
+ */
+ tTemplateWithServiceName
+ getTemplate(const rtl::Reference< ::chart::ChartTypeManager > & xChartTypeManager);
+ std::vector<rtl::Reference<::chart::RegressionCurveModel> >
+ getAllRegressionCurvesNotMeanValueLine();
+
+ double getCameraDistance();
+ void setCameraDistance( double fCameraDistance );
+
+ void getRotation(
+ sal_Int32& rnHorizontalAngleDegree, sal_Int32& rnVerticalAngleDegree );
+ void setRotation(
+ sal_Int32 nHorizontalAngleDegree, sal_Int32 nVerticalYAngleDegree );
+ void getRotationAngle(
+ double& rfXAngleRad, double& rfYAngleRad, double& rfZAngleRad );
+ void setRotationAngle(
+ double fXAngleRad, double fYAngleRad, double fZAngleRad );
+
+ ThreeDLookScheme detectScheme();
+ void setScheme( ThreeDLookScheme aScheme );
+
+ void setDefaultRotation( bool bPieOrDonut );
+
+ void switchRightAngledAxes( bool bRightAngledAxes );
+
+private:
// ____ XModifyListener ____
virtual void SAL_CALL modified(
const css::lang::EventObject& aEvent ) override;
@@ -160,24 +361,19 @@ private:
void fireModifyEvent();
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
-
+ css::uno::Reference<css::uno::XComponentContext> m_xContext;
tCoordinateSystemContainerType m_aCoordSystems;
- rtl::Reference< Wall > m_xWall;
-
- rtl::Reference< Wall > m_xFloor;
+ rtl::Reference<Wall> m_xWall;
+ rtl::Reference<Wall> m_xFloor;
- css::uno::Reference< css::chart2::XTitle >
- m_xTitle;
-
- css::uno::Reference< css::chart2::XLegend >
- m_xLegend;
-
- css::uno::Reference< css::chart2::XColorScheme >
- m_xColorScheme;
+ css::uno::Reference<css::chart2::XTitle> m_xTitle;
+ rtl::Reference<::chart::Legend> m_xLegend;
+ rtl::Reference<::chart::DataTable> m_xDataTable;
+ css::uno::Reference<css::chart2::XColorScheme> m_xColorScheme;
rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+
};
} // namespace chart
diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx
index 57372a1c072e..eb9e4fd00792 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -20,18 +20,18 @@
#include "StackMode.hxx"
#include "charttoolsdllapi.hxx"
+#include "ChartTypeTemplate.hxx"
#include <com/sun/star/awt/Rectangle.hpp>
-#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
#include <rtl/ref.hxx>
-#include <utility>
-#include <vector>
-
namespace chart { class ChartModel; }
namespace com::sun::star::chart2 { class XAxis; }
namespace com::sun::star::chart2 { class XChartDocument; }
+namespace com::sun::star::chart2 { class XChartType; }
namespace com::sun::star::chart2 { class XCoordinateSystem; }
namespace com::sun::star::chart2 { class XDiagram; }
+namespace com::sun::star::chart2 { class XDataSeries; }
+namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
namespace com::sun::star::uno { class XComponentContext; }
@@ -40,68 +40,18 @@ namespace com::sun::star::util { class XNumberFormatsSupplier; }
namespace chart
{
+class Axis;
+class BaseCoordinateSystem;
+class ChartType;
class ChartTypeManager;
class ChartTypeTemplate;
+class DataSeries;
+class Diagram;
+class LabeledDataSequence;
-enum DiagramPositioningMode
-{
- DiagramPositioningMode_AUTO,
- DiagramPositioningMode_EXCLUDING,
- DiagramPositioningMode_INCLUDING
-};
-
-class OOO_DLLPUBLIC_CHARTTOOLS DiagramHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) DiagramHelper
{
public:
- struct tTemplateWithServiceName {
- rtl::Reference< ::chart::ChartTypeTemplate > xChartTypeTemplate;
- OUString sServiceName;
- };
-
- /** tries to find a template in the chart-type manager that matches the
- given diagram.
-
- @return
- A pair containing a template with the correct properties set as
- first entry and the service name of the templates second entry. If
- no template was found both elements are empty.
- */
- static tTemplateWithServiceName
- getTemplateForDiagram(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- const rtl::Reference< ::chart::ChartTypeManager > & xChartTypeManager);
-
- /** Sets the "SwapXAndYAxis" property at all coordinate systems found in the
- given diagram.
-
- "vertical==true" for bar charts, "vertical==false" for column charts
- */
- static void setVertical( const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- bool bVertical );
-
- /** Gets the "SwapXAndYAxis" property at all coordinate systems found in the
- given diagram.
-
- "vertical==true" for bar charts, "vertical==false" for column charts
- */
- static bool getVertical( const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- bool& rbOutFoundResult, bool& rbOutAmbiguousResult );
-
- static StackMode getStackMode(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- bool& rbFound, bool& rbAmbiguous
- );
-
- /** The stacking mode is only set at the series found inside
- the first chart type. This is the standard for all current
- templates (the only template that has more than one chart-type and
- allows stacking is bar/line combi, and for this the stacking only
- applies to the first chart type/the bars)
- */
- static void setStackMode(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- StackMode eStackMode
- );
/** Retrieves the stackmode of the first DataSeries or none. If the series have differing stack
modes, rbAmbiguous is set to true. If no series is there rbFound is set to false.
@@ -113,93 +63,27 @@ public:
"ambiguous")
*/
static StackMode getStackModeFromChartType(
- const css::uno::Reference< css::chart2::XChartType > & xChartType,
+ const rtl::Reference< ::chart::ChartType > & xChartType,
bool& rbFound, bool& rbAmbiguous,
- const css::uno::Reference< css::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
+ const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem
);
- /** Returns the dimension found for all chart types in the tree. If the
- dimension is not unique, 0 is returned.
- */
- static sal_Int32 getDimension(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
-
- /** Sets the dimension of the diagram given.
-
- 1. Sets the dimension of all used ChartTypes
- 2. Adapts the DataSeriesTree to reflect the new dimension
- 3. If new coordinate-systems have to be created, adapts the
- XCoordinateSystemContainer of the diagram.
- */
- static void setDimension(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- sal_Int32 nNewDimensionCount );
-
- /** Replaces all occurrences of xCooSysToReplace in the tree with
- xReplacement in the diagram's tree
- */
- SAL_DLLPRIVATE static void replaceCoordinateSystem(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- const css::uno::Reference< css::chart2::XCoordinateSystem > & xCooSysToReplace,
- const css::uno::Reference< css::chart2::XCoordinateSystem > & xReplacement );
-
static bool isSeriesAttachedToMainAxis(
- const css::uno::Reference< css::chart2::XDataSeries >& xDataSeries );
-
- static bool attachSeriesToAxis( bool bMainAxis,
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- const css::uno::Reference< css::uno::XComponentContext > & xContext,
- bool bAdaptAxes=true );
-
- static css::uno::Reference< css::chart2::XAxis > getAttachedAxis(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
-
- static css::uno::Reference< css::chart2::XChartType >
- getChartTypeOfSeries(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
-
- static std::vector< css::uno::Reference< css::chart2::XDataSeries > >
- getDataSeriesFromDiagram(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
-
- /** return all data series in this diagram grouped by chart-types
- */
- static css::uno::Sequence<
- css::uno::Sequence<
- css::uno::Reference< css::chart2::XDataSeries > > >
- getDataSeriesGroups(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
-
- static bool isCategoryDiagram(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
-
- static void setCategoriesToDiagram(
- const css::uno::Reference< css::chart2::data::XLabeledDataSequence >& xCategories,
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- bool bSetAxisType = false, // when this flag is true ...
- bool bCategoryAxis = true);// set the AxisType to CATEGORY or back to REALNUMBER
-
- static css::uno::Reference< css::chart2::data::XLabeledDataSequence >
- getCategoriesFromDiagram(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ const rtl::Reference< ::chart::DataSeries >& xDataSeries );
static css::uno::Sequence< OUString >
getExplicitSimpleCategories( ChartModel& rModel );
SAL_DLLPRIVATE static css::uno::Sequence< OUString >
generateAutomaticCategoriesFromCooSys(
- const css::uno::Reference< css::chart2::XCoordinateSystem > & xCooSys );
+ const rtl::Reference< ::chart::BaseCoordinateSystem > & xCooSys );
static void switchToDateCategories(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc );
+ const rtl::Reference<::chart::ChartModel> & xChartDoc );
static void switchToTextCategories(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc );
+ const rtl::Reference<::chart::ChartModel> & xChartDoc );
- static bool isSupportingDateAxis( const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
static bool isDateNumberFormat( sal_Int32 nNumberFormat, const css::uno::Reference< css::util::XNumberFormats >& xNumberFormats );
static sal_Int32 getDateNumberFormat( const css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
static sal_Int32 getDateTimeInputNumberFormat( const css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier, double fNumber );
@@ -207,81 +91,14 @@ public:
static sal_Int32 getPercentNumberFormat( const css::uno::Reference<
css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
- static css::uno::Reference< css::chart2::XChartType >
- getChartTypeByIndex( const css::uno::Reference< css::chart2::XDiagram >& xDiagram, sal_Int32 nIndex );
-
- static css::uno::Sequence<
- css::uno::Reference< css::chart2::XChartType > >
- getChartTypesFromDiagram(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
-
- SAL_DLLPRIVATE static bool areChartTypesCompatible( const css::uno::Reference<
- css::chart2::XChartType >& xFirstType,
- const css::uno::Reference< css::chart2::XChartType >& xSecondType );
-
- /**
- * Test if a series can be moved.
- *
- * @param xDiagram
- * Reference to the diagram that contains the series.
- *
- * @param xGivenDataSeries
- * Reference to the series that should be tested for moving.
- *
- * @param bForward
- * Direction of the move to be checked.
- *
- * @returns </sal_True> if the series can be moved.
- *
- */
- static bool isSeriesMoveable(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- const css::uno::Reference< css::chart2::XDataSeries >& xGivenDataSeries,
- bool bForward );
-
- /**
- * Move a series forward or backward.
- *
- * @param xDiagram
- * Reference to the diagram that contains the series.
- *
- * @param xGivenDataSeries
- * Reference to the series that should be moved.
- *
- * @param bForward
- * Direction in which the series should be moved.
- *
- * @returns </sal_True> if the series was moved successfully.
- *
- */
- static bool moveSeries(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- const css::uno::Reference< css::chart2::XDataSeries >& xGivenDataSeries,
- bool bForward );
-
- static bool isSupportingFloorAndWall( const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
-
- static bool isPieOrDonutChart( const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
-
- static sal_Int32 getGeometry3D(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- bool& rbFound, bool& rbAmbiguous );
-
- static void setGeometry3D(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- sal_Int32 nNewGeometry );
-
- //returns integer from constant group css::chart::MissingValueTreatment
- static sal_Int32 getCorrectedMissingValueTreatment(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- const css::uno::Reference< css::chart2::XChartType >& xChartType );
-
- static DiagramPositioningMode getDiagramPositioningMode( const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ SAL_DLLPRIVATE static bool areChartTypesCompatible(
+ const rtl::Reference< ::chart::ChartType >& xFirstType,
+ const rtl::Reference< ::chart::ChartType >& xSecondType );
- static bool setDiagramPositioning( const css::uno::Reference< css::frame::XModel >& xChartModel,
+ static bool setDiagramPositioning( const rtl::Reference<::chart::ChartModel>& xChartModel,
const css::awt::Rectangle& rPosRect /*100th mm*/ );
- static css::awt::Rectangle getDiagramRectangleFromModel( const css::uno::Reference< css::frame::XModel >& xChartModel );
+ static css::awt::Rectangle getDiagramRectangleFromModel( const rtl::Reference<::chart::ChartModel>& xChartModel );
static bool switchDiagramPositioningToExcludingPositioning( ChartModel& rModel
, bool bResetModifiedState //set model back to unchanged if it was unchanged before
diff --git a/chart2/source/inc/DisposeHelper.hxx b/chart2/source/inc/DisposeHelper.hxx
index 8c9b0b7d47f3..58dc2d5c55ba 100644
--- a/chart2/source/inc/DisposeHelper.hxx
+++ b/chart2/source/inc/DisposeHelper.hxx
@@ -33,7 +33,7 @@ template <class T> void Dispose(const T& xInterface)
template <class T> void DisposeAndClear(css::uno::Reference<T>& rInterface)
{
Dispose<css::uno::Reference<T>>(rInterface);
- rInterface.set(nullptr);
+ rInterface.clear();
}
template <class Container> void DisposeAllElements(Container& rContainer)
diff --git a/chart2/source/inc/ErrorBar.hxx b/chart2/source/inc/ErrorBar.hxx
index bf31ed364d72..939b95c739e8 100644
--- a/chart2/source/inc/ErrorBar.hxx
+++ b/chart2/source/inc/ErrorBar.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include <cppuhelper/basemutex.hxx>
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
#include <cppuhelper/implbase.hxx>
@@ -57,9 +57,7 @@ typedef ::cppu::WeakImplHelper<
ErrorBar_Base;
}
-class ErrorBar final :
- public cppu::BaseMutex,
- public impl::ErrorBar_Base
+class ErrorBar final : public impl::ErrorBar_Base
{
private:
OUString maDashName;
@@ -77,7 +75,7 @@ private:
sal_Int32 meStyle;
public:
- OOO_DLLPUBLIC_CHARTTOOLS explicit ErrorBar();
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) explicit ErrorBar();
virtual ~ErrorBar() override;
/// XServiceInfo declarations
diff --git a/chart2/source/inc/EventListenerHelper.hxx b/chart2/source/inc/EventListenerHelper.hxx
index a042c006716d..dcf3256d46b5 100644
--- a/chart2/source/inc/EventListenerHelper.hxx
+++ b/chart2/source/inc/EventListenerHelper.hxx
@@ -20,7 +20,7 @@
#include <com/sun/star/lang/XComponent.hpp>
-#include <algorithm>
+#include <utility>
namespace com::sun::star::lang { class XEventListener; }
@@ -35,8 +35,8 @@ namespace impl
template< class InterfaceRef >
struct addListenerFunctor
{
- explicit addListenerFunctor( const css::uno::Reference< css::lang::XEventListener > & xListener ) :
- m_xListener( xListener )
+ explicit addListenerFunctor( css::uno::Reference< css::lang::XEventListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const InterfaceRef & xObject )
@@ -53,8 +53,8 @@ private:
template< class InterfaceRef >
struct removeListenerFunctor
{
- explicit removeListenerFunctor( const css::uno::Reference< css::lang::XEventListener > & xListener ) :
- m_xListener( xListener )
+ explicit removeListenerFunctor( css::uno::Reference< css::lang::XEventListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const InterfaceRef & xObject )
diff --git a/chart2/source/inc/ExplicitCategoriesProvider.hxx b/chart2/source/inc/ExplicitCategoriesProvider.hxx
index 63097a3aea11..73bc258c9922 100644
--- a/chart2/source/inc/ExplicitCategoriesProvider.hxx
+++ b/chart2/source/inc/ExplicitCategoriesProvider.hxx
@@ -18,11 +18,13 @@
*/
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
-#include <cppuhelper/weakref.hxx>
+#include <unotools/weakref.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Sequence.h>
+#include <utility>
#include <vector>
namespace chart { class ChartModel; }
@@ -33,13 +35,15 @@ namespace com::sun::star::uno { class Any; }
namespace chart
{
+class BaseCoordinateSystem;
+class LabeledDataSequence;
struct OOO_DLLPUBLIC_CHARTTOOLS ComplexCategory
{
OUString Text;
sal_Int32 Count;
- ComplexCategory( const OUString& rText, sal_Int32 nCount ) : Text( rText ), Count (nCount)
+ ComplexCategory( OUString aText, sal_Int32 nCount ) : Text(std::move( aText )), Count (nCount)
{}
};
@@ -52,10 +56,10 @@ public:
virtual css::uno::Sequence< OUString > getStringsForLevel( sal_Int32 nIndex ) const = 0;
};
-class OOO_DLLPUBLIC_CHARTTOOLS ExplicitCategoriesProvider final
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ExplicitCategoriesProvider final
{
public:
- ExplicitCategoriesProvider( const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSysModel
+ ExplicitCategoriesProvider( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSysModel
, ChartModel& rChartModel
);
~ExplicitCategoriesProvider();
@@ -68,7 +72,7 @@ public:
const std::vector<ComplexCategory>* getCategoriesByLevel( sal_Int32 nLevel );
static OUString getCategoryByIndex(
- const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSysModel
+ const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSysModel
, ChartModel& rModel
, sal_Int32 nIndex );
@@ -82,8 +86,8 @@ public:
bool hasComplexCategories() const;
sal_Int32 getCategoryLevelCount() const;
- const css::uno::Sequence< css::uno::Reference<
- css::chart2::data::XLabeledDataSequence> >& getSplitCategoriesList() const { return m_aSplitCategoriesList;}
+ const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence> >&
+ getSplitCategoriesList() const { return m_aSplitCategoriesList;}
bool isDateAxis();
const std::vector< double >& getDateCategories();
@@ -93,15 +97,14 @@ private:
ExplicitCategoriesProvider& operator =(ExplicitCategoriesProvider const &) = delete;
bool volatile m_bDirty;
- css::uno::WeakReference< css::chart2::XCoordinateSystem > m_xCooSysModel;
+ unotools::WeakReference< ::chart::BaseCoordinateSystem > m_xCooSysModel;
ChartModel& mrModel;
css::uno::Reference< css::chart2::data::XLabeledDataSequence> m_xOriginalCategories;
bool m_bIsExplicitCategoriesInited;
css::uno::Sequence< OUString > m_aExplicitCategories;
std::vector< std::vector< ComplexCategory > > m_aComplexCats;
- css::uno::Sequence< css::uno::Reference<
- css::chart2::data::XLabeledDataSequence> > m_aSplitCategoriesList;
+ std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence> > m_aSplitCategoriesList;
bool m_bIsDateAxis;
bool m_bIsAutoDate;
diff --git a/chart2/source/inc/FillProperties.hxx b/chart2/source/inc/FillProperties.hxx
index 84759cfa0ced..ce1c6d83629c 100644
--- a/chart2/source/inc/FillProperties.hxx
+++ b/chart2/source/inc/FillProperties.hxx
@@ -63,10 +63,10 @@ namespace FillProperties
, PROP_FILL_BACKGROUND
};
- OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddPropertiesToVector(
std::vector< css::beans::Property > & rOutProperties );
- OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
}
} // namespace chart
diff --git a/chart2/source/model/main/FormattedString.hxx b/chart2/source/inc/FormattedString.hxx
index 878c300156b4..23c81454facf 100644
--- a/chart2/source/model/main/FormattedString.hxx
+++ b/chart2/source/inc/FormattedString.hxx
@@ -18,14 +18,14 @@
*/
#pragma once
-#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
+#include "OPropertySet.hxx"
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <ModifyListenerHelper.hxx>
+#include "ModifyListenerHelper.hxx"
+#include "PropertyHelper.hxx"
namespace chart
{
@@ -42,7 +42,6 @@ typedef ::cppu::WeakImplHelper<
}
class FormattedString final :
- public cppu::BaseMutex,
public impl::FormattedString_Base,
public ::property::OPropertySet
{
@@ -73,7 +72,6 @@ public:
virtual void SAL_CALL removeVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) override
{ ::property::OPropertySet::removeVetoableChangeListener(p1, p2); }
-private:
explicit FormattedString( const FormattedString & rOther );
// ____ XFormattedString ____
@@ -118,6 +116,7 @@ private:
virtual void SAL_CALL disposing(
const css::lang::EventObject& Source ) override;
+private:
// ____ OPropertySet ____
virtual void firePropertyChangeEvent() override;
using OPropertySet::disposing;
@@ -136,6 +135,8 @@ private:
rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
};
+OOO_DLLPUBLIC_CHARTTOOLS const ::chart::tPropertyValueMap & StaticFormattedStringDefaults();
+
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/FormattedStringHelper.hxx b/chart2/source/inc/FormattedStringHelper.hxx
index 45ce0b30142e..adc1f54802b8 100644
--- a/chart2/source/inc/FormattedStringHelper.hxx
+++ b/chart2/source/inc/FormattedStringHelper.hxx
@@ -18,24 +18,23 @@
*/
#pragma once
-#include <com/sun/star/uno/Sequence.h>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::chart2 { class XFormattedString2; }
-namespace com::sun::star::uno { class XComponentContext; }
namespace com::sun::star::uno { template <class interface_type> class Reference; }
namespace chart
{
+class FormattedString;
class FormattedStringHelper
{
public:
- static css::uno::Sequence<
- css::uno::Reference< css::chart2::XFormattedString2 > >
- createFormattedStringSequence(
- const css::uno::Reference< css::uno::XComponentContext > & xContext
- , const OUString & rString
+ static rtl::Reference< ::chart::FormattedString >
+ createFormattedString(
+ const OUString & rString
, const css::uno::Reference< css::beans::XPropertySet > & xTextProperties ) noexcept;
};
diff --git a/chart2/source/model/main/GridProperties.hxx b/chart2/source/inc/GridProperties.hxx
index 43ab136c8332..da19322675e3 100644
--- a/chart2/source/model/main/GridProperties.hxx
+++ b/chart2/source/inc/GridProperties.hxx
@@ -18,14 +18,13 @@
*/
#pragma once
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <ModifyListenerHelper.hxx>
+#include "ModifyListenerHelper.hxx"
-#include <OPropertySet.hxx>
+#include "OPropertySet.hxx"
namespace chart
{
@@ -40,13 +39,13 @@ typedef ::cppu::WeakImplHelper<
GridProperties_Base;
}
-class GridProperties final :
- public cppu::BaseMutex,
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) GridProperties final :
public impl::GridProperties_Base,
public ::property::OPropertySet
{
public:
explicit GridProperties();
+ explicit GridProperties( const GridProperties & rOther );
virtual ~GridProperties() override;
/// XServiceInfo declarations
@@ -59,9 +58,6 @@ public:
/// merge XTypeProvider implementations
DECLARE_XTYPEPROVIDER()
-private:
- explicit GridProperties( const GridProperties & rOther );
-
// ____ OPropertySet ____
virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
@@ -80,6 +76,8 @@ private:
virtual void SAL_CALL removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+private:
+
// ____ XModifyListener ____
virtual void SAL_CALL modified(
const css::lang::EventObject& aEvent ) override;
diff --git a/chart2/source/inc/InternalDataProvider.hxx b/chart2/source/inc/InternalDataProvider.hxx
index 0fa2bdf8b855..a5032efcdab8 100644
--- a/chart2/source/inc/InternalDataProvider.hxx
+++ b/chart2/source/inc/InternalDataProvider.hxx
@@ -37,6 +37,7 @@ namespace com::sun::star::chart2 { class XChartDocument; }
namespace chart
{
+class ChartModel;
class UncachedDataSequence;
namespace impl
@@ -72,7 +73,7 @@ public:
// #i120559# allow handing over a default for data orientation
// (DataInColumns) that will be used when no data is available
explicit InternalDataProvider(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc,
+ const rtl::Reference< ::chart::ChartModel > & xChartDoc,
bool bConnectToModel,
bool bDefaultDataInColumns );
explicit InternalDataProvider( const InternalDataProvider & rOther );
diff --git a/chart2/source/inc/LabeledDataSequence.hxx b/chart2/source/inc/LabeledDataSequence.hxx
index 811eb1997e49..aa37753695f9 100644
--- a/chart2/source/inc/LabeledDataSequence.hxx
+++ b/chart2/source/inc/LabeledDataSequence.hxx
@@ -18,12 +18,13 @@
*/
#pragma once
-#include <cppuhelper/basemutex.hxx>
+#include <config_options.h>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/chart2/data/XLabeledDataSequence2.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include "ModifyListenerHelper.hxx"
+#include "charttoolsdllapi.hxx"
namespace com::sun::star::chart2::data { class XDataSequence; }
namespace com::sun::star::util { class XCloneable; }
@@ -40,17 +41,17 @@ typedef cppu::WeakImplHelper<
LabeledDataSequence_Base;
}
-class LabeledDataSequence final :
- public cppu::BaseMutex,
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) LabeledDataSequence final :
public impl::LabeledDataSequence_Base
{
public:
explicit LabeledDataSequence();
+ explicit LabeledDataSequence(const LabeledDataSequence &);
explicit LabeledDataSequence(
- const css::uno::Reference< css::chart2::data::XDataSequence > & rValues );
+ css::uno::Reference< css::chart2::data::XDataSequence > xValues );
explicit LabeledDataSequence(
- const css::uno::Reference< css::chart2::data::XDataSequence > & rValues,
- const css::uno::Reference< css::chart2::data::XDataSequence > & rLabels );
+ css::uno::Reference< css::chart2::data::XDataSequence > xValues,
+ css::uno::Reference< css::chart2::data::XDataSequence > xLabels );
virtual ~LabeledDataSequence() override;
@@ -59,7 +60,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
-protected:
// ____ XLabeledDataSequence ____
virtual css::uno::Reference< css::chart2::data::XDataSequence > SAL_CALL getValues() override;
virtual void SAL_CALL setValues(
diff --git a/chart2/source/model/main/Legend.hxx b/chart2/source/inc/Legend.hxx
index 8748a4592393..dbc3db602400 100644
--- a/chart2/source/model/main/Legend.hxx
+++ b/chart2/source/inc/Legend.hxx
@@ -18,14 +18,15 @@
*/
#pragma once
-#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
+#include "OPropertySet.hxx"
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <com/sun/star/chart2/XLegend.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <ModifyListenerHelper.hxx>
+#include "ModifyListenerHelper.hxx"
+#include "charttoolsdllapi.hxx"
+#include "PropertyHelper.hxx"
namespace chart
{
@@ -41,8 +42,7 @@ typedef ::cppu::WeakImplHelper<
Legend_Base;
}
-class Legend final :
- public cppu::BaseMutex,
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) Legend final :
public impl::Legend_Base,
public ::property::OPropertySet
{
@@ -60,15 +60,16 @@ public:
/// merge XTypeProvider implementations
DECLARE_XTYPEPROVIDER()
-private:
explicit Legend( const Legend & rOther );
+private:
// ____ OPropertySet ____
virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
// ____ OPropertySet ____
virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+public:
// ____ XPropertySet ____
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
@@ -82,6 +83,7 @@ private:
virtual void SAL_CALL removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+private:
// ____ XModifyListener ____
virtual void SAL_CALL modified(
const css::lang::EventObject& aEvent ) override;
@@ -97,6 +99,8 @@ private:
rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
};
+OOO_DLLPUBLIC_CHARTTOOLS const ::chart::tPropertyValueMap& StaticLegendDefaults();
+
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/LegendHelper.hxx b/chart2/source/inc/LegendHelper.hxx
index d0f19ebb8385..c46131bd2bc4 100644
--- a/chart2/source/inc/LegendHelper.hxx
+++ b/chart2/source/inc/LegendHelper.hxx
@@ -18,7 +18,9 @@
*/
#pragma once
+#include <config_options.h>
#include <com/sun/star/uno/Reference.hxx>
+#include <rtl/ref.hxx>
#include "charttoolsdllapi.hxx"
namespace chart { class ChartModel; }
@@ -28,17 +30,19 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
+class Diagram;
+class Legend;
-class OOO_DLLPUBLIC_CHARTTOOLS LegendHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) LegendHelper
{
public:
- static css::uno::Reference< css::chart2::XLegend >
+ static rtl::Reference< ::chart::Legend >
showLegend( ChartModel& rModel
, const css::uno::Reference< css::uno::XComponentContext >& xContext );
static void hideLegend( ChartModel& rModel );
- static css::uno::Reference< css::chart2::XLegend >
+ static rtl::Reference< ::chart::Legend >
getLegend( ChartModel& rModel
, const css::uno::Reference< css::uno::XComponentContext >& xContext = nullptr
, bool bCreate = false );
@@ -47,7 +51,7 @@ public:
is a legend which has a "Show" property of value <FALSE/>. Otherwise,
<TRUE/> is returned.
*/
- static bool hasLegend( const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ static bool hasLegend( const rtl::Reference< ::chart::Diagram > & xDiagram );
};
} //namespace chart
diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx
index 613d92314f96..582d10086b78 100644
--- a/chart2/source/inc/LifeTime.hxx
+++ b/chart2/source/inc/LifeTime.hxx
@@ -18,24 +18,27 @@
*/
#pragma once
-#include <osl/mutex.hxx>
+#include <config_options.h>
+#include <mutex>
#include <osl/conditn.hxx>
-#include <comphelper/multicontainer2.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include "charttoolsdllapi.hxx"
+namespace com::sun::star::document { class XStorageChangeListener; }
namespace com::sun::star::lang { class XComponent; }
+namespace com::sun::star::lang { class XEventListener; }
namespace com::sun::star::util { class CloseVetoException; }
namespace com::sun::star::util { class XCloseListener; }
namespace com::sun::star::util { class XCloseable; }
+namespace com::sun::star::util { class XModifyListener; }
+namespace com::sun::star::view { class XSelectionChangeListener; }
namespace apphelper
{
-class OOO_DLLPUBLIC_CHARTTOOLS LifeTimeManager
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) LifeTimeManager
{
friend class LifeTimeGuard;
-protected:
- mutable ::osl::Mutex m_aAccessMutex;
public:
LifeTimeManager( css::lang::XComponent* pComponent );
virtual ~LifeTimeManager();
@@ -44,25 +47,25 @@ public:
/// @throws css::uno::RuntimeException
bool dispose();
-public:
- ::comphelper::OMultiTypeInterfaceContainerHelper2 m_aListenerContainer;
+ mutable std::mutex m_aAccessMutex;
+ ::comphelper::OInterfaceContainerHelper4<css::util::XCloseListener> m_aCloseListeners;
+ ::comphelper::OInterfaceContainerHelper4<css::util::XModifyListener> m_aModifyListeners;
+ ::comphelper::OInterfaceContainerHelper4<css::document::XStorageChangeListener> m_aStorageChangeListeners;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListeners;
+ ::comphelper::OInterfaceContainerHelper4<css::view::XSelectionChangeListener> m_aSelectionChangeListeners;
protected:
- SAL_DLLPRIVATE virtual bool impl_canStartApiCall();
- SAL_DLLPRIVATE virtual void impl_apiCallCountReachedNull(){}
+ SAL_DLLPRIVATE virtual bool impl_canStartApiCall();
+ SAL_DLLPRIVATE virtual void impl_apiCallCountReachedNull(std::unique_lock<std::mutex>& /*rGuard*/){}
SAL_DLLPRIVATE void impl_registerApiCall(bool bLongLastingCall);
- SAL_DLLPRIVATE void impl_unregisterApiCall(bool bLongLastingCall);
+ SAL_DLLPRIVATE void impl_unregisterApiCall(std::unique_lock<std::mutex>& rGuard, bool bLongLastingCall);
-protected:
css::lang::XComponent* m_pComponent;
-
::osl::Condition m_aNoAccessCountCondition;
sal_Int32 m_nAccessCount;
-
bool volatile m_bDisposed;
bool volatile m_bInDispose;
-
::osl::Condition m_aNoLongLastingCallCountCondition;
sal_Int32 m_nLongLastingCallCount;
};
@@ -96,10 +99,10 @@ public:
private:
virtual bool impl_canStartApiCall() override;
- virtual void impl_apiCallCountReachedNull() override;
+ virtual void impl_apiCallCountReachedNull(std::unique_lock<std::mutex>& rGuard) override;
void impl_setOwnership( bool bDeliverOwnership, bool bMyVeto );
- void impl_doClose();
+ void impl_doClose(std::unique_lock<std::mutex>& rGuard);
};
/*
@@ -178,10 +181,10 @@ public:
}
bool startApiCall(bool bLongLastingCall=false);
~LifeTimeGuard();
- void clear() { m_guard.clear(); }
+ void clear() { m_guard.unlock(); }
private:
- osl::ClearableMutexGuard m_guard;
+ std::unique_lock<std::mutex> m_guard;
LifeTimeManager& m_rManager;
bool m_bCallRegistered;
bool m_bLongLastingCallRegistered;
@@ -191,23 +194,6 @@ private:
LifeTimeGuard& operator= ( const LifeTimeGuard& ) = delete;
};
-template<class T>
-class NegativeGuard final
-{
- T * m_pT;
-public:
-
- NegativeGuard(T & t) : m_pT(&t)
- {
- m_pT->release();
- }
-
- ~NegativeGuard()
- {
- m_pT->acquire();
- }
-};
-
}//end namespace apphelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/LinePropertiesHelper.hxx b/chart2/source/inc/LinePropertiesHelper.hxx
index 2999de81a76f..efa5a6e6b847 100644
--- a/chart2/source/inc/LinePropertiesHelper.hxx
+++ b/chart2/source/inc/LinePropertiesHelper.hxx
@@ -48,10 +48,10 @@ namespace LinePropertiesHelper
PROP_LINE_CAP
};
- OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddPropertiesToVector(
std::vector< css::beans::Property > & rOutProperties );
- OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
bool IsLineVisible( const css::uno::Reference<
css::beans::XPropertySet >& xLineProperties );
diff --git a/chart2/source/inc/MediaDescriptorHelper.hxx b/chart2/source/inc/MediaDescriptorHelper.hxx
index cfef8fc14f68..46edb2657598 100644
--- a/chart2/source/inc/MediaDescriptorHelper.hxx
+++ b/chart2/source/inc/MediaDescriptorHelper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -43,7 +44,7 @@ namespace com::sun::star::io { class XStream; }
namespace apphelper
{
-class OOO_DLLPUBLIC_CHARTTOOLS MediaDescriptorHelper final
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) MediaDescriptorHelper final
{
public:
MediaDescriptorHelper( const css::uno::Sequence< css::beans::PropertyValue > & rMediaDescriptor );
diff --git a/chart2/source/inc/ModifyListenerCallBack.hxx b/chart2/source/inc/ModifyListenerCallBack.hxx
index 406804189e73..b1b704c86002 100644
--- a/chart2/source/inc/ModifyListenerCallBack.hxx
+++ b/chart2/source/inc/ModifyListenerCallBack.hxx
@@ -19,6 +19,7 @@
#pragma once
+#include <config_options.h>
#include <tools/link.hxx>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
@@ -32,7 +33,7 @@ without becoming a XModifyListener yourself
class ModifyListenerCallBack_impl;
-class OOO_DLLPUBLIC_CHARTTOOLS ModifyListenerCallBack final
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ModifyListenerCallBack final
{
public:
explicit ModifyListenerCallBack(const Link<void*, void>& rCallBack);
diff --git a/chart2/source/inc/ModifyListenerHelper.hxx b/chart2/source/inc/ModifyListenerHelper.hxx
index b65530d9f229..ee90d407a66f 100644
--- a/chart2/source/inc/ModifyListenerHelper.hxx
+++ b/chart2/source/inc/ModifyListenerHelper.hxx
@@ -75,8 +75,8 @@ namespace impl
template< class InterfaceRef >
struct addListenerFunctor
{
- explicit addListenerFunctor( const css::uno::Reference< css::util::XModifyListener > & xListener ) :
- m_xListener( xListener )
+ explicit addListenerFunctor( css::uno::Reference< css::util::XModifyListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const InterfaceRef & xObject )
@@ -93,8 +93,8 @@ private:
template< class InterfaceRef >
struct removeListenerFunctor
{
- explicit removeListenerFunctor( const css::uno::Reference< css::util::XModifyListener > & xListener ) :
- m_xListener( xListener )
+ explicit removeListenerFunctor( css::uno::Reference< css::util::XModifyListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const InterfaceRef & xObject )
@@ -111,8 +111,8 @@ private:
template< class Pair >
struct addListenerToMappedElementFunctor
{
- explicit addListenerToMappedElementFunctor( const css::uno::Reference< css::util::XModifyListener > & xListener ) :
- m_xListener( xListener )
+ explicit addListenerToMappedElementFunctor( css::uno::Reference< css::util::XModifyListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const Pair & aPair )
@@ -129,8 +129,8 @@ private:
template< class Pair >
struct removeListenerFromMappedElementFunctor
{
- explicit removeListenerFromMappedElementFunctor( const css::uno::Reference< css::util::XModifyListener > & xListener ) :
- m_xListener( xListener )
+ explicit removeListenerFromMappedElementFunctor( css::uno::Reference< css::util::XModifyListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const Pair & aPair )
@@ -157,6 +157,14 @@ void addListener(
aFunctor( xObject );
}
}
+template< class T >
+void addListener(
+ const rtl::Reference<T> & xBroadcaster,
+ const css::uno::Reference< css::util::XModifyListener > & xListener )
+{
+ if( xBroadcaster && xListener )
+ xBroadcaster->addModifyListener( xListener );
+}
template< class Container >
void addListenerToAllElements(
@@ -168,6 +176,17 @@ void addListenerToAllElements(
impl::addListenerFunctor< typename Container::value_type >( xListener ));
}
+template< class T >
+void addListenerToAllElements(
+ const std::vector<rtl::Reference<T>> & rContainer,
+ const css::uno::Reference< css::util::XModifyListener > & xListener )
+{
+ if( !xListener )
+ return;
+ for (auto const & i : rContainer)
+ i->addModifyListener(xListener);
+}
+
template< class Container >
void addListenerToAllMapElements(
const Container & rContainer,
@@ -178,16 +197,6 @@ void addListenerToAllMapElements(
impl::addListenerToMappedElementFunctor< typename Container::value_type >( xListener ));
}
-template< typename T >
-void addListenerToAllSequenceElements(
- const css::uno::Sequence< T > & rSequence,
- const css::uno::Reference< css::util::XModifyListener > & xListener )
-{
- if( xListener.is())
- std::for_each( rSequence.begin(), rSequence.end(),
- impl::addListenerFunctor< T >( xListener ));
-}
-
template< class InterfaceRef >
void removeListener(
const InterfaceRef & xObject,
@@ -200,6 +209,15 @@ void removeListener(
}
}
+template< class T >
+void removeListener(
+ const rtl::Reference<T> & xBroadcaster,
+ const css::uno::Reference< css::util::XModifyListener > & xListener )
+{
+ if( xBroadcaster && xListener )
+ xBroadcaster->removeModifyListener( xListener );
+}
+
template< class Container >
void removeListenerFromAllElements(
const Container & rContainer,
@@ -210,6 +228,17 @@ void removeListenerFromAllElements(
impl::removeListenerFunctor< typename Container::value_type >( xListener ));
}
+template< class T >
+void removeListenerFromAllElements(
+ const std::vector<rtl::Reference<T>> & rContainer,
+ const css::uno::Reference< css::util::XModifyListener > & xListener )
+{
+ if( !xListener )
+ return;
+ for (auto const & i : rContainer)
+ i->removeModifyListener(xListener);
+}
+
template< class Container >
void removeListenerFromAllMapElements(
const Container & rContainer,
@@ -220,16 +249,6 @@ void removeListenerFromAllMapElements(
impl::removeListenerFromMappedElementFunctor< typename Container::value_type >( xListener ));
}
-template< typename T >
-void removeListenerFromAllSequenceElements(
- const css::uno::Sequence< T > & rSequence,
- const css::uno::Reference< css::util::XModifyListener > & xListener )
-{
- if( xListener.is())
- std::for_each( rSequence.begin(), rSequence.end(),
- impl::removeListenerFunctor< T >( xListener ));
-}
-
} // namespace chart::ModifyListenerHelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/NameContainer.hxx b/chart2/source/inc/NameContainer.hxx
index 66d0fde1a70f..12fc76978b0d 100644
--- a/chart2/source/inc/NameContainer.hxx
+++ b/chart2/source/inc/NameContainer.hxx
@@ -23,7 +23,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/util/XCloneable.hpp>
#include <cppuhelper/implbase.hxx>
-#include "charttoolsdllapi.hxx"
#include <map>
diff --git a/chart2/source/inc/NumberFormatterWrapper.hxx b/chart2/source/inc/NumberFormatterWrapper.hxx
index c3412fc9c91c..aff249d84f33 100644
--- a/chart2/source/inc/NumberFormatterWrapper.hxx
+++ b/chart2/source/inc/NumberFormatterWrapper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <tools/date.hxx>
@@ -28,7 +29,7 @@ class Color;
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS NumberFormatterWrapper final
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) NumberFormatterWrapper final
{
public:
NumberFormatterWrapper( const css::uno::Reference< css::util::XNumberFormatsSupplier >& xSupplier );
diff --git a/chart2/source/inc/OPropertySet.hxx b/chart2/source/inc/OPropertySet.hxx
index 0a810fc6d2d8..0dd19a236e8a 100644
--- a/chart2/source/inc/OPropertySet.hxx
+++ b/chart2/source/inc/OPropertySet.hxx
@@ -18,7 +18,10 @@
*/
#pragma once
+
+#include <config_options.h>
// helper classes
+#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/propshlp.hxx>
// interfaces and types
@@ -28,12 +31,13 @@
#include <com/sun/star/style/XStyleSupplier.hpp>
#include "charttoolsdllapi.hxx"
-#include <map>
+#include <unordered_map>
namespace property
{
-class SAL_DLLPUBLIC_RTTI OPropertySet :
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OPropertySet :
+ protected cppu::BaseMutex,
public ::cppu::OBroadcastHelper,
// includes beans::XPropertySet, XMultiPropertySet and XFastPropertySet
public ::cppu::OPropertySetHelper,
@@ -45,11 +49,11 @@ class SAL_DLLPUBLIC_RTTI OPropertySet :
public css::style::XStyleSupplier
{
public:
- OPropertySet( ::osl::Mutex & rMutex );
+ OPropertySet();
virtual ~OPropertySet();
protected:
- explicit OPropertySet( const OPropertySet & rOther, ::osl::Mutex & rMutex );
+ explicit OPropertySet( const OPropertySet & rOther );
void SetNewValuesExplicitlyEvenIfTheyEqualDefault();
@@ -103,7 +107,7 @@ protected:
( css::uno::Any & rConvertedValue,
css::uno::Any & rOldValue,
sal_Int32 nHandle,
- const css::uno::Any& rValue ) override;
+ const css::uno::Any& rValue ) override final;
/** The same as setFastPropertyValue; nHandle is always valid.
The changes must not be broadcasted in this method.
@@ -136,15 +140,15 @@ protected:
( css::uno::Any& rValue,
sal_Int32 nHandle ) const override;
- /// make original interface function visible again
- using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue;
-
/** implement this method in derived classes to get called when properties
change.
*/
virtual void firePropertyChangeEvent();
public:
+ /// make original interface function visible again
+ using ::cppu::OPropertySetHelper::getFastPropertyValue;
+
// Interfaces
// ____ XInterface ____
@@ -158,36 +162,35 @@ public:
// ____ XPropertyState ____
virtual css::beans::PropertyState SAL_CALL
- getPropertyState( const OUString& PropertyName ) override;
+ getPropertyState( const OUString& PropertyName ) override final;
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL
- getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName ) override;
- OOO_DLLPUBLIC_CHARTTOOLS
+ getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName ) override final;
virtual void SAL_CALL
- setPropertyToDefault( const OUString& PropertyName ) override;
+ setPropertyToDefault( const OUString& PropertyName ) override final;
virtual css::uno::Any SAL_CALL
- getPropertyDefault( const OUString& aPropertyName ) override;
+ getPropertyDefault( const OUString& aPropertyName ) override final;
// ____ XMultiPropertyStates ____
// Note: getPropertyStates() is already implemented in XPropertyState with the
// same signature
virtual void SAL_CALL
- setAllPropertiesToDefault() override;
+ setAllPropertiesToDefault() override final;
virtual void SAL_CALL
- setPropertiesToDefault( const css::uno::Sequence< OUString >& aPropertyNames ) override;
+ setPropertiesToDefault( const css::uno::Sequence< OUString >& aPropertyNames ) override final;
virtual css::uno::Sequence< css::uno::Any > SAL_CALL
- getPropertyDefaults( const css::uno::Sequence< OUString >& aPropertyNames ) override;
+ getPropertyDefaults( const css::uno::Sequence< OUString >& aPropertyNames ) override final;
// ____ XStyleSupplier ____
- virtual css::uno::Reference< css::style::XStyle > SAL_CALL getStyle() override;
- virtual void SAL_CALL setStyle( const css::uno::Reference< css::style::XStyle >& xStyle ) override;
+ virtual css::uno::Reference< css::style::XStyle > SAL_CALL getStyle() override final;
+ virtual void SAL_CALL setStyle( const css::uno::Reference< css::style::XStyle >& xStyle ) override final;
// ____ XMultiPropertySet ____
virtual void SAL_CALL setPropertyValues(
const css::uno::Sequence< OUString >& PropertyNames,
- const css::uno::Sequence< css::uno::Any >& Values ) override;
+ const css::uno::Sequence< css::uno::Any >& Values ) override final;
// ____ XFastPropertySet ____
- virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const css::uno::Any& rValue ) override;
+ virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const css::uno::Any& rValue ) override final;
// Note: it is assumed that the base class implements setPropertyValue by
// using setFastPropertyValue
@@ -222,12 +225,8 @@ private:
bool SetStyle( const css::uno::Reference< css::style::XStyle > & xStyle );
- /// reference to mutex of class deriving from here
- ::osl::Mutex & m_rMutex;
-
bool m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault;
- typedef std::map< sal_Int32, css::uno::Any > tPropertyMap;
- tPropertyMap m_aProperties;
+ std::unordered_map< sal_Int32, css::uno::Any > m_aProperties;
css::uno::Reference< css::style::XStyle > m_xStyle;
};
diff --git a/chart2/source/inc/ObjectIdentifier.hxx b/chart2/source/inc/ObjectIdentifier.hxx
index e429e3eb2105..5cfd6a1671b1 100644
--- a/chart2/source/inc/ObjectIdentifier.hxx
+++ b/chart2/source/inc/ObjectIdentifier.hxx
@@ -42,7 +42,11 @@ namespace com::sun::star::uno { class XInterface; }
namespace chart
{
+class Axis;
+class BaseCoordinateSystem;
+class DataSeries;
class Diagram;
+class Legend;
enum ObjectType
{
@@ -70,11 +74,12 @@ enum ObjectType
OBJECTTYPE_DATA_STOCK_RANGE,
OBJECTTYPE_DATA_STOCK_LOSS,
OBJECTTYPE_DATA_STOCK_GAIN,
+ OBJECTTYPE_DATA_TABLE,
OBJECTTYPE_SHAPE,
OBJECTTYPE_UNKNOWN
};
-class OOO_DLLPUBLIC_CHARTTOOLS ObjectIdentifier
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ObjectIdentifier
{
//CID == ClassifiedIdentifier <--> name of shape
//semicolon, colon, equal sign and slash have special meanings in a CID
@@ -95,45 +100,45 @@ class OOO_DLLPUBLIC_CHARTTOOLS ObjectIdentifier
public:
ObjectIdentifier();
- ObjectIdentifier( const OUString& rObjectCID );
+ ObjectIdentifier( OUString aObjectCID );
ObjectIdentifier( const css::uno::Reference< css::drawing::XShape >& rxShape );
ObjectIdentifier( const css::uno::Any& rAny );
bool operator==( const ObjectIdentifier& rOID ) const;
- bool operator!=( const ObjectIdentifier& rOID ) const;
bool operator<( const ObjectIdentifier& rOID ) const;
static OUString createClassifiedIdentifierForObject(
const css::uno::Reference< css::uno::XInterface >& xObject
- , ChartModel& rModel);
-
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
static OUString createClassifiedIdentifierForObject(
- const css::uno::Reference< css::uno::XInterface >& xObject
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
+ const rtl::Reference< ::chart::Title >& xObject
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
+ static OUString createClassifiedIdentifierForObject(
+ const rtl::Reference< ::chart::Legend >& xObject
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
+ static OUString createClassifiedIdentifierForObject(
+ const rtl::Reference< ::chart::Axis >& xObject
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
static OUString createClassifiedIdentifierForParticle(
- const OUString& rParticle );
+ std::u16string_view rParticle );
static OUString createClassifiedIdentifierForParticles(
- const OUString& rParentParticle
- , const OUString& rChildParticle
+ std::u16string_view rParentParticle
+ , std::u16string_view rChildParticle
, std::u16string_view rDragMethodServiceName = std::u16string_view()
, std::u16string_view rDragParameterString = std::u16string_view() );
static OUString createClassifiedIdentifierForGrid(
const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::frame::XModel >& xChartModel
+ , const rtl::Reference<::chart::ChartModel>& xChartModel
, sal_Int32 nSubIndex = -1 );//-1: main grid, 0: first subgrid etc
SAL_DLLPRIVATE static OUString createParticleForDiagram();
static OUString createParticleForCoordinateSystem(
- const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
- , ChartModel& rModel );
-
- static OUString createParticleForCoordinateSystem(
- const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
+ const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
static OUString createParticleForAxis(
sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex );
@@ -144,14 +149,16 @@ public:
static OUString createParticleForSeries( sal_Int32 nDiagramIndex, sal_Int32 nCooSysIndex
, sal_Int32 nChartTypeIndex, sal_Int32 nSeriesIndex );
- static OUString createParticleForLegend( ChartModel& rModel );
-
static OUString createParticleForLegend(
- const css::uno::Reference< css::frame::XModel >& xChartModel );
+ const rtl::Reference<::chart::ChartModel>& xChartModel );
+
+ /** Creates an identifier for the data table */
+ static OUString createParticleForDataTable(
+ const rtl::Reference<::chart::ChartModel>& xChartModel );
static OUString addChildParticle( std::u16string_view rParticle, std::u16string_view rChildParticle );
static OUString createChildParticleWithIndex( ObjectType eObjectType, sal_Int32 nIndex );
- static sal_Int32 getIndexFromParticleOrCID( const OUString& rParticleOrCID );
+ static sal_Int32 getIndexFromParticleOrCID( std::u16string_view rParticleOrCID );
static OUString createClassifiedIdentifier(
enum ObjectType eObjectType //e.g. OBJECTTYPE_DATA_SERIES
@@ -165,22 +172,22 @@ public:
, std::u16string_view rDragParameterString = std::u16string_view()
);
- static bool isCID( const OUString& rName );
- static OUString getDragMethodServiceName( const OUString& rClassifiedIdentifier );
- static OUString getDragParameterString( const OUString& rCID );
- static bool isDragableObject( const OUString& rClassifiedIdentifier );
+ static bool isCID( std::u16string_view rName );
+ static std::u16string_view getDragMethodServiceName( std::u16string_view rClassifiedIdentifier );
+ static std::u16string_view getDragParameterString( std::u16string_view rCID );
+ static bool isDragableObject( std::u16string_view rClassifiedIdentifier );
bool isDragableObject() const;
- static bool isRotateableObject( const OUString& rClassifiedIdentifier );
- static bool isMultiClickObject( const OUString& rClassifiedIdentifier );
- static bool areSiblings( const OUString& rCID1, const OUString& rCID2 );//identical object is no sibling
- static bool areIdenticalObjects( const OUString& rCID1, const OUString& rCID2 );
+ static bool isRotateableObject( std::u16string_view rClassifiedIdentifier );
+ static bool isMultiClickObject( std::u16string_view rClassifiedIdentifier );
+ static bool areSiblings( std::u16string_view rCID1, std::u16string_view rCID2 );//identical object is no sibling
+ static bool areIdenticalObjects( std::u16string_view rCID1, std::u16string_view rCID2 );
static OUString getStringForType( ObjectType eObjectType );
- static ObjectType getObjectType( const OUString& rCID );
+ static ObjectType getObjectType( std::u16string_view rCID );
ObjectType getObjectType() const;
static OUString createSeriesSubObjectStub( ObjectType eSubObjectType
- , const OUString& rSeriesParticle
+ , std::u16string_view rSeriesParticle
, std::u16string_view rDragMethodServiceName = std::u16string_view()
, std::u16string_view rDragParameterString = std::u16string_view() );
static OUString createPointCID( std::u16string_view rPointCID_Stub, sal_Int32 nIndex );
@@ -188,57 +195,49 @@ public:
static OUString createDataCurveCID( std::u16string_view rSeriesParticle, sal_Int32 nCurveIndex, bool bAverageLine );
static OUString createDataCurveEquationCID( std::u16string_view rSeriesParticle, sal_Int32 nCurveIndex );
- SAL_DLLPRIVATE static OUString getObjectID( const OUString& rCID );
- static OUString getParticleID( const OUString& rCID );
- static OUString getFullParentParticle( const OUString& rCID );
+ SAL_DLLPRIVATE static OUString getObjectID( std::u16string_view rCID );
+ static std::u16string_view getParticleID( std::u16string_view rCID );
+ static std::u16string_view getFullParentParticle( std::u16string_view rCID );
//returns the series particle of a CID when the CID is a child of the series
- static OUString getSeriesParticleFromCID( const OUString& rCID );
+ static OUString getSeriesParticleFromCID( std::u16string_view rCID );
//return the model object that is indicated by rObjectCID
static css::uno::Reference< css::beans::XPropertySet >
getObjectPropertySet(
- const OUString& rObjectCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
- static css::uno::Reference< css::beans::XPropertySet >
- getObjectPropertySet(
- const OUString& rObjectCID
- , const css::uno::Reference< css::chart2::XChartDocument >& xChartDocument );
- static css::uno::Reference< css::beans::XPropertySet >
- getObjectPropertySet(
- const OUString& rObjectCID
+ std::u16string_view rObjectCID
, const rtl::Reference< ::chart::ChartModel >& xChartDocument );
//return the axis object that belongs to rObjectCID if any
- static css::uno::Reference< css::chart2::XAxis >
+ static rtl::Reference< ::chart::Axis >
getAxisForCID(
- const OUString& rObjectCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
+ std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
//return the series object that belongs to rObjectCID if any
- static css::uno::Reference< css::chart2::XDataSeries >
+ static rtl::Reference< ::chart::DataSeries >
getDataSeriesForCID(
- const OUString& rObjectCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
+ std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
static rtl::Reference< ::chart::Diagram >
getDiagramForCID(
- const OUString& rObjectCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
+ std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
static const OUString& getPieSegmentDragMethodServiceName();
static OUString createPieSegmentDragParameterString(
sal_Int32 nOffsetPercent
, const css::awt::Point& rMinimumPosition
, const css::awt::Point& rMaximumPosition );
- static bool parsePieSegmentDragParameterString( const OUString& rDragParameterString
+ static bool parsePieSegmentDragParameterString( std::u16string_view rDragParameterString
, sal_Int32& rOffsetPercent
, css::awt::Point& rMinimumPosition
, css::awt::Point& rMaximumPosition );
- static TitleHelper::eTitleType getTitleTypeForCID( const OUString& rCID );
+ static TitleHelper::eTitleType getTitleTypeForCID( std::u16string_view rCID );
- static OUString getMovedSeriesCID( const OUString& rObjectCID, bool bForward );
+ static OUString getMovedSeriesCID( std::u16string_view rObjectCID, bool bForward );
bool isValid() const;
bool isAutoGeneratedObject() const;
diff --git a/chart2/source/inc/PopupRequest.hxx b/chart2/source/inc/PopupRequest.hxx
index a755fdfa3c85..90fe315d2471 100644
--- a/chart2/source/inc/PopupRequest.hxx
+++ b/chart2/source/inc/PopupRequest.hxx
@@ -9,6 +9,7 @@
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
#include <comphelper/compbase.hxx>
@@ -21,7 +22,7 @@ namespace impl
typedef comphelper::WeakComponentImplHelper<css::awt::XRequestCallback> PopupRequest_Base;
}
-class OOO_DLLPUBLIC_CHARTTOOLS PopupRequest final : public impl::PopupRequest_Base
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) PopupRequest final : public impl::PopupRequest_Base
{
public:
explicit PopupRequest();
diff --git a/chart2/source/inc/PropertyHelper.hxx b/chart2/source/inc/PropertyHelper.hxx
index 14aa57609534..3e1949057361 100644
--- a/chart2/source/inc/PropertyHelper.hxx
+++ b/chart2/source/inc/PropertyHelper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/uno/Any.hxx>
#include "charttoolsdllapi.hxx"
@@ -41,7 +42,7 @@ namespace PropertyHelper
@return The name used for storing this element in the table
*/
-OOO_DLLPUBLIC_CHARTTOOLS OUString addLineDashUniqueNameToTable(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString addLineDashUniqueNameToTable(
const css::uno::Any & rValue,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xFact,
const OUString & rPreferredName );
@@ -51,7 +52,7 @@ OOO_DLLPUBLIC_CHARTTOOLS OUString addLineDashUniqueNameToTable(
@return The name used for storing this element in the table
*/
-OOO_DLLPUBLIC_CHARTTOOLS OUString addGradientUniqueNameToTable(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString addGradientUniqueNameToTable(
const css::uno::Any & rValue,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xFact,
const OUString & rPreferredName );
@@ -61,7 +62,7 @@ OOO_DLLPUBLIC_CHARTTOOLS OUString addGradientUniqueNameToTable(
@return The name used for storing this element in the table
*/
-OOO_DLLPUBLIC_CHARTTOOLS
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
OUString addTransparencyGradientUniqueNameToTable(
const css::uno::Any & rValue,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xFact,
@@ -72,7 +73,7 @@ OUString addTransparencyGradientUniqueNameToTable(
@return The name used for storing this element in the table
*/
-OOO_DLLPUBLIC_CHARTTOOLS OUString addHatchUniqueNameToTable(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString addHatchUniqueNameToTable(
const css::uno::Any & rValue,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xFact,
const OUString & rPreferredName );
@@ -82,7 +83,7 @@ OOO_DLLPUBLIC_CHARTTOOLS OUString addHatchUniqueNameToTable(
@return The name used for storing this element in the table
*/
-OOO_DLLPUBLIC_CHARTTOOLS OUString addBitmapUniqueNameToTable(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString addBitmapUniqueNameToTable(
const css::uno::Any & rValue,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xFact,
const OUString & rPreferredName );
@@ -92,7 +93,7 @@ OOO_DLLPUBLIC_CHARTTOOLS OUString addBitmapUniqueNameToTable(
@param any is the value encapsulated in the variant type Any
*/
-OOO_DLLPUBLIC_CHARTTOOLS
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
void setPropertyValueAny( tPropertyValueMap & rOutMap, tPropertyValueMapKey key,
const css::uno::Any & rAny );
@@ -111,7 +112,7 @@ template< typename Value >
template<>
void setPropertyValue< css::uno::Any >( tPropertyValueMap & rOutMap, tPropertyValueMapKey key, const css::uno::Any & rAny );
-OOO_DLLPUBLIC_CHARTTOOLS void setPropertyValueDefaultAny( tPropertyValueMap & rOutMap, tPropertyValueMapKey key, const css::uno::Any & rAny );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void setPropertyValueDefaultAny( tPropertyValueMap & rOutMap, tPropertyValueMapKey key, const css::uno::Any & rAny );
/** Calls setPropertyValue() but asserts that the given property hasn't been set
before.
@@ -130,7 +131,7 @@ template<>
/** Calls setPropertyValueDefault() with an empty Any as value
*/
-OOO_DLLPUBLIC_CHARTTOOLS void setEmptyPropertyValueDefault( tPropertyValueMap & rOutMap, tPropertyValueMapKey key );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void setEmptyPropertyValueDefault( tPropertyValueMap & rOutMap, tPropertyValueMapKey key );
} // namespace PropertyHelper
diff --git a/chart2/source/inc/RangeHighlighter.hxx b/chart2/source/inc/RangeHighlighter.hxx
index 8642d66f7e88..c7bcdd2c5c55 100644
--- a/chart2/source/inc/RangeHighlighter.hxx
+++ b/chart2/source/inc/RangeHighlighter.hxx
@@ -36,6 +36,8 @@ namespace com::sun::star::view { class XSelectionSupplier; }
namespace chart
{
+class ChartModel;
+class DataSeries;
class Diagram;
namespace impl
@@ -52,7 +54,7 @@ class RangeHighlighter final :
{
public:
explicit RangeHighlighter(
- const css::uno::Reference< css::view::XSelectionSupplier > & xSelectionSupplier );
+ const rtl::Reference< ::chart::ChartModel > & xSelectionSupplier );
virtual ~RangeHighlighter() override;
protected:
@@ -81,16 +83,16 @@ private:
void stopListening();
void determineRanges();
- void fillRangesForDiagram( const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
void fillRangesForDiagram( const rtl::Reference< ::chart::Diagram > & xDiagram );
void fillRangesForDataSeries( const css::uno::Reference< css::chart2::XDataSeries > & xSeries );
void fillRangesForCategories( const css::uno::Reference< css::chart2::XAxis > & xAxis );
- void fillRangesForDataPoint( const css::uno::Reference< css::uno::XInterface > & xDataSeries, sal_Int32 nIndex );
+ void fillRangesForDataPoint( const rtl::Reference< ::chart::DataSeries > & xDataSeries, sal_Int32 nIndex );
void fillRangesForErrorBars( const css::uno::Reference< css::beans::XPropertySet > & xErrorBar,
const css::uno::Reference< css::chart2::XDataSeries > & xDataSeries );
css::uno::Reference< css::view::XSelectionSupplier >
m_xSelectionSupplier;
+ rtl::Reference< ::chart::ChartModel > m_xChartModel;
css::uno::Reference< css::view::XSelectionChangeListener >
m_xListener;
css::uno::Sequence< css::chart2::data::HighlightedRange >
diff --git a/chart2/source/inc/ReferenceSizeProvider.hxx b/chart2/source/inc/ReferenceSizeProvider.hxx
index 3db11e5327b1..f3626b03d193 100644
--- a/chart2/source/inc/ReferenceSizeProvider.hxx
+++ b/chart2/source/inc/ReferenceSizeProvider.hxx
@@ -21,6 +21,8 @@
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/awt/Size.hpp>
#include "charttoolsdllapi.hxx"
+#include <rtl/ref.hxx>
+#include <ChartModel.hxx>
namespace com::sun::star {
namespace chart2 {
@@ -36,7 +38,7 @@ namespace com::sun::star {
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS ReferenceSizeProvider
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ReferenceSizeProvider
{
public:
@@ -50,7 +52,7 @@ public:
ReferenceSizeProvider(
css::awt::Size aPageSize,
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc );
+ const rtl::Reference<::chart::ChartModel> & xChartDoc );
const css::awt::Size& getPageSize() const { return m_aPageSize;}
@@ -63,7 +65,7 @@ public:
with state NO, AUTO_RESIZE_AMBIGUOUS is returned.
*/
static AutoResizeState getAutoResizeState(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc );
+ const rtl::Reference<::chart::ChartModel> & xChartDoc );
/** sets or resets the auto-resize at all objects that support this feature
for text to the opposite of the current setting. If the current state
@@ -119,7 +121,7 @@ private:
AutoResizeState & rInOutState );
css::awt::Size m_aPageSize;
- css::uno::Reference< css::chart2::XChartDocument > m_xChartDoc;
+ rtl::Reference<::chart::ChartModel> m_xChartDoc;
bool m_bUseAutoScale;
};
diff --git a/chart2/source/inc/RegressionCurveCalculator.hxx b/chart2/source/inc/RegressionCurveCalculator.hxx
index 6cf1f2914d5b..ebb3ad40f616 100644
--- a/chart2/source/inc/RegressionCurveCalculator.hxx
+++ b/chart2/source/inc/RegressionCurveCalculator.hxx
@@ -42,28 +42,6 @@ public:
static bool isLogarithmicScaling(
const css::uno::Reference< css::chart2::XScaling >& xScaling );
-protected:
- virtual OUString ImplGetRepresentation(
- const css::uno::Reference< css::util::XNumberFormatter >& xNumFormatter,
- sal_Int32 nNumberFormatKey, sal_Int32* pFormulaLength = nullptr ) const = 0;
-
- static OUString getFormattedString(
- const css::uno::Reference< css::util::XNumberFormatter >& xNumFormatter,
- sal_Int32 nNumberFormatKey,
- double fNumber,
- const sal_Int32* pStringLength );
-
- static void addStringToEquation( OUStringBuffer& aStrEquation, sal_Int32& nLineLength, OUStringBuffer const & aAddString, const sal_Int32* pMaxLength );
-
- double m_fCorrelationCoefficient;
-
- sal_Int32 mDegree;
- bool mForceIntercept;
- double mInterceptValue;
- sal_Int32 mPeriod;
- OUString mXName, mYName;
- sal_Int32 mnMovingType;
-
// ____ XRegressionCurveCalculator ____
virtual void SAL_CALL setRegressionProperties(
sal_Int32 aDegree,
@@ -96,6 +74,28 @@ protected:
virtual void SAL_CALL setXYNames(
const OUString& aXName, const OUString& aYName ) override;
+
+protected:
+ virtual OUString ImplGetRepresentation(
+ const css::uno::Reference< css::util::XNumberFormatter >& xNumFormatter,
+ sal_Int32 nNumberFormatKey, sal_Int32* pFormulaLength = nullptr ) const = 0;
+
+ static OUString getFormattedString(
+ const css::uno::Reference< css::util::XNumberFormatter >& xNumFormatter,
+ sal_Int32 nNumberFormatKey,
+ double fNumber,
+ const sal_Int32* pStringLength );
+
+ static void addStringToEquation( OUStringBuffer& aStrEquation, sal_Int32& nLineLength, OUStringBuffer const & aAddString, const sal_Int32* pMaxLength );
+
+ double m_fCorrelationCoefficient;
+
+ sal_Int32 mDegree;
+ bool mForceIntercept;
+ double mInterceptValue;
+ sal_Int32 mPeriod;
+ OUString mXName, mYName;
+ sal_Int32 mnMovingType;
};
} // namespace chart
diff --git a/chart2/source/inc/RegressionCurveHelper.hxx b/chart2/source/inc/RegressionCurveHelper.hxx
index 83fc72e65649..fc0c2abcd5b7 100644
--- a/chart2/source/inc/RegressionCurveHelper.hxx
+++ b/chart2/source/inc/RegressionCurveHelper.hxx
@@ -18,8 +18,10 @@
*/
#pragma once
+#include <config_options.h>
#include <svx/chrtitem.hxx>
#include "charttoolsdllapi.hxx"
+#include <rtl/ref.hxx>
#include <vector>
@@ -31,59 +33,78 @@ namespace com::sun::star::chart2 { class XRegressionCurveCalculator; }
namespace com::sun::star::chart2 { class XRegressionCurveContainer; }
namespace com::sun::star::chart2::data { class XDataSource; }
namespace com::sun::star::frame { class XModel; }
+namespace chart { class ChartModel; }
+namespace chart { class DataSeries; }
+namespace chart { class RegressionCurveModel; }
+namespace chart { class RegressionCurveCalculator; }
namespace chart::RegressionCurveHelper
{
/// returns a model mean-value line
- css::uno::Reference<css::chart2::XRegressionCurve> createMeanValueLine();
+ rtl::Reference<::chart::RegressionCurveModel> createMeanValueLine();
/// returns a model regression curve
- css::uno::Reference<css::chart2::XRegressionCurve>
+ rtl::Reference<::chart::RegressionCurveModel>
createRegressionCurveByServiceName( std::u16string_view aServiceName );
- OOO_DLLPUBLIC_CHARTTOOLS bool hasMeanValueLine(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool hasMeanValueLine(
const css::uno::Reference<css::chart2::XRegressionCurveContainer> & xRegCnt );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool hasMeanValueLine(
+ const rtl::Reference<::chart::DataSeries> & xRegCnt );
- OOO_DLLPUBLIC_CHARTTOOLS bool isMeanValueLine(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool isMeanValueLine(
const css::uno::Reference<css::chart2::XRegressionCurve> & xRegCurve );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool isMeanValueLine(
+ const rtl::Reference<::chart::RegressionCurveModel> & xRegCurve );
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve>
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
getMeanValueLine(
const css::uno::Reference<css::chart2::XRegressionCurveContainer> & xRegCnt );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
+ getMeanValueLine(
+ const rtl::Reference<::chart::DataSeries> & xRegCnt );
/** creates a mean-value line and adds it to the container.
@param xSeriesProp
If set, this property-set will be used to apply a line color
*/
- OOO_DLLPUBLIC_CHARTTOOLS void addMeanValueLine(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void addMeanValueLine(
css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xRegCnt,
const css::uno::Reference<css::beans::XPropertySet>& xSeriesProp );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void addMeanValueLine(
+ rtl::Reference<::chart::DataSeries> const & xRegCnt,
+ const css::uno::Reference<css::beans::XPropertySet>& xSeriesProp );
- OOO_DLLPUBLIC_CHARTTOOLS void removeMeanValueLine(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void removeMeanValueLine(
css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xRegCnt );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void removeMeanValueLine(
+ rtl::Reference<::chart::DataSeries> const & xRegCnt );
/** Returns the first regression curve found that is not of type
mean-value line
*/
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve>
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
getFirstCurveNotMeanValueLine(
const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xCurveContainer );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
+ getFirstCurveNotMeanValueLine(
+ const rtl::Reference<::chart::DataSeries>& xCurveContainer );
/** Returns the regression curve found at the index provided.
*/
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve>
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
getRegressionCurveAtIndex(
- const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xCurveContainer,
+ const rtl::Reference<::chart::DataSeries>& xCurveContainer,
sal_Int32 aIndex);
/** Returns the type of the first regression curve found that is not of type
mean-value line
*/
- OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress getFirstRegressTypeNotMeanValueLine(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) SvxChartRegress getFirstRegressTypeNotMeanValueLine(
const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xCurveContainer );
- OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress getRegressionType(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) SvxChartRegress getRegressionType(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
/** @param xPropertySource is taken as source to copy all properties from if
@@ -91,7 +112,7 @@ namespace chart::RegressionCurveHelper
@param xEquationProperties is set at the new regression curve as
equation properties if not null
*/
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve>
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
addRegressionCurve(
SvxChartRegress eType,
css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xCurveContainer,
@@ -99,21 +120,29 @@ namespace chart::RegressionCurveHelper
css::uno::Reference<css::beans::XPropertySet>(),
const css::uno::Reference<css::beans::XPropertySet>& xEquationProperties =
css::uno::Reference<css::beans::XPropertySet>() );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
+ addRegressionCurve(
+ SvxChartRegress eType,
+ rtl::Reference<::chart::DataSeries> const & xCurveContainer,
+ const css::uno::Reference<css::beans::XPropertySet >& xPropertySource =
+ css::uno::Reference<css::beans::XPropertySet>(),
+ const css::uno::Reference<css::beans::XPropertySet>& xEquationProperties =
+ css::uno::Reference<css::beans::XPropertySet>() );
- OOO_DLLPUBLIC_CHARTTOOLS bool removeAllExceptMeanValueLine(
- css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xCurveContainer );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool removeAllExceptMeanValueLine(
+ rtl::Reference<::chart::DataSeries> const & xCurveContainer );
- OOO_DLLPUBLIC_CHARTTOOLS void removeEquations(
- css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xCurveContainer );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void removeEquations(
+ rtl::Reference<::chart::DataSeries> const & xCurveContainer );
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve>
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
changeRegressionCurveType(
SvxChartRegress eType,
css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xRegressionCurveContainer,
css::uno::Reference<css::chart2::XRegressionCurve> const & xRegressionCurve );
/// returns a calculator object for regression curves (used by the view)
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurveCalculator>
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveCalculator>
createRegressionCurveCalculatorByServiceName( std::u16string_view aServiceName );
/** recalculates the regression parameters according to the data given in
@@ -141,36 +170,33 @@ namespace chart::RegressionCurveHelper
necessary that the data::XDataSource is an XDataSeries, thus this parameter
also changed.
*/
- OOO_DLLPUBLIC_CHARTTOOLS void initializeCurveCalculator(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void initializeCurveCalculator(
const css::uno::Reference<css::chart2::XRegressionCurveCalculator>& xOutCurveCalculator,
- const css::uno::Reference<css::chart2::XDataSeries>& xSeries,
- const css::uno::Reference<css::frame::XModel>& xModel );
+ const rtl::Reference<::chart::DataSeries>& xSeries,
+ const rtl::Reference<::chart::ChartModel>& xModel );
- OOO_DLLPUBLIC_CHARTTOOLS OUString getUINameForRegressionCurve(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString getUINameForRegressionCurve(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
- OOO_DLLPUBLIC_CHARTTOOLS OUString getRegressionCurveName(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString getRegressionCurveName(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
- OOO_DLLPUBLIC_CHARTTOOLS OUString getRegressionCurveGenericName(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString getRegressionCurveGenericName(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
- OOO_DLLPUBLIC_CHARTTOOLS OUString getRegressionCurveSpecificName(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString getRegressionCurveSpecificName(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
- OOO_DLLPUBLIC_CHARTTOOLS std::vector<css::uno::Reference<css::chart2::XRegressionCurve> >
- getAllRegressionCurvesNotMeanValueLine(
- const css::uno::Reference<css::chart2::XDiagram>& xDiagram );
-
- OOO_DLLPUBLIC_CHARTTOOLS void resetEquationPosition(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void resetEquationPosition(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
/// @return the index of the given curve in the given container. -1 if not contained
- OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getRegressionCurveIndex(
- const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xContainer,
- const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) sal_Int32 getRegressionCurveIndex(
+ const rtl::Reference<::chart::DataSeries>& xContainer,
+ const rtl::Reference<::chart::RegressionCurveModel>& xCurve );
- OOO_DLLPUBLIC_CHARTTOOLS bool hasEquation(const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool hasEquation(const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool MayHaveCorrelationCoefficient(const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
} // namespace chart
diff --git a/chart2/source/tools/RegressionCurveModel.hxx b/chart2/source/inc/RegressionCurveModel.hxx
index 73c2439f01e7..ddd75a8391a1 100644
--- a/chart2/source/tools/RegressionCurveModel.hxx
+++ b/chart2/source/inc/RegressionCurveModel.hxx
@@ -18,18 +18,18 @@
*/
#pragma once
-#include <OPropertySet.hxx>
+#include "OPropertySet.hxx"
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
+#include <sal/types.h>
#include <com/sun/star/chart2/XRegressionCurve.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <ModifyListenerHelper.hxx>
+#include "ModifyListenerHelper.hxx"
namespace chart
{
@@ -46,8 +46,7 @@ typedef ::cppu::WeakImplHelper<
RegressionCurveModel_Base;
}
-class RegressionCurveModel :
- public cppu::BaseMutex,
+class SAL_DLLPUBLIC_RTTI RegressionCurveModel :
public impl::RegressionCurveModel_Base,
public ::property::OPropertySet
{
@@ -83,6 +82,7 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
+public:
// ____ XRegressionCurve ____
virtual css::uno::Reference< css::chart2::XRegressionCurveCalculator > SAL_CALL getCalculator() override;
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getEquationProperties() override;
@@ -98,6 +98,7 @@ protected:
virtual void SAL_CALL removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+protected:
// ____ XModifyListener ____
virtual void SAL_CALL modified(
const css::lang::EventObject& aEvent ) override;
@@ -118,6 +119,7 @@ private:
rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
css::uno::Reference< css::beans::XPropertySet > m_xEquationProperties;
+ void setPropertyMayHaveR2();
};
// implementations for factory instantiation
diff --git a/chart2/source/inc/RelativePositionHelper.hxx b/chart2/source/inc/RelativePositionHelper.hxx
index 5a6bcbbc85af..03ea72eebeed 100644
--- a/chart2/source/inc/RelativePositionHelper.hxx
+++ b/chart2/source/inc/RelativePositionHelper.hxx
@@ -19,6 +19,7 @@
#pragma once
+#include <config_options.h>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/drawing/Alignment.hpp>
#include <com/sun/star/awt/Point.hpp>
@@ -30,7 +31,7 @@ namespace com::sun::star::chart2 { struct RelativeSize; }
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS RelativePositionHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) RelativePositionHelper
{
public:
/** returns the upper left corner of an object that has size aObjectSize and
diff --git a/chart2/source/inc/RelativeSizeHelper.hxx b/chart2/source/inc/RelativeSizeHelper.hxx
index b07876bb67d3..6b3dbb7c2dee 100644
--- a/chart2/source/inc/RelativeSizeHelper.hxx
+++ b/chart2/source/inc/RelativeSizeHelper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
namespace com::sun::star::awt { struct Size; }
@@ -28,7 +29,7 @@ class SvxShapeText;
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS RelativeSizeHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) RelativeSizeHelper
{
public:
static double calculate(
diff --git a/chart2/source/inc/SceneProperties.hxx b/chart2/source/inc/SceneProperties.hxx
index ab7d89711af4..1fdae1b6703f 100644
--- a/chart2/source/inc/SceneProperties.hxx
+++ b/chart2/source/inc/SceneProperties.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include "PropertyHelper.hxx"
#include "FastPropertyIdRanges.hxx"
#include "charttoolsdllapi.hxx"
@@ -71,10 +72,10 @@ namespace SceneProperties
PROP_SCENE_LIGHT_ON_8
};
- OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddPropertiesToVector(
std::vector< css::beans::Property > & rOutProperties );
- OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
}
} // namespace chart
diff --git a/chart2/source/inc/StatisticsHelper.hxx b/chart2/source/inc/StatisticsHelper.hxx
index 7a6a96c5e5bd..f38a27ba500f 100644
--- a/chart2/source/inc/StatisticsHelper.hxx
+++ b/chart2/source/inc/StatisticsHelper.hxx
@@ -18,8 +18,10 @@
*/
#pragma once
+#include <config_options.h>
#include <com/sun/star/uno/Reference.h>
#include <rtl/ustring.hxx>
+#include <rtl/ref.hxx>
#include "charttoolsdllapi.hxx"
namespace com::sun::star::beans { class XPropertySet; }
@@ -29,6 +31,8 @@ namespace com::sun::star::chart2::data { class XDataSequence; }
namespace com::sun::star::chart2::data { class XDataSource; }
namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
namespace com::sun::star::uno { template <typename > class Sequence; }
+namespace chart { class LabeledDataSequence; }
+namespace chart { class DataSeries; }
namespace chart::StatisticsHelper
{
@@ -36,33 +40,33 @@ namespace chart::StatisticsHelper
@see http://mathworld.wolfram.com/Variance.html
*/
- OOO_DLLPUBLIC_CHARTTOOLS double getVariance( const css::uno::Sequence< double > & rData );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) double getVariance( const css::uno::Sequence< double > & rData );
// square root of the variance
- OOO_DLLPUBLIC_CHARTTOOLS double getStandardDeviation( const css::uno::Sequence< double > & rData );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) double getStandardDeviation( const css::uno::Sequence< double > & rData );
// also called "Standard deviation of the mean (SDOM)"
- OOO_DLLPUBLIC_CHARTTOOLS double getStandardError( const css::uno::Sequence< double > & rData );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) double getStandardError( const css::uno::Sequence< double > & rData );
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::uno::Reference< css::chart2::data::XLabeledDataSequence >
getErrorLabeledDataSequenceFromDataSource(
const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
bool bPositiveValue,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XDataSequence >
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::uno::Reference< css::chart2::data::XDataSequence >
getErrorDataSequenceFromDataSource(
const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
bool bPositiveValue,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS double getErrorFromDataSource(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) double getErrorFromDataSource(
const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
sal_Int32 nIndex,
bool bPositiveValue,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS void setErrorDataSequence(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void setErrorDataSequence(
const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
const css::uno::Reference< css::chart2::data::XDataProvider > & xDataProvider,
const OUString & rNewRange,
@@ -71,27 +75,27 @@ namespace chart::StatisticsHelper
OUString const * pXMLRange = nullptr );
/// @return the newly created or existing error bar object
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::beans::XPropertySet >
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::uno::Reference< css::beans::XPropertySet >
addErrorBars(
- const css::uno::Reference< css::chart2::XDataSeries > & xDataSeries,
+ const rtl::Reference< ::chart::DataSeries > & xDataSeries,
sal_Int32 nStyle,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::beans::XPropertySet >
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::uno::Reference< css::beans::XPropertySet >
getErrorBars(
- const css::uno::Reference< css::chart2::XDataSeries > & xDataSeries,
+ const rtl::Reference< ::chart::DataSeries > & xDataSeries,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS bool hasErrorBars(
- const css::uno::Reference< css::chart2::XDataSeries > & xDataSeries,
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool hasErrorBars(
+ const rtl::Reference< ::chart::DataSeries > & xDataSeries,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS void removeErrorBars(
- const css::uno::Reference< css::chart2::XDataSeries > & xDataSeries,
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void removeErrorBars(
+ const rtl::Reference< ::chart::DataSeries > & xDataSeries,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS bool usesErrorBarRanges(
- const css::uno::Reference< css::chart2::XDataSeries > & xDataSeries,
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool usesErrorBarRanges(
+ const rtl::Reference< ::chart::DataSeries > & xDataSeries,
bool bYError = true );
} // namespace chart
diff --git a/chart2/source/inc/ThreeDHelper.hxx b/chart2/source/inc/ThreeDHelper.hxx
index 93b1c995f388..2c43fff6c71a 100644
--- a/chart2/source/inc/ThreeDHelper.hxx
+++ b/chart2/source/inc/ThreeDHelper.hxx
@@ -19,7 +19,9 @@
#pragma once
+#include <config_options.h>
#include <com/sun/star/drawing/CameraGeometry.hpp>
+#include <rtl/ref.hxx>
#include "charttoolsdllapi.hxx"
namespace com::sun::star::beans { class XPropertySet; }
@@ -27,6 +29,7 @@ namespace com::sun::star::chart2 { class XDiagram; }
namespace chart
{
+class Diagram;
enum class ThreeDLookScheme
{
@@ -45,7 +48,7 @@ enum CuboidPlanePosition
CuboidPlanePosition_Back
};
-class OOO_DLLPUBLIC_CHARTTOOLS ThreeDHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ThreeDHelper
{
public:
@@ -57,23 +60,6 @@ public:
*/
static css::drawing::CameraGeometry getDefaultCameraGeometry( bool bPie=false );
- static void getRotationAngleFromDiagram(
- const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
- , double& rfXAngleRad, double& rfYAngleRad, double& rfZAngleRad );
- static void setRotationAngleToDiagram(
- const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
- , double fXAngleRad, double fYAngleRad, double fZAngleRad );
-
- static void getRotationFromDiagram(
- const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
- , sal_Int32& rnHorizontalAngleDegree, sal_Int32& rnVerticalAngleDegree );
- static void setRotationToDiagram(
- const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
- , sal_Int32 nHorizontalAngleDegree, sal_Int32 nVerticalYAngleDegree );
-
- static void switchRightAngledAxes( const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
- , bool bRightAngledAxes );
-
static void adaptRadAnglesForRightAngledAxes( double& rfXAngleRad, double& rfYAngleRad );
static double getXDegreeAngleLimitForRightAngledAxes() { return 90.0; }
static double getYDegreeAngleLimitForRightAngledAxes() { return 45.0; }
@@ -88,40 +74,25 @@ public:
sal_Int32& rnElevationDeg, sal_Int32& rnRotationDeg
, double fXRad, double fYRad, double fZRad );
- static double getCameraDistance(
- const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties );
- static void setCameraDistance(
- const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
- , double fCameraDistance );
SAL_DLLPRIVATE static void ensureCameraDistanceRange( double& rfCameraDistance );
SAL_DLLPRIVATE static void getCameraDistanceRange( double& rfMinimumDistance, double& rfMaximumDistance );
static double CameraDistanceToPerspective( double fCameraDistance );
static double PerspectiveToCameraDistance( double fPerspective );
- static void set3DSettingsToDefault( const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties );
- static void setDefaultRotation( const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties );
- static void setDefaultIllumination( const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties );
-
- static void setDefaultRotation( const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties, bool bPieOrDonut );
-
- static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardLeftWall( const css::uno::Reference<
- css::beans::XPropertySet >& xSceneProperties );
- static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardBackWall(const css::uno::Reference<
- css::beans::XPropertySet >& xSceneProperties );
- static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardBottom(const css::uno::Reference<
- css::beans::XPropertySet >& xSceneProperties );
-
- static ThreeDLookScheme detectScheme( const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
- static void setScheme( const css::uno::Reference< css::chart2::XDiagram >& xDiagram
- , ThreeDLookScheme aScheme );
+ static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardLeftWall( const rtl::Reference<
+ ::chart::Diagram >& xDiagram );
+ static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardBackWall(const rtl::Reference<
+ ::chart::Diagram >& xDiagram );
+ static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardBottom(const rtl::Reference<
+ ::chart::Diagram >& xDiagram );
//sal_Int32 nRoundedEdges: <0 or >100 -> mixed state
//sal_Int32 nObjectLines: 0->no lines; 1->all lines on; other->mixed state
- static void getRoundedEdgesAndObjectLines( const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ static void getRoundedEdgesAndObjectLines( const rtl::Reference< ::chart::Diagram >& xDiagram
, sal_Int32& rnRoundedEdges, sal_Int32& rnObjectLines );
- static void setRoundedEdgesAndObjectLines( const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ static void setRoundedEdgesAndObjectLines( const rtl::Reference< ::chart::Diagram >& xDiagram
, sal_Int32 nRoundedEdges, sal_Int32 nObjectLines );
};
diff --git a/chart2/source/model/main/Title.hxx b/chart2/source/inc/Title.hxx
index 426fd5ef4219..230267918de2 100644
--- a/chart2/source/model/main/Title.hxx
+++ b/chart2/source/inc/Title.hxx
@@ -18,14 +18,13 @@
*/
#pragma once
-#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
+#include "OPropertySet.hxx"
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <com/sun/star/chart2/XTitle.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <ModifyListenerHelper.hxx>
+#include "ModifyListenerHelper.hxx"
namespace chart
{
@@ -41,8 +40,7 @@ typedef ::cppu::WeakImplHelper<
Title_Base;
}
-class Title final :
- public cppu::BaseMutex,
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) Title final :
public impl::Title_Base,
public ::property::OPropertySet
{
@@ -60,7 +58,6 @@ public:
/// merge XTypeProvider implementations
DECLARE_XTYPEPROVIDER()
-private:
explicit Title( const Title & rOther );
// ____ OPropertySet ____
@@ -86,6 +83,8 @@ private:
virtual void SAL_CALL removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+private:
+
// ____ XModifyListener ____
virtual void SAL_CALL modified(
const css::lang::EventObject& aEvent ) override;
diff --git a/chart2/source/inc/TitleHelper.hxx b/chart2/source/inc/TitleHelper.hxx
index c85b5ce1a3ff..f4ea2204d7d5 100644
--- a/chart2/source/inc/TitleHelper.hxx
+++ b/chart2/source/inc/TitleHelper.hxx
@@ -19,8 +19,10 @@
#pragma once
#include <com/sun/star/uno/Reference.h>
+#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
#include "charttoolsdllapi.hxx"
+#include "Title.hxx"
namespace chart { class ChartModel; }
namespace chart { class ReferenceSizeProvider; }
@@ -31,7 +33,7 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS TitleHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) TitleHelper
{
public:
enum eTitleType
@@ -51,46 +53,44 @@ public:
TITLE_AT_STANDARD_Y_AXIS_POSITION //equals the X_AXIS_TITLE for barchart
};
- static css::uno::Reference< css::chart2::XTitle >
+ static rtl::Reference< ::chart::Title >
getTitle( eTitleType nTitleIndex
, ChartModel& rModel );
- static css::uno::Reference< css::chart2::XTitle >
+ static rtl::Reference< ::chart::Title >
getTitle( eTitleType nTitleIndex
- , const css::uno::Reference< css::frame::XModel >& xModel );
+ , const rtl::Reference< ::chart::ChartModel >& xModel );
- static css::uno::Reference<
- css::chart2::XTitle >
+ static rtl::Reference< ::chart::Title >
createTitle( eTitleType nTitleIndex
, const OUString& rTitleText
- , const css::uno::Reference< css::frame::XModel >& xModel
+ , const rtl::Reference< ::chart::ChartModel >& xModel
, const css::uno::Reference< css::uno::XComponentContext > & xContext
, ReferenceSizeProvider * pRefSizeProvider = nullptr );
- static css::uno::Reference<
- css::chart2::XTitle >
+ static rtl::Reference< ::chart::Title >
createOrShowTitle( eTitleType nTitleIndex
, const OUString& rTitleText
- , const css::uno::Reference< css::frame::XModel >& xModel
+ , const rtl::Reference< ::chart::ChartModel >& xModel
, const css::uno::Reference< css::uno::XComponentContext > & xContex );
static void removeTitle( eTitleType nTitleIndex
- , const css::uno::Reference< css::frame::XModel >& xModel );
+ , const rtl::Reference< ::chart::ChartModel >& xModel );
- static OUString getCompleteString( const css::uno::Reference< css::chart2::XTitle >& xTitle );
+ static OUString getCompleteString( const rtl::Reference< ::chart::Title >& xTitle );
+ static OUString getUnstackedStr( const OUString& rNewText );
+ static void setFormattedString( const rtl::Reference< ::chart::Title >& xTitle,
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > >& aNewFormattedTitle );
static void setCompleteString( const OUString& rNewText
- , const css::uno::Reference< css::chart2::XTitle >& xTitle
+ , const rtl::Reference< ::chart::Title >& xTitle
, const css::uno::Reference< css::uno::XComponentContext > & xContext
- , const float * pDefaultCharHeight = nullptr );
+ , const float * pDefaultCharHeight = nullptr
+ , bool bDialogTitle = false );
static bool getTitleType( eTitleType& rType
- , const css::uno::Reference< css::chart2::XTitle >& xTitle
- , ChartModel& rModel);
-
- static bool getTitleType( eTitleType& rType
- , const css::uno::Reference< css::chart2::XTitle >& xTitle
- , const css::uno::Reference< css::frame::XModel >& xModel );
+ , const rtl::Reference< ::chart::Title >& xTitle
+ , const rtl::Reference< ::chart::ChartModel >& xModel );
static void hideTitle( eTitleType nTitleIndex,
- const css::uno::Reference< css::frame::XModel > & xModel);
+ const rtl::Reference< ::chart::ChartModel > & xModel);
};
} //namespace chart
diff --git a/chart2/source/inc/TrueGuard.hxx b/chart2/source/inc/TrueGuard.hxx
deleted file mode 100644
index 528fd28fc265..000000000000
--- a/chart2/source/inc/TrueGuard.hxx
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- 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 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 .
- */
-#pragma once
-
-namespace chart
-{
-/** This guard sets the given boolean reference to true in the constructor and to false in the destructor
- */
-class TrueGuard final
-{
-public:
- explicit TrueGuard(bool& rbTrueDuringGuardedTime);
- ~TrueGuard();
-
-private:
- bool& m_rbTrueDuringGuardedTime;
-};
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/UncachedDataSequence.hxx b/chart2/source/inc/UncachedDataSequence.hxx
index e3a51f55727a..c134601944ff 100644
--- a/chart2/source/inc/UncachedDataSequence.hxx
+++ b/chart2/source/inc/UncachedDataSequence.hxx
@@ -19,10 +19,10 @@
#pragma once
// helper classes
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/broadcasthelper.hxx>
-#include <comphelper/propertycontainer.hxx>
+#include <comphelper/propertycontainer2.hxx>
#include <comphelper/proparrhlp.hxx>
#include <rtl/ref.hxx>
@@ -42,10 +42,11 @@ namespace com::sun::star::chart2 { class XInternalDataProvider; }
namespace chart
{
class InternalDataProvider;
+class ModifyEventForwarder;
namespace impl
{
-typedef ::cppu::WeakComponentImplHelper<
+typedef ::comphelper::WeakComponentImplHelper<
css::chart2::data::XDataSequence,
css::chart2::data::XNumericalDataSequence,
css::chart2::data::XTextualDataSequence,
@@ -68,8 +69,7 @@ typedef ::cppu::WeakComponentImplHelper<
* 'label 2', ...</p>
*/
class UncachedDataSequence final :
- public ::comphelper::OMutexAndBroadcastHelper,
- public ::comphelper::OPropertyContainer,
+ public ::comphelper::OPropertyContainer2,
public ::comphelper::OPropertyArrayUsageHelper< UncachedDataSequence >,
public impl::UncachedDataSequence_Base
{
@@ -78,11 +78,11 @@ public:
lifetime is at least as long as the one of this object.
*/
UncachedDataSequence(
- const rtl::Reference< InternalDataProvider > & xIntDataProv,
- const OUString & rRangeRepresentation );
+ rtl::Reference< InternalDataProvider > xIntDataProv,
+ OUString aRangeRepresentation );
UncachedDataSequence(
- const rtl::Reference< InternalDataProvider > & xIntDataProv,
- const OUString & rRangeRepresentation,
+ rtl::Reference< InternalDataProvider > xIntDataProv,
+ OUString aRangeRepresentation,
const OUString & rRole );
UncachedDataSequence( const UncachedDataSequence & rSource );
virtual ~UncachedDataSequence() override;
@@ -102,7 +102,7 @@ private:
/// @see css::beans::XPropertySet
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
/// @see ::comphelper::OPropertySetHelper
- virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+ virtual ::cppu::IPropertyArrayHelper& getInfoHelper() override;
/// @see ::comphelper::OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override;
@@ -164,7 +164,7 @@ private:
rtl::Reference< InternalDataProvider > m_xDataProvider;
OUString m_aSourceRepresentation;
- css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
};
} // namespace chart
diff --git a/chart2/source/inc/UserDefinedProperties.hxx b/chart2/source/inc/UserDefinedProperties.hxx
index 07ab7b5bbcef..3d4e587db745 100644
--- a/chart2/source/inc/UserDefinedProperties.hxx
+++ b/chart2/source/inc/UserDefinedProperties.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include "FastPropertyIdRanges.hxx"
#include "charttoolsdllapi.hxx"
@@ -45,7 +46,7 @@ namespace UserDefinedProperties
PROP_XML_USERDEF
};
- OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddPropertiesToVector(
std::vector< css::beans::Property > & rOutProperties );
}
diff --git a/chart2/source/inc/WeakListenerAdapter.hxx b/chart2/source/inc/WeakListenerAdapter.hxx
index 7240a5363f85..f300f1aa0391 100644
--- a/chart2/source/inc/WeakListenerAdapter.hxx
+++ b/chart2/source/inc/WeakListenerAdapter.hxx
@@ -19,7 +19,6 @@
#pragma once
#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/view/XSelectionChangeListener.hpp>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/implbase.hxx>
@@ -47,9 +46,6 @@ public:
explicit WeakListenerAdapter( const css::uno::Reference< Listener > & xListener ) :
m_xListener( xListener )
{}
- explicit WeakListenerAdapter( const css::uno::WeakReference< Listener > & xListener ) :
- m_xListener( xListener )
- {}
protected:
// ____ XEventListener (base of all listeners) ____
@@ -71,19 +67,6 @@ private:
css::uno::WeakReference< Listener > m_xListener;
};
-class WeakModifyListenerAdapter final :
- public WeakListenerAdapter< css::util::XModifyListener >
-{
-public:
- explicit WeakModifyListenerAdapter(
- const css::uno::WeakReference< css::util::XModifyListener > & xListener );
- virtual ~WeakModifyListenerAdapter() override;
-
-protected:
- // ____ XModifyListener ____
- virtual void SAL_CALL modified( const css::lang::EventObject& aEvent ) override;
-};
-
class WeakSelectionChangeListenerAdapter final :
public WeakListenerAdapter< css::view::XSelectionChangeListener >
{
diff --git a/chart2/source/inc/WrappedDefaultProperty.hxx b/chart2/source/inc/WrappedDefaultProperty.hxx
index 08a11ce032eb..f9fdbff2cbf9 100644
--- a/chart2/source/inc/WrappedDefaultProperty.hxx
+++ b/chart2/source/inc/WrappedDefaultProperty.hxx
@@ -24,12 +24,12 @@
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedDefaultProperty : public WrappedProperty
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedDefaultProperty : public WrappedProperty
{
public:
explicit WrappedDefaultProperty(
const OUString& rOuterName, const OUString& rInnerName,
- const css::uno::Any& rNewOuterDefault );
+ css::uno::Any aNewOuterDefault );
virtual ~WrappedDefaultProperty() override;
virtual void setPropertyToDefault(
diff --git a/chart2/source/inc/WrappedDirectStateProperty.hxx b/chart2/source/inc/WrappedDirectStateProperty.hxx
index 28398efd8155..082a70ed0a76 100644
--- a/chart2/source/inc/WrappedDirectStateProperty.hxx
+++ b/chart2/source/inc/WrappedDirectStateProperty.hxx
@@ -23,7 +23,7 @@
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedDirectStateProperty : public WrappedProperty
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedDirectStateProperty : public WrappedProperty
{
public:
explicit WrappedDirectStateProperty(const OUString& rOuterName, const OUString& rInnerName);
diff --git a/chart2/source/inc/WrappedIgnoreProperty.hxx b/chart2/source/inc/WrappedIgnoreProperty.hxx
index a031097bda01..22c1673cc956 100644
--- a/chart2/source/inc/WrappedIgnoreProperty.hxx
+++ b/chart2/source/inc/WrappedIgnoreProperty.hxx
@@ -26,7 +26,7 @@
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedIgnoreProperty final : public WrappedProperty
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedIgnoreProperty final : public WrappedProperty
{
public:
WrappedIgnoreProperty( const OUString& rOuterName, const css::uno::Any& rDefaultValue );
@@ -47,7 +47,7 @@ private:
mutable css::uno::Any m_aCurrentValue;
};
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedIgnoreProperties
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedIgnoreProperties
{
public:
static void addIgnoreLineProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList );
diff --git a/chart2/source/inc/WrappedProperty.hxx b/chart2/source/inc/WrappedProperty.hxx
index 6bd13936c732..de6e0095e354 100644
--- a/chart2/source/inc/WrappedProperty.hxx
+++ b/chart2/source/inc/WrappedProperty.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <rtl/ustring.hxx>
@@ -33,13 +34,13 @@ namespace com::sun::star::uno { template <class interface_type> class Reference;
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedProperty
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedProperty
{
/** The property visible to the outer PropertySet in the PropertySetWrapper may have a different name, type and value than
a corresponding property of the inner PropertySet. Use this class to do the conversion between the two.
*/
public:
- WrappedProperty( const OUString& rOuterName, const OUString& rInnerName );
+ WrappedProperty( OUString aOuterName, OUString aInnerName );
virtual ~WrappedProperty();
const OUString& getOuterName() const { return m_aOuterName;}
diff --git a/chart2/source/inc/WrappedPropertySet.hxx b/chart2/source/inc/WrappedPropertySet.hxx
index 30ac421b3f5c..dabc6e33c5c4 100644
--- a/chart2/source/inc/WrappedPropertySet.hxx
+++ b/chart2/source/inc/WrappedPropertySet.hxx
@@ -18,16 +18,17 @@
*/
#pragma once
+#include <config_options.h>
#include "WrappedProperty.hxx"
#include "charttoolsdllapi.hxx"
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertyStates.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <memory>
+#include <mutex>
#include <vector>
namespace cppu { class IPropertyArrayHelper; }
@@ -36,9 +37,8 @@ namespace cppu { class OPropertyArrayHelper; }
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedPropertySet :
- public cppu::BaseMutex
- , public ::cppu::WeakImplHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedPropertySet :
+ public ::cppu::WeakImplHelper
< css::beans::XPropertySet
, css::beans::XMultiPropertySet
, css::beans::XPropertyState
@@ -103,7 +103,9 @@ protected: //methods
const WrappedProperty* getWrappedProperty( const OUString& rOuterName );
const WrappedProperty* getWrappedProperty( sal_Int32 nHandle );
-protected: //member
+ std::mutex m_aMutex;
+
+private:
css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo;//outer PropertySetInfo
std::unique_ptr<::cppu::OPropertyArrayHelper> m_pPropertyArrayHelper;//holds all possible outer properties
diff --git a/chart2/source/inc/chartview/ChartSfxItemIds.hxx b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
index 55fec55872f3..a5099cc0c31a 100644
--- a/chart2/source/inc/chartview/ChartSfxItemIds.hxx
+++ b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
@@ -163,7 +163,7 @@ constexpr TypedWhichId<SfxInt32Item> SCHATTR_NUM_OF_LINES_FOR_BAR
constexpr TypedWhichId<SfxInt32Item> SCHATTR_SPLINE_ORDER (SCHATTR_CHARTTYPE_START + 4);
constexpr TypedWhichId<SfxInt32Item> SCHATTR_SPLINE_RESOLUTION (SCHATTR_CHARTTYPE_START + 5);
constexpr TypedWhichId<SfxBoolItem> SCHATTR_GROUP_BARS_PER_AXIS (SCHATTR_CHARTTYPE_START + 6);
-constexpr TypedWhichId<SfxInt32Item> SCHATTR_STARTING_ANGLE (SCHATTR_CHARTTYPE_START + 7);
+constexpr TypedWhichId<SdrAngleItem> SCHATTR_STARTING_ANGLE (SCHATTR_CHARTTYPE_START + 7);
constexpr TypedWhichId<SfxBoolItem> SCHATTR_CLOCKWISE (SCHATTR_CHARTTYPE_START + 8);
constexpr TypedWhichId<SfxInt32Item> SCHATTR_MISSING_VALUE_TREATMENT (SCHATTR_CHARTTYPE_START + 9);
constexpr TypedWhichId<SfxIntegerListItem> SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS (SCHATTR_CHARTTYPE_START + 10);
@@ -194,7 +194,14 @@ constexpr TypedWhichId<SfxStringItem> SCHATTR_REGRESSION_YNAME
constexpr TypedWhichId<SfxInt32Item> SCHATTR_REGRESSION_MOVING_TYPE (SCHATTR_REGRESSION_START + 12);
constexpr sal_uInt16 SCHATTR_REGRESSION_END (SCHATTR_REGRESSION_MOVING_TYPE);
-constexpr sal_uInt16 SCHATTR_END (SCHATTR_REGRESSION_END);
+constexpr sal_uInt16 SCHATTR_DATA_TABLE_START (SCHATTR_REGRESSION_END + 1);
+constexpr TypedWhichId<SfxBoolItem> SCHATTR_DATA_TABLE_HORIZONTAL_BORDER (SCHATTR_DATA_TABLE_START + 0);
+constexpr TypedWhichId<SfxBoolItem> SCHATTR_DATA_TABLE_VERTICAL_BORDER (SCHATTR_DATA_TABLE_START + 1);
+constexpr TypedWhichId<SfxBoolItem> SCHATTR_DATA_TABLE_OUTLINE (SCHATTR_DATA_TABLE_START + 2);
+constexpr TypedWhichId<SfxBoolItem> SCHATTR_DATA_TABLE_KEYS (SCHATTR_DATA_TABLE_START + 3);
+constexpr sal_uInt16 SCHATTR_DATA_TABLE_END (SCHATTR_DATA_TABLE_KEYS);
+
+constexpr sal_uInt16 SCHATTR_END (SCHATTR_DATA_TABLE_END);
// values for Items
diff --git a/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx b/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
index 58d8a9ff2e4d..304b0f5a486f 100644
--- a/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
+++ b/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
@@ -29,7 +29,7 @@ namespace com::sun::star::drawing { struct Direction3D; }
namespace chart
{
-class OOO_DLLPUBLIC_CHARTVIEW DataPointSymbolSupplier
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) DataPointSymbolSupplier
{
public:
static rtl::Reference< SvxShapeGroup >
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index 0b4da35435d4..e555fb7ab021 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -35,12 +35,12 @@ class SdrObject;
namespace chart
{
-class OOO_DLLPUBLIC_CHARTVIEW DrawModelWrapper final : private SdrModel
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) DrawModelWrapper final : private SdrModel
{
private:
rtl::Reference<SvxDrawPage> m_xMainDrawPage;
rtl::Reference<SvxDrawPage> m_xHiddenDrawPage;
-
+ rtl::Reference<SfxItemPool> m_xChartItemPool;
VclPtr<OutputDevice> m_pRefDevice;
public:
@@ -66,7 +66,7 @@ public:
SfxItemPool& GetItemPool();
- SAL_DLLPRIVATE virtual css::uno::Reference< css::uno::XInterface >
+ SAL_DLLPRIVATE virtual css::uno::Reference< css::frame::XModel >
createUnoModel() override;
SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel >
getUnoModel();
diff --git a/chart2/source/inc/chartview/ExplicitScaleValues.hxx b/chart2/source/inc/chartview/ExplicitScaleValues.hxx
index a49dddeb6658..07b8290cb7db 100644
--- a/chart2/source/inc/chartview/ExplicitScaleValues.hxx
+++ b/chart2/source/inc/chartview/ExplicitScaleValues.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include <chartview/chartviewdllapi.hxx>
#include <com/sun/star/chart/TimeInterval.hpp>
#include <com/sun/star/chart2/AxisOrientation.hpp>
@@ -35,7 +36,7 @@ namespace chart
/** This structure contains the explicit values for a scale like Minimum and Maximum.
See also css::chart2::ScaleData.
*/
-struct OOO_DLLPUBLIC_CHARTVIEW ExplicitScaleData
+struct UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) ExplicitScaleData
{
ExplicitScaleData();
@@ -73,7 +74,7 @@ struct ExplicitSubIncrement
/** describes how tickmarks are positioned on the scale of an axis.
*/
-struct OOO_DLLPUBLIC_CHARTVIEW ExplicitIncrementData
+struct UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) ExplicitIncrementData
{
ExplicitIncrementData();
diff --git a/chart2/source/inc/chartview/ExplicitValueProvider.hxx b/chart2/source/inc/chartview/ExplicitValueProvider.hxx
index f367271e3b80..f4bc4aac874b 100644
--- a/chart2/source/inc/chartview/ExplicitValueProvider.hxx
+++ b/chart2/source/inc/chartview/ExplicitValueProvider.hxx
@@ -18,14 +18,14 @@
*/
#pragma once
-#include <com/sun/star/awt/Rectangle.hpp>
+#include <config_options.h>
+#include <sal/types.h>
#include <chartview/chartviewdllapi.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
#include <memory>
-namespace chart { class ChartModel; }
-namespace chart { struct ExplicitIncrementData; }
-namespace chart { struct ExplicitScaleData; }
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::chart2 { class XAxis; }
namespace com::sun::star::chart2 { class XChartDocument; }
@@ -37,12 +37,19 @@ namespace com::sun::star::uno { class XInterface; }
namespace com::sun::star::uno { template <typename > class Reference; }
namespace com::sun::star::uno { template <typename > class Sequence; }
namespace com::sun::star::util { class XNumberFormatsSupplier; }
+namespace com::sun::star::awt { struct Rectangle; }
+class SvxShape;
namespace chart
{
-
+class Axis;
+class BaseCoordinateSystem;
class DrawModelWrapper;
-class OOO_DLLPUBLIC_CHARTVIEW ExplicitValueProvider
+class ChartModel;
+struct ExplicitIncrementData;
+struct ExplicitScaleData;
+
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) SAL_LOPLUGIN_ANNOTATE("crosscast") ExplicitValueProvider
{
public:
/** Gives calculated scale and increment values for a given xAxis in the current view.
@@ -50,7 +57,7 @@ public:
If the given Axis could not be found or for another reason no correct output can be given false is returned.
*/
virtual bool getExplicitValuesForAxis(
- css::uno::Reference< css::chart2::XAxis > xAxis
+ rtl::Reference< ::chart::Axis > xAxis
, ExplicitScaleData& rExplicitScale
, ExplicitIncrementData& rExplicitIncrement )=0;
@@ -62,13 +69,11 @@ public:
virtual css::awt::Rectangle getDiagramRectangleExcludingAxes()=0;
- virtual css::uno::Reference< css::drawing::XShape >
+ virtual rtl::Reference< SvxShape >
getShapeForCID( const OUString& rObjectCID )=0;
virtual std::shared_ptr< DrawModelWrapper > getDrawModelWrapper() = 0;
- static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
-
static css::awt::Rectangle
AddSubtractAxisTitleSizes(
ChartModel& rModel
@@ -76,9 +81,9 @@ public:
, const css::awt::Rectangle& rPositionAndSize, bool bSubtract );
static sal_Int32 getExplicitNumberFormatKeyForAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
- , const css::uno::Reference< css::chart2::XChartDocument>& xChartDoc);
+ const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem
+ , const rtl::Reference<::chart::ChartModel>& xChartDoc);
static sal_Int32 getExplicitNumberFormatKeyForDataLabel(
const css::uno::Reference< css::beans::XPropertySet >& xSeriesOrPointProp );
@@ -88,7 +93,7 @@ public:
, const css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
protected:
- ~ExplicitValueProvider() {}
+ ~ExplicitValueProvider() = default;
};
} //namespace chart
diff --git a/chart2/source/inc/defines.hxx b/chart2/source/inc/defines.hxx
index bf003b6c6520..1eb464bc203a 100644
--- a/chart2/source/inc/defines.hxx
+++ b/chart2/source/inc/defines.hxx
@@ -19,6 +19,6 @@
#pragma once
-#define FIXED_SIZE_FOR_3D_CHART_VOLUME 10000.0
+constexpr double FIXED_SIZE_FOR_3D_CHART_VOLUME = 10000.0;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/servicenames.hxx b/chart2/source/inc/servicenames.hxx
index 30e9b40f5efa..0f5cbe2b40f9 100644
--- a/chart2/source/inc/servicenames.hxx
+++ b/chart2/source/inc/servicenames.hxx
@@ -20,44 +20,34 @@
#include <rtl/ustring.hxx>
-inline constexpr OUStringLiteral CHART_MODEL_SERVICE_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.ChartModel";
-inline constexpr OUStringLiteral CHART_MODEL_SERVICE_NAME = u"com.sun.star.chart2.ChartDocument";
+inline constexpr OUString CHART_MODEL_SERVICE_IMPLEMENTATION_NAME
+ = u"com.sun.star.comp.chart2.ChartModel"_ustr;
+inline constexpr OUString CHART_MODEL_SERVICE_NAME = u"com.sun.star.chart2.ChartDocument"_ustr;
//@todo create your own service containing the service com.sun.star.document.OfficeDocument
-inline constexpr OUStringLiteral CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.ChartController";
-inline constexpr OUStringLiteral CHART_CONTROLLER_SERVICE_NAME
- = u"com.sun.star.chart2.ChartController";
-//@todo create your own service containing the service com.sun.star.frame.Controller
+inline constexpr OUString CHART_VIEW_SERVICE_IMPLEMENTATION_NAME
+ = u"com.sun.star.comp.chart2.ChartView"_ustr;
+inline constexpr OUString CHART_VIEW_SERVICE_NAME = u"com.sun.star.chart2.ChartView"_ustr;
-inline constexpr OUStringLiteral CHART_VIEW_SERVICE_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.ChartView";
-inline constexpr OUStringLiteral CHART_VIEW_SERVICE_NAME = u"com.sun.star.chart2.ChartView";
+inline constexpr OUString CHART_FRAMELOADER_SERVICE_IMPLEMENTATION_NAME
+ = u"com.sun.star.comp.chart2.ChartFrameLoader"_ustr;
+inline constexpr OUString CHART_FRAMELOADER_SERVICE_NAME
+ = u"com.sun.star.frame.SynchronousFrameLoader"_ustr;
-inline constexpr OUStringLiteral CHART_FRAMELOADER_SERVICE_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.ChartFrameLoader";
-inline constexpr OUStringLiteral CHART_FRAMELOADER_SERVICE_NAME
- = u"com.sun.star.frame.SynchronousFrameLoader";
+inline constexpr OUString CHART_WIZARD_DIALOG_SERVICE_IMPLEMENTATION_NAME
+ = u"com.sun.star.comp.chart2.WizardDialog"_ustr;
+inline constexpr OUString CHART_WIZARD_DIALOG_SERVICE_NAME
+ = u"com.sun.star.chart2.WizardDialog"_ustr;
-inline constexpr OUStringLiteral CHART_WIZARD_DIALOG_SERVICE_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.WizardDialog";
-inline constexpr OUStringLiteral CHART_WIZARD_DIALOG_SERVICE_NAME
- = u"com.sun.star.chart2.WizardDialog";
-
-inline constexpr OUStringLiteral CHART_TYPE_DIALOG_SERVICE_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.ChartTypeDialog";
-inline constexpr OUStringLiteral CHART_TYPE_DIALOG_SERVICE_NAME
- = u"com.sun.star.chart2.ChartTypeDialog";
+inline constexpr OUString CHART_TYPE_DIALOG_SERVICE_IMPLEMENTATION_NAME
+ = u"com.sun.star.comp.chart2.ChartTypeDialog"_ustr;
+inline constexpr OUString CHART_TYPE_DIALOG_SERVICE_NAME
+ = u"com.sun.star.chart2.ChartTypeDialog"_ustr;
// wrapper for old UNO API (com.sun.star.chart)
-inline constexpr OUStringLiteral CHART_CHARTAPIWRAPPER_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.ChartDocumentWrapper";
-inline constexpr OUStringLiteral CHART_CHARTAPIWRAPPER_SERVICE_NAME
- = u"com.sun.star.chart2.ChartDocumentWrapper";
-
-// accessibility
-inline constexpr OUStringLiteral CHART_ACCESSIBLE_TEXT_SERVICE_NAME
- = u"com.sun.star.accessibility.AccessibleTextComponent";
+inline constexpr OUString CHART_CHARTAPIWRAPPER_IMPLEMENTATION_NAME
+ = u"com.sun.star.comp.chart2.ChartDocumentWrapper"_ustr;
+inline constexpr OUString CHART_CHARTAPIWRAPPER_SERVICE_NAME
+ = u"com.sun.star.chart2.ChartDocumentWrapper"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/servicenames_charttypes.hxx b/chart2/source/inc/servicenames_charttypes.hxx
index 0c06c2d3ea57..5ab2dcbf4929 100644
--- a/chart2/source/inc/servicenames_charttypes.hxx
+++ b/chart2/source/inc/servicenames_charttypes.hxx
@@ -20,25 +20,25 @@
#include <rtl/ustring.hxx>
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_AREA
- = u"com.sun.star.chart2.AreaChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_BAR
- = u"com.sun.star.chart2.BarChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_COLUMN
- = u"com.sun.star.chart2.ColumnChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_LINE
- = u"com.sun.star.chart2.LineChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_SCATTER
- = u"com.sun.star.chart2.ScatterChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_PIE
- = u"com.sun.star.chart2.PieChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_NET
- = u"com.sun.star.chart2.NetChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET
- = u"com.sun.star.chart2.FilledNetChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK
- = u"com.sun.star.chart2.CandleStickChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE
- = u"com.sun.star.chart2.BubbleChartType";
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_AREA
+ = u"com.sun.star.chart2.AreaChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_BAR
+ = u"com.sun.star.chart2.BarChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_COLUMN
+ = u"com.sun.star.chart2.ColumnChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_LINE
+ = u"com.sun.star.chart2.LineChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_SCATTER
+ = u"com.sun.star.chart2.ScatterChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_PIE
+ = u"com.sun.star.chart2.PieChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_NET
+ = u"com.sun.star.chart2.NetChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET
+ = u"com.sun.star.chart2.FilledNetChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK
+ = u"com.sun.star.chart2.CandleStickChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE
+ = u"com.sun.star.chart2.BubbleChartType"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/servicenames_coosystems.hxx b/chart2/source/inc/servicenames_coosystems.hxx
index f8472a3dfeec..065155a8bb37 100644
--- a/chart2/source/inc/servicenames_coosystems.hxx
+++ b/chart2/source/inc/servicenames_coosystems.hxx
@@ -20,7 +20,7 @@
#include <rtl/ustring.hxx>
-inline constexpr OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.CartesianView";
-inline constexpr OUStringLiteral CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.PolarView";
+inline constexpr OUString CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.CartesianView"_ustr;
+inline constexpr OUString CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.PolarView"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx
index 0f061c66121b..b5a485dc4c86 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -47,7 +47,7 @@
#include <com/sun/star/xml/sax/XFastParser.hpp>
#include <com/sun/star/packages/zip/ZipIOException.hpp>
#include <com/sun/star/document/GraphicStorageHandler.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
using namespace ::com::sun::star;
@@ -58,9 +58,9 @@ using ::osl::MutexGuard;
namespace
{
-constexpr OUStringLiteral sXML_metaStreamName = u"meta.xml";
-constexpr OUStringLiteral sXML_styleStreamName = u"styles.xml";
-constexpr OUStringLiteral sXML_contentStreamName = u"content.xml";
+constexpr OUString sXML_metaStreamName = u"meta.xml"_ustr;
+constexpr OUString sXML_styleStreamName = u"styles.xml"_ustr;
+constexpr OUString sXML_contentStreamName = u"content.xml"_ustr;
uno::Reference< embed::XStorage > lcl_getWriteStorage(
@@ -186,8 +186,7 @@ namespace chart
{
XMLFilter::XMLFilter( Reference< uno::XComponentContext > const & xContext ) :
- m_xContext( xContext ),
- m_bCancelOperation( false )
+ m_xContext( xContext )
{}
XMLFilter::~XMLFilter()
@@ -201,11 +200,6 @@ sal_Bool SAL_CALL XMLFilter::filter(
MutexGuard aGuard( m_aMutex );
- // ignore cancel flag at start of function
- // note: is currently ignored during import/export
- if( m_bCancelOperation )
- m_bCancelOperation = false;
-
if( m_xSourceDoc.is())
{
OSL_ENSURE( ! m_xTargetDoc.is(), "source doc is set -> target document should not be set" );
@@ -235,12 +229,6 @@ sal_Bool SAL_CALL XMLFilter::filter(
void SAL_CALL XMLFilter::cancel()
{
- // if mutex is locked set "cancel state"
- // note: is currently ignored in filter-method
- if( ! m_aMutex.tryToAcquire())
- {
- m_bCancelOperation = true;
- }
}
// ____ XImporter ____
@@ -308,7 +296,7 @@ ErrCode XMLFilter::impl_Import(
// create XPropertySet with extra information for the filter
/** property map for import info set */
- comphelper::PropertyMapEntry const aImportInfoMap[] =
+ static comphelper::PropertyMapEntry const aImportInfoMap[] =
{
// necessary properties for XML progress bar at load time
{ OUString("ProgressRange"), 0, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0},
@@ -319,7 +307,6 @@ ErrCode XMLFilter::impl_Import(
{ OUString("StreamRelPath"), 0, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("StreamName"), 0, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("BuildId"), 0, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 },
- { OUString(), 0, css::uno::Type(), 0, 0 }
};
uno::Reference< beans::XPropertySet > xImportInfo(
comphelper::GenericPropertySet_CreateInstance(
@@ -569,14 +556,13 @@ ErrCode XMLFilter::impl_Export(
xGraphicStorageHandler.set(document::GraphicStorageHandler::createWithStorage(m_xContext, xStorage));
// property map for export info set
- comphelper::PropertyMapEntry const aExportInfoMap[] =
+ static comphelper::PropertyMapEntry const aExportInfoMap[] =
{
{ OUString("UsePrettyPrinting"), 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
{ OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("ExportTableNumberList"), 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::MAYBEVOID, 0 },
- { OUString(), 0, css::uno::Type(), 0, 0 }
};
uno::Reference< beans::XPropertySet > xInfoSet =
@@ -688,7 +674,7 @@ ErrCode XMLFilter::impl_ExportStream(
{
uno::Reference< beans::XPropertySet > xInfoSet;
if( rFilterProperties.hasElements() )
- rFilterProperties.getConstArray()[0] >>= xInfoSet;
+ rFilterProperties[0] >>= xInfoSet;
OSL_ENSURE( xInfoSet.is(), "missing infoset for export" );
if( xInfoSet.is() )
xInfoSet->setPropertyValue( "StreamName", uno::Any( rStreamName ) );
@@ -722,7 +708,7 @@ void XMLFilter::isOasisFormat(const Sequence< beans::PropertyValue >& _rMediaDes
}
OUString XMLFilter::getMediaType(bool _bOasis)
{
- return _bOasis ? OUString(MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII) : OUString(MIMETYPE_VND_SUN_XML_CHART_ASCII);
+ return _bOasis ? MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII : MIMETYPE_VND_SUN_XML_CHART_ASCII;
}
OUString SAL_CALL XMLFilter::getImplementationName()
diff --git a/chart2/source/model/inc/StockBar.hxx b/chart2/source/model/inc/StockBar.hxx
index dd8160574fd2..38f5c2629b4a 100644
--- a/chart2/source/model/inc/StockBar.hxx
+++ b/chart2/source/model/inc/StockBar.hxx
@@ -21,7 +21,6 @@
#include <com/sun/star/util/XCloneable.hpp>
#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <ModifyListenerHelper.hxx>
@@ -39,7 +38,6 @@ typedef ::cppu::WeakImplHelper<
}
class StockBar final :
- public cppu::BaseMutex,
public impl::StockBar_Base,
public ::property::OPropertySet
{
@@ -53,6 +51,9 @@ public:
private:
explicit StockBar( const StockBar & rOther );
+ // ____ XTypeProvider ____
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+
// ____ OPropertySet ____
virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
diff --git a/chart2/source/model/inc/XMLFilter.hxx b/chart2/source/model/inc/XMLFilter.hxx
index b189ce0b3530..12c28ad40e79 100644
--- a/chart2/source/model/inc/XMLFilter.hxx
+++ b/chart2/source/model/inc/XMLFilter.hxx
@@ -24,9 +24,8 @@
#include <com/sun/star/document/XExporter.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
#include <osl/mutex.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::uno { class XComponentContext; }
@@ -124,8 +123,6 @@ private:
css::uno::Sequence<css::beans::PropertyValue> m_aMediaDescriptor;
OUString m_sDocumentHandler; // when set it will be set as doc handler
-
- volatile bool m_bCancelOperation;
::osl::Mutex m_aMutex;
};
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index 9bae79cf8adc..3d7cfc6267b8 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -17,16 +17,16 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "Axis.hxx"
-#include "GridProperties.hxx"
+#include <Axis.hxx>
+#include <GridProperties.hxx>
#include <CharacterProperties.hxx>
#include <LinePropertiesHelper.hxx>
#include <UserDefinedProperties.hxx>
#include <PropertyHelper.hxx>
-#include <CloneHelper.hxx>
#include <AxisHelper.hxx>
#include <EventListenerHelper.hxx>
#include <ModifyListenerHelper.hxx>
+#include <Title.hxx>
#include <unonames.hxx>
#include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp>
@@ -36,7 +36,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <rtl/ref.hxx>
#include <vector>
@@ -204,116 +204,75 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEVOID );
}
+} // namespace
-struct StaticAxisDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::CharacterProperties::AddDefaultsToMap( rOutMap );
- ::chart::LinePropertiesHelper::AddDefaultsToMap( rOutMap );
-
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_SHOW, true );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_CROSSOVER_POSITION, css::chart::ChartAxisPosition_ZERO );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_DISPLAY_LABELS, true );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_LINK_NUMBERFORMAT_TO_SOURCE, true );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_LABEL_POSITION, css::chart::ChartAxisLabelPosition_NEAR_AXIS );
- ::chart::PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_AXIS_TEXT_ROTATION, 0.0 );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_TEXT_BREAK, false );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_TEXT_OVERLAP, false );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_TEXT_STACKED, false );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_TEXT_ARRANGE_ORDER, css::chart::ChartAxisArrangeOrderType_AUTO );
-
- float fDefaultCharHeight = 10.0;
- ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_CHAR_HEIGHT, fDefaultCharHeight );
- ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_ASIAN_CHAR_HEIGHT, fDefaultCharHeight );
- ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultCharHeight );
-
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_AXIS_MAJOR_TICKMARKS, 2 /* CHAXIS_MARK_OUTER */ );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_AXIS_MINOR_TICKMARKS, 0 /* CHAXIS_MARK_NONE */ );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_MARK_POSITION, css::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_DISPLAY_UNITS, false );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_TRY_STAGGERING_FIRST, false );
- }
-};
-
-struct StaticAxisDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticAxisDefaults_Initializer >
-{
-};
-
-struct StaticAxisInfoHelper_Initializer
+namespace chart
{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
- ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-};
-
-struct StaticAxisInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticAxisInfoHelper_Initializer >
+const ::chart::tPropertyValueMap & StaticAxisDefaults()
{
+ static ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ ::chart::tPropertyValueMap aMap;
+ ::chart::CharacterProperties::AddDefaultsToMap( aMap );
+ ::chart::LinePropertiesHelper::AddDefaultsToMap( aMap );
+
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_AXIS_SHOW, true );
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_AXIS_CROSSOVER_POSITION, css::chart::ChartAxisPosition_ZERO );
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_AXIS_DISPLAY_LABELS, true );
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_AXIS_LINK_NUMBERFORMAT_TO_SOURCE, true );
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_AXIS_LABEL_POSITION, css::chart::ChartAxisLabelPosition_NEAR_AXIS );
+ ::chart::PropertyHelper::setPropertyValueDefault< double >( aMap, PROP_AXIS_TEXT_ROTATION, 0.0 );
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_AXIS_TEXT_BREAK, false );
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_AXIS_TEXT_OVERLAP, false );
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_AXIS_TEXT_STACKED, false );
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_AXIS_TEXT_ARRANGE_ORDER, css::chart::ChartAxisArrangeOrderType_AUTO );
+
+ float fDefaultCharHeight = 10.0;
+ ::chart::PropertyHelper::setPropertyValue( aMap, ::chart::CharacterProperties::PROP_CHAR_CHAR_HEIGHT, fDefaultCharHeight );
+ ::chart::PropertyHelper::setPropertyValue( aMap, ::chart::CharacterProperties::PROP_CHAR_ASIAN_CHAR_HEIGHT, fDefaultCharHeight );
+ ::chart::PropertyHelper::setPropertyValue( aMap, ::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultCharHeight );
+
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aMap, PROP_AXIS_MAJOR_TICKMARKS, 2 /* CHAXIS_MARK_OUTER */ );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aMap, PROP_AXIS_MINOR_TICKMARKS, 0 /* CHAXIS_MARK_NONE */ );
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_AXIS_MARK_POSITION, css::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS );
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_AXIS_DISPLAY_UNITS, false );
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_AXIS_TRY_STAGGERING_FIRST, false );
+ return aMap;
+ }();
+ return aStaticDefaults;
};
+} // namespace chart
-struct StaticAxisInfo_Initializer
+namespace
{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticAxisInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
-
-struct StaticAxisInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticAxisInfo_Initializer >
+::cppu::OPropertyArrayHelper& StaticAxisInfoHelper()
{
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
+ ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
-typedef uno::Reference< beans::XPropertySet > lcl_tSubGridType;
-
-void lcl_CloneSubGrids(
- const uno::Sequence< lcl_tSubGridType > & rSource, uno::Sequence< lcl_tSubGridType > & rDestination )
+std::vector< rtl::Reference< ::chart::GridProperties > > lcl_CloneSubGrids(
+ const std::vector< rtl::Reference< ::chart::GridProperties > > & rSource )
{
- rDestination.realloc( rSource.getLength());
- lcl_tSubGridType * pDestBegin = rDestination.getArray();
- lcl_tSubGridType * pDestEnd = pDestBegin + rDestination.getLength();
- lcl_tSubGridType * pDestIt = pDestBegin;
-
- for( Reference< beans::XPropertySet > const & i : rSource )
+ std::vector< rtl::Reference< ::chart::GridProperties > > aDestination;
+ aDestination.reserve( rSource.size());
+ for( rtl::Reference< ::chart::GridProperties > const & i : rSource )
{
- Reference< beans::XPropertySet > xSubGrid( i );
- if( xSubGrid.is())
- {
- Reference< util::XCloneable > xCloneable( xSubGrid, uno::UNO_QUERY );
- if( xCloneable.is())
- xSubGrid.set( xCloneable->createClone(), uno::UNO_QUERY );
- }
-
- (*pDestIt) = xSubGrid;
- OSL_ASSERT( pDestIt != pDestEnd );
- ++pDestIt;
+ aDestination.push_back(new ::chart::GridProperties(*i));
}
- OSL_ASSERT( pDestIt == pDestEnd );
+ return aDestination;
}
} // anonymous namespace
@@ -322,7 +281,6 @@ namespace chart
{
Axis::Axis() :
- ::property::OPropertySet( m_aMutex ),
m_xModifyEventForwarder( new ModifyEventForwarder() ),
m_aScaleData( AxisHelper::createDefaultScale() ),
m_xGrid( new GridProperties() )
@@ -342,22 +300,24 @@ Axis::Axis() :
Axis::Axis( const Axis & rOther ) :
impl::Axis_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_xModifyEventForwarder( new ModifyEventForwarder() ),
m_aScaleData( rOther.m_aScaleData )
{
- m_xGrid.set( CloneHelper::CreateRefClone< beans::XPropertySet >()( rOther.m_xGrid ));
+ if (rOther.m_xGrid)
+ m_xGrid = new ::chart::GridProperties(*rOther.m_xGrid);
if( m_xGrid.is())
ModifyListenerHelper::addListener( m_xGrid, m_xModifyEventForwarder );
if( m_aScaleData.Categories.is())
ModifyListenerHelper::addListener( m_aScaleData.Categories, m_xModifyEventForwarder );
- if( rOther.m_aSubGridProperties.hasElements() )
- lcl_CloneSubGrids( rOther.m_aSubGridProperties, m_aSubGridProperties );
- ModifyListenerHelper::addListenerToAllSequenceElements( m_aSubGridProperties, m_xModifyEventForwarder );
+ if( !rOther.m_aSubGridProperties.empty() )
+ m_aSubGridProperties = lcl_CloneSubGrids( rOther.m_aSubGridProperties );
+ ModifyListenerHelper::addListenerToAllElements( m_aSubGridProperties, m_xModifyEventForwarder );
- m_xTitle.set( CloneHelper::CreateRefClone< chart2::XTitle >()( rOther.m_xTitle ));
+ if ( rOther.m_xTitle )
+ m_xTitle = new Title( *rOther.m_xTitle );
if( m_xTitle.is())
ModifyListenerHelper::addListener( m_xTitle, m_xModifyEventForwarder );
}
@@ -374,12 +334,12 @@ Axis::~Axis()
try
{
ModifyListenerHelper::removeListener( m_xGrid, m_xModifyEventForwarder );
- ModifyListenerHelper::removeListenerFromAllSequenceElements( m_aSubGridProperties, m_xModifyEventForwarder );
+ ModifyListenerHelper::removeListenerFromAllElements( m_aSubGridProperties, m_xModifyEventForwarder );
ModifyListenerHelper::removeListener( m_xTitle, m_xModifyEventForwarder );
if( m_aScaleData.Categories.is())
{
ModifyListenerHelper::removeListener( m_aScaleData.Categories, m_xModifyEventForwarder );
- m_aScaleData.Categories.set(nullptr);
+ m_aScaleData.Categories.clear();
}
}
catch( const uno::Exception & )
@@ -387,7 +347,7 @@ Axis::~Axis()
DBG_UNHANDLED_EXCEPTION("chart2");
}
- m_aSubGridProperties.realloc(0);
+ m_aSubGridProperties.clear();
m_xGrid = nullptr;
m_xTitle = nullptr;
}
@@ -396,32 +356,31 @@ void Axis::AllocateSubGrids()
{
Reference< util::XModifyListener > xModifyEventForwarder;
Reference< lang::XEventListener > xEventListener;
- std::vector< Reference< beans::XPropertySet > > aOldBroadcasters;
- std::vector< Reference< beans::XPropertySet > > aNewBroadcasters;
+ std::vector< rtl::Reference< GridProperties > > aOldBroadcasters;
+ std::vector< rtl::Reference< GridProperties > > aNewBroadcasters;
{
MutexGuard aGuard( m_aMutex );
xModifyEventForwarder = m_xModifyEventForwarder;
xEventListener = this;
sal_Int32 nNewSubIncCount = m_aScaleData.IncrementData.SubIncrements.getLength();
- sal_Int32 nOldSubIncCount = m_aSubGridProperties.getLength();
+ sal_Int32 nOldSubIncCount = m_aSubGridProperties.size();
if( nOldSubIncCount > nNewSubIncCount )
{
// remove superfluous entries
for( sal_Int32 i = nNewSubIncCount; i < nOldSubIncCount; ++i )
aOldBroadcasters.push_back( m_aSubGridProperties[ i ] );
- m_aSubGridProperties.realloc( nNewSubIncCount );
+ m_aSubGridProperties.resize( nNewSubIncCount );
}
else if( nOldSubIncCount < nNewSubIncCount )
{
- m_aSubGridProperties.realloc( nNewSubIncCount );
- auto pSubGridProperties = m_aSubGridProperties.getArray();
+ m_aSubGridProperties.resize( nNewSubIncCount );
// allocate new entries
for( sal_Int32 i = nOldSubIncCount; i < nNewSubIncCount; ++i )
{
- pSubGridProperties[ i ] = new GridProperties();
+ m_aSubGridProperties[ i ] = new GridProperties();
LinePropertiesHelper::SetLineInvisible( m_aSubGridProperties[ i ] );
LinePropertiesHelper::SetLineColor( m_aSubGridProperties[ i ], static_cast<sal_Int32>(0xdddddd) ); //gray2
aNewBroadcasters.push_back( m_aSubGridProperties[ i ] );
@@ -476,9 +435,20 @@ Reference< beans::XPropertySet > SAL_CALL Axis::getGridProperties()
MutexGuard aGuard( m_aMutex );
return m_xGrid;
}
+rtl::Reference< ::chart::GridProperties > Axis::getGridProperties2()
+{
+ MutexGuard aGuard( m_aMutex );
+ return m_xGrid;
+}
Sequence< Reference< beans::XPropertySet > > SAL_CALL Axis::getSubGridProperties()
{
MutexGuard aGuard( m_aMutex );
+ return comphelper::containerToSequence<Reference< beans::XPropertySet >>(m_aSubGridProperties);
+}
+
+std::vector< rtl::Reference< GridProperties > > Axis::getSubGridProperties2()
+{
+ MutexGuard aGuard( m_aMutex );
return m_aSubGridProperties;
}
@@ -495,10 +465,23 @@ Reference< chart2::XTitle > SAL_CALL Axis::getTitleObject()
return m_xTitle;
}
+rtl::Reference< Title > Axis::getTitleObject2() const
+{
+ MutexGuard aGuard( m_aMutex );
+ return m_xTitle;
+}
+
void SAL_CALL Axis::setTitleObject( const Reference< chart2::XTitle >& xNewTitle )
{
+ rtl::Reference<Title> xTitle = dynamic_cast<Title*>(xNewTitle.get());
+ assert(!xNewTitle || xTitle);
+ setTitleObject(xTitle);
+}
+
+void Axis::setTitleObject( const rtl::Reference< Title >& xNewTitle )
+{
Reference< util::XModifyListener > xModifyEventForwarder;
- Reference< chart2::XTitle > xOldTitle;
+ rtl::Reference< Title > xOldTitle;
{
MutexGuard aGuard( m_aMutex );
xOldTitle = m_xTitle;
@@ -561,7 +544,7 @@ void Axis::fireModifyEvent()
// ____ OPropertySet ____
void Axis::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticAxisDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticAxisDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -571,13 +554,15 @@ void Axis::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
::cppu::IPropertyArrayHelper & SAL_CALL Axis::getInfoHelper()
{
- return *StaticAxisInfoHelper::get();
+ return StaticAxisInfoHelper();
}
// ____ XPropertySet ____
Reference< beans::XPropertySetInfo > SAL_CALL Axis::getPropertySetInfo()
{
- return *StaticAxisInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticAxisInfoHelper() ) );
+ return xPropertySetInfo;
}
using impl::Axis_Base;
diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx
index 3729c32bd281..8af32fa09678 100644
--- a/chart2/source/model/main/BaseCoordinateSystem.cxx
+++ b/chart2/source/model/main/BaseCoordinateSystem.cxx
@@ -22,12 +22,13 @@
#include <UserDefinedProperties.hxx>
#include <CloneHelper.hxx>
#include <ModifyListenerHelper.hxx>
-#include "Axis.hxx"
+#include <Axis.hxx>
+#include <ChartType.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/container/NoSuchElementException.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <o3tl/safeint.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <algorithm>
@@ -55,58 +56,31 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEVOID );
}
-struct StaticCooSysDefaults_Initializer
+const ::chart::tPropertyValueMap & StaticCooSysDefaults()
{
- ::chart::tPropertyValueMap* operator()()
+ static ::chart::tPropertyValueMap aStaticDefaults = []()
{
- static ::chart::tPropertyValueMap aStaticDefaults;
- ::chart::PropertyHelper::setPropertyValueDefault( aStaticDefaults, PROP_COORDINATESYSTEM_SWAPXANDYAXIS, false );
- return &aStaticDefaults;
- }
-};
-
-struct StaticCooSysDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticCooSysDefaults_Initializer >
-{
+ ::chart::tPropertyValueMap aMap;
+ ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_COORDINATESYSTEM_SWAPXANDYAXIS, false );
+ return aMap;
+ }();
+ return aStaticDefaults;
};
-struct StaticCooSysInfoHelper_Initializer
+::cppu::OPropertyArrayHelper& StaticCooSysInfoHelper()
{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-};
-
-struct StaticCooSysInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticCooSysInfoHelper_Initializer >
-{
-};
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-struct StaticCooSysInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticCooSysInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticCooSysInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticCooSysInfo_Initializer >
-{
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -116,7 +90,6 @@ namespace chart
BaseCoordinateSystem::BaseCoordinateSystem(
sal_Int32 nDimensionCount /* = 2 */ ) :
- ::property::OPropertySet( m_aMutex ),
m_xModifyEventForwarder( new ModifyEventForwarder() ),
m_nDimensionCount( nDimensionCount )
{
@@ -124,7 +97,7 @@ BaseCoordinateSystem::BaseCoordinateSystem(
for( sal_Int32 nN=0; nN<m_nDimensionCount; nN++ )
{
m_aAllAxis[nN].resize( 1 );
- Reference< chart2::XAxis > xAxis( new Axis );
+ rtl::Reference< Axis > xAxis( new Axis );
m_aAllAxis[nN][0] = xAxis;
ModifyListenerHelper::addListenerToAllElements( m_aAllAxis[nN], m_xModifyEventForwarder );
@@ -151,19 +124,21 @@ BaseCoordinateSystem::BaseCoordinateSystem(
BaseCoordinateSystem::BaseCoordinateSystem(
const BaseCoordinateSystem & rSource ) :
impl::BaseCoordinateSystem_Base(rSource),
- ::property::OPropertySet( rSource, m_aMutex ),
+ ::property::OPropertySet( rSource ),
m_xModifyEventForwarder( new ModifyEventForwarder() ),
m_nDimensionCount( rSource.m_nDimensionCount )
{
m_aAllAxis.resize(rSource.m_aAllAxis.size());
tAxisVecVecType::size_type nN=0;
for( nN=0; nN<m_aAllAxis.size(); nN++ )
- CloneHelper::CloneRefVector<chart2::XAxis>( rSource.m_aAllAxis[nN], m_aAllAxis[nN] );
- CloneHelper::CloneRefVector<chart2::XChartType>( rSource.m_aChartTypes, m_aChartTypes );
+ CloneHelper::CloneRefVector( rSource.m_aAllAxis[nN], m_aAllAxis[nN] );
+ for (const auto & rxChartType : rSource.m_aChartTypes)
+ m_aChartTypes.push_back(rxChartType->cloneChartType());
for( nN=0; nN<m_aAllAxis.size(); nN++ )
ModifyListenerHelper::addListenerToAllElements( m_aAllAxis[nN], m_xModifyEventForwarder );
- ModifyListenerHelper::addListenerToAllElements( m_aChartTypes, m_xModifyEventForwarder );
+ for (const auto & rxChartType : m_aChartTypes)
+ rxChartType->addModifyListener( m_xModifyEventForwarder );
}
BaseCoordinateSystem::~BaseCoordinateSystem()
@@ -172,7 +147,8 @@ BaseCoordinateSystem::~BaseCoordinateSystem()
{
for(const tAxisVecVecType::value_type & i : m_aAllAxis)
ModifyListenerHelper::removeListenerFromAllElements( i, m_xModifyEventForwarder );
- ModifyListenerHelper::removeListenerFromAllElements( m_aChartTypes, m_xModifyEventForwarder );
+ for (const auto & rxChartType : m_aChartTypes)
+ rxChartType->removeModifyListener( m_xModifyEventForwarder );
}
catch( const uno::Exception & )
{
@@ -197,13 +173,41 @@ void SAL_CALL BaseCoordinateSystem::setAxisByDimension(
if( nIndex < 0 )
throw lang::IndexOutOfBoundsException();
+ assert(!xAxis || dynamic_cast<Axis*>(xAxis.get()));
+
+ if( m_aAllAxis[ nDimensionIndex ].size() < o3tl::make_unsigned( nIndex+1 ))
+ {
+ m_aAllAxis[ nDimensionIndex ].resize( nIndex+1 );
+ m_aAllAxis[ nDimensionIndex ][nIndex] = nullptr;
+ }
+
+ rtl::Reference< Axis > xOldAxis( m_aAllAxis[ nDimensionIndex ][nIndex] );
+ if( xOldAxis.is())
+ ModifyListenerHelper::removeListener( xOldAxis, m_xModifyEventForwarder );
+ m_aAllAxis[ nDimensionIndex ][nIndex] = dynamic_cast<Axis*>(xAxis.get());
+ if( xAxis.is())
+ ModifyListenerHelper::addListener( xAxis, m_xModifyEventForwarder );
+ fireModifyEvent();
+}
+
+void BaseCoordinateSystem::setAxisByDimension(
+ sal_Int32 nDimensionIndex,
+ const rtl::Reference< Axis >& xAxis,
+ sal_Int32 nIndex )
+{
+ if( nDimensionIndex < 0 || nDimensionIndex >= getDimension() )
+ throw lang::IndexOutOfBoundsException();
+
+ if( nIndex < 0 )
+ throw lang::IndexOutOfBoundsException();
+
if( m_aAllAxis[ nDimensionIndex ].size() < o3tl::make_unsigned( nIndex+1 ))
{
m_aAllAxis[ nDimensionIndex ].resize( nIndex+1 );
m_aAllAxis[ nDimensionIndex ][nIndex] = nullptr;
}
- Reference< chart2::XAxis > xOldAxis( m_aAllAxis[ nDimensionIndex ][nIndex] );
+ rtl::Reference< Axis > xOldAxis( m_aAllAxis[ nDimensionIndex ][nIndex] );
if( xOldAxis.is())
ModifyListenerHelper::removeListener( xOldAxis, m_xModifyEventForwarder );
m_aAllAxis[ nDimensionIndex ][nIndex] = xAxis;
@@ -226,6 +230,20 @@ Reference< chart2::XAxis > SAL_CALL BaseCoordinateSystem::getAxisByDimension(
return m_aAllAxis[ nDimensionIndex ][nAxisIndex];
}
+const rtl::Reference< Axis > & BaseCoordinateSystem::getAxisByDimension2(
+ sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const
+{
+ if( nDimensionIndex < 0 || nDimensionIndex >= m_nDimensionCount )
+ throw lang::IndexOutOfBoundsException();
+
+ OSL_ASSERT( m_aAllAxis.size() == static_cast< size_t >( m_nDimensionCount));
+
+ if( nAxisIndex < 0 || o3tl::make_unsigned(nAxisIndex) > m_aAllAxis[ nDimensionIndex ].size() )
+ throw lang::IndexOutOfBoundsException();
+
+ return m_aAllAxis[ nDimensionIndex ][nAxisIndex];
+}
+
sal_Int32 SAL_CALL BaseCoordinateSystem::getMaximumAxisIndexByDimension( sal_Int32 nDimensionIndex )
{
if( nDimensionIndex < 0 || nDimensionIndex >= getDimension() )
@@ -243,19 +261,23 @@ sal_Int32 SAL_CALL BaseCoordinateSystem::getMaximumAxisIndexByDimension( sal_Int
// ____ XChartTypeContainer ____
void SAL_CALL BaseCoordinateSystem::addChartType( const Reference< chart2::XChartType >& aChartType )
{
- if( std::find( m_aChartTypes.begin(), m_aChartTypes.end(), aChartType )
+ auto pChartType = dynamic_cast<ChartType*>(aChartType.get());
+ assert(pChartType);
+
+ if( std::find( m_aChartTypes.begin(), m_aChartTypes.end(), pChartType )
!= m_aChartTypes.end())
throw lang::IllegalArgumentException("type not found", static_cast<cppu::OWeakObject*>(this), 1);
- m_aChartTypes.push_back( aChartType );
+ m_aChartTypes.push_back( pChartType );
ModifyListenerHelper::addListener( aChartType, m_xModifyEventForwarder );
fireModifyEvent();
}
void SAL_CALL BaseCoordinateSystem::removeChartType( const Reference< chart2::XChartType >& aChartType )
{
- std::vector< uno::Reference< chart2::XChartType > >::iterator
- aIt( std::find( m_aChartTypes.begin(), m_aChartTypes.end(), aChartType ));
+ auto pChartType = dynamic_cast<ChartType*>(aChartType.get());
+ assert(pChartType);
+ auto aIt( std::find( m_aChartTypes.begin(), m_aChartTypes.end(), pChartType ));
if( aIt == m_aChartTypes.end())
throw container::NoSuchElementException(
"The given chart type is no element of the container",
@@ -268,14 +290,31 @@ void SAL_CALL BaseCoordinateSystem::removeChartType( const Reference< chart2::XC
Sequence< Reference< chart2::XChartType > > SAL_CALL BaseCoordinateSystem::getChartTypes()
{
- return comphelper::containerToSequence( m_aChartTypes );
+ return comphelper::containerToSequence< Reference< chart2::XChartType > >( m_aChartTypes );
}
void SAL_CALL BaseCoordinateSystem::setChartTypes( const Sequence< Reference< chart2::XChartType > >& aChartTypes )
{
- ModifyListenerHelper::removeListenerFromAllElements( m_aChartTypes, m_xModifyEventForwarder );
- m_aChartTypes = comphelper::sequenceToContainer<std::vector< css::uno::Reference< css::chart2::XChartType > >>( aChartTypes );
- ModifyListenerHelper::addListenerToAllElements( m_aChartTypes, m_xModifyEventForwarder );
+ for (auto const & aChartType : m_aChartTypes)
+ aChartType->removeModifyListener( m_xModifyEventForwarder );
+ m_aChartTypes.clear();
+ for (auto const & aChartType : aChartTypes)
+ {
+ auto pChartType = dynamic_cast<ChartType*>(aChartType.get());
+ assert(pChartType);
+ m_aChartTypes.push_back(pChartType);
+ pChartType->addModifyListener( m_xModifyEventForwarder );
+ }
+ fireModifyEvent();
+}
+
+void BaseCoordinateSystem::setChartTypes( const std::vector< rtl::Reference< ChartType > >& aChartTypes )
+{
+ for (auto const & aChartType : m_aChartTypes)
+ aChartType->removeModifyListener( m_xModifyEventForwarder );
+ m_aChartTypes = aChartTypes;
+ for (auto const & aChartType : m_aChartTypes)
+ aChartType->addModifyListener( m_xModifyEventForwarder );
fireModifyEvent();
}
@@ -316,7 +355,7 @@ void BaseCoordinateSystem::fireModifyEvent()
// ____ OPropertySet ____
void BaseCoordinateSystem::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticCooSysDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticCooSysDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -327,13 +366,15 @@ void BaseCoordinateSystem::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny )
// ____ OPropertySet ____
::cppu::IPropertyArrayHelper & SAL_CALL BaseCoordinateSystem::getInfoHelper()
{
- return *StaticCooSysInfoHelper::get();
+ return StaticCooSysInfoHelper();
}
// ____ XPropertySet ____
Reference< beans::XPropertySetInfo > SAL_CALL BaseCoordinateSystem::getPropertySetInfo()
{
- return *StaticCooSysInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticCooSysInfoHelper() ) );
+ return xPropertySetInfo;
}
using impl::BaseCoordinateSystem_Base;
diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx
index c65adee25829..1f1320d8ae69 100644
--- a/chart2/source/model/main/CartesianCoordinateSystem.cxx
+++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx
@@ -31,7 +31,7 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace
{
-constexpr OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.Cartesian";
+constexpr OUString CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.Cartesian"_ustr;
}
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index b05db28661dd..c0627abf7bbd 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -19,7 +19,9 @@
#include <ChartModel.hxx>
#include <ChartTypeManager.hxx>
+#include <ChartTypeTemplate.hxx>
#include <servicenames.hxx>
+#include <DataSource.hxx>
#include <DataSourceHelper.hxx>
#include <ChartModelHelper.hxx>
#include <DisposeHelper.hxx>
@@ -33,7 +35,9 @@
#include <ChartView.hxx>
#include <PopupRequest.hxx>
#include <ModifyListenerHelper.hxx>
+#include <RangeHighlighter.hxx>
#include <Diagram.hxx>
+#include <comphelper/dumpxmltostring.hxx>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart2/data/XPivotTableDataProvider.hpp>
@@ -45,7 +49,6 @@
#include <svl/numformat.hxx>
#include <svl/numuno.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/embed/EmbedMapUnits.hpp>
#include <com/sun/star/embed/Aspects.hpp>
@@ -55,10 +58,10 @@
#include <com/sun/star/document/DocumentProperties.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
-#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
#include <sal/log.hxx>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
#include <libxml/xmlwriter.h>
using ::com::sun::star::uno::Sequence;
@@ -68,14 +71,13 @@ using ::osl::MutexGuard;
using namespace ::com::sun::star;
using namespace ::apphelper;
-using namespace ::chart::CloneHelper;
namespace
{
-constexpr OUStringLiteral lcl_aGDIMetaFileMIMEType(
- u"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"");
-constexpr OUStringLiteral lcl_aGDIMetaFileMIMETypeHighContrast(
- u"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"");
+constexpr OUString lcl_aGDIMetaFileMIMEType(
+ u"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\""_ustr);
+constexpr OUString lcl_aGDIMetaFileMIMETypeHighContrast(
+ u"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\""_ustr);
} // anonymous namespace
@@ -84,7 +86,7 @@ constexpr OUStringLiteral lcl_aGDIMetaFileMIMETypeHighContrast(
namespace chart
{
-ChartModel::ChartModel(uno::Reference<uno::XComponentContext > const & xContext)
+ChartModel::ChartModel(uno::Reference<uno::XComponentContext > xContext)
: m_aLifeTimeManager( this, this )
, m_bReadOnly( false )
, m_bModified( false )
@@ -93,7 +95,7 @@ ChartModel::ChartModel(uno::Reference<uno::XComponentContext > const & xContext)
, mbTimeBased(false)
, m_aControllers( m_aModelMutex )
, m_nControllerLockCount(0)
- , m_xContext( xContext )
+ , m_xContext(std::move( xContext ))
, m_aVisualAreaSize( ChartModelHelper::getDefaultPageSize() )
, m_xPageBackground( new PageBackground )
, m_xXMLNamespaceMap( new NameContainer() )
@@ -149,20 +151,27 @@ ChartModel::ChartModel( const ChartModel & rOther )
m_xOldModelAgg->setDelegator( *this );
Reference< util::XModifyListener > xListener;
- Reference< chart2::XTitle > xNewTitle = CreateRefClone< chart2::XTitle >()( rOther.m_xTitle );
- rtl::Reference< ::chart::Diagram > xNewDiagram = new ::chart::Diagram( *rOther.m_xDiagram );
+ rtl::Reference< Title > xNewTitle;
+ if ( rOther.m_xTitle )
+ xNewTitle = new Title(*rOther.m_xTitle);
+ rtl::Reference< ::chart::Diagram > xNewDiagram;
+ if (rOther.m_xDiagram.is())
+ xNewDiagram = new ::chart::Diagram( *rOther.m_xDiagram );
rtl::Reference< ::chart::PageBackground > xNewPageBackground = new PageBackground( *rOther.m_xPageBackground );
- rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager; // does not implement XCloneable
- rtl::Reference< ::chart::NameContainer > xXMLNamespaceMap = new NameContainer( *rOther.m_xXMLNamespaceMap );
{
- MutexGuard aGuard( m_aModelMutex );
- xListener = this;
- m_xTitle = xNewTitle;
- m_xDiagram = xNewDiagram;
- m_xPageBackground = xNewPageBackground;
- m_xChartTypeManager = xChartTypeManager;
- m_xXMLNamespaceMap = xXMLNamespaceMap;
+ rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager; // does not implement XCloneable
+ rtl::Reference< ::chart::NameContainer > xXMLNamespaceMap = new NameContainer( *rOther.m_xXMLNamespaceMap );
+
+ {
+ MutexGuard aGuard( m_aModelMutex );
+ xListener = this;
+ m_xTitle = xNewTitle;
+ m_xDiagram = xNewDiagram;
+ m_xPageBackground = xNewPageBackground;
+ m_xChartTypeManager = std::move(xChartTypeManager);
+ m_xXMLNamespaceMap = std::move(xXMLNamespaceMap);
+ }
}
ModifyListenerHelper::addListener( xNewTitle, xListener );
@@ -246,16 +255,11 @@ uno::Reference< frame::XController > ChartModel::impl_getCurrentController()
void ChartModel::impl_notifyCloseListeners()
{
- ::comphelper::OInterfaceContainerHelper2* pIC = m_aLifeTimeManager.m_aListenerContainer
- .getContainer( cppu::UnoType<util::XCloseListener>::get());
- if( pIC )
+ std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex);
+ if( m_aLifeTimeManager.m_aCloseListeners.getLength(aGuard) )
{
lang::EventObject aEvent( static_cast< lang::XComponent*>(this) );
- ::comphelper::OInterfaceIteratorHelper2 aIt( *pIC );
- while( aIt.hasMoreElements() )
- {
- static_cast< util::XCloseListener* >( aIt.next() )->notifyClosing( aEvent );
- }
+ m_aLifeTimeManager.m_aCloseListeners.notifyEach(aGuard, &util::XCloseListener::notifyClosing, aEvent);
}
}
@@ -393,7 +397,11 @@ void SAL_CALL ChartModel::disconnectController( const uno::Reference< frame::XCo
if( m_xCurrentController == xController )
m_xCurrentController.clear();
- DisposeHelper::DisposeAndClear( m_xRangeHighlighter );
+ if (m_xRangeHighlighter)
+ {
+ m_xRangeHighlighter->dispose();
+ m_xRangeHighlighter.clear();
+ }
DisposeHelper::DisposeAndClear(m_xPopupRequest);
}
@@ -478,7 +486,11 @@ void SAL_CALL ChartModel::setCurrentController( const uno::Reference< frame::XCo
m_xCurrentController = xController;
- DisposeHelper::DisposeAndClear( m_xRangeHighlighter );
+ if (m_xRangeHighlighter)
+ {
+ m_xRangeHighlighter->dispose();
+ m_xRangeHighlighter.clear();
+ }
DisposeHelper::DisposeAndClear(m_xPopupRequest);
}
@@ -502,7 +514,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartModel::getCurrentSelection()
uno::Any aSel = xSelectionSupl->getSelection();
OUString aObjectCID;
if( aSel >>= aObjectCID )
- xReturn.set( ObjectIdentifier::getObjectPropertySet( aObjectCID, Reference< XChartDocument >(this)));
+ xReturn.set( ObjectIdentifier::getObjectPropertySet( aObjectCID, this));
}
}
return xReturn;
@@ -541,7 +553,7 @@ void SAL_CALL ChartModel::dispose()
m_xOwnNumberFormatsSupplier.clear();
m_xChartTypeManager.clear();
m_xDiagram.clear();
- DisposeHelper::DisposeAndClear( m_xTitle );
+ m_xTitle.clear();
m_xPageBackground.clear();
m_xXMLNamespaceMap.clear();
@@ -559,7 +571,11 @@ void SAL_CALL ChartModel::dispose()
m_aControllers.disposeAndClear( lang::EventObject( static_cast< cppu::OWeakObject * >( this )));
m_xCurrentController.clear();
- DisposeHelper::DisposeAndClear( m_xRangeHighlighter );
+ if (m_xRangeHighlighter)
+ {
+ m_xRangeHighlighter->dispose();
+ m_xRangeHighlighter.clear();
+ }
DisposeHelper::DisposeAndClear(m_xPopupRequest);
if( m_xOldModelAgg.is())
@@ -571,7 +587,8 @@ void SAL_CALL ChartModel::addEventListener( const uno::Reference< lang::XEventLi
if( m_aLifeTimeManager.impl_isDisposedOrClosed() )
return; //behave passive if already disposed or closed
- m_aLifeTimeManager.m_aListenerContainer.addInterface( cppu::UnoType<lang::XEventListener>::get(), xListener );
+ std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex);
+ m_aLifeTimeManager.m_aEventListeners.addInterface( aGuard, xListener );
}
void SAL_CALL ChartModel::removeEventListener( const uno::Reference< lang::XEventListener > & xListener )
@@ -579,7 +596,8 @@ void SAL_CALL ChartModel::removeEventListener( const uno::Reference< lang::XEven
if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) )
return; //behave passive if already disposed or closed
- m_aLifeTimeManager.m_aListenerContainer.removeInterface( cppu::UnoType<lang::XEventListener>::get(), xListener );
+ std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex);
+ m_aLifeTimeManager.m_aEventListeners.removeInterface( aGuard, xListener );
}
// util::XCloseBroadcaster (base of XCloseable)
@@ -593,7 +611,8 @@ void SAL_CALL ChartModel::removeCloseListener( const uno::Reference< util::XClos
if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) )
return; //behave passive if already disposed or closed
- m_aLifeTimeManager.m_aListenerContainer.removeInterface( cppu::UnoType<util::XCloseListener>::get(), xListener );
+ std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex);
+ m_aLifeTimeManager.m_aCloseListeners.removeInterface( aGuard, xListener );
}
// util::XCloseable
@@ -723,7 +742,7 @@ void SAL_CALL ChartModel::createInternalDataProvider( sal_Bool bCloneExistingDat
if( bCloneExistingData )
m_xInternalDataProvider = ChartModelHelper::createInternalDataProvider( this, true );
else
- m_xInternalDataProvider = ChartModelHelper::createInternalDataProvider( Reference<XChartDocument>(), true );
+ m_xInternalDataProvider = ChartModelHelper::createInternalDataProvider( nullptr, true );
m_xDataProvider.set( m_xInternalDataProvider );
}
setModified( true );
@@ -772,7 +791,7 @@ void SAL_CALL ChartModel::attachDataProvider( const uno::Reference< chart2::data
{
try
{
- bool bIncludeHiddenCells = ChartModelHelper::isIncludeHiddenCells( Reference< frame::XModel >(this) );
+ bool bIncludeHiddenCells = ChartModelHelper::isIncludeHiddenCells( this );
xProp->setPropertyValue("IncludeHiddenCells", uno::Any(bIncludeHiddenCells));
}
catch (const beans::UnknownPropertyException&)
@@ -836,10 +855,10 @@ void SAL_CALL ChartModel::setArguments( const Sequence< beans::PropertyValue >&
Reference< chart2::data::XDataSource > xDataSource( m_xDataProvider->createDataSource( aArguments ) );
if( xDataSource.is() )
{
- Reference< chart2::XDiagram > xDia( getFirstDiagram() );
+ rtl::Reference< Diagram > xDia = getFirstChartDiagram();
if( !xDia.is() )
{
- Reference< chart2::XChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() );
+ rtl::Reference< ::chart::ChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() );
if( xTemplate.is())
setFirstDiagram( xTemplate->createDiagramByDataSource( xDataSource, aArguments ) );
}
@@ -862,22 +881,18 @@ void SAL_CALL ChartModel::setArguments( const Sequence< beans::PropertyValue >&
Sequence< OUString > SAL_CALL ChartModel::getUsedRangeRepresentations()
{
- return DataSourceHelper::getUsedDataRanges( Reference< frame::XModel >(this));
+ return DataSourceHelper::getUsedDataRanges( this );
}
Reference< chart2::data::XDataSource > SAL_CALL ChartModel::getUsedData()
{
- return DataSourceHelper::getUsedData( Reference< chart2::XChartDocument >(this));
+ return DataSourceHelper::getUsedData( *this );
}
Reference< chart2::data::XRangeHighlighter > SAL_CALL ChartModel::getRangeHighlighter()
{
if( ! m_xRangeHighlighter.is())
- {
- uno::Reference< view::XSelectionSupplier > xSelSupp( getCurrentController(), uno::UNO_QUERY );
- if( xSelSupp.is() )
- m_xRangeHighlighter.set( ChartModelHelper::createRangeHighlighter( xSelSupp ));
- }
+ m_xRangeHighlighter = new RangeHighlighter( this );
return m_xRangeHighlighter;
}
@@ -888,11 +903,11 @@ Reference<awt::XRequestCallback> SAL_CALL ChartModel::getPopupRequest()
return m_xPopupRequest;
}
-Reference< chart2::XChartTypeTemplate > ChartModel::impl_createDefaultChartTypeTemplate()
+rtl::Reference< ::chart::ChartTypeTemplate > ChartModel::impl_createDefaultChartTypeTemplate()
{
- Reference< chart2::XChartTypeTemplate > xTemplate;
+ rtl::Reference< ::chart::ChartTypeTemplate > xTemplate;
if( m_xChartTypeManager.is() )
- xTemplate.set( m_xChartTypeManager->createInstance( "com.sun.star.chart2.template.Column" ), uno::UNO_QUERY );
+ xTemplate = m_xChartTypeManager->createTemplate( "com.sun.star.chart2.template.Column" );
return xTemplate;
}
@@ -930,7 +945,20 @@ uno::Reference< chart2::XTitle > SAL_CALL ChartModel::getTitleObject()
return m_xTitle;
}
-void SAL_CALL ChartModel::setTitleObject( const uno::Reference< chart2::XTitle >& xTitle )
+rtl::Reference< Title > ChartModel::getTitleObject2() const
+{
+ MutexGuard aGuard( m_aModelMutex );
+ return m_xTitle;
+}
+
+void SAL_CALL ChartModel::setTitleObject( const uno::Reference< chart2::XTitle >& xNewTitle )
+{
+ rtl::Reference<Title> xTitle = dynamic_cast<Title*>(xNewTitle.get());
+ assert(!xNewTitle || xTitle);
+ setTitleObject(xTitle);
+}
+
+void ChartModel::setTitleObject( const rtl::Reference< Title >& xTitle )
{
{
MutexGuard aGuard( m_aModelMutex );
@@ -1250,8 +1278,7 @@ void SAL_CALL ChartModel::setParent( const Reference< uno::XInterface >& Parent
// ____ XDataSource ____
uno::Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL ChartModel::getDataSequences()
{
- Reference< chart2::data::XDataSource > xSource(
- DataSourceHelper::getUsedData( uno::Reference< frame::XModel >(this) ) );
+ rtl::Reference< DataSource > xSource = DataSourceHelper::getUsedData( *this );
if( xSource.is())
return xSource->getDataSequences();
@@ -1259,12 +1286,17 @@ uno::Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL ChartM
}
//XDumper
-OUString SAL_CALL ChartModel::dump()
+OUString SAL_CALL ChartModel::dump(OUString const & kind)
{
+ if (kind.isEmpty()) {
+ return comphelper::dumpXmlToString([this](auto writer) { return dumpAsXml(writer); });
+ }
+
+ // kind == "shapes":
uno::Reference< qa::XDumper > xDumper(
createInstance( CHART_VIEW_SERVICE_NAME ), uno::UNO_QUERY );
if (xDumper.is())
- return xDumper->dump();
+ return xDumper->dump(kind);
return OUString();
}
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index 458d23b6283a..8d9e6076078a 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -27,8 +27,10 @@
#include <DataSourceHelper.hxx>
#include <AxisHelper.hxx>
#include <ThreeDHelper.hxx>
-#include <DiagramHelper.hxx>
+#include <Diagram.hxx>
#include <BaseCoordinateSystem.hxx>
+#include <Legend.hxx>
+#include <XMLFilter.hxx>
#include <com/sun/star/chart2/LegendPosition.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -44,8 +46,6 @@
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/io/TempFile.hpp>
-#include <com/sun/star/io/XSeekable.hpp>
#include <com/sun/star/ucb/CommandFailedException.hpp>
#include <com/sun/star/ucb/ContentCreationException.hpp>
@@ -53,12 +53,14 @@
#include <ucbhelper/content.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <unotools/tempfile.hxx>
+#include <utility>
#include <vcl/cvtgrf.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
#include <sfx2/objsh.hxx>
@@ -72,19 +74,6 @@ using ::osl::MutexGuard;
namespace
{
-struct lcl_PropNameEquals
-{
- explicit lcl_PropNameEquals( const OUString & rStrToCompareWith ) :
- m_aStr( rStrToCompareWith )
- {}
- bool operator() ( const beans::PropertyValue & rProp )
- {
- return rProp.Name == m_aStr;
- }
-private:
- OUString m_aStr;
-};
-
template< typename T >
T lcl_getProperty(
const Sequence< beans::PropertyValue > & rMediaDescriptor,
@@ -93,10 +82,9 @@ T lcl_getProperty(
T aResult;
if( rMediaDescriptor.hasElements())
{
- const beans::PropertyValue * pIt = rMediaDescriptor.getConstArray();
- const beans::PropertyValue * pEndIt = pIt + + rMediaDescriptor.getLength();
- pIt = std::find_if( pIt, pEndIt, lcl_PropNameEquals( rPropName ));
- if( pIt != pEndIt )
+ auto pIt = std::find_if(rMediaDescriptor.begin(), rMediaDescriptor.end(),
+ [&rPropName](auto& prop) { return prop.Name == rPropName; });
+ if (pIt != rMediaDescriptor.end())
(*pIt).Value >>= aResult;
}
return aResult;
@@ -198,10 +186,7 @@ Reference< document::XFilter > ChartModel::impl_createFilter(
if( ! xFilter.is())
{
SAL_WARN("chart2", "No FilterName passed in MediaDescriptor" );
- xFilter.set(
- m_xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.comp.chart2.XMLFilter", m_xContext ),
- uno::UNO_QUERY_THROW );
+ xFilter = new XMLFilter(m_xContext);
}
return xFilter;
@@ -302,8 +287,7 @@ void SAL_CALL ChartModel::storeToURL(
{
if( m_xContext.is() && aMediaDescriptorHelper.ISSET_OutputStream )
{
- Reference< io::XStream > xStream(
- io::TempFile::create(m_xContext), uno::UNO_QUERY_THROW );
+ rtl::Reference< utl::TempFileFastService > xStream = new utl::TempFileFastService;
Reference< io::XInputStream > xInputStream( xStream->getInputStream());
Reference< embed::XStorage > xStorage(
@@ -312,8 +296,7 @@ void SAL_CALL ChartModel::storeToURL(
{
impl_store( aReducedMediaDescriptor, xStorage );
- Reference< io::XSeekable > xSeekable( xStream, uno::UNO_QUERY_THROW );
- xSeekable->seek( 0 );
+ xStream->seek( 0 );
::comphelper::OStorageHelper::CopyInputToOutput( xInputStream, aMediaDescriptorHelper.OutputStream );
}
}
@@ -387,7 +370,7 @@ void ChartModel::insertDefaultChart()
try
{
// create default chart
- Reference< chart2::XChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() );
+ rtl::Reference< ::chart::ChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() );
if( xTemplate.is())
{
try
@@ -402,7 +385,7 @@ void ChartModel::insertDefaultChart()
beans::PropertyState_DIRECT_VALUE ) };
}
- Reference< chart2::XDiagram > xDiagram( xTemplate->createDiagramByDataSource( xDataSource, aParam ) );
+ rtl::Reference< Diagram > xDiagram( xTemplate->createDiagramByDataSource2( xDataSource, aParam ) );
setFirstDiagram( xDiagram );
@@ -412,30 +395,23 @@ void ChartModel::insertDefaultChart()
AxisHelper::setRTLAxisLayout( AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 ) );
// create and attach legend
- Reference< chart2::XLegend > xLegend(
- m_xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.chart2.Legend", m_xContext ), uno::UNO_QUERY_THROW );
- Reference< beans::XPropertySet > xLegendProperties( xLegend, uno::UNO_QUERY );
- if( xLegendProperties.is() )
- {
- xLegendProperties->setPropertyValue( "FillStyle", uno::Any( drawing::FillStyle_NONE ));
- xLegendProperties->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_NONE ));
- xLegendProperties->setPropertyValue( "LineColor", uno::Any( static_cast< sal_Int32 >( 0xb3b3b3 ) )); // gray30
- xLegendProperties->setPropertyValue( "FillColor", uno::Any( static_cast< sal_Int32 >( 0xe6e6e6 ) ) ); // gray10
+ rtl::Reference< Legend > xLegend = new Legend();
+ xLegend->setPropertyValue( "FillStyle", uno::Any( drawing::FillStyle_NONE ));
+ xLegend->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_NONE ));
+ xLegend->setPropertyValue( "LineColor", uno::Any( static_cast< sal_Int32 >( 0xb3b3b3 ) )); // gray30
+ xLegend->setPropertyValue( "FillColor", uno::Any( static_cast< sal_Int32 >( 0xe6e6e6 ) ) ); // gray10
- if( bIsRTL )
- xLegendProperties->setPropertyValue( "AnchorPosition", uno::Any( chart2::LegendPosition_LINE_START ));
- }
+ if( bIsRTL )
+ xLegend->setPropertyValue( "AnchorPosition", uno::Any( chart2::LegendPosition_LINE_START ));
if(xDiagram.is())
xDiagram->setLegend( xLegend );
// set simple 3D look
- Reference< beans::XPropertySet > xDiagramProperties( xDiagram, uno::UNO_QUERY );
- if( xDiagramProperties.is() )
+ if( xDiagram.is() )
{
- xDiagramProperties->setPropertyValue( "RightAngledAxes", uno::Any( true ));
- xDiagramProperties->setPropertyValue( "D3DScenePerspective", uno::Any( drawing::ProjectionMode_PARALLEL ));
- ThreeDHelper::setScheme( xDiagram, ThreeDLookScheme::ThreeDLookScheme_Realistic );
+ xDiagram->setPropertyValue( "RightAngledAxes", uno::Any( true ));
+ xDiagram->setPropertyValue( "D3DScenePerspective", uno::Any( drawing::ProjectionMode_PARALLEL ));
+ xDiagram->setScheme( ThreeDLookScheme::ThreeDLookScheme_Realistic );
}
//set some new 'defaults' for wall and floor
@@ -645,16 +621,11 @@ void ChartModel::impl_notifyModifiedListeners()
//always notify the view first!
ChartViewHelper::setViewToDirtyState( this );
- ::comphelper::OInterfaceContainerHelper2* pIC = m_aLifeTimeManager.m_aListenerContainer
- .getContainer( cppu::UnoType<util::XModifyListener>::get());
- if( pIC )
+ std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex);
+ if( m_aLifeTimeManager.m_aModifyListeners.getLength(aGuard) )
{
lang::EventObject aEvent( static_cast< lang::XComponent*>(this) );
- ::comphelper::OInterfaceIteratorHelper2 aIt( *pIC );
- while( aIt.hasMoreElements() )
- {
- static_cast< util::XModifyListener* >( aIt.next() )->modified( aEvent );
- }
+ m_aLifeTimeManager.m_aModifyListeners.notifyEach(aGuard, &util::XModifyListener::modified, aEvent);
}
}
@@ -683,7 +654,8 @@ void SAL_CALL ChartModel::setModified( sal_Bool bModified )
if( m_nControllerLockCount > 0 )
{
- m_bUpdateNotificationsPending = true;
+ if (bModified)
+ m_bUpdateNotificationsPending = true; // Maybe !bModified should reset it?
return;//don't call listeners if controllers are locked
}
aGuard.clear();
@@ -699,8 +671,8 @@ void SAL_CALL ChartModel::addModifyListener(
if( m_aLifeTimeManager.impl_isDisposedOrClosed() )
return; //behave passive if already disposed or closed
- m_aLifeTimeManager.m_aListenerContainer.addInterface(
- cppu::UnoType<util::XModifyListener>::get(), xListener );
+ std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex);
+ m_aLifeTimeManager.m_aModifyListeners.addInterface( aGuard, xListener );
}
void SAL_CALL ChartModel::removeModifyListener(
@@ -709,8 +681,8 @@ void SAL_CALL ChartModel::removeModifyListener(
if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) )
return; //behave passive if already disposed or closed
- m_aLifeTimeManager.m_aListenerContainer.removeInterface(
- cppu::UnoType<util::XModifyListener>::get(), xListener );
+ std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex);
+ m_aLifeTimeManager.m_aModifyListeners.removeInterface( aGuard, xListener );
}
// util::XModifyListener
@@ -728,9 +700,9 @@ void SAL_CALL ChartModel::modified( const lang::EventObject& rEvenObject)
Reference<chart2::data::XDataSource> xDataSource(xDataProvider->createDataSource(aArguments));
rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = getTypeManager();
- Reference<chart2::XDiagram> xDiagram(getFirstDiagram());
+ rtl::Reference<Diagram> xDiagram(getFirstChartDiagram());
- DiagramHelper::tTemplateWithServiceName aTemplateAndService = DiagramHelper::getTemplateForDiagram(xDiagram, xChartTypeManager);
+ Diagram::tTemplateWithServiceName aTemplateAndService = xDiagram->getTemplate(xChartTypeManager);
aTemplateAndService.xChartTypeTemplate->changeDiagramData(xDiagram, xDataSource, aArguments);
}
catch (const uno::Exception &)
@@ -779,16 +751,14 @@ Reference< embed::XStorage > SAL_CALL ChartModel::getDocumentStorage()
void ChartModel::impl_notifyStorageChangeListeners()
{
- ::comphelper::OInterfaceContainerHelper2* pIC = m_aLifeTimeManager.m_aListenerContainer
- .getContainer( cppu::UnoType<document::XStorageChangeListener>::get());
- if( pIC )
+ std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex);
+ if( m_aLifeTimeManager.m_aStorageChangeListeners.getLength(aGuard) )
{
- ::comphelper::OInterfaceIteratorHelper2 aIt( *pIC );
- while( aIt.hasMoreElements() )
- {
- static_cast< document::XStorageChangeListener* >( aIt.next() )
- ->notifyStorageChange( static_cast< ::cppu::OWeakObject* >( this ), m_xStorage );
- }
+ m_aLifeTimeManager.m_aStorageChangeListeners.forEach(aGuard,
+ [this](const uno::Reference<document::XStorageChangeListener>& l)
+ {
+ l->notifyStorageChange( static_cast< ::cppu::OWeakObject* >( this ), m_xStorage );
+ });
}
}
@@ -797,8 +767,8 @@ void SAL_CALL ChartModel::addStorageChangeListener( const Reference< document::X
if( m_aLifeTimeManager.impl_isDisposedOrClosed() )
return; //behave passive if already disposed or closed
- m_aLifeTimeManager.m_aListenerContainer.addInterface(
- cppu::UnoType<document::XStorageChangeListener>::get(), xListener );
+ std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex);
+ m_aLifeTimeManager.m_aStorageChangeListeners.addInterface( aGuard, xListener );
}
void SAL_CALL ChartModel::removeStorageChangeListener( const Reference< document::XStorageChangeListener >& xListener )
@@ -806,8 +776,8 @@ void SAL_CALL ChartModel::removeStorageChangeListener( const Reference< document
if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) )
return; //behave passive if already disposed or closed
- m_aLifeTimeManager.m_aListenerContainer.removeInterface(
- cppu::UnoType<document::XStorageChangeListener>::get(), xListener );
+ std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex);
+ m_aLifeTimeManager.m_aStorageChangeListeners.removeInterface(aGuard, xListener );
}
} // namespace chart
diff --git a/chart2/source/model/main/DataPoint.cxx b/chart2/source/model/main/DataPoint.cxx
index a5838c91f5d5..d6c8a9e2ac3b 100644
--- a/chart2/source/model/main/DataPoint.cxx
+++ b/chart2/source/model/main/DataPoint.cxx
@@ -26,7 +26,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <algorithm>
@@ -39,45 +39,21 @@ using ::com::sun::star::beans::Property;
namespace
{
-struct StaticDataPointInfoHelper_Initializer
+::cppu::OPropertyArrayHelper& StaticDataPointInfoHelper()
{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- ::chart::DataPointProperties::AddPropertiesToVector( aProperties );
- ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-};
-
-struct StaticDataPointInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticDataPointInfoHelper_Initializer >
-{
-};
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ ::chart::DataPointProperties::AddPropertiesToVector( aProperties );
+ ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-struct StaticDataPointInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticDataPointInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticDataPointInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticDataPointInfo_Initializer >
-{
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -86,7 +62,6 @@ namespace chart
{
DataPoint::DataPoint( const uno::Reference< beans::XPropertySet > & rParentProperties ) :
- ::property::OPropertySet( m_aMutex ),
m_xParentProperties( rParentProperties ),
m_xModifyEventForwarder( new ModifyEventForwarder() ),
m_bNoParentPropAllowed( false )
@@ -96,7 +71,7 @@ DataPoint::DataPoint( const uno::Reference< beans::XPropertySet > & rParentPrope
DataPoint::DataPoint( const DataPoint & rOther ) :
impl::DataPoint_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_xModifyEventForwarder( new ModifyEventForwarder() ),
m_bNoParentPropAllowed( true )
{
@@ -209,13 +184,15 @@ void SAL_CALL DataPoint::setFastPropertyValue_NoBroadcast(
::cppu::IPropertyArrayHelper & SAL_CALL DataPoint::getInfoHelper()
{
- return *StaticDataPointInfoHelper::get();
+ return StaticDataPointInfoHelper();
}
// ____ XPropertySet ____
Reference< beans::XPropertySetInfo > SAL_CALL DataPoint::getPropertySetInfo()
{
- return *StaticDataPointInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticDataPointInfoHelper() ) );
+ return xPropertySetInfo;
}
// ____ XModifyBroadcaster ____
diff --git a/chart2/source/model/main/DataPoint.hxx b/chart2/source/model/main/DataPoint.hxx
index 52feb197d354..ba94449fff94 100644
--- a/chart2/source/model/main/DataPoint.hxx
+++ b/chart2/source/model/main/DataPoint.hxx
@@ -18,7 +18,6 @@
*/
#pragma once
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/weakref.hxx>
#include <comphelper/uno3.hxx>
@@ -44,7 +43,6 @@ typedef ::cppu::WeakImplHelper<
}
class DataPoint final :
- public cppu::BaseMutex,
public impl::DataPoint_Base,
public ::property::OPropertySet
{
diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx
index 267bf9014dca..c27407c98fca 100644
--- a/chart2/source/model/main/DataPointProperties.cxx
+++ b/chart2/source/model/main/DataPointProperties.cxx
@@ -30,11 +30,14 @@
#include <com/sun/star/drawing/BitmapMode.hpp>
#include <com/sun/star/drawing/RectanglePoint.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
+#include <com/sun/star/chart2/RelativeSize.hpp>
#include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
+#include <tools/color.hxx>
+
using namespace ::com::sun::star;
using ::com::sun::star::beans::Property;
@@ -445,13 +448,18 @@ void DataPointProperties::AddPropertiesToVector(
cppu::UnoType<chart2::RelativePosition>::get(),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEVOID );
+
+ rOutProperties.emplace_back("CustomLabelSize", PROP_DATAPOINT_LABEL_CUSTOM_SIZE,
+ cppu::UnoType<chart2::RelativeSize>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEVOID);
}
void DataPointProperties::AddDefaultsToMap(
::chart::tPropertyValueMap & rOutMap )
{
- PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DATAPOINT_COLOR, 0x0099ccff ); // blue 8
- PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_DATAPOINT_TRANSPARENCY, 0 );
+ PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_COLOR, Color(0x99, 0xcc, 0xff) ); // blue 8
+ PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_TRANSPARENCY, sal_Int16(0) );
//fill
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_FILL_STYLE, drawing::FillStyle_SOLID );
@@ -462,29 +470,29 @@ void DataPointProperties::AddDefaultsToMap(
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_FILL_BACKGROUND, false );
//border
- PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DATAPOINT_BORDER_COLOR, 0x000000 ); // black
+ PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_BORDER_COLOR, COL_BLACK );
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_BORDER_STYLE, drawing::LineStyle_SOLID ); // drawing::LineStyle_NONE
- PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DATAPOINT_BORDER_WIDTH, 0 );
+ PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_BORDER_WIDTH, sal_Int32(0) );
PropertyHelper::setEmptyPropertyValueDefault( rOutMap, PROP_DATAPOINT_BORDER_DASH_NAME );
- PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_DATAPOINT_BORDER_TRANSPARENCY, 0 );
+ PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_BORDER_TRANSPARENCY, sal_Int16(0) );
//line
PropertyHelper::setPropertyValueDefault( rOutMap, LinePropertiesHelper::PROP_LINE_STYLE, drawing::LineStyle_SOLID );
- PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, LinePropertiesHelper::PROP_LINE_WIDTH, 0 );
+ PropertyHelper::setPropertyValueDefault( rOutMap, LinePropertiesHelper::PROP_LINE_WIDTH, sal_Int32(0) );
PropertyHelper::setPropertyValueDefault( rOutMap, LinePropertiesHelper::PROP_LINE_DASH, drawing::LineDash());
PropertyHelper::setEmptyPropertyValueDefault( rOutMap, LinePropertiesHelper::PROP_LINE_DASH_NAME );
PropertyHelper::setPropertyValueDefault( rOutMap, LinePropertiesHelper::PROP_LINE_CAP, drawing::LineCap_BUTT);
//fill bitmap
- PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_BITMAP_OFFSETX, 0 );
- PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_BITMAP_OFFSETY, 0 );
- PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETX, 0 );
- PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETY, 0 );
+ PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_OFFSETX, sal_Int16(0) );
+ PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_OFFSETY, sal_Int16(0) );
+ PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETX, sal_Int16(0) );
+ PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETY, sal_Int16(0) );
PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_RECTANGLEPOINT, drawing::RectanglePoint_MIDDLE_MIDDLE );
PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_LOGICALSIZE, true );
- PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, FillProperties::PROP_FILL_BITMAP_SIZEX, 0 );
- PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, FillProperties::PROP_FILL_BITMAP_SIZEY, 0 );
+ PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_SIZEX, sal_Int32(0) );
+ PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_SIZEY, sal_Int32(0) );
PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_MODE, drawing::BitmapMode_REPEAT );
//others
@@ -492,19 +500,19 @@ void DataPointProperties::AddDefaultsToMap(
aSymbProp.Style = chart2::SymbolStyle_NONE;
aSymbProp.StandardSymbol = 0;
aSymbProp.Size = awt::Size( 250, 250 ); // ca. 7pt x 7pt (7pt=246.94)
- aSymbProp.BorderColor = 0x000000; // Black
+ aSymbProp.BorderColor = sal_Int32(COL_BLACK);
aSymbProp.FillColor = 0xee4000; // OrangeRed2
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_SYMBOL_PROP, aSymbProp );
- PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_DATAPOINT_OFFSET, 0.0 );
+ PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_OFFSET, 0.0 );
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_GEOMETRY3D, chart2::DataPointGeometry3D::CUBOID );
//@todo maybe choose a different one here -> should be dynamically that of the attached axis
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_ERROR_BAR_X, uno::Reference< beans::XPropertySet >());
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_ERROR_BAR_Y, uno::Reference< beans::XPropertySet >());
- PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_DATAPOINT_PERCENT_DIAGONAL, 0 );
+ PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_PERCENT_DIAGONAL, sal_Int16(0) );
- PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_DATAPOINT_TEXT_ROTATION, 0.0 );
+ PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_TEXT_ROTATION, 0.0 );
PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_LINK_NUMBERFORMAT_TO_SOURCE, true);
@@ -521,17 +529,17 @@ void DataPointProperties::AddDefaultsToMap(
));
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_TEXT_WORD_WRAP, false );
- PropertyHelper::setPropertyValueDefault< OUString >( rOutMap, PROP_DATAPOINT_LABEL_SEPARATOR, " " );
- PropertyHelper::setPropertyValueDefault<sal_Int32>(rOutMap, PROP_DATAPOINT_LABEL_BORDER_STYLE, sal_Int32(drawing::LineStyle_NONE));
+ PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_LABEL_SEPARATOR, OUString(" ") );
+ PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_STYLE, drawing::LineStyle_NONE);
PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_COLOR);
PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_FILL_STYLE);
PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_FILL_COLOR);
PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_FILL_BACKGROUND);
PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_FILL_HATCH_NAME);
- PropertyHelper::setPropertyValueDefault<sal_Int32>(rOutMap, PROP_DATAPOINT_LABEL_BORDER_WIDTH, 0);
+ PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_WIDTH, sal_Int32(0));
PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_DASH, drawing::LineDash());
PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_DASH_NAME);
- PropertyHelper::setPropertyValueDefault<sal_Int16>(rOutMap, PROP_DATAPOINT_LABEL_BORDER_TRANS, 0);
+ PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_TRANS, sal_Int16(0));
uno::Sequence<uno::Reference<chart2::XDataPointCustomLabelField>> aFields(0);
PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_CUSTOM_LABEL_FIELDS, aFields);
diff --git a/chart2/source/model/main/DataPointProperties.hxx b/chart2/source/model/main/DataPointProperties.hxx
index ada7907b888f..1689322148d8 100644
--- a/chart2/source/model/main/DataPointProperties.hxx
+++ b/chart2/source/model/main/DataPointProperties.hxx
@@ -87,7 +87,8 @@ namespace DataPointProperties
PROP_DATAPOINT_LABEL_BORDER_DASH_NAME,
PROP_DATAPOINT_LABEL_BORDER_TRANS,
PROP_DATAPOINT_CUSTOM_LABEL_FIELDS,
- PROP_DATAPOINT_LABEL_CUSTOM_POS
+ PROP_DATAPOINT_LABEL_CUSTOM_POS,
+ PROP_DATAPOINT_LABEL_CUSTOM_SIZE
// additionally some properties from ::chart::LineProperties
};
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index d6aa5eebe3e9..38f2c474b47a 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -18,20 +18,22 @@
*/
#include <DataSeries.hxx>
-#include "DataSeriesProperties.hxx"
+#include <DataSeriesProperties.hxx>
#include "DataPointProperties.hxx"
#include <CharacterProperties.hxx>
#include <UserDefinedProperties.hxx>
#include "DataPoint.hxx"
#include <DataSeriesHelper.hxx>
#include <CloneHelper.hxx>
+#include <RegressionCurveModel.hxx>
#include <ModifyListenerHelper.hxx>
-#include <EventListenerHelper.hxx>
+#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
#include <com/sun/star/container/NoSuchElementException.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <rtl/ref.hxx>
+#include <rtl/ustrbuf.hxx>
#include <algorithm>
@@ -44,46 +46,43 @@ using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Reference;
using ::osl::MutexGuard;
-namespace
+namespace chart
{
-
-struct StaticDataSeriesDefaults : public rtl::StaticWithInit< ::chart::tPropertyValueMap, StaticDataSeriesDefaults >
+const ::chart::tPropertyValueMap & StaticDataSeriesDefaults()
{
- ::chart::tPropertyValueMap operator()()
- {
- ::chart::tPropertyValueMap aStaticDefaults;
- ::chart::DataSeriesProperties::AddDefaultsToMap( aStaticDefaults );
- ::chart::CharacterProperties::AddDefaultsToMap( aStaticDefaults );
- float fDefaultCharHeight = 10.0;
- ::chart::PropertyHelper::setPropertyValue( aStaticDefaults, ::chart::CharacterProperties::PROP_CHAR_CHAR_HEIGHT, fDefaultCharHeight );
- ::chart::PropertyHelper::setPropertyValue( aStaticDefaults, ::chart::CharacterProperties::PROP_CHAR_ASIAN_CHAR_HEIGHT, fDefaultCharHeight );
- ::chart::PropertyHelper::setPropertyValue( aStaticDefaults, ::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultCharHeight );
- return aStaticDefaults;
- }
+ static const ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ ::chart::tPropertyValueMap aMap;
+ ::chart::DataSeriesProperties::AddDefaultsToMap( aMap );
+ ::chart::CharacterProperties::AddDefaultsToMap( aMap );
+ float fDefaultCharHeight = 10.0;
+ ::chart::PropertyHelper::setPropertyValue( aMap, ::chart::CharacterProperties::PROP_CHAR_CHAR_HEIGHT, fDefaultCharHeight );
+ ::chart::PropertyHelper::setPropertyValue( aMap, ::chart::CharacterProperties::PROP_CHAR_ASIAN_CHAR_HEIGHT, fDefaultCharHeight );
+ ::chart::PropertyHelper::setPropertyValue( aMap, ::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultCharHeight );
+ return aMap;
+ }();
+ return aStaticDefaults;
};
+} // namespace chart
-struct StaticDataSeriesInfoHelper : public rtl::StaticWithInit< ::cppu::OPropertyArrayHelper, StaticDataSeriesInfoHelper, StaticDataSeriesInfoHelper, uno::Sequence< Property > >
+namespace
{
- uno::Sequence< Property > operator()()
- {
- std::vector< css::beans::Property > aProperties;
- ::chart::DataSeriesProperties::AddPropertiesToVector( aProperties );
- ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
+::cppu::OPropertyArrayHelper& StaticDataSeriesInfoHelper()
+{
+ static ::cppu::OPropertyArrayHelper oHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ ::chart::DataSeriesProperties::AddPropertiesToVector( aProperties );
+ ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- return comphelper::containerToSequence( aProperties );
- }
-};
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticDataSeriesInfo : public rtl::StaticWithInit< uno::Reference< beans::XPropertySetInfo >, StaticDataSeriesInfo >
-{
- uno::Reference< beans::XPropertySetInfo > operator()()
- {
- return ::cppu::OPropertySetHelper::createPropertySetInfo(StaticDataSeriesInfoHelper::get() );
- }
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return oHelper;
};
void lcl_SetParent(
@@ -127,24 +126,22 @@ namespace chart
{
DataSeries::DataSeries() :
- ::property::OPropertySet( m_aMutex ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
}
DataSeries::DataSeries( const DataSeries & rOther ) :
impl::DataSeries_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
if( ! rOther.m_aDataSequences.empty())
{
- CloneHelper::CloneRefVector<css::chart2::data::XLabeledDataSequence>(
- rOther.m_aDataSequences, m_aDataSequences );
+ CloneHelper::CloneRefVector(rOther.m_aDataSequences, m_aDataSequences );
ModifyListenerHelper::addListenerToAllElements( m_aDataSequences, m_xModifyEventForwarder );
}
- CloneHelper::CloneRefVector< chart2::XRegressionCurve >( rOther.m_aRegressionCurves, m_aRegressionCurves );
+ CloneHelper::CloneRefVector( rOther.m_aRegressionCurves, m_aRegressionCurves );
ModifyListenerHelper::addListenerToAllElements( m_aRegressionCurves, m_xModifyEventForwarder );
// add as listener to XPropertySet properties
@@ -165,9 +162,6 @@ DataSeries::DataSeries( const DataSeries & rOther ) :
// late initialization to call after copy-constructing
void DataSeries::Init( const DataSeries & rOther )
{
- if( ! rOther.m_aDataSequences.empty())
- EventListenerHelper::addListenerToAllElements( m_aDataSequences, this );
-
Reference< uno::XInterface > xThisInterface( static_cast< ::cppu::OWeakObject * >( this ));
if( ! rOther.m_aAttributedDataPoints.empty())
{
@@ -232,7 +226,7 @@ uno::Reference< util::XCloneable > SAL_CALL DataSeries::createClone()
// ____ OPropertySet ____
void DataSeries::GetDefaultValue( sal_Int32 nHandle, uno::Any& rDest ) const
{
- const tPropertyValueMap& rStaticDefaults = StaticDataSeriesDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticDataSeriesDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rDest.clear();
@@ -243,13 +237,15 @@ void DataSeries::GetDefaultValue( sal_Int32 nHandle, uno::Any& rDest ) const
// ____ OPropertySet ____
::cppu::IPropertyArrayHelper & SAL_CALL DataSeries::getInfoHelper()
{
- return StaticDataSeriesInfoHelper::get();
+ return StaticDataSeriesInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL DataSeries::getPropertySetInfo()
{
- return StaticDataSeriesInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropSetInfo =
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticDataSeriesInfoHelper() );
+ return xPropSetInfo;
}
void SAL_CALL DataSeries::getFastPropertyValue
@@ -300,13 +296,13 @@ Reference< beans::XPropertySet >
{
Reference< beans::XPropertySet > xResult;
- Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSequences;
{
MutexGuard aGuard( m_aMutex );
- aSequences = comphelper::containerToSequence( m_aDataSequences );
+ aSequences = m_aDataSequences;
}
- std::vector< Reference< chart2::data::XLabeledDataSequence > > aValuesSeries(
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aValuesSeries(
DataSeriesHelper::getAllDataSequencesByRole( aSequences , "values" ) );
if (aValuesSeries.empty())
@@ -388,18 +384,34 @@ void SAL_CALL DataSeries::setData( const uno::Sequence< Reference< chart2::data:
tDataSequenceContainer aOldDataSequences;
tDataSequenceContainer aNewDataSequences;
Reference< util::XModifyListener > xModifyEventForwarder;
- Reference< lang::XEventListener > xListener;
{
MutexGuard aGuard( m_aMutex );
xModifyEventForwarder = m_xModifyEventForwarder;
- xListener = this;
std::swap( aOldDataSequences, m_aDataSequences );
- aNewDataSequences = comphelper::sequenceToContainer<tDataSequenceContainer>( aData );
+ for (const auto & i : aData)
+ {
+ aNewDataSequences.push_back(i);
+ }
+ m_aDataSequences = aNewDataSequences;
+ }
+ ModifyListenerHelper::removeListenerFromAllElements( aOldDataSequences, xModifyEventForwarder );
+ ModifyListenerHelper::addListenerToAllElements( aNewDataSequences, xModifyEventForwarder );
+ fireModifyEvent();
+}
+
+void DataSeries::setData( const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > >& aData )
+{
+ tDataSequenceContainer aOldDataSequences;
+ tDataSequenceContainer aNewDataSequences;
+ Reference< util::XModifyListener > xModifyEventForwarder;
+ {
+ MutexGuard aGuard( m_aMutex );
+ xModifyEventForwarder = m_xModifyEventForwarder;
+ std::swap( aOldDataSequences, m_aDataSequences );
+ aNewDataSequences = aData;
m_aDataSequences = aNewDataSequences;
}
ModifyListenerHelper::removeListenerFromAllElements( aOldDataSequences, xModifyEventForwarder );
- EventListenerHelper::removeListenerFromAllElements( aOldDataSequences, xListener );
- EventListenerHelper::addListenerToAllElements( aNewDataSequences, xListener );
ModifyListenerHelper::addListenerToAllElements( aNewDataSequences, xModifyEventForwarder );
fireModifyEvent();
}
@@ -408,23 +420,25 @@ void SAL_CALL DataSeries::setData( const uno::Sequence< Reference< chart2::data:
Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL DataSeries::getDataSequences()
{
MutexGuard aGuard( m_aMutex );
- return comphelper::containerToSequence( m_aDataSequences );
+ return comphelper::containerToSequence<Reference< chart2::data::XLabeledDataSequence >>( m_aDataSequences );
}
// ____ XRegressionCurveContainer ____
void SAL_CALL DataSeries::addRegressionCurve(
const uno::Reference< chart2::XRegressionCurve >& xRegressionCurve )
{
+ auto pRegressionCurve = dynamic_cast<RegressionCurveModel*>(xRegressionCurve.get());
+ assert(pRegressionCurve);
Reference< util::XModifyListener > xModifyEventForwarder;
{
MutexGuard aGuard( m_aMutex );
xModifyEventForwarder = m_xModifyEventForwarder;
- if( std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), xRegressionCurve )
+ if( std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), pRegressionCurve )
!= m_aRegressionCurves.end())
throw lang::IllegalArgumentException("curve not found", static_cast<cppu::OWeakObject*>(this), 1);
- m_aRegressionCurves.push_back( xRegressionCurve );
+ m_aRegressionCurves.push_back( pRegressionCurve );
}
- ModifyListenerHelper::addListener( xRegressionCurve, xModifyEventForwarder );
+ ModifyListenerHelper::addListener( rtl::Reference<RegressionCurveModel>(pRegressionCurve), xModifyEventForwarder );
fireModifyEvent();
}
@@ -433,13 +447,15 @@ void SAL_CALL DataSeries::removeRegressionCurve(
{
if( !xRegressionCurve.is() )
throw container::NoSuchElementException();
+ auto pRegressionCurve = dynamic_cast<RegressionCurveModel*>(xRegressionCurve.get());
+ assert(pRegressionCurve);
Reference< util::XModifyListener > xModifyEventForwarder;
{
MutexGuard aGuard( m_aMutex );
xModifyEventForwarder = m_xModifyEventForwarder;
tRegressionCurveContainerType::iterator aIt(
- std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), xRegressionCurve ) );
+ std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), pRegressionCurve ) );
if( aIt == m_aRegressionCurves.end())
throw container::NoSuchElementException(
"The given regression curve is no element of this series",
@@ -447,21 +463,27 @@ void SAL_CALL DataSeries::removeRegressionCurve(
m_aRegressionCurves.erase( aIt );
}
- ModifyListenerHelper::removeListener( xRegressionCurve, xModifyEventForwarder );
+ ModifyListenerHelper::removeListener( rtl::Reference<RegressionCurveModel>(pRegressionCurve), xModifyEventForwarder );
fireModifyEvent();
}
uno::Sequence< uno::Reference< chart2::XRegressionCurve > > SAL_CALL DataSeries::getRegressionCurves()
{
MutexGuard aGuard( m_aMutex );
- return comphelper::containerToSequence( m_aRegressionCurves );
+ return comphelper::containerToSequence<uno::Reference< chart2::XRegressionCurve >>( m_aRegressionCurves );
}
void SAL_CALL DataSeries::setRegressionCurves(
const Sequence< Reference< chart2::XRegressionCurve > >& aRegressionCurves )
{
tRegressionCurveContainerType aOldCurves;
- auto aNewCurves( comphelper::sequenceToContainer<tRegressionCurveContainerType>( aRegressionCurves ) );
+ tRegressionCurveContainerType aNewCurves;
+ for (const auto & i : aRegressionCurves)
+ {
+ auto pRegressionCurve = dynamic_cast<RegressionCurveModel*>(i.get());
+ assert(pRegressionCurve);
+ aNewCurves.push_back(pRegressionCurve);
+ }
Reference< util::XModifyListener > xModifyEventForwarder;
{
MutexGuard aGuard( m_aMutex );
@@ -492,13 +514,8 @@ void SAL_CALL DataSeries::modified( const lang::EventObject& aEvent )
}
// ____ XEventListener (base of XModifyListener) ____
-void SAL_CALL DataSeries::disposing( const lang::EventObject& rEventObject )
+void SAL_CALL DataSeries::disposing( const lang::EventObject& )
{
- // forget disposed data sequences
- tDataSequenceContainer::iterator aIt(
- std::find( m_aDataSequences.begin(), m_aDataSequences.end(), rEventObject.Source ));
- if( aIt != m_aDataSequences.end())
- m_aDataSequences.erase( aIt );
}
// ____ OPropertySet ____
@@ -537,6 +554,173 @@ css::uno::Sequence< OUString > SAL_CALL DataSeries::getSupportedServiceNames()
"com.sun.star.beans.PropertySet" };
}
+static Reference< chart2::data::XLabeledDataSequence > lcl_findLSequenceWithOnlyLabel(
+ const Sequence< Reference< chart2::data::XLabeledDataSequence > > & rDataSequences )
+{
+ Reference< chart2::data::XLabeledDataSequence > xResult;
+
+ for( auto const & labeledData : rDataSequences )
+ {
+ OSL_ENSURE( labeledData.is(), "empty LabeledDataSequence" );
+ // no values are set but a label exists
+ if( labeledData.is() &&
+ ( ! labeledData->getValues().is() &&
+ labeledData->getLabel().is()))
+ {
+ xResult.set( labeledData );
+ break;
+ }
+ }
+
+ return xResult;
+}
+
+static OUString lcl_getDataSequenceLabel( const Reference< chart2::data::XDataSequence > & xSequence )
+{
+ OUString aResult;
+
+ Reference< chart2::data::XTextualDataSequence > xTextSeq( xSequence, uno::UNO_QUERY );
+ if( xTextSeq.is())
+ {
+ Sequence< OUString > aSeq( xTextSeq->getTextualData());
+
+ const sal_Int32 nMax = aSeq.getLength() - 1;
+ OUStringBuffer aBuf;
+
+ for( sal_Int32 i = 0; i <= nMax; ++i )
+ {
+ aBuf.append( aSeq[i] );
+ if( i < nMax )
+ aBuf.append( ' ');
+ }
+ aResult = aBuf.makeStringAndClear();
+ }
+ else if( xSequence.is())
+ {
+ Sequence< uno::Any > aSeq( xSequence->getData());
+
+ const sal_Int32 nMax = aSeq.getLength() - 1;
+ OUString aVal;
+ OUStringBuffer aBuf;
+ double fNum = 0;
+
+ for( sal_Int32 i = 0; i <= nMax; ++i )
+ {
+ if( aSeq[i] >>= aVal )
+ {
+ aBuf.append( aVal );
+ if( i < nMax )
+ aBuf.append( ' ');
+ }
+ else if( aSeq[ i ] >>= fNum )
+ {
+ aBuf.append( fNum );
+ if( i < nMax )
+ aBuf.append( ' ');
+ }
+ }
+ aResult = aBuf.makeStringAndClear();
+ }
+
+ return aResult;
+}
+
+static OUString getLabelForLabeledDataSequence(
+ const Reference< chart2::data::XLabeledDataSequence > & xLabeledSeq )
+{
+ OUString aResult;
+ if( xLabeledSeq.is())
+ {
+ Reference< chart2::data::XDataSequence > xSeq( xLabeledSeq->getLabel());
+ if( xSeq.is() )
+ aResult = lcl_getDataSequenceLabel( xSeq );
+ if( !xSeq.is() || aResult.isEmpty() )
+ {
+ // no label set or label content is empty -> use auto-generated one
+ Reference< chart2::data::XDataSequence > xValueSeq( xLabeledSeq->getValues() );
+ if( xValueSeq.is() )
+ {
+ Sequence< OUString > aLabels( xValueSeq->generateLabel(
+ chart2::data::LabelOrigin_SHORT_SIDE ) );
+ // no labels returned is interpreted as: auto-generation not
+ // supported by sequence
+ if( aLabels.hasElements() )
+ aResult=aLabels[0];
+ else
+ {
+ //todo?: maybe use the index of the series as name
+ //but as the index may change it would be better to have such a name persistent
+ //what is not possible at the moment
+ //--> maybe use the identifier as part of the name ...
+ aResult = lcl_getDataSequenceLabel( xValueSeq );
+ }
+ }
+ }
+ }
+ return aResult;
+}
+
+OUString DataSeries::getLabelForRole( const OUString & rLabelSequenceRole )
+{
+ OUString aResult;
+
+ Reference< chart2::data::XLabeledDataSequence > xLabeledSeq(
+ ::chart::DataSeriesHelper::getDataSequenceByRole( this, rLabelSequenceRole ));
+ if( xLabeledSeq.is())
+ aResult = getLabelForLabeledDataSequence( xLabeledSeq );
+ else
+ {
+ // special case: labeled data series with only a label and no values may
+ // serve as label
+ xLabeledSeq.set( lcl_findLSequenceWithOnlyLabel( getDataSequences() ));
+ if( xLabeledSeq.is())
+ {
+ Reference< chart2::data::XDataSequence > xSeq( xLabeledSeq->getLabel());
+ if( xSeq.is())
+ aResult = lcl_getDataSequenceLabel( xSeq );
+ }
+ }
+
+ return aResult;
+}
+
+static bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSequence >& xDataSequence )
+{
+ if (!xDataSequence.is())
+ return false;
+ uno::Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY );
+ if( xProp.is() )
+ {
+ uno::Sequence< sal_Int32 > aHiddenValues;
+ try
+ {
+ xProp->getPropertyValue( "HiddenValues" ) >>= aHiddenValues;
+ if( !aHiddenValues.hasElements() )
+ return true;
+ }
+ catch( const uno::Exception& )
+ {
+ return true;
+ }
+ }
+ return xDataSequence->getData().hasElements();
+}
+
+bool DataSeries::hasUnhiddenData()
+{
+ MutexGuard aGuard( m_aMutex );
+
+ for(uno::Reference< chart2::data::XLabeledDataSequence > const & rDataSequence : m_aDataSequences)
+ {
+ if( !rDataSequence.is() )
+ continue;
+ if( lcl_SequenceHasUnhiddenData( rDataSequence->getValues() ) )
+ return true;
+ }
+ return false;
+}
+
+
} // namespace chart
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/chart2/source/model/main/DataSeriesProperties.cxx b/chart2/source/model/main/DataSeriesProperties.cxx
index d85d264753c1..e6d40feb5ab6 100644
--- a/chart2/source/model/main/DataSeriesProperties.cxx
+++ b/chart2/source/model/main/DataSeriesProperties.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "DataSeriesProperties.hxx"
+#include <DataSeriesProperties.hxx>
#include "DataPointProperties.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/chart2/StackingDirection.hpp>
@@ -84,7 +84,7 @@ void DataSeriesProperties::AddDefaultsToMap(
{
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATASERIES_STACKING_DIRECTION, chart2::StackingDirection_NO_STACKING );
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATASERIES_VARY_COLORS_BY_POINT, false );
- PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DATASERIES_ATTACHED_AXIS_INDEX, 0 );
+ PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATASERIES_ATTACHED_AXIS_INDEX, sal_Int32(0) );
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATASERIES_SHOW_LEGEND_ENTRY, true );
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES, true );
diff --git a/chart2/source/model/main/DataTable.cxx b/chart2/source/model/main/DataTable.cxx
new file mode 100644
index 000000000000..6cec190615bd
--- /dev/null
+++ b/chart2/source/model/main/DataTable.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 <DataTable.hxx>
+
+#include <LinePropertiesHelper.hxx>
+#include <FillProperties.hxx>
+#include <CharacterProperties.hxx>
+#include <ModifyListenerHelper.hxx>
+#include <PropertyHelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
+
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+
+#include <algorithm>
+
+using namespace css;
+
+namespace
+{
+/** DataTable Properties */
+enum
+{
+ DataTableProperty_HorizontalBorder,
+ DataTableProperty_VerticalBorder,
+ DataTableProperty_Outilne,
+ DataTableProperty_Keys,
+};
+
+void lcl_AddPropertiesToVector(std::vector<beans::Property>& rProps)
+{
+ auto const nBound = beans::PropertyAttribute::BOUND;
+ auto const nMaybeDefault = beans::PropertyAttribute::MAYBEDEFAULT;
+
+ rProps.emplace_back("HBorder", DataTableProperty_HorizontalBorder, cppu::UnoType<bool>::get(),
+ nBound | nMaybeDefault);
+ rProps.emplace_back("VBorder", DataTableProperty_VerticalBorder, cppu::UnoType<bool>::get(),
+ nBound | nMaybeDefault);
+ rProps.emplace_back("Outline", DataTableProperty_Outilne, cppu::UnoType<bool>::get(),
+ nBound | nMaybeDefault);
+ rProps.emplace_back("Keys", DataTableProperty_Keys, cppu::UnoType<bool>::get(),
+ nBound | nMaybeDefault);
+}
+
+const ::chart::tPropertyValueMap& StaticDataTableDefaults()
+{
+ static ::chart::tPropertyValueMap aStaticDefaults = []() {
+ ::chart::tPropertyValueMap aMap;
+ ::chart::LinePropertiesHelper::AddDefaultsToMap(aMap);
+ ::chart::FillProperties::AddDefaultsToMap(aMap);
+ ::chart::CharacterProperties::AddDefaultsToMap(aMap);
+
+ ::chart::PropertyHelper::setPropertyValueDefault(aMap, DataTableProperty_HorizontalBorder,
+ false);
+ ::chart::PropertyHelper::setPropertyValueDefault(aMap, DataTableProperty_VerticalBorder,
+ false);
+ ::chart::PropertyHelper::setPropertyValueDefault(aMap, DataTableProperty_Outilne, false);
+ ::chart::PropertyHelper::setPropertyValueDefault(aMap, DataTableProperty_Keys, false);
+
+ ::chart::PropertyHelper::setPropertyValue(
+ aMap, ::chart::LinePropertiesHelper::PROP_LINE_WIDTH, uno::Any(sal_Int32(1)));
+
+ ::chart::PropertyHelper::setPropertyValueDefault(
+ aMap, ::chart::FillProperties::PROP_FILL_STYLE, drawing::FillStyle_NONE);
+
+ float fDefaultCharHeight = 10.0;
+ ::chart::PropertyHelper::setPropertyValue(
+ aMap, ::chart::CharacterProperties::PROP_CHAR_CHAR_HEIGHT, fDefaultCharHeight);
+ ::chart::PropertyHelper::setPropertyValue(
+ aMap, ::chart::CharacterProperties::PROP_CHAR_ASIAN_CHAR_HEIGHT, fDefaultCharHeight);
+ ::chart::PropertyHelper::setPropertyValue(
+ aMap, ::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultCharHeight);
+ return aMap;
+ }();
+ return aStaticDefaults;
+};
+
+cppu::OPropertyArrayHelper& StaticDataTableInfoHelper()
+{
+ static cppu::OPropertyArrayHelper aPropHelper = []() {
+ std::vector<beans::Property> aProperties;
+ lcl_AddPropertiesToVector(aProperties);
+ ::chart::LinePropertiesHelper::AddPropertiesToVector(aProperties);
+ ::chart::FillProperties::AddPropertiesToVector(aProperties);
+ ::chart::CharacterProperties::AddPropertiesToVector(aProperties);
+ std::sort(aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess());
+
+ return comphelper::containerToSequence(aProperties);
+ }();
+ return aPropHelper;
+};
+
+} // anonymous namespace
+
+namespace chart
+{
+DataTable::DataTable()
+ : m_xModifyEventForwarder(new ModifyEventForwarder())
+{
+}
+
+DataTable::DataTable(const DataTable& rOther)
+ : DataTable_Base(rOther)
+ , ::property::OPropertySet(rOther)
+ , m_xModifyEventForwarder(new ModifyEventForwarder())
+{
+}
+
+DataTable::~DataTable() = default;
+
+// ____ XCloneable ____
+uno::Reference<util::XCloneable> SAL_CALL DataTable::createClone()
+{
+ return uno::Reference<util::XCloneable>(new DataTable(*this));
+}
+
+// ____ XModifyBroadcaster ____
+void SAL_CALL DataTable::addModifyListener(const uno::Reference<util::XModifyListener>& aListener)
+{
+ m_xModifyEventForwarder->addModifyListener(aListener);
+}
+
+void SAL_CALL
+DataTable::removeModifyListener(const uno::Reference<util::XModifyListener>& aListener)
+{
+ m_xModifyEventForwarder->removeModifyListener(aListener);
+}
+
+// ____ XModifyListener ____
+void SAL_CALL DataTable::modified(const lang::EventObject& aEvent)
+{
+ m_xModifyEventForwarder->modified(aEvent);
+}
+
+// ____ XEventListener (base of XModifyListener) ____
+void SAL_CALL DataTable::disposing(const lang::EventObject& /* Source */)
+{
+ // nothing
+}
+
+// ____ OPropertySet ____
+void DataTable::firePropertyChangeEvent()
+{
+ m_xModifyEventForwarder->modified(lang::EventObject(static_cast<uno::XWeak*>(this)));
+}
+
+// ____ OPropertySet ____
+void DataTable::GetDefaultValue(sal_Int32 nHandle, uno::Any& rAny) const
+{
+ const tPropertyValueMap& rStaticDefaults = StaticDataTableDefaults();
+ auto aFound = rStaticDefaults.find(nHandle);
+ if (aFound == rStaticDefaults.end())
+ rAny.clear();
+ else
+ rAny = (*aFound).second;
+}
+
+::cppu::IPropertyArrayHelper& SAL_CALL DataTable::getInfoHelper()
+{
+ return StaticDataTableInfoHelper();
+}
+
+// ____ XPropertySet ____
+uno::Reference<beans::XPropertySetInfo> SAL_CALL DataTable::getPropertySetInfo()
+{
+ static uno::Reference<beans::XPropertySetInfo> xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticDataTableInfoHelper()));
+ return xPropertySetInfo;
+}
+
+// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
+OUString SAL_CALL DataTable::getImplementationName()
+{
+ return "com.sun.star.comp.chart2.DataTable";
+}
+
+sal_Bool SAL_CALL DataTable::supportsService(const OUString& rServiceName)
+{
+ return cppu::supportsService(this, rServiceName);
+}
+
+uno::Sequence<OUString> SAL_CALL DataTable::getSupportedServiceNames()
+{
+ return { "com.sun.star.chart2.DataTable", "com.sun.star.beans.PropertySet",
+ "com.sun.star.drawing.FillProperties", "com.sun.star.drawing.LineProperties",
+ "com.sun.star.style.CharacterProperties" };
+}
+
+IMPLEMENT_FORWARD_XINTERFACE2(DataTable, DataTable_Base, ::property::OPropertySet)
+IMPLEMENT_FORWARD_XTYPEPROVIDER2(DataTable, DataTable_Base, ::property::OPropertySet)
+
+} // namespace chart
+
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_chart2_DataTable_get_implementation(
+ css::uno::XComponentContext* /*pComponentContext*/, uno::Sequence<uno::Any> const& /*rAny*/)
+{
+ return cppu::acquire(new ::chart::DataTable);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 91b4a6b31c7b..a963e2a25c07 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -18,9 +18,16 @@
*/
#include <Diagram.hxx>
+#include <AxisHelper.hxx>
+#include <BaseGFXHelper.hxx>
+#include <ChartTypeHelper.hxx>
#include <ChartTypeManager.hxx>
#include <ChartTypeTemplate.hxx>
+#include <ChartType.hxx>
+#include <DataSeriesHelper.hxx>
#include <PropertyHelper.hxx>
+#include <RegressionCurveHelper.hxx>
+#include <RegressionCurveModel.hxx>
#include "Wall.hxx"
#include <ModifyListenerHelper.hxx>
#include <UserDefinedProperties.hxx>
@@ -31,22 +38,38 @@
#include <SceneProperties.hxx>
#include <unonames.hxx>
#include <BaseCoordinateSystem.hxx>
+#include <Legend.hxx>
+#include <Axis.hxx>
+#include <DataTable.hxx>
+#include <servicenames_charttypes.hxx>
+#include <defines.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/chart2/AxisType.hpp>
+#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
+#include <com/sun/star/chart2/StackingDirection.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/chart2/RelativeSize.hpp>
+#include <com/sun/star/chart2/PieChartSubType.hpp>
+#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <com/sun/star/container/NoSuchElementException.hpp>
+#include <com/sun/star/drawing/ShadeMode.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/util/CloseVetoException.hpp>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <o3tl/safeint.hxx>
+#include <rtl/math.hxx>
+#include <tools/helpers.hxx>
#include <algorithm>
+#include <utility>
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans::PropertyAttribute;
+using namespace ::chart::SceneProperties;
using ::com::sun::star::beans::Property;
using ::com::sun::star::uno::Sequence;
@@ -74,6 +97,7 @@ enum
PROP_DIAGRAM_MISSING_VALUE_TREATMENT,
PROP_DIAGRAM_3DRELATIVEHEIGHT,
PROP_DIAGRAM_DATATABLEHBORDER,
+ PROP_DIAGRAM_OF_PIE_TYPE,
PROP_DIAGRAM_DATATABLEVBORDER,
PROP_DIAGRAM_DATATABLEOUTLINE,
PROP_DIAGRAM_EXTERNALDATA
@@ -160,21 +184,10 @@ void lcl_AddPropertiesToVector(
PROP_DIAGRAM_3DRELATIVEHEIGHT,
cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::MAYBEVOID );
- rOutProperties.emplace_back( "DataTableHBorder",
- PROP_DIAGRAM_DATATABLEHBORDER,
- cppu::UnoType<bool>::get(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( "DataTableVBorder",
- PROP_DIAGRAM_DATATABLEVBORDER,
- cppu::UnoType<bool>::get(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( "DataTableOutline",
- PROP_DIAGRAM_DATATABLEOUTLINE,
- cppu::UnoType<bool>::get(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
+ rOutProperties.emplace_back( "SubPieType",
+ PROP_DIAGRAM_OF_PIE_TYPE,
+ cppu::UnoType<chart2::PieChartSubType>::get(),
+ beans::PropertyAttribute::MAYBEVOID );
rOutProperties.emplace_back( "ExternalData",
PROP_DIAGRAM_EXTERNALDATA,
cppu::UnoType<OUString>::get(),
@@ -192,11 +205,10 @@ const ::chart::tPropertyValueMap& StaticDiagramDefaults()
::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_GROUP_BARS_PER_AXIS, true );
::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS, true );
::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_RIGHT_ANGLED_AXES, false );
- ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_DATATABLEHBORDER, false );
- ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_DATATABLEVBORDER, false );
- ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_DATATABLEOUTLINE, false );
::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aMap, PROP_DIAGRAM_STARTING_ANGLE, 90 );
::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aMap, PROP_DIAGRAM_3DRELATIVEHEIGHT, 100 );
+ ::chart::PropertyHelper::setPropertyValueDefault< chart2::PieChartSubType >( aMap, PROP_DIAGRAM_OF_PIE_TYPE,
+ chart2::PieChartSubType_NONE);
::chart::SceneProperties::AddDefaultsToMap( aMap );
return aMap;
}();
@@ -245,9 +257,8 @@ void lcl_CloneCoordinateSystems(
namespace chart
{
-Diagram::Diagram( uno::Reference< uno::XComponentContext > const & xContext ) :
- ::property::OPropertySet( m_aMutex ),
- m_xContext( xContext ),
+Diagram::Diagram( uno::Reference< uno::XComponentContext > xContext ) :
+ m_xContext(std::move( xContext )),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
// Set camera position to a default position (that should be set hard, so
@@ -255,13 +266,13 @@ Diagram::Diagram( uno::Reference< uno::XComponentContext > const & xContext ) :
// straight ono the scene). These defaults have been acquired from the old
// chart implementation.
setFastPropertyValue_NoBroadcast(
- SceneProperties::PROP_SCENE_CAMERA_GEOMETRY, uno::Any(
+ PROP_SCENE_CAMERA_GEOMETRY, uno::Any(
ThreeDHelper::getDefaultCameraGeometry()));
}
Diagram::Diagram( const Diagram & rOther ) :
impl::Diagram_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_xContext( rOther.m_xContext ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
@@ -274,7 +285,10 @@ Diagram::Diagram( const Diagram & rOther ) :
if ( rOther.m_xFloor )
m_xFloor = new Wall( *rOther.m_xFloor );
m_xTitle.set( CloneHelper::CreateRefClone< chart2::XTitle >()( rOther.m_xTitle ));
- m_xLegend.set( CloneHelper::CreateRefClone< chart2::XLegend >()( rOther.m_xLegend ));
+ if (rOther.m_xLegend)
+ m_xLegend = new Legend(*rOther.m_xLegend);
+ if (rOther.m_xDataTable)
+ m_xDataTable = new DataTable(*rOther.m_xDataTable);
if ( m_xWall )
m_xWall->addModifyListener( m_xModifyEventForwarder );
@@ -347,9 +361,22 @@ uno::Reference< chart2::XLegend > SAL_CALL Diagram::getLegend()
return m_xLegend;
}
+rtl::Reference< ::chart::Legend > Diagram::getLegend2() const
+{
+ MutexGuard aGuard( m_aMutex );
+ return m_xLegend;
+}
+
void SAL_CALL Diagram::setLegend( const uno::Reference< chart2::XLegend >& xNewLegend )
{
- Reference< chart2::XLegend > xOldLegend;
+ auto pLegend = dynamic_cast<Legend*>(xNewLegend.get());
+ assert(!xNewLegend || pLegend);
+ setLegend(rtl::Reference< Legend >(pLegend));
+}
+
+void Diagram::setLegend( const rtl::Reference< Legend >& xNewLegend )
+{
+ rtl::Reference< Legend > xOldLegend;
{
MutexGuard aGuard( m_aMutex );
if( m_xLegend == xNewLegend )
@@ -395,13 +422,13 @@ void SAL_CALL Diagram::setDiagramData(
const Sequence< beans::PropertyValue >& aArguments )
{
rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = new ::chart::ChartTypeManager( m_xContext );
- DiagramHelper::tTemplateWithServiceName aTemplateAndService = DiagramHelper::getTemplateForDiagram( this, xChartTypeManager );
+ Diagram::tTemplateWithServiceName aTemplateAndService = getTemplate( xChartTypeManager );
rtl::Reference< ::chart::ChartTypeTemplate > xTemplate( aTemplateAndService.xChartTypeTemplate );
if( !xTemplate.is() )
xTemplate = xChartTypeManager->createTemplate( "com.sun.star.chart2.template.Column" );
if(!xTemplate.is())
return;
- xTemplate->changeDiagramData( this, xDataSource, aArguments );
+ xTemplate->changeDiagramData( rtl::Reference< ::chart::Diagram >(this), xDataSource, aArguments );
}
// ____ XTitled ____
@@ -431,17 +458,118 @@ void SAL_CALL Diagram::setTitleObject( const uno::Reference< chart2::XTitle >& x
// ____ X3DDefaultSetter ____
void SAL_CALL Diagram::set3DSettingsToDefault()
{
- ThreeDHelper::set3DSettingsToDefault( this );
+ setPropertyToDefault( "D3DSceneDistance");
+ setPropertyToDefault( "D3DSceneFocalLength");
+ setDefaultRotation();
+ setDefaultIllumination();
}
void SAL_CALL Diagram::setDefaultRotation()
{
- ThreeDHelper::setDefaultRotation( this );
+ bool bPieOrDonut( isPieOrDonutChart() );
+ setDefaultRotation( bPieOrDonut );
+}
+
+static ::basegfx::B3DHomMatrix lcl_getCompleteRotationMatrix( Diagram& rDiagram )
+{
+ ::basegfx::B3DHomMatrix aCompleteRotation;
+ double fXAngleRad=0.0;
+ double fYAngleRad=0.0;
+ double fZAngleRad=0.0;
+ rDiagram.getRotationAngle( fXAngleRad, fYAngleRad, fZAngleRad );
+ aCompleteRotation.rotate( fXAngleRad, fYAngleRad, fZAngleRad );
+ return aCompleteRotation;
+}
+static void lcl_RotateLightSource( Diagram& rDiagram
+ , int nLightSourceDirectionProp
+ , int nLightSourceOnProp
+ , const ::basegfx::B3DHomMatrix& rRotationMatrix )
+{
+ bool bLightOn = false;
+ if( !(rDiagram.getFastPropertyValue( nLightSourceOnProp ) >>= bLightOn) )
+ return;
+
+ if( bLightOn )
+ {
+ drawing::Direction3D aLight;
+ if( rDiagram.getFastPropertyValue( nLightSourceDirectionProp ) >>= aLight )
+ {
+ ::basegfx::B3DVector aLightVector( BaseGFXHelper::Direction3DToB3DVector( aLight ) );
+ aLightVector = rRotationMatrix*aLightVector;
+
+ rDiagram.setFastPropertyValue( nLightSourceDirectionProp
+ , uno::Any( BaseGFXHelper::B3DVectorToDirection3D( aLightVector ) ) );
+ }
+ }
+}
+
+static void lcl_setLightsForScheme( Diagram& rDiagram, const ThreeDLookScheme& rScheme )
+{
+ if( rScheme == ThreeDLookScheme::ThreeDLookScheme_Unknown)
+ return;
+
+ // "D3DSceneLightOn2" / UNO_NAME_3D_SCENE_LIGHTON_2
+ rDiagram.setFastPropertyValue( PROP_SCENE_LIGHT_ON_2, uno::Any( true ) );
+
+ rtl::Reference< ChartType > xChartType( rDiagram.getChartTypeByIndex( 0 ) );
+ uno::Any aADirection( rScheme == ThreeDLookScheme::ThreeDLookScheme_Simple
+ ? ChartTypeHelper::getDefaultSimpleLightDirection(xChartType)
+ : ChartTypeHelper::getDefaultRealisticLightDirection(xChartType) );
+
+ // "D3DSceneLightDirection2" / UNO_NAME_3D_SCENE_LIGHTDIRECTION_2
+ rDiagram.setFastPropertyValue( PROP_SCENE_LIGHT_DIRECTION_2, aADirection );
+ //rotate light direction when right angled axes are off but supported
+ {
+ bool bRightAngledAxes = false;
+ rDiagram.getFastPropertyValue( PROP_DIAGRAM_RIGHT_ANGLED_AXES ) >>= bRightAngledAxes; // "RightAngledAxes"
+ if(!bRightAngledAxes)
+ {
+ if( ChartTypeHelper::isSupportingRightAngledAxes( xChartType ) )
+ {
+ ::basegfx::B3DHomMatrix aRotation( lcl_getCompleteRotationMatrix( rDiagram ) );
+ BaseGFXHelper::ReduceToRotationMatrix( aRotation );
+ // "D3DSceneLightDirection2", "D3DSceneLightOn2"
+ lcl_RotateLightSource( rDiagram, PROP_SCENE_LIGHT_DIRECTION_2, PROP_SCENE_LIGHT_ON_2, aRotation );
+ }
+ }
+ }
+
+ sal_Int32 nColor = ::chart::ChartTypeHelper::getDefaultDirectLightColor(
+ rScheme == ThreeDLookScheme::ThreeDLookScheme_Simple, xChartType);
+ // "D3DSceneLightColor2" / UNO_NAME_3D_SCENE_LIGHTCOLOR_2
+ rDiagram.setFastPropertyValue( PROP_SCENE_LIGHT_COLOR_2, uno::Any( nColor ) );
+
+ sal_Int32 nAmbientColor = ::chart::ChartTypeHelper::getDefaultAmbientLightColor(
+ rScheme == ThreeDLookScheme::ThreeDLookScheme_Simple, xChartType);
+ // "D3DSceneAmbientColor" / UNO_NAME_3D_SCENE_AMBIENTCOLOR
+ rDiagram.setFastPropertyValue( PROP_SCENE_AMBIENT_COLOR, uno::Any( nAmbientColor ) );
}
void SAL_CALL Diagram::setDefaultIllumination()
{
- ThreeDHelper::setDefaultIllumination( this );
+ drawing::ShadeMode aShadeMode( drawing::ShadeMode_SMOOTH );
+ try
+ {
+ // "D3DSceneShadeMode"
+ getFastPropertyValue( PROP_SCENE_SHADE_MODE )>>= aShadeMode;
+ // "D3DSceneLightOn1" / UNO_NAME_3D_SCENE_LIGHTON_1
+ setFastPropertyValue( PROP_SCENE_LIGHT_ON_1, uno::Any( false ) );
+ setFastPropertyValue( PROP_SCENE_LIGHT_ON_3, uno::Any( false ) );
+ setFastPropertyValue( PROP_SCENE_LIGHT_ON_4, uno::Any( false ) );
+ setFastPropertyValue( PROP_SCENE_LIGHT_ON_5, uno::Any( false ) );
+ setFastPropertyValue( PROP_SCENE_LIGHT_ON_6, uno::Any( false ) );
+ setFastPropertyValue( PROP_SCENE_LIGHT_ON_7, uno::Any( false ) );
+ setFastPropertyValue( PROP_SCENE_LIGHT_ON_8, uno::Any( false ) );
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+ ThreeDLookScheme aScheme = (aShadeMode == drawing::ShadeMode_FLAT)
+ ? ThreeDLookScheme::ThreeDLookScheme_Simple
+ : ThreeDLookScheme::ThreeDLookScheme_Realistic;
+ lcl_setLightsForScheme( *this, aScheme );
}
// ____ XCoordinateSystemContainer ____
@@ -491,6 +619,12 @@ uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > SAL_CALL Diagram::g
return comphelper::containerToSequence<uno::Reference< chart2::XCoordinateSystem >>( m_aCoordSystems );
}
+Diagram::tCoordinateSystemContainerType Diagram::getBaseCoordinateSystems() const
+{
+ MutexGuard aGuard( m_aMutex );
+ return m_aCoordSystems;
+}
+
void SAL_CALL Diagram::setCoordinateSystems(
const Sequence< Reference< chart2::XCoordinateSystem > >& aCoordinateSystems )
{
@@ -515,6 +649,28 @@ void SAL_CALL Diagram::setCoordinateSystems(
fireModifyEvent();
}
+void Diagram::setCoordinateSystems(
+ const std::vector< rtl::Reference< BaseCoordinateSystem > >& aCoordinateSystems )
+{
+ tCoordinateSystemContainerType aNew;
+ tCoordinateSystemContainerType aOld;
+ if( !aCoordinateSystems.empty() )
+ {
+ OSL_ENSURE( aCoordinateSystems.size()<=1, "more than one coordinatesystem is not supported yet by the fileformat" );
+ aNew.push_back( aCoordinateSystems[0] );
+ }
+ {
+ MutexGuard aGuard( m_aMutex );
+ std::swap( aOld, m_aCoordSystems );
+ m_aCoordSystems = aNew;
+ }
+ for (auto & xSystem : aOld)
+ xSystem->removeModifyListener(m_xModifyEventForwarder);
+ for (auto & xSystem : aNew)
+ xSystem->addModifyListener(m_xModifyEventForwarder);
+ fireModifyEvent();
+}
+
// ____ XCloneable ____
Reference< util::XCloneable > SAL_CALL Diagram::createClone()
{
@@ -580,14 +736,14 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL Diagram::getPropertySetInfo()
}
// ____ XFastPropertySet ____
-void SAL_CALL Diagram::setFastPropertyValue( sal_Int32 nHandle, const Any& rValue )
+void SAL_CALL Diagram::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue )
{
//special treatment for some 3D properties
if( nHandle == PROP_DIAGRAM_PERSPECTIVE )
{
sal_Int32 fPerspective = 20;
if( rValue >>=fPerspective )
- ThreeDHelper::setCameraDistance( this, ThreeDHelper::PerspectiveToCameraDistance( fPerspective ) );
+ setCameraDistance( ThreeDHelper::PerspectiveToCameraDistance( fPerspective ) );
}
else if( nHandle == PROP_DIAGRAM_ROTATION_HORIZONTAL
|| nHandle == PROP_DIAGRAM_ROTATION_VERTICAL )
@@ -596,16 +752,16 @@ void SAL_CALL Diagram::setFastPropertyValue( sal_Int32 nHandle, const Any& rValu
if( rValue >>=nNewAngleDegree )
{
sal_Int32 nHorizontal, nVertical;
- ThreeDHelper::getRotationFromDiagram( this, nHorizontal, nVertical );
+ getRotation( nHorizontal, nVertical );
if( nHandle == PROP_DIAGRAM_ROTATION_HORIZONTAL )
nHorizontal = nNewAngleDegree;
else
nVertical = nNewAngleDegree;
- ThreeDHelper::setRotationToDiagram( this, nHorizontal, nVertical );
+ setRotation( nHorizontal, nVertical );
}
}
else
- ::property::OPropertySet::setFastPropertyValue( nHandle, rValue );
+ ::property::OPropertySet::setFastPropertyValue_NoBroadcast( nHandle, rValue );
}
void SAL_CALL Diagram::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
@@ -614,14 +770,14 @@ void SAL_CALL Diagram::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) co
if( nHandle == PROP_DIAGRAM_PERSPECTIVE )
{
sal_Int32 nPerspective = ::basegfx::fround( ThreeDHelper::CameraDistanceToPerspective(
- ThreeDHelper::getCameraDistance( const_cast< Diagram* >( this ) ) ) );
+ const_cast< Diagram* >( this )->getCameraDistance() ) );
rValue <<= nPerspective;
}
else if( nHandle == PROP_DIAGRAM_ROTATION_HORIZONTAL
|| nHandle == PROP_DIAGRAM_ROTATION_VERTICAL )
{
sal_Int32 nHorizontal, nVertical;
- ThreeDHelper::getRotationFromDiagram( const_cast< Diagram* >( this ), nHorizontal, nVertical );
+ const_cast< Diagram* >( this )->getRotation( nHorizontal, nVertical );
sal_Int32 nAngleDegree = 0;
if( nHandle == PROP_DIAGRAM_ROTATION_HORIZONTAL )
nAngleDegree = nHorizontal;
@@ -633,6 +789,42 @@ void SAL_CALL Diagram::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) co
::property::OPropertySet::getFastPropertyValue( rValue,nHandle );
}
+uno::Reference<chart2::XDataTable> SAL_CALL Diagram::getDataTable()
+{
+ MutexGuard aGuard( m_aMutex );
+ return m_xDataTable;
+}
+
+rtl::Reference<::chart::DataTable> Diagram::getDataTableRef() const
+{
+ MutexGuard aGuard( m_aMutex );
+ return m_xDataTable;
+}
+
+void SAL_CALL Diagram::setDataTable(const uno::Reference<chart2::XDataTable>& xDataTable)
+{
+ auto* pDataTable = dynamic_cast<DataTable*>(xDataTable.get());
+ assert(!xDataTable || pDataTable);
+ setDataTable(rtl::Reference<DataTable>(pDataTable));
+}
+
+void Diagram::setDataTable(const rtl::Reference<DataTable>& xNewDataTable)
+{
+ rtl::Reference<DataTable> xOldDataTable;
+ {
+ MutexGuard aGuard(m_aMutex);
+ if (m_xDataTable == xNewDataTable)
+ return;
+ xOldDataTable = m_xDataTable;
+ m_xDataTable = xNewDataTable;
+ }
+ if (xOldDataTable.is())
+ ModifyListenerHelper::removeListener(xOldDataTable, m_xModifyEventForwarder);
+ if (xNewDataTable.is())
+ ModifyListenerHelper::addListener(xNewDataTable, m_xModifyEventForwarder);
+ fireModifyEvent();
+}
+
using impl::Diagram_Base;
IMPLEMENT_FORWARD_XINTERFACE2( Diagram, Diagram_Base, ::property::OPropertySet )
@@ -657,6 +849,1440 @@ css::uno::Sequence< OUString > SAL_CALL Diagram::getSupportedServiceNames()
"com.sun.star.beans.PropertySet" };
}
+DiagramPositioningMode Diagram::getDiagramPositioningMode()
+{
+ DiagramPositioningMode eMode = DiagramPositioningMode::Auto;
+ chart2::RelativePosition aRelPos;
+ chart2::RelativeSize aRelSize;
+ if( (getFastPropertyValue(PROP_DIAGRAM_REL_POS) >>= aRelPos ) &&
+ (getFastPropertyValue(PROP_DIAGRAM_REL_SIZE) >>= aRelSize ) )
+ {
+ bool bPosSizeExcludeAxes=false;
+ getFastPropertyValue(PROP_DIAGRAM_POSSIZE_EXCLUDE_LABELS) >>= bPosSizeExcludeAxes;
+ if( bPosSizeExcludeAxes )
+ eMode = DiagramPositioningMode::Excluding;
+ else
+ eMode = DiagramPositioningMode::Including;
+ }
+ return eMode;
+}
+
+
+sal_Int32 Diagram::getCorrectedMissingValueTreatment(
+ const rtl::Reference< ChartType >& xChartType )
+{
+ sal_Int32 nResult = css::chart::MissingValueTreatment::LEAVE_GAP;
+ const uno::Sequence < sal_Int32 > aAvailableMissingValueTreatments(
+ ChartTypeHelper::getSupportedMissingValueTreatments( xChartType ) );
+
+ if( getFastPropertyValue( PROP_DIAGRAM_MISSING_VALUE_TREATMENT ) >>= nResult )
+ {
+ //ensure that the set value is supported by this charttype
+ for( sal_Int32 n : aAvailableMissingValueTreatments )
+ if( n == nResult )
+ return nResult; //ok
+ }
+
+ //otherwise use the first supported one
+ if( aAvailableMissingValueTreatments.hasElements() )
+ {
+ nResult = aAvailableMissingValueTreatments[0];
+ return nResult;
+ }
+
+ return nResult;
+}
+
+void Diagram::setGeometry3D( sal_Int32 nNewGeometry )
+{
+ std::vector< rtl::Reference< DataSeries > > aSeriesVec =
+ getDataSeries();
+
+ for (auto const& series : aSeriesVec)
+ {
+ DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(
+ series, "Geometry3D", uno::Any( nNewGeometry ));
+ }
+}
+
+sal_Int32 Diagram::getGeometry3D( bool& rbFound, bool& rbAmbiguous )
+{
+ sal_Int32 nCommonGeom( css::chart2::DataPointGeometry3D::CUBOID );
+ rbFound = false;
+ rbAmbiguous = false;
+
+ std::vector< rtl::Reference< DataSeries > > aSeriesVec = getDataSeries();
+
+ if( aSeriesVec.empty())
+ rbAmbiguous = true;
+
+ for (auto const& series : aSeriesVec)
+ {
+ try
+ {
+ sal_Int32 nGeom = 0;
+ if( series->getPropertyValue( "Geometry3D") >>= nGeom )
+ {
+ if( ! rbFound )
+ {
+ // first series
+ nCommonGeom = nGeom;
+ rbFound = true;
+ }
+ // further series: compare for uniqueness
+ else if( nCommonGeom != nGeom )
+ {
+ rbAmbiguous = true;
+ break;
+ }
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+ }
+
+ return nCommonGeom;
+}
+
+bool Diagram::isPieOrDonutChart()
+{
+ rtl::Reference< ChartType > xChartType = getChartTypeByIndex( 0 );
+
+ if( xChartType .is() )
+ {
+ OUString aChartType = xChartType->getChartType();
+ if( aChartType == CHART2_SERVICE_NAME_CHARTTYPE_PIE )
+ return true;
+ }
+ return false;
+}
+
+bool Diagram::isSupportingFloorAndWall()
+{
+ //pies and donuts currently do not support this because of wrong files from older versions
+ //todo: allow this in future again, if fileversion is available for OLE objects (metastream)
+ //thus the wrong bottom can be removed on import
+
+ const std::vector< rtl::Reference< ChartType > > aTypes = getChartTypes();
+ for( rtl::Reference< ChartType > const & xType : aTypes )
+ {
+ OUString sChartType = xType->getChartType();
+ if( sChartType.match(CHART2_SERVICE_NAME_CHARTTYPE_PIE) )
+ return false;
+ if( sChartType.match(CHART2_SERVICE_NAME_CHARTTYPE_NET) )
+ return false;
+ if( sChartType.match(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) )
+ return false;
+ }
+ return true;
+}
+
+ /**
+ * This method implements the logic of checking if a series can be moved
+ * forward/backward. Depending on the "bDoMove" parameter the series will
+ * be moved (bDoMove = true) or the function just will test if the
+ * series can be moved without doing the move (bDoMove = false).
+ *
+ * @param xDiagram
+ * Reference to the diagram that contains the series.
+ *
+ * @param xGivenDataSeries
+ * Reference to the series that should moved or tested for moving.
+ *
+ * @param bForward
+ * Direction in which the series should be moved or tested for moving.
+ *
+ * @param bDoMove
+ * Should this function really move the series (true) or just test if it is
+ * possible (false).
+ *
+ *
+ * @returns
+ * in case of bDoMove == true
+ * - True : if the move was done
+ * - False : the move failed
+ * in case of bDoMove == false
+ * - True : the series can be moved
+ * - False : the series can not be moved
+ *
+ */
+static bool lcl_moveSeriesOrCheckIfMoveIsAllowed(
+ Diagram& rDiagram,
+ const rtl::Reference< DataSeries >& xGivenDataSeries,
+ bool bForward,
+ bool bDoMove )
+{
+ bool bMovedOrMoveAllowed = false;
+
+ try
+ {
+ if( !xGivenDataSeries.is() )
+ return false;
+
+ //find position of series.
+ bool bFound = false;
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysList( rDiagram.getBaseCoordinateSystems() );
+
+ for( std::size_t nCS = 0; !bFound && nCS < aCooSysList.size(); ++nCS )
+ {
+ const rtl::Reference< BaseCoordinateSystem > & xCooSys( aCooSysList[nCS] );
+
+ //iterate through all chart types in the current coordinate system
+ std::vector< rtl::Reference< ChartType > > aChartTypeList( xCooSys->getChartTypes2() );
+ rtl::Reference< ChartType > xFormerChartType;
+
+ for( std::size_t nT = 0; !bFound && nT < aChartTypeList.size(); ++nT )
+ {
+ rtl::Reference< ChartType > xCurrentChartType( aChartTypeList[nT] );
+
+ //iterate through all series in this chart type
+
+ std::vector< rtl::Reference< DataSeries > > aSeriesList = xCurrentChartType->getDataSeries2();
+
+ for( std::size_t nS = 0; !bFound && nS < aSeriesList.size(); ++nS )
+ {
+
+ // We found the series we are interested in!
+ if( xGivenDataSeries==aSeriesList[nS] )
+ {
+ std::size_t nOldSeriesIndex = nS;
+ bFound = true;
+
+ try
+ {
+ sal_Int32 nNewSeriesIndex = nS;
+
+ // tdf#34517 Bringing forward means increasing, backwards means decreasing series position
+ if( !bForward )
+ nNewSeriesIndex--;
+ else
+ nNewSeriesIndex++;
+
+ if( nNewSeriesIndex >= 0 && o3tl::make_unsigned(nNewSeriesIndex) < aSeriesList.size() )
+ {
+ //move series in the same charttype
+ bMovedOrMoveAllowed = true;
+ if( bDoMove )
+ {
+ aSeriesList[ nOldSeriesIndex ] = aSeriesList[ nNewSeriesIndex ];
+ aSeriesList[ nNewSeriesIndex ] = xGivenDataSeries;
+ xCurrentChartType->setDataSeries( aSeriesList );
+ }
+ }
+ else if( nNewSeriesIndex<0 )
+ {
+ //exchange series with former charttype
+ if( xFormerChartType.is() && DiagramHelper::areChartTypesCompatible( xFormerChartType, xCurrentChartType ) )
+ {
+ bMovedOrMoveAllowed = true;
+ if( bDoMove )
+ {
+ std::vector< rtl::Reference< DataSeries > > aOtherSeriesList = xFormerChartType->getDataSeries2();
+ sal_Int32 nOtherSeriesIndex = aOtherSeriesList.size()-1;
+ if( nOtherSeriesIndex >= 0 && o3tl::make_unsigned(nOtherSeriesIndex) < aOtherSeriesList.size() )
+ {
+ rtl::Reference< DataSeries > xExchangeSeries( aOtherSeriesList[nOtherSeriesIndex] );
+ aOtherSeriesList[nOtherSeriesIndex] = xGivenDataSeries;
+ xFormerChartType->setDataSeries(aOtherSeriesList);
+
+ aSeriesList[nOldSeriesIndex] = std::move(xExchangeSeries);
+ xCurrentChartType->setDataSeries(aSeriesList);
+ }
+ }
+ }
+ }
+ else if( nT+1 < aChartTypeList.size() )
+ {
+ //exchange series with next charttype
+ rtl::Reference< ChartType > xOtherChartType( aChartTypeList[nT+1] );
+ if( xOtherChartType.is() && DiagramHelper::areChartTypesCompatible( xOtherChartType, xCurrentChartType ) )
+ {
+ bMovedOrMoveAllowed = true;
+ if( bDoMove )
+ {
+ std::vector< rtl::Reference< DataSeries > > aOtherSeriesList = xOtherChartType->getDataSeries2();
+ if( !aOtherSeriesList.empty() )
+ {
+ rtl::Reference<DataSeries> xExchangeSeries(aOtherSeriesList[0]);
+ aOtherSeriesList[0] = xGivenDataSeries;
+ xOtherChartType->setDataSeries(aOtherSeriesList);
+
+ aSeriesList[nOldSeriesIndex] = std::move(xExchangeSeries);
+ xCurrentChartType->setDataSeries(aSeriesList);
+ }
+ }
+ }
+ }
+ }
+ catch( const util::CloseVetoException& )
+ {
+ }
+ catch( const uno::RuntimeException& )
+ {
+ }
+ }
+ }
+ xFormerChartType = xCurrentChartType;
+ }
+ }
+ }
+ catch( const util::CloseVetoException& )
+ {
+ }
+ catch( const uno::RuntimeException& )
+ {
+ }
+ return bMovedOrMoveAllowed;
+}
+
+bool Diagram::isSeriesMoveable(
+ const rtl::Reference< DataSeries >& xGivenDataSeries,
+ bool bForward )
+{
+ const bool bDoMove = false;
+
+ bool bIsMoveable = lcl_moveSeriesOrCheckIfMoveIsAllowed(
+ *this, xGivenDataSeries, bForward, bDoMove );
+
+ return bIsMoveable;
+}
+
+bool Diagram::moveSeries( const rtl::Reference< DataSeries >& xGivenDataSeries, bool bForward )
+{
+ const bool bDoMove = true;
+
+ bool bMoved = lcl_moveSeriesOrCheckIfMoveIsAllowed(
+ *this, xGivenDataSeries, bForward, bDoMove );
+
+ return bMoved;
+}
+
+std::vector< rtl::Reference< ChartType > > Diagram::getChartTypes()
+{
+ std::vector< rtl::Reference< ChartType > > aResult;
+ try
+ {
+ for( rtl::Reference< BaseCoordinateSystem > const & coords : getBaseCoordinateSystems() )
+ {
+ const std::vector< rtl::Reference< ChartType > > & aChartTypeSeq( coords->getChartTypes2());
+ aResult.insert( aResult.end(), aChartTypeSeq.begin(), aChartTypeSeq.end() );
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+ return aResult;
+}
+
+rtl::Reference< ChartType > Diagram::getChartTypeByIndex( sal_Int32 nIndex )
+{
+ rtl::Reference< ChartType > xChartType;
+
+ //iterate through all coordinate systems
+ sal_Int32 nTypesSoFar = 0;
+ for( rtl::Reference< BaseCoordinateSystem > const & coords : getBaseCoordinateSystems() )
+ {
+ const std::vector< rtl::Reference< ChartType > > & aChartTypeList( coords->getChartTypes2() );
+ if( nIndex >= 0 && o3tl::make_unsigned(nIndex) < nTypesSoFar + aChartTypeList.size() )
+ {
+ xChartType = aChartTypeList[nIndex - nTypesSoFar];
+ break;
+ }
+ nTypesSoFar += aChartTypeList.size();
+ }
+
+ return xChartType;
+}
+
+bool Diagram::isSupportingDateAxis()
+{
+ return ::chart::ChartTypeHelper::isSupportingDateAxis( getChartTypeByIndex( 0 ), 0 );
+}
+
+static std::vector< rtl::Reference< Axis > > lcl_getAxisHoldingCategoriesFromDiagram(
+ Diagram& rDiagram )
+{
+ std::vector< rtl::Reference< Axis > > aRet;
+
+ // return first x-axis as fall-back
+ rtl::Reference< Axis > xFallBack;
+ try
+ {
+ for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : rDiagram.getBaseCoordinateSystems() )
+ {
+ OSL_ASSERT( xCooSys.is());
+ for( sal_Int32 nN = xCooSys->getDimension(); nN--; )
+ {
+ const sal_Int32 nMaximumScaleIndex = xCooSys->getMaximumAxisIndexByDimension(nN);
+ for(sal_Int32 nI=0; nI<=nMaximumScaleIndex; ++nI)
+ {
+ rtl::Reference< Axis > xAxis = xCooSys->getAxisByDimension2( nN,nI );
+ OSL_ASSERT( xAxis.is());
+ if( xAxis.is())
+ {
+ chart2::ScaleData aScaleData = xAxis->getScaleData();
+ if( aScaleData.Categories.is() || (aScaleData.AxisType == chart2::AxisType::CATEGORY) )
+ {
+ aRet.push_back(xAxis);
+ }
+ if( (nN == 0) && !xFallBack.is())
+ xFallBack = xAxis;
+ }
+ }
+ }
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2" );
+ }
+
+ if( aRet.empty() )
+ aRet.push_back(xFallBack);
+
+ return aRet;
+}
+
+uno::Reference< chart2::data::XLabeledDataSequence > Diagram::getCategories()
+{
+ uno::Reference< chart2::data::XLabeledDataSequence > xResult;
+
+ try
+ {
+ std::vector< rtl::Reference< Axis > > aCatAxes(
+ lcl_getAxisHoldingCategoriesFromDiagram( *this ));
+ //search for first categories
+ if (aCatAxes.empty())
+ return xResult;
+
+ rtl::Reference< Axis > xCatAxis(aCatAxes[0]);
+ if( !xCatAxis.is())
+ return xResult;
+
+ chart2::ScaleData aScaleData( xCatAxis->getScaleData());
+ if( !aScaleData.Categories.is() )
+ return xResult;
+
+ xResult = aScaleData.Categories;
+ uno::Reference<beans::XPropertySet> xProp(xResult->getValues(), uno::UNO_QUERY );
+ if( xProp.is() )
+ {
+ try
+ {
+ xProp->setPropertyValue( "Role", uno::Any( OUString("categories") ) );
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+ return xResult;
+}
+
+void Diagram::setCategories(
+ const uno::Reference< chart2::data::XLabeledDataSequence >& xCategories,
+ bool bSetAxisType /* = false */,
+ bool bCategoryAxis /* = true */ )
+{
+ std::vector< rtl::Reference< Axis > > aCatAxes(
+ lcl_getAxisHoldingCategoriesFromDiagram( *this ));
+
+ for (const rtl::Reference< Axis >& xCatAxis : aCatAxes)
+ {
+ if( xCatAxis.is())
+ {
+ chart2::ScaleData aScaleData( xCatAxis->getScaleData());
+ aScaleData.Categories = xCategories;
+ if( bSetAxisType )
+ {
+ if( bCategoryAxis )
+ aScaleData.AxisType = chart2::AxisType::CATEGORY;
+ else if( aScaleData.AxisType == chart2::AxisType::CATEGORY || aScaleData.AxisType == chart2::AxisType::DATE )
+ aScaleData.AxisType = chart2::AxisType::REALNUMBER;
+ }
+ xCatAxis->setScaleData( aScaleData );
+ }
+ }
+}
+
+bool Diagram::isCategory()
+{
+ try
+ {
+ for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : getBaseCoordinateSystems() )
+ {
+ for( sal_Int32 nN = xCooSys->getDimension(); nN--; )
+ {
+ const sal_Int32 nMaximumScaleIndex = xCooSys->getMaximumAxisIndexByDimension(nN);
+ for(sal_Int32 nI=0; nI<=nMaximumScaleIndex; ++nI)
+ {
+ rtl::Reference< Axis > xAxis = xCooSys->getAxisByDimension2( nN,nI );
+ OSL_ASSERT( xAxis.is());
+ if( xAxis.is())
+ {
+ chart2::ScaleData aScaleData = xAxis->getScaleData();
+ if( aScaleData.AxisType == chart2::AxisType::CATEGORY || aScaleData.AxisType == chart2::AxisType::DATE )
+ return true;
+ }
+ }
+ }
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+ return false;
+}
+
+std::vector< std::vector< rtl::Reference< DataSeries > > >
+Diagram::getDataSeriesGroups()
+{
+ std::vector< std::vector< rtl::Reference< DataSeries > > > aResult;
+
+ //iterate through all coordinate systems
+ for( rtl::Reference< BaseCoordinateSystem > const & coords : getBaseCoordinateSystems() )
+ {
+ //iterate through all chart types in the current coordinate system
+ for( rtl::Reference< ChartType > const & chartType : coords->getChartTypes2() )
+ {
+ aResult.push_back( chartType->getDataSeries2() );
+ }
+ }
+ return aResult;
+}
+
+std::vector< rtl::Reference< ::chart::DataSeries > >
+ Diagram::getDataSeries()
+{
+ std::vector< rtl::Reference< DataSeries > > aResult;
+ try
+ {
+ for( rtl::Reference< BaseCoordinateSystem > const & coords : getBaseCoordinateSystems() )
+ {
+ for( rtl::Reference< ChartType> const & chartType : coords->getChartTypes2() )
+ {
+ const std::vector< rtl::Reference< DataSeries > > aSeriesSeq( chartType->getDataSeries2() );
+ aResult.insert( aResult.end(), aSeriesSeq.begin(), aSeriesSeq.end() );
+ }
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+ return aResult;
+}
+
+rtl::Reference< ChartType > Diagram::getChartTypeOfSeries(
+ const rtl::Reference< DataSeries >& xGivenDataSeries )
+{
+ if( !xGivenDataSeries.is() )
+ return nullptr;
+
+ //iterate through the model to find the given xSeries
+ //the found parent indicates the charttype
+
+ //iterate through all coordinate systems
+
+ for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : getBaseCoordinateSystems() )
+ {
+ //iterate through all chart types in the current coordinate system
+ const std::vector< rtl::Reference< ChartType > > & aChartTypeList( xCooSys->getChartTypes2() );
+ for( rtl::Reference< ChartType > const & xChartType : aChartTypeList )
+ {
+ //iterate through all series in this chart type
+ for( rtl::Reference< DataSeries > const & dataSeries : xChartType->getDataSeries2() )
+ {
+ if( xGivenDataSeries==dataSeries )
+ return xChartType;
+ }
+ }
+ }
+ return nullptr;
+}
+
+rtl::Reference< Axis > Diagram::getAttachedAxis(
+ const rtl::Reference< DataSeries >& xSeries )
+{
+ return AxisHelper::getAxis( 1, DiagramHelper::isSeriesAttachedToMainAxis( xSeries ), this );
+}
+
+bool Diagram::attachSeriesToAxis( bool bAttachToMainAxis
+ , const rtl::Reference< DataSeries >& xDataSeries
+ , const uno::Reference< uno::XComponentContext > & xContext
+ , bool bAdaptAxes )
+{
+ bool bChanged = false;
+
+ //set property at axis
+
+ sal_Int32 nNewAxisIndex = bAttachToMainAxis ? 0 : 1;
+ sal_Int32 nOldAxisIndex = DataSeriesHelper::getAttachedAxisIndex(xDataSeries);
+ rtl::Reference< Axis > xOldAxis = getAttachedAxis( xDataSeries );
+
+ if( nOldAxisIndex != nNewAxisIndex )
+ {
+ try
+ {
+ xDataSeries->setPropertyValue( "AttachedAxisIndex", uno::Any( nNewAxisIndex ) );
+ bChanged = true;
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+ }
+
+ if( bChanged )
+ {
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( 1, bAttachToMainAxis, this );
+ if(!xAxis.is()) //create an axis if necessary
+ xAxis = AxisHelper::createAxis( 1, bAttachToMainAxis, this, xContext );
+ if( bAdaptAxes )
+ {
+ AxisHelper::makeAxisVisible( xAxis );
+ AxisHelper::hideAxisIfNoDataIsAttached( xOldAxis, this );
+ }
+ }
+
+ return bChanged;
+}
+
+void Diagram::replaceCoordinateSystem(
+ const rtl::Reference< BaseCoordinateSystem > & xCooSysToReplace,
+ const rtl::Reference< BaseCoordinateSystem > & xReplacement )
+{
+ // update the coordinate-system container
+ try
+ {
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories = getCategories();
+
+ // move chart types of xCooSysToReplace to xReplacement
+ xReplacement->setChartTypes( xCooSysToReplace->getChartTypes());
+
+ removeCoordinateSystem( xCooSysToReplace );
+ addCoordinateSystem( xReplacement );
+
+ if( xCategories.is() )
+ setCategories( xCategories );
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+}
+
+sal_Int32 Diagram::getDimension()
+{
+ // -1: not yet set
+ sal_Int32 nResult = -1;
+
+ try
+ {
+ for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : getBaseCoordinateSystems() )
+ {
+ if(xCooSys.is())
+ {
+ nResult = xCooSys->getDimension();
+ break;
+ }
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+ return nResult;
+}
+
+void Diagram::setDimension( sal_Int32 nNewDimensionCount )
+{
+ if( getDimension() == nNewDimensionCount )
+ return;
+
+ try
+ {
+ bool rbFound = false;
+ bool rbAmbiguous = true;
+ StackMode eStackMode = getStackMode( rbFound, rbAmbiguous );
+ bool bIsSupportingOnlyDeepStackingFor3D=false;
+
+ //change all coordinate systems:
+ auto aCoordSystems = getBaseCoordinateSystems();
+ for( rtl::Reference<BaseCoordinateSystem> const & xOldCooSys : aCoordSystems )
+ {
+ rtl::Reference< BaseCoordinateSystem > xNewCooSys;
+
+ const std::vector< rtl::Reference< ChartType > > aChartTypeList( xOldCooSys->getChartTypes2() );
+ for( rtl::Reference< ChartType > const & xChartType : aChartTypeList )
+ {
+ bIsSupportingOnlyDeepStackingFor3D = ChartTypeHelper::isSupportingOnlyDeepStackingFor3D( xChartType );
+ if(!xNewCooSys.is())
+ {
+ xNewCooSys = dynamic_cast<BaseCoordinateSystem*>(xChartType->createCoordinateSystem( nNewDimensionCount ).get());
+ assert(xNewCooSys);
+ break;
+ }
+ //@todo make sure that all following charttypes are also capable of the new dimension
+ //otherwise separate them in a different group
+ //BM: might be done in replaceCoordinateSystem()
+ }
+
+ // replace the old coordinate system at all places where it was used
+ replaceCoordinateSystem( xOldCooSys, xNewCooSys );
+ }
+
+ //correct stack mode if necessary
+ if( nNewDimensionCount==3 && eStackMode != StackMode::ZStacked && bIsSupportingOnlyDeepStackingFor3D )
+ setStackMode( StackMode::ZStacked );
+ else if( nNewDimensionCount==2 && eStackMode == StackMode::ZStacked )
+ setStackMode( StackMode::NONE );
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+}
+
+void Diagram::setStackMode( StackMode eStackMode )
+{
+ try
+ {
+ bool bValueFound = false;
+ bool bIsAmbiguous = false;
+ StackMode eOldStackMode = getStackMode( bValueFound, bIsAmbiguous );
+
+ if( eStackMode == eOldStackMode && !bIsAmbiguous )
+ return;
+
+ chart2::StackingDirection eNewDirection = chart2::StackingDirection_NO_STACKING;
+ if( eStackMode == StackMode::YStacked || eStackMode == StackMode::YStackedPercent )
+ eNewDirection = chart2::StackingDirection_Y_STACKING;
+ else if( eStackMode == StackMode::ZStacked )
+ eNewDirection = chart2::StackingDirection_Z_STACKING;
+
+ uno::Any aNewDirection( eNewDirection );
+
+ bool bPercent = false;
+ if( eStackMode == StackMode::YStackedPercent )
+ bPercent = true;
+
+ //iterate through all coordinate systems
+ for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : getBaseCoordinateSystems() )
+ {
+ //set correct percent stacking
+ const sal_Int32 nMaximumScaleIndex = xCooSys->getMaximumAxisIndexByDimension(1);
+ for(sal_Int32 nI=0; nI<=nMaximumScaleIndex; ++nI)
+ {
+ rtl::Reference< Axis > xAxis = xCooSys->getAxisByDimension2( 1,nI );
+ if( xAxis.is())
+ {
+ chart2::ScaleData aScaleData = xAxis->getScaleData();
+ if( (aScaleData.AxisType==chart2::AxisType::PERCENT) != bPercent )
+ {
+ if( bPercent )
+ aScaleData.AxisType = chart2::AxisType::PERCENT;
+ else
+ aScaleData.AxisType = chart2::AxisType::REALNUMBER;
+ xAxis->setScaleData( aScaleData );
+ }
+ }
+ }
+ //iterate through all chart types in the current coordinate system
+ const std::vector< rtl::Reference< ChartType > > & aChartTypeList( xCooSys->getChartTypes2() );
+ if (aChartTypeList.empty())
+ continue;
+
+ rtl::Reference< ChartType > xChartType( aChartTypeList[0] );
+
+ //iterate through all series in this chart type
+ for( rtl::Reference< DataSeries > const & dataSeries : xChartType->getDataSeries2() )
+ {
+ dataSeries->setPropertyValue( "StackingDirection", aNewDirection );
+ }
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+}
+
+StackMode Diagram::getStackMode( bool& rbFound, bool& rbAmbiguous )
+{
+ rbFound=false;
+ rbAmbiguous=false;
+
+ StackMode eGlobalStackMode = StackMode::NONE;
+
+ //iterate through all coordinate systems
+ for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : getBaseCoordinateSystems() )
+ {
+ //iterate through all chart types in the current coordinate system
+ std::vector< rtl::Reference< ChartType > > aChartTypeList( xCooSys->getChartTypes2() );
+ for( std::size_t nT = 0; nT < aChartTypeList.size(); ++nT )
+ {
+ rtl::Reference< ChartType > xChartType( aChartTypeList[nT] );
+
+ StackMode eLocalStackMode = DiagramHelper::getStackModeFromChartType(
+ xChartType, rbFound, rbAmbiguous, xCooSys );
+
+ if( rbFound && eLocalStackMode != eGlobalStackMode && nT>0 )
+ {
+ rbAmbiguous = true;
+ return eGlobalStackMode;
+ }
+
+ eGlobalStackMode = eLocalStackMode;
+ }
+ }
+
+ return eGlobalStackMode;
+}
+
+void Diagram::setVertical( bool bVertical /* = true */ )
+{
+ try
+ {
+ uno::Any aValue;
+ aValue <<= bVertical;
+ for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : getBaseCoordinateSystems() )
+ {
+ bool bChanged = false;
+ bool bOldSwap = false;
+ if( !(xCooSys->getPropertyValue("SwapXAndYAxis") >>= bOldSwap)
+ || bVertical != bOldSwap )
+ bChanged = true;
+
+ if( bChanged )
+ xCooSys->setPropertyValue("SwapXAndYAxis", aValue);
+
+ const sal_Int32 nDimensionCount = xCooSys->getDimension();
+ sal_Int32 nDimIndex = 0;
+ for (nDimIndex=0; nDimIndex < nDimensionCount; ++nDimIndex)
+ {
+ const sal_Int32 nMaximumScaleIndex = xCooSys->getMaximumAxisIndexByDimension(nDimIndex);
+ for (sal_Int32 nI = 0; nI <= nMaximumScaleIndex; ++nI)
+ {
+ rtl::Reference<Axis> xAxis = xCooSys->getAxisByDimension2(nDimIndex,nI);
+ if (!xAxis.is())
+ continue;
+
+ //adapt title rotation only when axis swapping has changed
+ if (!bChanged)
+ continue;
+
+ Reference< beans::XPropertySet > xTitleProps( xAxis->getTitleObject(), uno::UNO_QUERY );
+ if (!xTitleProps.is())
+ continue;
+
+ double fAngleDegree = 0.0;
+ xTitleProps->getPropertyValue("TextRotation") >>= fAngleDegree;
+ if (fAngleDegree != 0.0 &&
+ !rtl::math::approxEqual(fAngleDegree, 90.0))
+ continue;
+
+ double fNewAngleDegree = 0.0;
+ if( !bVertical && nDimIndex == 1 )
+ fNewAngleDegree = 90.0;
+ else if( bVertical && nDimIndex == 0 )
+ fNewAngleDegree = 90.0;
+
+ xTitleProps->setPropertyValue("TextRotation", uno::Any(fNewAngleDegree));
+ }
+ }
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+}
+
+bool Diagram::getVertical( bool& rbFound, bool& rbAmbiguous )
+{
+ bool bValue = false;
+ rbFound = false;
+ rbAmbiguous = false;
+
+ for (rtl::Reference<BaseCoordinateSystem> const & coords : getBaseCoordinateSystems())
+ {
+ bool bCurrent = false;
+ if (coords->getPropertyValue("SwapXAndYAxis") >>= bCurrent)
+ {
+ if (!rbFound)
+ {
+ bValue = bCurrent;
+ rbFound = true;
+ }
+ else if (bCurrent != bValue)
+ {
+ // ambiguous -> choose always first found
+ rbAmbiguous = true;
+ }
+ }
+ }
+ return bValue;
+}
+
+Diagram::tTemplateWithServiceName
+ Diagram::getTemplate(
+ const rtl::Reference< ::chart::ChartTypeManager > & xChartTypeManager )
+{
+ tTemplateWithServiceName aResult;
+
+ if( !xChartTypeManager )
+ return aResult;
+
+ Sequence< OUString > aServiceNames( xChartTypeManager->getAvailableServiceNames());
+ const sal_Int32 nLength = aServiceNames.getLength();
+
+ bool bTemplateFound = false;
+
+ for( sal_Int32 i = 0; ! bTemplateFound && i < nLength; ++i )
+ {
+ try
+ {
+ rtl::Reference< ::chart::ChartTypeTemplate > xTempl =
+ xChartTypeManager->createTemplate( aServiceNames[ i ] );
+
+ if (xTempl.is() && xTempl->matchesTemplate2(this, true))
+ {
+ aResult.xChartTypeTemplate = xTempl;
+ aResult.sServiceName = aServiceNames[ i ];
+ bTemplateFound = true;
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+ }
+
+ return aResult;
+}
+
+std::vector< rtl::Reference< RegressionCurveModel > >
+ Diagram::getAllRegressionCurvesNotMeanValueLine()
+{
+ std::vector< rtl::Reference< RegressionCurveModel > > aResult;
+ std::vector< rtl::Reference< DataSeries > > aSeries( getDataSeries());
+ for (auto const& elem : aSeries)
+ {
+ for( rtl::Reference< RegressionCurveModel > const & curve : elem->getRegressionCurves2() )
+ {
+ if( ! RegressionCurveHelper::isMeanValueLine( curve ))
+ aResult.push_back( curve );
+ }
+ }
+
+ return aResult;
+}
+
+double Diagram::getCameraDistance()
+{
+ double fCameraDistance = FIXED_SIZE_FOR_3D_CHART_VOLUME;
+
+ try
+ {
+ drawing::CameraGeometry aCG( ThreeDHelper::getDefaultCameraGeometry() );
+ getFastPropertyValue( PROP_SCENE_CAMERA_GEOMETRY ) >>= aCG;
+ ::basegfx::B3DVector aVRP( BaseGFXHelper::Position3DToB3DVector( aCG.vrp ) );
+ fCameraDistance = aVRP.getLength();
+
+ ThreeDHelper::ensureCameraDistanceRange( fCameraDistance );
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+ return fCameraDistance;
+}
+
+void Diagram::setCameraDistance(double fCameraDistance )
+{
+ try
+ {
+ if( fCameraDistance <= 0 )
+ fCameraDistance = FIXED_SIZE_FOR_3D_CHART_VOLUME;
+
+ drawing::CameraGeometry aCG( ThreeDHelper::getDefaultCameraGeometry() );
+ getFastPropertyValue( PROP_SCENE_CAMERA_GEOMETRY ) >>= aCG;
+ ::basegfx::B3DVector aVRP( BaseGFXHelper::Position3DToB3DVector( aCG.vrp ) );
+ if( ::basegfx::fTools::equalZero( aVRP.getLength() ) )
+ aVRP = ::basegfx::B3DVector(0,0,1);
+ aVRP.setLength(fCameraDistance);
+ aCG.vrp = BaseGFXHelper::B3DVectorToPosition3D( aVRP );
+
+ setFastPropertyValue( PROP_SCENE_CAMERA_GEOMETRY, uno::Any( aCG ));
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+}
+
+static bool lcl_isRightAngledAxesSetAndSupported( Diagram& rDiagram )
+{
+ bool bRightAngledAxes = false;
+ rDiagram.getFastPropertyValue( PROP_DIAGRAM_RIGHT_ANGLED_AXES ) >>= bRightAngledAxes; // "RightAngledAxes"
+ if(bRightAngledAxes)
+ {
+ if( ChartTypeHelper::isSupportingRightAngledAxes(
+ rDiagram.getChartTypeByIndex( 0 ) ) )
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+void Diagram::getRotation( sal_Int32& rnHorizontalAngleDegree, sal_Int32& rnVerticalAngleDegree )
+{
+ double fXAngle, fYAngle, fZAngle;
+ getRotationAngle( fXAngle, fYAngle, fZAngle );
+
+ if( !lcl_isRightAngledAxesSetAndSupported( *this ) )
+ {
+ ThreeDHelper::convertXYZAngleRadToElevationRotationDeg(
+ rnHorizontalAngleDegree, rnVerticalAngleDegree, fXAngle, fYAngle, fZAngle);
+ rnVerticalAngleDegree*=-1;
+ }
+ else
+ {
+ rnHorizontalAngleDegree = basegfx::fround(basegfx::rad2deg(fXAngle));
+ rnVerticalAngleDegree = basegfx::fround(-1.0 * basegfx::rad2deg(fYAngle));
+ // nZRotation = basegfx::fround(-1.0 * basegfx::rad2deg(fZAngle));
+ }
+
+ rnHorizontalAngleDegree = NormAngle180(rnHorizontalAngleDegree);
+ rnVerticalAngleDegree = NormAngle180(rnVerticalAngleDegree);
+}
+
+void Diagram::setRotation( sal_Int32 nHorizontalAngleDegree, sal_Int32 nVerticalYAngleDegree )
+{
+ //todo: x and y is not equal to horz and vert in case of RightAngledAxes==false
+ double fXAngle = basegfx::deg2rad(nHorizontalAngleDegree);
+ double fYAngle = basegfx::deg2rad(-1 * nVerticalYAngleDegree);
+ double fZAngle = 0.0;
+
+ if( !lcl_isRightAngledAxesSetAndSupported( *this ) )
+ ThreeDHelper::convertElevationRotationDegToXYZAngleRad(
+ nHorizontalAngleDegree, -1*nVerticalYAngleDegree, fXAngle, fYAngle, fZAngle );
+
+ setRotationAngle( fXAngle, fYAngle, fZAngle );
+}
+
+static ::basegfx::B3DHomMatrix lcl_getCameraMatrix( Diagram& rDiagram )
+{
+ drawing::HomogenMatrix aCameraMatrix;
+
+ drawing::CameraGeometry aCG( ThreeDHelper::getDefaultCameraGeometry() );
+ rDiagram.getFastPropertyValue( PROP_SCENE_CAMERA_GEOMETRY ) >>= aCG; // "D3DCameraGeometry"
+
+ ::basegfx::B3DVector aVPN( BaseGFXHelper::Direction3DToB3DVector( aCG.vpn ) );
+ ::basegfx::B3DVector aVUP( BaseGFXHelper::Direction3DToB3DVector( aCG.vup ) );
+
+ //normalize vectors:
+ aVPN.normalize();
+ aVUP.normalize();
+
+ ::basegfx::B3DVector aCross = ::basegfx::cross( aVUP, aVPN );
+
+ //first line is VUP x VPN
+ aCameraMatrix.Line1.Column1 = aCross[0];
+ aCameraMatrix.Line1.Column2 = aCross[1];
+ aCameraMatrix.Line1.Column3 = aCross[2];
+ aCameraMatrix.Line1.Column4 = 0.0;
+
+ //second line is VUP
+ aCameraMatrix.Line2.Column1 = aVUP[0];
+ aCameraMatrix.Line2.Column2 = aVUP[1];
+ aCameraMatrix.Line2.Column3 = aVUP[2];
+ aCameraMatrix.Line2.Column4 = 0.0;
+
+ //third line is VPN
+ aCameraMatrix.Line3.Column1 = aVPN[0];
+ aCameraMatrix.Line3.Column2 = aVPN[1];
+ aCameraMatrix.Line3.Column3 = aVPN[2];
+ aCameraMatrix.Line3.Column4 = 0.0;
+
+ //fourth line is 0 0 0 1
+ aCameraMatrix.Line4.Column1 = 0.0;
+ aCameraMatrix.Line4.Column2 = 0.0;
+ aCameraMatrix.Line4.Column3 = 0.0;
+ aCameraMatrix.Line4.Column4 = 1.0;
+
+ return BaseGFXHelper::HomogenMatrixToB3DHomMatrix( aCameraMatrix );
+}
+
+static double lcl_shiftAngleToIntervalMinusPiToPi( double fAngleRad )
+{
+ //valid range: ]-Pi,Pi]
+ while( fAngleRad<=-M_PI )
+ fAngleRad+=(2*M_PI);
+ while( fAngleRad>M_PI )
+ fAngleRad-=(2*M_PI);
+ return fAngleRad;
+}
+
+void Diagram::getRotationAngle( double& rfXAngleRad, double& rfYAngleRad, double& rfZAngleRad )
+{
+ //takes the camera and the transformation matrix into account
+
+ rfXAngleRad = rfYAngleRad = rfZAngleRad = 0.0;
+
+ //get camera rotation
+ ::basegfx::B3DHomMatrix aFixCameraRotationMatrix( lcl_getCameraMatrix( *this ) );
+ BaseGFXHelper::ReduceToRotationMatrix( aFixCameraRotationMatrix );
+
+ //get scene rotation
+ ::basegfx::B3DHomMatrix aSceneRotation;
+ {
+ drawing::HomogenMatrix aHomMatrix;
+ // "D3DTransformMatrix"
+ if( getFastPropertyValue( PROP_SCENE_TRANSF_MATRIX ) >>= aHomMatrix )
+ {
+ aSceneRotation = BaseGFXHelper::HomogenMatrixToB3DHomMatrix( aHomMatrix );
+ BaseGFXHelper::ReduceToRotationMatrix( aSceneRotation );
+ }
+ }
+
+ ::basegfx::B3DHomMatrix aResultRotation = aFixCameraRotationMatrix * aSceneRotation;
+ ::basegfx::B3DTuple aRotation( BaseGFXHelper::GetRotationFromMatrix( aResultRotation ) );
+
+ rfXAngleRad = lcl_shiftAngleToIntervalMinusPiToPi(aRotation.getX());
+ rfYAngleRad = lcl_shiftAngleToIntervalMinusPiToPi(aRotation.getY());
+ rfZAngleRad = lcl_shiftAngleToIntervalMinusPiToPi(aRotation.getZ());
+
+ if(rfZAngleRad<-M_PI_2 || rfZAngleRad>M_PI_2)
+ {
+ rfZAngleRad-=M_PI;
+ rfXAngleRad-=M_PI;
+ rfYAngleRad=(M_PI-rfYAngleRad);
+
+ rfXAngleRad = lcl_shiftAngleToIntervalMinusPiToPi(rfXAngleRad);
+ rfYAngleRad = lcl_shiftAngleToIntervalMinusPiToPi(rfYAngleRad);
+ rfZAngleRad = lcl_shiftAngleToIntervalMinusPiToPi(rfZAngleRad);
+ }
+}
+
+static ::basegfx::B3DHomMatrix lcl_getInverseRotationMatrix( Diagram& rDiagram )
+{
+ ::basegfx::B3DHomMatrix aInverseRotation;
+ double fXAngleRad=0.0;
+ double fYAngleRad=0.0;
+ double fZAngleRad=0.0;
+ rDiagram.getRotationAngle( fXAngleRad, fYAngleRad, fZAngleRad );
+ aInverseRotation.rotate( 0.0, 0.0, -fZAngleRad );
+ aInverseRotation.rotate( 0.0, -fYAngleRad, 0.0 );
+ aInverseRotation.rotate( -fXAngleRad, 0.0, 0.0 );
+ return aInverseRotation;
+}
+
+static void lcl_rotateLights( const ::basegfx::B3DHomMatrix& rLightRotation, Diagram& rDiagram )
+{
+ ::basegfx::B3DHomMatrix aLightRotation( rLightRotation );
+ BaseGFXHelper::ReduceToRotationMatrix( aLightRotation );
+
+ // "D3DSceneLightDirection1","D3DSceneLightOn1",
+ lcl_RotateLightSource( rDiagram, PROP_SCENE_LIGHT_DIRECTION_1, PROP_SCENE_LIGHT_ON_1, aLightRotation );
+ lcl_RotateLightSource( rDiagram, PROP_SCENE_LIGHT_DIRECTION_2, PROP_SCENE_LIGHT_ON_2, aLightRotation );
+ lcl_RotateLightSource( rDiagram, PROP_SCENE_LIGHT_DIRECTION_3, PROP_SCENE_LIGHT_ON_3, aLightRotation );
+ lcl_RotateLightSource( rDiagram, PROP_SCENE_LIGHT_DIRECTION_4, PROP_SCENE_LIGHT_ON_4, aLightRotation );
+ lcl_RotateLightSource( rDiagram, PROP_SCENE_LIGHT_DIRECTION_5, PROP_SCENE_LIGHT_ON_5, aLightRotation );
+ lcl_RotateLightSource( rDiagram, PROP_SCENE_LIGHT_DIRECTION_6, PROP_SCENE_LIGHT_ON_6, aLightRotation );
+ lcl_RotateLightSource( rDiagram, PROP_SCENE_LIGHT_DIRECTION_7, PROP_SCENE_LIGHT_ON_7, aLightRotation );
+ lcl_RotateLightSource( rDiagram, PROP_SCENE_LIGHT_DIRECTION_8, PROP_SCENE_LIGHT_ON_8, aLightRotation );
+}
+
+void Diagram::setRotationAngle(
+ double fXAngleRad, double fYAngleRad, double fZAngleRad )
+{
+ //the rotation of the camera is not touched but taken into account
+ //the rotation difference is applied to the transformation matrix
+
+ //the light sources will be adapted also
+
+ try
+ {
+ //remind old rotation for adaptation of light directions
+ ::basegfx::B3DHomMatrix aInverseOldRotation( lcl_getInverseRotationMatrix( *this ) );
+
+ ::basegfx::B3DHomMatrix aInverseCameraRotation;
+ {
+ ::basegfx::B3DTuple aR( BaseGFXHelper::GetRotationFromMatrix(
+ lcl_getCameraMatrix( *this ) ) );
+ aInverseCameraRotation.rotate( 0.0, 0.0, -aR.getZ() );
+ aInverseCameraRotation.rotate( 0.0, -aR.getY(), 0.0 );
+ aInverseCameraRotation.rotate( -aR.getX(), 0.0, 0.0 );
+ }
+
+ ::basegfx::B3DHomMatrix aCumulatedRotation;
+ aCumulatedRotation.rotate( fXAngleRad, fYAngleRad, fZAngleRad );
+
+ //calculate new scene matrix
+ ::basegfx::B3DHomMatrix aSceneRotation = aInverseCameraRotation*aCumulatedRotation;
+ BaseGFXHelper::ReduceToRotationMatrix( aSceneRotation );
+
+ //set new rotation to transformation matrix ("D3DTransformMatrix")
+ setFastPropertyValue(
+ PROP_SCENE_TRANSF_MATRIX, uno::Any( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aSceneRotation )));
+
+ //rotate lights if RightAngledAxes are not set or not supported
+ bool bRightAngledAxes = false;
+ getFastPropertyValue( PROP_DIAGRAM_RIGHT_ANGLED_AXES ) >>= bRightAngledAxes;
+ if(!bRightAngledAxes || !ChartTypeHelper::isSupportingRightAngledAxes(
+ getChartTypeByIndex( 0 ) ) )
+ {
+ ::basegfx::B3DHomMatrix aNewRotation;
+ aNewRotation.rotate( fXAngleRad, fYAngleRad, fZAngleRad );
+ lcl_rotateLights( aNewRotation*aInverseOldRotation, *this );
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+}
+
+static bool lcl_isEqual( const drawing::Direction3D& rA, const drawing::Direction3D& rB )
+{
+ return ::rtl::math::approxEqual(rA.DirectionX, rB.DirectionX)
+ && ::rtl::math::approxEqual(rA.DirectionY, rB.DirectionY)
+ && ::rtl::math::approxEqual(rA.DirectionZ, rB.DirectionZ);
+}
+static bool lcl_isSimpleScheme( drawing::ShadeMode aShadeMode
+ , sal_Int32 nRoundedEdges
+ , sal_Int32 nObjectLines
+ , const rtl::Reference< Diagram >& xDiagram )
+{
+ if(aShadeMode!=drawing::ShadeMode_FLAT)
+ return false;
+ if(nRoundedEdges!=0)
+ return false;
+ if(nObjectLines==0)
+ {
+ rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeByIndex( 0 ) );
+ return ChartTypeHelper::noBordersForSimpleScheme( xChartType );
+ }
+ if(nObjectLines!=1)
+ return false;
+ return true;
+}
+static bool lcl_isRealisticScheme( drawing::ShadeMode aShadeMode
+ , sal_Int32 nRoundedEdges
+ , sal_Int32 nObjectLines )
+{
+ if(aShadeMode!=drawing::ShadeMode_SMOOTH)
+ return false;
+ if(nRoundedEdges!=5)
+ return false;
+ if(nObjectLines!=0)
+ return false;
+ return true;
+}
+static bool lcl_isLightScheme( Diagram& rDiagram, bool bRealistic )
+{
+ bool bIsOn = false;
+ // "D3DSceneLightOn2" / UNO_NAME_3D_SCENE_LIGHTON_2
+ rDiagram.getFastPropertyValue( PROP_SCENE_LIGHT_ON_2 ) >>= bIsOn;
+ if(!bIsOn)
+ return false;
+
+ rtl::Reference< ChartType > xChartType( rDiagram.getChartTypeByIndex( 0 ) );
+
+ sal_Int32 nColor = 0;
+ // "D3DSceneLightColor2" / UNO_NAME_3D_SCENE_LIGHTCOLOR_2
+ rDiagram.getFastPropertyValue( PROP_SCENE_LIGHT_COLOR_2 ) >>= nColor;
+ if( nColor != ::chart::ChartTypeHelper::getDefaultDirectLightColor( !bRealistic, xChartType ) )
+ return false;
+
+ sal_Int32 nAmbientColor = 0;
+ // "D3DSceneAmbientColor" / UNO_NAME_3D_SCENE_AMBIENTCOLOR
+ rDiagram.getFastPropertyValue( PROP_SCENE_AMBIENT_COLOR ) >>= nAmbientColor;
+ if( nAmbientColor != ::chart::ChartTypeHelper::getDefaultAmbientLightColor( !bRealistic, xChartType ) )
+ return false;
+
+ drawing::Direction3D aDirection(0,0,0);
+ // "D3DSceneLightDirection2" / UNO_NAME_3D_SCENE_LIGHTDIRECTION_2
+ rDiagram.getFastPropertyValue( PROP_SCENE_LIGHT_DIRECTION_2 ) >>= aDirection;
+
+ drawing::Direction3D aDefaultDirection( bRealistic
+ ? ChartTypeHelper::getDefaultRealisticLightDirection(xChartType)
+ : ChartTypeHelper::getDefaultSimpleLightDirection(xChartType) );
+
+ //rotate default light direction when right angled axes are off but supported
+ {
+ bool bRightAngledAxes = false;
+ rDiagram.getFastPropertyValue( PROP_DIAGRAM_RIGHT_ANGLED_AXES ) >>= bRightAngledAxes; // "RightAngledAxes"
+ if(!bRightAngledAxes)
+ {
+ if( ChartTypeHelper::isSupportingRightAngledAxes(
+ rDiagram.getChartTypeByIndex( 0 ) ) )
+ {
+ ::basegfx::B3DHomMatrix aRotation( lcl_getCompleteRotationMatrix( rDiagram ) );
+ BaseGFXHelper::ReduceToRotationMatrix( aRotation );
+ ::basegfx::B3DVector aLightVector( BaseGFXHelper::Direction3DToB3DVector( aDefaultDirection ) );
+ aLightVector = aRotation*aLightVector;
+ aDefaultDirection = BaseGFXHelper::B3DVectorToDirection3D( aLightVector );
+ }
+ }
+ }
+
+ return lcl_isEqual( aDirection, aDefaultDirection );
+}
+static bool lcl_isRealisticLightScheme( Diagram& rDiagram )
+{
+ return lcl_isLightScheme( rDiagram, true /*bRealistic*/ );
+}
+static bool lcl_isSimpleLightScheme( Diagram& rDiagram )
+{
+ return lcl_isLightScheme( rDiagram, false /*bRealistic*/ );
+}
+
+ThreeDLookScheme Diagram::detectScheme()
+{
+ ThreeDLookScheme aScheme = ThreeDLookScheme::ThreeDLookScheme_Unknown;
+
+ sal_Int32 nRoundedEdges;
+ sal_Int32 nObjectLines;
+ ThreeDHelper::getRoundedEdgesAndObjectLines( this, nRoundedEdges, nObjectLines );
+
+ //get shade mode and light settings:
+ drawing::ShadeMode aShadeMode( drawing::ShadeMode_SMOOTH );
+ try
+ {
+ getFastPropertyValue( PROP_SCENE_SHADE_MODE )>>= aShadeMode; // "D3DSceneShadeMode"
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+ if( lcl_isSimpleScheme( aShadeMode, nRoundedEdges, nObjectLines, this ) )
+ {
+ if( lcl_isSimpleLightScheme(*this) )
+ aScheme = ThreeDLookScheme::ThreeDLookScheme_Simple;
+ }
+ else if( lcl_isRealisticScheme( aShadeMode, nRoundedEdges, nObjectLines ) )
+ {
+ if( lcl_isRealisticLightScheme(*this) )
+ aScheme = ThreeDLookScheme::ThreeDLookScheme_Realistic;
+ }
+
+ return aScheme;
+}
+
+static void lcl_setRealisticScheme( drawing::ShadeMode& rShadeMode
+ , sal_Int32& rnRoundedEdges
+ , sal_Int32& rnObjectLines )
+{
+ rShadeMode = drawing::ShadeMode_SMOOTH;
+ rnRoundedEdges = 5;
+ rnObjectLines = 0;
+}
+
+static void lcl_setSimpleScheme( drawing::ShadeMode& rShadeMode
+ , sal_Int32& rnRoundedEdges
+ , sal_Int32& rnObjectLines
+ , const rtl::Reference< Diagram >& xDiagram )
+{
+ rShadeMode = drawing::ShadeMode_FLAT;
+ rnRoundedEdges = 0;
+
+ rtl::Reference< ChartType > xChartType( xDiagram->getChartTypeByIndex( 0 ) );
+ rnObjectLines = ChartTypeHelper::noBordersForSimpleScheme( xChartType ) ? 0 : 1;
+}
+void Diagram::setScheme( ThreeDLookScheme aScheme )
+{
+ if( aScheme == ThreeDLookScheme::ThreeDLookScheme_Unknown )
+ return;
+
+ drawing::ShadeMode aShadeMode;
+ sal_Int32 nRoundedEdges;
+ sal_Int32 nObjectLines;
+
+ if( aScheme == ThreeDLookScheme::ThreeDLookScheme_Simple )
+ lcl_setSimpleScheme(aShadeMode,nRoundedEdges,nObjectLines,this);
+ else
+ lcl_setRealisticScheme(aShadeMode,nRoundedEdges,nObjectLines);
+
+ try
+ {
+ ThreeDHelper::setRoundedEdgesAndObjectLines( this, nRoundedEdges, nObjectLines );
+
+ drawing::ShadeMode aOldShadeMode;
+ if( ! (getFastPropertyValue( PROP_SCENE_SHADE_MODE)>>=aOldShadeMode) ||
+ aOldShadeMode != aShadeMode )
+ {
+ setFastPropertyValue( PROP_SCENE_SHADE_MODE, uno::Any( aShadeMode )); // "D3DSceneShadeMode"
+ }
+
+ lcl_setLightsForScheme( *this, aScheme );
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+}
+
+void Diagram::setDefaultRotation( bool bPieOrDonut )
+{
+ drawing::CameraGeometry aCameraGeo( ThreeDHelper::getDefaultCameraGeometry( bPieOrDonut ) );
+ // "D3DCameraGeometry"
+ setFastPropertyValue( PROP_SCENE_CAMERA_GEOMETRY, uno::Any( aCameraGeo ));
+
+ ::basegfx::B3DHomMatrix aSceneRotation;
+ if( bPieOrDonut )
+ aSceneRotation.rotate( -M_PI/3.0, 0, 0 );
+ // "D3DTransformMatrix"
+ setFastPropertyValue( PROP_SCENE_TRANSF_MATRIX,
+ uno::Any( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aSceneRotation )));
+}
+
+void Diagram::switchRightAngledAxes( bool bRightAngledAxes )
+{
+ try
+ {
+ bool bOldRightAngledAxes = false;
+ getFastPropertyValue( PROP_DIAGRAM_RIGHT_ANGLED_AXES ) >>= bOldRightAngledAxes; // "RightAngledAxes"
+ if( bOldRightAngledAxes!=bRightAngledAxes)
+ {
+ setFastPropertyValue( PROP_DIAGRAM_RIGHT_ANGLED_AXES, uno::Any( bRightAngledAxes ));
+ if(bRightAngledAxes)
+ {
+ ::basegfx::B3DHomMatrix aInverseRotation( lcl_getInverseRotationMatrix( *this ) );
+ lcl_rotateLights( aInverseRotation, *this );
+ }
+ else
+ {
+ ::basegfx::B3DHomMatrix aCompleteRotation( lcl_getCompleteRotationMatrix( *this ) );
+ lcl_rotateLights( aCompleteRotation, *this );
+ }
+ }
+ }
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+}
+
} // namespace chart
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx
index a08375fc5cf4..dbd5876b978a 100644
--- a/chart2/source/model/main/FormattedString.cxx
+++ b/chart2/source/model/main/FormattedString.cxx
@@ -17,13 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "FormattedString.hxx"
+#include <FormattedString.hxx>
#include <CharacterProperties.hxx>
#include <PropertyHelper.hxx>
#include <ModifyListenerHelper.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
namespace com::sun::star::uno { class XComponentContext; }
@@ -33,61 +32,36 @@ using ::com::sun::star::beans::Property;
using ::com::sun::star::uno::Sequence;
using ::osl::MutexGuard;
-namespace
-{
-
-struct StaticFormattedStringDefaults_Initializer
+namespace chart
{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- ::chart::CharacterProperties::AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-};
-
-struct StaticFormattedStringDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticFormattedStringDefaults_Initializer >
+const ::chart::tPropertyValueMap & StaticFormattedStringDefaults()
{
+ static ::chart::tPropertyValueMap aStaticDefaults = []
+ {
+ ::chart::tPropertyValueMap aMap;
+ ::chart::CharacterProperties::AddDefaultsToMap( aMap );
+ return aMap;
+ }();
+ return aStaticDefaults;
};
+} // namespace chart
-struct StaticFormattedStringInfoHelper_Initializer
+namespace
{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-
-};
-struct StaticFormattedStringInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticFormattedStringInfoHelper_Initializer >
+::cppu::OPropertyArrayHelper& StaticFormattedStringInfoHelper()
{
-};
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
-struct StaticFormattedStringInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticFormattedStringInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticFormattedStringInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticFormattedStringInfo_Initializer >
-{
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -96,7 +70,6 @@ namespace chart
{
FormattedString::FormattedString() :
- ::property::OPropertySet( m_aMutex ),
m_aType(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT),
m_bDataLabelsRange(false),
m_xModifyEventForwarder( new ModifyEventForwarder() )
@@ -104,7 +77,7 @@ FormattedString::FormattedString() :
FormattedString::FormattedString( const FormattedString & rOther ) :
impl::FormattedString_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_aString( rOther.m_aString ),
m_aType(rOther.m_aType),
m_aGuid(rOther.m_aGuid),
@@ -243,7 +216,7 @@ void FormattedString::fireModifyEvent()
// ____ OPropertySet ____
void FormattedString::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticFormattedStringDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticFormattedStringDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -254,13 +227,15 @@ void FormattedString::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
// ____ OPropertySet ____
::cppu::IPropertyArrayHelper & SAL_CALL FormattedString::getInfoHelper()
{
- return *StaticFormattedStringInfoHelper::get();
+ return StaticFormattedStringInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL FormattedString::getPropertySetInfo()
{
- return *StaticFormattedStringInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticFormattedStringInfoHelper() ) );
+ return xPropertySetInfo;
}
using impl::FormattedString_Base;
diff --git a/chart2/source/model/main/GridProperties.cxx b/chart2/source/model/main/GridProperties.cxx
index 0cfeaaafe1e3..a495f631f7e2 100644
--- a/chart2/source/model/main/GridProperties.cxx
+++ b/chart2/source/model/main/GridProperties.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "GridProperties.hxx"
+#include <GridProperties.hxx>
#include <LinePropertiesHelper.hxx>
#include <UserDefinedProperties.hxx>
#include <PropertyHelper.hxx>
@@ -25,7 +25,6 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
namespace com::sun::star::beans { class XPropertySetInfo; }
namespace com::sun::star::uno { class XComponentContext; }
@@ -54,71 +53,38 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT );
}
-struct StaticGridDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::LinePropertiesHelper::AddDefaultsToMap( rOutMap );
-
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_GRID_SHOW, false );
-
- // override other defaults
- ::chart::PropertyHelper::setPropertyValue< sal_Int32 >(
- rOutMap, ::chart::LinePropertiesHelper::PROP_LINE_COLOR, 0xb3b3b3 ); // gray30
- }
-};
-
-struct StaticGridDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticGridDefaults_Initializer >
-{
-};
-
-struct StaticGridInfoHelper_Initializer
+const ::chart::tPropertyValueMap & StaticGridDefaults()
{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+ static ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ ::chart::tPropertyValueMap aTmp;
+ ::chart::LinePropertiesHelper::AddDefaultsToMap( aTmp );
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_GRID_SHOW, false );
+ // override other defaults
+ ::chart::PropertyHelper::setPropertyValue< sal_Int32 >(
+ aTmp, ::chart::LinePropertiesHelper::PROP_LINE_COLOR, 0xb3b3b3 ); // gray30
+ return aTmp;
+ }();
+ return aStaticDefaults;
};
-struct StaticGridInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticGridInfoHelper_Initializer >
+::cppu::OPropertyArrayHelper& StaticGridInfoHelper()
{
-};
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-struct StaticGridInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticGridInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticGridInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticGridInfo_Initializer >
-{
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -127,13 +93,12 @@ namespace chart
{
GridProperties::GridProperties() :
- ::property::OPropertySet( m_aMutex ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{}
GridProperties::GridProperties( const GridProperties & rOther ) :
impl::GridProperties_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
}
@@ -144,7 +109,7 @@ GridProperties::~GridProperties()
// ____ OPropertySet ____
void GridProperties::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticGridDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticGridDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -154,13 +119,15 @@ void GridProperties::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
::cppu::IPropertyArrayHelper & SAL_CALL GridProperties::getInfoHelper()
{
- return *StaticGridInfoHelper::get();
+ return StaticGridInfoHelper();
}
// ____ XPropertySet ____
Reference< beans::XPropertySetInfo > SAL_CALL GridProperties::getPropertySetInfo()
{
- return *StaticGridInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticGridInfoHelper() ) );
+ return xPropertySetInfo;
}
// ____ XCloneable ____
diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx
index 27eae67764ed..f72868b58cb5 100644
--- a/chart2/source/model/main/Legend.cxx
+++ b/chart2/source/model/main/Legend.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "Legend.hxx"
+#include <Legend.hxx>
#include <LinePropertiesHelper.hxx>
#include <FillProperties.hxx>
#include <CharacterProperties.hxx>
@@ -31,7 +31,6 @@
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/chart2/RelativeSize.hpp>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
#include <algorithm>
@@ -106,78 +105,53 @@ void lcl_AddPropertiesToVector(
}
-struct StaticLegendDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::LinePropertiesHelper::AddDefaultsToMap( rOutMap );
- ::chart::FillProperties::AddDefaultsToMap( rOutMap );
- ::chart::CharacterProperties::AddDefaultsToMap( rOutMap );
-
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_LEGEND_ANCHOR_POSITION, chart2::LegendPosition_LINE_END );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_LEGEND_EXPANSION, css::chart::ChartLegendExpansion_HIGH );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_LEGEND_SHOW, true );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_LEGEND_OVERLAY, false );
-
- float fDefaultCharHeight = 10.0;
- ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_CHAR_HEIGHT, fDefaultCharHeight );
- ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_ASIAN_CHAR_HEIGHT, fDefaultCharHeight );
- ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultCharHeight );
- }
-};
+} // namespace
-struct StaticLegendDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticLegendDefaults_Initializer >
+namespace chart
{
-};
-
-struct StaticLegendInfoHelper_Initializer
+const ::chart::tPropertyValueMap& StaticLegendDefaults()
{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::FillProperties::AddPropertiesToVector( aProperties );
- ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
+ static ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ ::chart::tPropertyValueMap aTmp;
+ ::chart::LinePropertiesHelper::AddDefaultsToMap( aTmp );
+ ::chart::FillProperties::AddDefaultsToMap( aTmp );
+ ::chart::CharacterProperties::AddDefaultsToMap( aTmp );
+
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_LEGEND_ANCHOR_POSITION, chart2::LegendPosition_LINE_END );
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_LEGEND_EXPANSION, css::chart::ChartLegendExpansion_HIGH );
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_LEGEND_SHOW, true );
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_LEGEND_OVERLAY, false );
+
+ float fDefaultCharHeight = 10.0;
+ ::chart::PropertyHelper::setPropertyValue( aTmp, ::chart::CharacterProperties::PROP_CHAR_CHAR_HEIGHT, fDefaultCharHeight );
+ ::chart::PropertyHelper::setPropertyValue( aTmp, ::chart::CharacterProperties::PROP_CHAR_ASIAN_CHAR_HEIGHT, fDefaultCharHeight );
+ ::chart::PropertyHelper::setPropertyValue( aTmp, ::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultCharHeight );
+ return aTmp;
+ }();
+ return aStaticDefaults;
};
+} // namespace chart
-struct StaticLegendInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticLegendInfoHelper_Initializer >
-{
-};
-
-struct StaticLegendInfo_Initializer
+namespace
{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticLegendInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
-
-struct StaticLegendInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticLegendInfo_Initializer >
+::cppu::OPropertyArrayHelper& StaticLegendInfoHelper()
{
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::FillProperties::AddPropertiesToVector( aProperties );
+ ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -186,14 +160,13 @@ namespace chart
{
Legend::Legend() :
- ::property::OPropertySet( m_aMutex ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
}
Legend::Legend( const Legend & rOther ) :
impl::Legend_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
}
@@ -240,7 +213,7 @@ void Legend::firePropertyChangeEvent()
// ____ OPropertySet ____
void Legend::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticLegendDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticLegendDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -250,13 +223,15 @@ void Legend::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
::cppu::IPropertyArrayHelper & SAL_CALL Legend::getInfoHelper()
{
- return *StaticLegendInfoHelper::get();
+ return StaticLegendInfoHelper();
}
// ____ XPropertySet ____
Reference< beans::XPropertySetInfo > SAL_CALL Legend::getPropertySetInfo()
{
- return *StaticLegendInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticLegendInfoHelper() ) );
+ return xPropertySetInfo;
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx
index 9f51469ca9cb..deae689d7a2b 100644
--- a/chart2/source/model/main/PageBackground.cxx
+++ b/chart2/source/model/main/PageBackground.cxx
@@ -18,15 +18,17 @@
*/
#include "PageBackground.hxx"
+#include <comphelper/lok.hxx>
#include <LinePropertiesHelper.hxx>
#include <FillProperties.hxx>
#include <UserDefinedProperties.hxx>
#include <PropertyHelper.hxx>
#include <ModifyListenerHelper.hxx>
+#include <svtools/colorcfg.hxx>
+#include <sfx2/viewsh.hxx>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
#include <vector>
#include <algorithm>
@@ -40,70 +42,47 @@ using ::com::sun::star::beans::Property;
namespace
{
-struct StaticPageBackgroundDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::LinePropertiesHelper::AddDefaultsToMap( rOutMap );
- ::chart::FillProperties::AddDefaultsToMap( rOutMap );
-
- // override other defaults
- ::chart::PropertyHelper::setPropertyValue< sal_Int32 >( rOutMap, ::chart::FillProperties::PROP_FILL_COLOR, 0xffffff );
- ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::LinePropertiesHelper::PROP_LINE_STYLE, drawing::LineStyle_NONE );
- }
+const ::chart::tPropertyValueMap& StaticPageBackgroundDefaults()
+{
+ static ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ ::chart::tPropertyValueMap aTmp;
+ ::chart::LinePropertiesHelper::AddDefaultsToMap( aTmp );
+ ::chart::FillProperties::AddDefaultsToMap( aTmp );
+
+ // override other defaults
+ Color aDocColor = COL_WHITE;
+ if (comphelper::LibreOfficeKit::isActive()) {
+ aDocColor = COL_AUTO;
+ } else {
+ if (SfxViewShell* pCurrentSh = SfxViewShell::Current()) {
+ aDocColor = pCurrentSh->GetColorConfigColor(svtools::DOCCOLOR);
+ } else {
+ aDocColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
+ }
+ }
+ ::chart::PropertyHelper::setPropertyValue( aTmp, ::chart::FillProperties::PROP_FILL_COLOR, aDocColor );
+ ::chart::PropertyHelper::setPropertyValue( aTmp, ::chart::LinePropertiesHelper::PROP_LINE_STYLE, drawing::LineStyle_NONE );
+ return aTmp;
+ }();
+ return aStaticDefaults;
};
-struct StaticPageBackgroundDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticPageBackgroundDefaults_Initializer >
+::cppu::OPropertyArrayHelper& StaticPageBackgroundInfoHelper()
{
-};
-
-struct StaticPageBackgroundInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static uno::Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::FillProperties::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::FillProperties::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- return comphelper::containerToSequence( aProperties );
- }
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-};
-
-struct StaticPageBackgroundInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticPageBackgroundInfoHelper_Initializer >
-{
-};
-
-struct StaticPageBackgroundInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticPageBackgroundInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
-
-struct StaticPageBackgroundInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticPageBackgroundInfo_Initializer >
-{
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -112,19 +91,26 @@ namespace chart
{
PageBackground::PageBackground() :
- ::property::OPropertySet( m_aMutex ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{}
PageBackground::PageBackground( const PageBackground & rOther ) :
impl::PageBackground_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{}
PageBackground::~PageBackground()
{}
+// ____ XTypeProvider ____
+uno::Sequence< css::uno::Type > SAL_CALL PageBackground::getTypes()
+{
+ return ::comphelper::concatSequences(
+ impl::PageBackground_Base::getTypes(),
+ ::property::OPropertySet::getTypes());
+}
+
// ____ XCloneable ____
uno::Reference< util::XCloneable > SAL_CALL PageBackground::createClone()
{
@@ -134,7 +120,7 @@ uno::Reference< util::XCloneable > SAL_CALL PageBackground::createClone()
// ____ OPropertySet ____
void PageBackground::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticPageBackgroundDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticPageBackgroundDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -144,13 +130,15 @@ void PageBackground::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
::cppu::IPropertyArrayHelper & SAL_CALL PageBackground::getInfoHelper()
{
- return *StaticPageBackgroundInfoHelper::get();
+ return StaticPageBackgroundInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL PageBackground::getPropertySetInfo()
{
- return *StaticPageBackgroundInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticPageBackgroundInfoHelper() ) );
+ return xPropertySetInfo;
}
// ____ XModifyBroadcaster ____
diff --git a/chart2/source/model/main/PageBackground.hxx b/chart2/source/model/main/PageBackground.hxx
index 3bc2dcfd0224..2aef8bd45ebe 100644
--- a/chart2/source/model/main/PageBackground.hxx
+++ b/chart2/source/model/main/PageBackground.hxx
@@ -21,7 +21,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/util/XCloneable.hpp>
#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <ModifyListenerHelper.hxx>
@@ -40,7 +39,6 @@ typedef ::cppu::WeakImplHelper<
}
class PageBackground final :
- public cppu::BaseMutex,
public impl::PageBackground_Base,
public ::property::OPropertySet
{
@@ -58,6 +56,9 @@ public:
explicit PageBackground( const PageBackground & rOther );
+ // ____ XTypeProvider ____
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+
// ____ OPropertySet ____
virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx
index 5c891989e37f..0807415dac24 100644
--- a/chart2/source/model/main/PolarCoordinateSystem.cxx
+++ b/chart2/source/model/main/PolarCoordinateSystem.cxx
@@ -31,8 +31,8 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-constexpr OUStringLiteral CHART2_COOSYSTEM_POLAR_SERVICE_NAME
- = u"com.sun.star.chart2.CoordinateSystems.Polar";
+constexpr OUString CHART2_COOSYSTEM_POLAR_SERVICE_NAME
+ = u"com.sun.star.chart2.CoordinateSystems.Polar"_ustr;
}
diff --git a/chart2/source/model/main/StockBar.cxx b/chart2/source/model/main/StockBar.cxx
index c93a9500e2d6..5d7efdc5f0d9 100644
--- a/chart2/source/model/main/StockBar.cxx
+++ b/chart2/source/model/main/StockBar.cxx
@@ -23,8 +23,6 @@
#include <UserDefinedProperties.hxx>
#include <PropertyHelper.hxx>
#include <ModifyListenerHelper.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <tools/diagnose_ex.h>
#include <algorithm>
@@ -38,69 +36,36 @@ using ::com::sun::star::beans::Property;
namespace
{
-struct StaticStockBarInfoHelper_Initializer
+::cppu::OPropertyArrayHelper& StaticStockBarInfoHelper()
{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static uno::Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::FillProperties::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::FillProperties::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-};
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticStockBarInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticStockBarInfoHelper_Initializer >
-{
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
-struct StaticStockBarInfo_Initializer
+const ::chart::tPropertyValueMap & StaticStockBarDefaults()
{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticStockBarInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ static ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ ::chart::tPropertyValueMap aTmp;
+ ::chart::LinePropertiesHelper::AddDefaultsToMap( aTmp );
+ ::chart::FillProperties::AddDefaultsToMap( aTmp );
-struct StaticStockBarInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticStockBarInfo_Initializer >
-{
-};
-
-struct StaticStockBarDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::LinePropertiesHelper::AddDefaultsToMap( rOutMap );
- ::chart::FillProperties::AddDefaultsToMap( rOutMap );
-
- // override other defaults
- ::chart::PropertyHelper::setPropertyValue< sal_Int32 >( rOutMap, ::chart::FillProperties::PROP_FILL_COLOR, 0xffffff ); // white
- }
-};
-
-struct StaticStockBarDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticStockBarDefaults_Initializer >
-{
+ // override other defaults
+ ::chart::PropertyHelper::setPropertyValue< sal_Int32 >( aTmp, ::chart::FillProperties::PROP_FILL_COLOR, 0xffffff ); // white
+ return aTmp;
+ }();
+ return aStaticDefaults;
};
} // anonymous namespace
@@ -109,7 +74,6 @@ namespace chart
{
StockBar::StockBar( bool bRisingCourse ) :
- ::property::OPropertySet( m_aMutex ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
if( ! bRisingCourse )
@@ -125,13 +89,21 @@ StockBar::StockBar( bool bRisingCourse ) :
StockBar::StockBar( const StockBar & rOther ) :
impl::StockBar_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{}
StockBar::~StockBar()
{}
+// ____ XTypeProvider ____
+uno::Sequence< css::uno::Type > SAL_CALL StockBar::getTypes()
+{
+ return ::comphelper::concatSequences(
+ impl::StockBar_Base::getTypes(),
+ ::property::OPropertySet::getTypes());
+}
+
// ____ XCloneable ____
uno::Reference< util::XCloneable > SAL_CALL StockBar::createClone()
{
@@ -141,7 +113,7 @@ uno::Reference< util::XCloneable > SAL_CALL StockBar::createClone()
// ____ OPropertySet ____
void StockBar::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticStockBarDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticStockBarDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -151,13 +123,15 @@ void StockBar::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
::cppu::IPropertyArrayHelper & SAL_CALL StockBar::getInfoHelper()
{
- return *StaticStockBarInfoHelper::get();
+ return StaticStockBarInfoHelper();
}
// ____ XPropertySet ____
Reference< beans::XPropertySetInfo > SAL_CALL StockBar::getPropertySetInfo()
{
- return *StaticStockBarInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticStockBarInfoHelper() ) );
+ return xPropertySetInfo;
}
// ____ XModifyBroadcaster ____
diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx
index 35e3631077b1..10551ce6e318 100644
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -17,7 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "Title.hxx"
+#include <Title.hxx>
+#include <CharacterProperties.hxx>
#include <LinePropertiesHelper.hxx>
#include <FillProperties.hxx>
#include <CloneHelper.hxx>
@@ -30,7 +31,6 @@
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
#include <vector>
#include <algorithm>
@@ -140,86 +140,56 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEVOID );
}
-struct StaticTitleDefaults_Initializer
+const ::chart::tPropertyValueMap& StaticTitleDefaults()
{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::LinePropertiesHelper::AddDefaultsToMap( rOutMap );
- ::chart::FillProperties::AddDefaultsToMap( rOutMap );
-
- // ParagraphProperties
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_TITLE_PARA_ADJUST,
- css::style::ParagraphAdjust_CENTER );
- // PROP_TITLE_PARA_LAST_LINE_ADJUST
-
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_TITLE_PARA_LEFT_MARGIN, 0 );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_TITLE_PARA_RIGHT_MARGIN, 0 );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_TITLE_PARA_TOP_MARGIN, 0 );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_TITLE_PARA_BOTTOM_MARGIN, 0 );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_TITLE_PARA_IS_HYPHENATION, true );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_TITLE_VISIBLE, true );
-
- // own properties
- ::chart::PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_TITLE_TEXT_ROTATION, 0.0 );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_TITLE_TEXT_STACKED, false );
-
- // override other defaults
- ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::FillProperties::PROP_FILL_STYLE, drawing::FillStyle_NONE );
- ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::LinePropertiesHelper::PROP_LINE_STYLE, drawing::LineStyle_NONE );
- }
-};
-
-struct StaticTitleDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticTitleDefaults_Initializer >
-{
-};
-
-struct StaticTitleInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static uno::Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::FillProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-
-};
-
-struct StaticTitleInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticTitleInfoHelper_Initializer >
-{
-};
-
-struct StaticTitleInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticTitleInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
+ static ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ ::chart::tPropertyValueMap aTmp;
+
+ ::chart::CharacterProperties::AddDefaultsToMap( aTmp );
+ ::chart::LinePropertiesHelper::AddDefaultsToMap( aTmp );
+ ::chart::FillProperties::AddDefaultsToMap( aTmp );
+
+ // ParagraphProperties
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_TITLE_PARA_ADJUST,
+ css::style::ParagraphAdjust_CENTER );
+ // PROP_TITLE_PARA_LAST_LINE_ADJUST
+
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aTmp, PROP_TITLE_PARA_LEFT_MARGIN, 0 );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aTmp, PROP_TITLE_PARA_RIGHT_MARGIN, 0 );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aTmp, PROP_TITLE_PARA_TOP_MARGIN, 0 );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aTmp, PROP_TITLE_PARA_BOTTOM_MARGIN, 0 );
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_TITLE_PARA_IS_HYPHENATION, true );
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_TITLE_VISIBLE, true );
+
+ // own properties
+ ::chart::PropertyHelper::setPropertyValueDefault< double >( aTmp, PROP_TITLE_TEXT_ROTATION, 0.0 );
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_TITLE_TEXT_STACKED, false );
+
+ // override other defaults
+ ::chart::PropertyHelper::setPropertyValue( aTmp, ::chart::FillProperties::PROP_FILL_STYLE, drawing::FillStyle_NONE );
+ ::chart::PropertyHelper::setPropertyValue( aTmp, ::chart::LinePropertiesHelper::PROP_LINE_STYLE, drawing::LineStyle_NONE );
+ return aTmp;
+ }();
+ return aStaticDefaults;
};
-struct StaticTitleInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticTitleInfo_Initializer >
+::cppu::OPropertyArrayHelper& StaticTitleInfoHelper()
{
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
+ ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::FillProperties::AddPropertiesToVector( aProperties );
+
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -228,13 +198,12 @@ namespace chart
{
Title::Title() :
- ::property::OPropertySet( m_aMutex ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{}
Title::Title( const Title & rOther ) :
impl::Title_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
CloneHelper::CloneRefSequence<chart2::XFormattedString>(
@@ -285,7 +254,7 @@ void SAL_CALL Title::setText( const uno::Sequence< uno::Reference< chart2::XForm
// ____ OPropertySet ____
void Title::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticTitleDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticTitleDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -295,13 +264,15 @@ void Title::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
::cppu::IPropertyArrayHelper & SAL_CALL Title::getInfoHelper()
{
- return *StaticTitleInfoHelper::get();
+ return StaticTitleInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL Title::getPropertySetInfo()
{
- return *StaticTitleInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticTitleInfoHelper() ) );
+ return xPropertySetInfo;
}
// ____ XModifyBroadcaster ____
diff --git a/chart2/source/model/main/UndoManager.cxx b/chart2/source/model/main/UndoManager.cxx
index 63dacf48444c..3688863b3883 100644
--- a/chart2/source/model/main/UndoManager.cxx
+++ b/chart2/source/model/main/UndoManager.cxx
@@ -18,9 +18,9 @@
*/
#include "UndoManager.hxx"
+#include <ChartModel.hxx>
#include <ChartViewHelper.hxx>
-#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/NoSupportException.hpp>
@@ -49,7 +49,7 @@ namespace chart
class UndoManager_Impl : public ::framework::IUndoManagerImplementation
{
public:
- UndoManager_Impl( UndoManager& i_antiImpl, ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex )
+ UndoManager_Impl( UndoManager& i_antiImpl, ::chart::ChartModel& i_parent, ::osl::Mutex& i_mutex )
:m_rAntiImpl( i_antiImpl )
,m_rParent( i_parent )
,m_rMutex( i_mutex )
@@ -70,7 +70,7 @@ namespace chart
virtual Reference< XUndoManager > getThis() override;
// attribute access
- ::cppu::OWeakObject& getParent() { return m_rParent; }
+ ::chart::ChartModel& getParent() { return m_rParent; }
::framework::UndoManagerHelper& getUndoHelper() { return m_aUndoHelper; }
// public interface
@@ -83,7 +83,7 @@ namespace chart
private:
UndoManager& m_rAntiImpl;
- ::cppu::OWeakObject& m_rParent;
+ ::chart::ChartModel& m_rParent;
::osl::Mutex& m_rMutex;
bool m_bDisposed;
@@ -172,7 +172,7 @@ namespace chart
using impl::UndoManagerMethodGuard;
- UndoManager::UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex )
+ UndoManager::UndoManager( ::chart::ChartModel& i_parent, ::osl::Mutex& i_mutex )
:m_pImpl( new impl::UndoManager_Impl( *this, i_parent, i_mutex ) )
{
}
@@ -225,7 +225,7 @@ namespace chart
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->getUndoHelper().undo( aGuard );
- ChartViewHelper::setViewToDirtyState( Reference< XModel >( getParent(), UNO_QUERY ) );
+ ChartViewHelper::setViewToDirtyState( &m_pImpl->getParent() );
}
void SAL_CALL UndoManager::redo( )
@@ -233,7 +233,7 @@ namespace chart
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->getUndoHelper().redo( aGuard );
- ChartViewHelper::setViewToDirtyState( Reference< XModel >( getParent(), UNO_QUERY ) );
+ ChartViewHelper::setViewToDirtyState( &m_pImpl->getParent() );
}
sal_Bool SAL_CALL UndoManager::isUndoPossible( )
diff --git a/chart2/source/model/main/UndoManager.hxx b/chart2/source/model/main/UndoManager.hxx
index 4d0a214e5a70..c20dcef6643d 100644
--- a/chart2/source/model/main/UndoManager.hxx
+++ b/chart2/source/model/main/UndoManager.hxx
@@ -28,6 +28,7 @@
namespace chart
{
+class ChartModel;
namespace impl
{
@@ -40,7 +41,7 @@ namespace chart
class UndoManager : public impl::UndoManager_Base
{
public:
- UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex );
+ UndoManager( ::chart::ChartModel& i_parent, ::osl::Mutex& i_mutex );
virtual ~UndoManager();
// XInterface
diff --git a/chart2/source/model/main/Wall.cxx b/chart2/source/model/main/Wall.cxx
index 5588ed81e0a3..1bbe133de905 100644
--- a/chart2/source/model/main/Wall.cxx
+++ b/chart2/source/model/main/Wall.cxx
@@ -24,7 +24,6 @@
#include <PropertyHelper.hxx>
#include <ModifyListenerHelper.hxx>
#include <com/sun/star/drawing/LineStyle.hpp>
-#include <tools/diagnose_ex.h>
#include <vector>
#include <algorithm>
@@ -36,69 +35,21 @@ using ::com::sun::star::beans::Property;
namespace
{
-struct StaticWallDefaults_Initializer
+::cppu::OPropertyArrayHelper& StaticWallInfoHelper()
{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::LinePropertiesHelper::AddDefaultsToMap( rOutMap );
- ::chart::FillProperties::AddDefaultsToMap( rOutMap );
-
- // override other defaults
- ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::LinePropertiesHelper::PROP_LINE_STYLE, drawing::LineStyle_NONE );
- }
-};
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
+ ::chart::FillProperties::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-struct StaticWallDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticWallDefaults_Initializer >
-{
-};
-
-struct StaticWallInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static uno::Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties );
- ::chart::FillProperties::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-};
-
-struct StaticWallInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticWallInfoHelper_Initializer >
-{
-};
-
-struct StaticWallInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticWallInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
-
-struct StaticWallInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticWallInfo_Initializer >
-{
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -107,19 +58,26 @@ namespace chart
{
Wall::Wall() :
- ::property::OPropertySet( m_aMutex ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{}
Wall::Wall( const Wall & rOther ) :
impl::Wall_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{}
Wall::~Wall()
{}
+// ____ XTypeProvider ____
+uno::Sequence< css::uno::Type > SAL_CALL Wall::getTypes()
+{
+ return ::comphelper::concatSequences(
+ impl::Wall_Base::getTypes(),
+ ::property::OPropertySet::getTypes());
+}
+
// ____ XCloneable ____
uno::Reference< util::XCloneable > SAL_CALL Wall::createClone()
{
@@ -129,9 +87,18 @@ uno::Reference< util::XCloneable > SAL_CALL Wall::createClone()
// ____ OPropertySet ____
void Wall::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticWallDefaults::get();
- tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
- if( aFound == rStaticDefaults.end() )
+ static ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ ::chart::tPropertyValueMap aTmp;
+ ::chart::LinePropertiesHelper::AddDefaultsToMap( aTmp );
+ ::chart::FillProperties::AddDefaultsToMap( aTmp );
+
+ // override other defaults
+ ::chart::PropertyHelper::setPropertyValue( aTmp, ::chart::LinePropertiesHelper::PROP_LINE_STYLE, drawing::LineStyle_NONE );
+ return aTmp;
+ }();
+ tPropertyValueMap::const_iterator aFound( aStaticDefaults.find( nHandle ) );
+ if( aFound == aStaticDefaults.end() )
rAny.clear();
else
rAny = (*aFound).second;
@@ -139,13 +106,15 @@ void Wall::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
::cppu::IPropertyArrayHelper & SAL_CALL Wall::getInfoHelper()
{
- return *StaticWallInfoHelper::get();
+ return StaticWallInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL Wall::getPropertySetInfo()
{
- return *StaticWallInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticWallInfoHelper() ) );
+ return xPropertySetInfo;
}
// ____ XModifyBroadcaster ____
diff --git a/chart2/source/model/main/Wall.hxx b/chart2/source/model/main/Wall.hxx
index ddec92b6c876..6cae798959c1 100644
--- a/chart2/source/model/main/Wall.hxx
+++ b/chart2/source/model/main/Wall.hxx
@@ -21,7 +21,6 @@
#include <com/sun/star/util/XCloneable.hpp>
#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <ModifyListenerHelper.hxx>
@@ -39,7 +38,6 @@ typedef ::cppu::WeakImplHelper<
}
class Wall final :
- public cppu::BaseMutex,
public impl::Wall_Base,
public ::property::OPropertySet
{
@@ -52,6 +50,9 @@ public:
explicit Wall( const Wall & rOther );
+ // ____ XTypeProvider ____
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+
// ____ OPropertySet ____
virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
diff --git a/chart2/source/model/template/AreaChartType.cxx b/chart2/source/model/template/AreaChartType.cxx
index 840bdba036d7..b0581ddc8837 100644
--- a/chart2/source/model/template/AreaChartType.cxx
+++ b/chart2/source/model/template/AreaChartType.cxx
@@ -44,6 +44,11 @@ uno::Reference< util::XCloneable > SAL_CALL AreaChartType::createClone()
return uno::Reference< util::XCloneable >( new AreaChartType( *this ));
}
+rtl::Reference< ChartType > AreaChartType::cloneChartType() const
+{
+ return new AreaChartType( *this );
+}
+
// ____ XChartType ____
OUString SAL_CALL AreaChartType::getChartType()
{
diff --git a/chart2/source/model/template/AreaChartType.hxx b/chart2/source/model/template/AreaChartType.hxx
index fdd2df3a234b..8ca01e1f3afd 100644
--- a/chart2/source/model/template/AreaChartType.hxx
+++ b/chart2/source/model/template/AreaChartType.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include "ChartType.hxx"
+#include <ChartType.hxx>
namespace chart
{
@@ -36,6 +36,8 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() override;
+ virtual rtl::Reference<ChartType> cloneChartType() const override;
+
private:
explicit AreaChartType( const AreaChartType & rOther );
diff --git a/chart2/source/model/template/AreaChartTypeTemplate.cxx b/chart2/source/model/template/AreaChartTypeTemplate.cxx
index 6087c21251fb..2ffad2a416fc 100644
--- a/chart2/source/model/template/AreaChartTypeTemplate.cxx
+++ b/chart2/source/model/template/AreaChartTypeTemplate.cxx
@@ -18,15 +18,15 @@
*/
#include "AreaChartTypeTemplate.hxx"
-#include <servicenames_charttypes.hxx>
-#include <DiagramHelper.hxx>
+#include "AreaChartType.hxx"
+#include <Diagram.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <PropertyHelper.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <algorithm>
@@ -54,58 +54,19 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT );
}
-struct StaticAreaChartTypeTemplateDefaults_Initializer
+::cppu::OPropertyArrayHelper& StaticAreaChartTypeTemplateInfoHelper()
{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aStaticDefaults, PROP_AREA_TEMPLATE_DIMENSION, 2 );
- return &aStaticDefaults;
- }
-};
-
-struct StaticAreaChartTypeTemplateDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticAreaChartTypeTemplateDefaults_Initializer >
-{
-};
-
-struct StaticAreaChartTypeTemplateInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static uno::Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-
-};
-
-struct StaticAreaChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticAreaChartTypeTemplateInfoHelper_Initializer >
-{
-};
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
-struct StaticAreaChartTypeTemplateInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticAreaChartTypeTemplateInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticAreaChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticAreaChartTypeTemplateInfo_Initializer >
-{
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -120,7 +81,6 @@ AreaChartTypeTemplate::AreaChartTypeTemplate(
StackMode eStackMode,
sal_Int32 nDim /* = 2 */ ) :
ChartTypeTemplate( xContext, rServiceName ),
- ::property::OPropertySet( m_aMutex ),
m_eStackMode( eStackMode )
{
setFastPropertyValue_NoBroadcast( PROP_AREA_TEMPLATE_DIMENSION, uno::Any( nDim ));
@@ -132,9 +92,14 @@ AreaChartTypeTemplate::~AreaChartTypeTemplate()
// ____ OPropertySet ____
void AreaChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticAreaChartTypeTemplateDefaults::get();
- tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
- if( aFound == rStaticDefaults.end() )
+ static ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ ::chart::tPropertyValueMap aTmp;
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aTmp, PROP_AREA_TEMPLATE_DIMENSION, 2 );
+ return aTmp;
+ }();
+ tPropertyValueMap::const_iterator aFound( aStaticDefaults.find( nHandle ) );
+ if( aFound == aStaticDefaults.end() )
rAny.clear();
else
rAny = (*aFound).second;
@@ -142,13 +107,15 @@ void AreaChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny )
::cppu::IPropertyArrayHelper & SAL_CALL AreaChartTypeTemplate::getInfoHelper()
{
- return *StaticAreaChartTypeTemplateInfoHelper::get();
+ return StaticAreaChartTypeTemplateInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL AreaChartTypeTemplate::getPropertySetInfo()
{
- return *StaticAreaChartTypeTemplateInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticAreaChartTypeTemplateInfoHelper() ) );
+ return xPropertySetInfo;
}
sal_Int32 AreaChartTypeTemplate::getDimension() const
@@ -173,59 +140,41 @@ StackMode AreaChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ )
return m_eStackMode;
}
-// ____ XChartTypeTemplate ____
-void SAL_CALL AreaChartTypeTemplate::applyStyle(
- const Reference< chart2::XDataSeries >& xSeries,
+// ____ ChartTypeTemplate ____
+void AreaChartTypeTemplate::applyStyle2(
+ const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) );
}
-void SAL_CALL AreaChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram )
+void AreaChartTypeTemplate::resetStyles2( const rtl::Reference< ::chart::Diagram >& xDiagram )
{
- ChartTypeTemplate::resetStyles( xDiagram );
- std::vector< Reference< chart2::XDataSeries > > aSeriesVec(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
+ ChartTypeTemplate::resetStyles2( xDiagram );
+ std::vector< rtl::Reference< ::chart::DataSeries > > aSeriesVec(
+ xDiagram->getDataSeries());
uno::Any aLineStyleAny( drawing::LineStyle_NONE );
for (auto const& series : aSeriesVec)
{
- Reference< beans::XPropertyState > xState(series, uno::UNO_QUERY);
- Reference< beans::XPropertySet > xProp(series, uno::UNO_QUERY);
- if( xState.is() &&
- xProp.is() &&
- xProp->getPropertyValue( "BorderStyle") == aLineStyleAny )
+ if( series->getPropertyValue( "BorderStyle") == aLineStyleAny )
{
- xState->setPropertyToDefault( "BorderStyle");
+ series->setPropertyToDefault( "BorderStyle");
}
}
}
-Reference< chart2::XChartType > AreaChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
+rtl::Reference< ChartType > AreaChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
{
- Reference< chart2::XChartType > xResult;
-
- try
- {
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_AREA ), uno::UNO_QUERY_THROW );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-
- return xResult;
+ return new AreaChartType();
}
-Reference< chart2::XChartType > SAL_CALL AreaChartTypeTemplate::getChartTypeForNewSeries(
- const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
+rtl::Reference< ChartType > AreaChartTypeTemplate::getChartTypeForNewSeries2(
+ const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
- Reference< chart2::XChartType > xResult( getChartTypeForIndex( 0 ) );
+ rtl::Reference< ChartType > xResult( getChartTypeForIndex( 0 ) );
ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( aFormerlyUsedChartTypes, xResult );
return xResult;
}
diff --git a/chart2/source/model/template/AreaChartTypeTemplate.hxx b/chart2/source/model/template/AreaChartTypeTemplate.hxx
index 6954513481e4..76a5bfd4c890 100644
--- a/chart2/source/model/template/AreaChartTypeTemplate.hxx
+++ b/chart2/source/model/template/AreaChartTypeTemplate.hxx
@@ -22,14 +22,12 @@
#include <StackMode.hxx>
#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <comphelper/uno3.hxx>
namespace chart
{
class AreaChartTypeTemplate :
- public cppu::BaseMutex,
public ChartTypeTemplate,
public ::property::OPropertySet
{
@@ -55,20 +53,20 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
- // ____ XChartTypeTemplate ____
- virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
- getChartTypeForNewSeries( const css::uno::Sequence<
- css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
- virtual void SAL_CALL applyStyle(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ // ____ ChartTypeTemplate ____
+ virtual rtl::Reference< ::chart::ChartType >
+ getChartTypeForNewSeries2( const std::vector<
+ rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
+ virtual void applyStyle2(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
- virtual void SAL_CALL resetStyles(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
+ virtual void resetStyles2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram ) override;
// ____ ChartTypeTemplate ____
- virtual css::uno::Reference< css::chart2::XChartType >
+ virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
virtual sal_Int32 getDimension() const override;
virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const override;
diff --git a/chart2/source/model/template/BarChartType.cxx b/chart2/source/model/template/BarChartType.cxx
index d32aa6efeca3..2a94db82ba2a 100644
--- a/chart2/source/model/template/BarChartType.cxx
+++ b/chart2/source/model/template/BarChartType.cxx
@@ -45,6 +45,11 @@ uno::Reference< util::XCloneable > SAL_CALL BarChartType::createClone()
return uno::Reference< util::XCloneable >( new BarChartType( *this ));
}
+rtl::Reference< ChartType > BarChartType::cloneChartType() const
+{
+ return new BarChartType( *this );
+}
+
// ____ XChartType ____
OUString SAL_CALL BarChartType::getChartType()
{
diff --git a/chart2/source/model/template/BarChartType.hxx b/chart2/source/model/template/BarChartType.hxx
index 62ed9aa0c2a2..cceaf05777f0 100644
--- a/chart2/source/model/template/BarChartType.hxx
+++ b/chart2/source/model/template/BarChartType.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include "ChartType.hxx"
+#include <ChartType.hxx>
namespace chart
{
@@ -36,6 +36,8 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() override;
+ virtual rtl::Reference<ChartType> cloneChartType() const override;
+
private:
explicit BarChartType( const BarChartType & rOther );
diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx
index f4534a27071a..2b649ec43364 100644
--- a/chart2/source/model/template/BarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BarChartTypeTemplate.cxx
@@ -18,17 +18,16 @@
*/
#include "BarChartTypeTemplate.hxx"
-#include <DiagramHelper.hxx>
-#include <servicenames_charttypes.hxx>
+#include "ColumnChartType.hxx"
+#include <Diagram.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <PropertyHelper.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <algorithm>
@@ -62,64 +61,19 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT );
}
-struct StaticBarChartTypeTemplateDefaults_Initializer
+::cppu::OPropertyArrayHelper& StaticBarChartTypeTemplateInfoHelper()
{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_BAR_TEMPLATE_DIMENSION, 2 );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_BAR_TEMPLATE_GEOMETRY3D, ::chart2::DataPointGeometry3D::CUBOID );
- }
-};
-
-struct StaticBarChartTypeTemplateDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticBarChartTypeTemplateDefaults_Initializer >
-{
-};
-
-struct StaticBarChartTypeTemplateInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-
-};
-
-struct StaticBarChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticBarChartTypeTemplateInfoHelper_Initializer >
-{
-};
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
-struct StaticBarChartTypeTemplateInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticBarChartTypeTemplateInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticBarChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticBarChartTypeTemplateInfo_Initializer >
-{
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -135,7 +89,6 @@ BarChartTypeTemplate::BarChartTypeTemplate(
BarDirection eDirection,
sal_Int32 nDim /* = 2 */ ) :
ChartTypeTemplate( xContext, rServiceName ),
- ::property::OPropertySet( m_aMutex ),
m_eStackMode( eStackMode ),
m_eBarDirection( eDirection ),
m_nDim( nDim )
@@ -159,19 +112,19 @@ bool BarChartTypeTemplate::isSwapXAndY() const
return (m_eBarDirection == HORIZONTAL);
}
-// ____ XChartTypeTemplate ____
-sal_Bool SAL_CALL BarChartTypeTemplate::matchesTemplate(
- const Reference< chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties )
+// ____ ChartTypeTemplate ____
+bool BarChartTypeTemplate::matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties )
{
- bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
+ bool bResult = ChartTypeTemplate::matchesTemplate2( xDiagram, bAdaptProperties );
//check BarDirection
if( bResult )
{
bool bFound = false;
bool bAmbiguous = false;
- bool bVertical = DiagramHelper::getVertical( xDiagram, bFound, bAmbiguous );
+ bool bVertical = xDiagram->getVertical( bFound, bAmbiguous );
if( m_eBarDirection == HORIZONTAL )
bResult = bVertical;
else if( m_eBarDirection == VERTICAL )
@@ -185,7 +138,7 @@ sal_Bool SAL_CALL BarChartTypeTemplate::matchesTemplate(
{
bool bGeomFound = false, bGeomAmbiguous = false;
- sal_Int32 aCommonGeom = DiagramHelper::getGeometry3D( xDiagram, bGeomFound, bGeomAmbiguous );
+ sal_Int32 aCommonGeom = xDiagram->getGeometry3D( bGeomFound, bGeomAmbiguous );
if( !bGeomAmbiguous )
{
@@ -196,29 +149,16 @@ sal_Bool SAL_CALL BarChartTypeTemplate::matchesTemplate(
return bResult;
}
-Reference< chart2::XChartType > BarChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
-{
- Reference< chart2::XChartType > xResult;
-
- try
- {
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_COLUMN ), uno::UNO_QUERY_THROW );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
- return xResult;
+rtl::Reference< ChartType > BarChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
+{
+ return new ColumnChartType();
}
-Reference< chart2::XChartType > SAL_CALL BarChartTypeTemplate::getChartTypeForNewSeries(
- const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
+rtl::Reference< ChartType > BarChartTypeTemplate::getChartTypeForNewSeries2(
+ const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
- Reference< chart2::XChartType > xResult( getChartTypeForIndex( 0 ) );
+ rtl::Reference< ChartType > xResult( getChartTypeForIndex( 0 ) );
ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( aFormerlyUsedChartTypes, xResult );
return xResult;
}
@@ -226,9 +166,15 @@ Reference< chart2::XChartType > SAL_CALL BarChartTypeTemplate::getChartTypeForNe
// ____ OPropertySet ____
void BarChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticBarChartTypeTemplateDefaults::get();
- tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
- if( aFound == rStaticDefaults.end() )
+ static ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ ::chart::tPropertyValueMap aTmp;
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aTmp, PROP_BAR_TEMPLATE_DIMENSION, 2 );
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_BAR_TEMPLATE_GEOMETRY3D, ::chart2::DataPointGeometry3D::CUBOID );
+ return aTmp;
+ }();
+ tPropertyValueMap::const_iterator aFound( aStaticDefaults.find( nHandle ) );
+ if( aFound == aStaticDefaults.end() )
rAny.clear();
else
rAny = (*aFound).second;
@@ -236,22 +182,24 @@ void BarChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny )
::cppu::IPropertyArrayHelper & SAL_CALL BarChartTypeTemplate::getInfoHelper()
{
- return *StaticBarChartTypeTemplateInfoHelper::get();
+ return StaticBarChartTypeTemplateInfoHelper();
}
// ____ XPropertySet ____
Reference< beans::XPropertySetInfo > SAL_CALL BarChartTypeTemplate::getPropertySetInfo()
{
- return *StaticBarChartTypeTemplateInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticBarChartTypeTemplateInfoHelper() ) );
+ return xPropertySetInfo;
}
-void SAL_CALL BarChartTypeTemplate::applyStyle(
- const Reference< chart2::XDataSeries >& xSeries,
+void BarChartTypeTemplate::applyStyle2(
+ const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) );
if( getDimension() != 3 )
return;
@@ -269,39 +217,32 @@ void SAL_CALL BarChartTypeTemplate::applyStyle(
}
}
-void SAL_CALL BarChartTypeTemplate::resetStyles(
- const Reference< chart2::XDiagram >& xDiagram )
+void BarChartTypeTemplate::resetStyles2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram )
{
- ChartTypeTemplate::resetStyles( xDiagram );
- std::vector< Reference< chart2::XDataSeries > > aSeriesVec(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
+ ChartTypeTemplate::resetStyles2( xDiagram );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVec(
+ xDiagram->getDataSeries());
uno::Any aLineStyleAny( drawing::LineStyle_NONE );
for (auto const& series : aSeriesVec)
{
- Reference< beans::XPropertyState > xState(series, uno::UNO_QUERY);
- if( xState.is())
+ if( getDimension() == 3 )
+ series->setPropertyToDefault( "Geometry3D");
+ if( series->getPropertyValue( "BorderStyle") == aLineStyleAny )
{
- if( getDimension() == 3 )
- xState->setPropertyToDefault( "Geometry3D");
- Reference< beans::XPropertySet > xProp( xState, uno::UNO_QUERY );
- if( xProp.is() &&
- xProp->getPropertyValue( "BorderStyle") == aLineStyleAny )
- {
- xState->setPropertyToDefault( "BorderStyle");
- }
+ series->setPropertyToDefault( "BorderStyle");
}
}
- DiagramHelper::setVertical( xDiagram, false );
+ xDiagram->setVertical( false );
}
void BarChartTypeTemplate::createCoordinateSystems(
- const Reference< chart2::XCoordinateSystemContainer > & xCooSysCnt )
+ const rtl::Reference< ::chart::Diagram > & xDiagram )
{
- ChartTypeTemplate::createCoordinateSystems( xCooSysCnt );
+ ChartTypeTemplate::createCoordinateSystems( xDiagram );
- Reference< chart2::XDiagram > xDiagram( xCooSysCnt, uno::UNO_QUERY );
- DiagramHelper::setVertical( xDiagram, m_eBarDirection == HORIZONTAL );
+ xDiagram->setVertical( m_eBarDirection == HORIZONTAL );
}
IMPLEMENT_FORWARD_XINTERFACE2( BarChartTypeTemplate, ChartTypeTemplate, OPropertySet )
diff --git a/chart2/source/model/template/BarChartTypeTemplate.hxx b/chart2/source/model/template/BarChartTypeTemplate.hxx
index 4146e2611c55..ab56869e71cd 100644
--- a/chart2/source/model/template/BarChartTypeTemplate.hxx
+++ b/chart2/source/model/template/BarChartTypeTemplate.hxx
@@ -19,7 +19,6 @@
#pragma once
#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <comphelper/uno3.hxx>
#include <ChartTypeTemplate.hxx>
@@ -29,7 +28,6 @@ namespace chart
{
class BarChartTypeTemplate :
- public cppu::BaseMutex,
public ChartTypeTemplate,
public ::property::OPropertySet
{
@@ -62,30 +60,28 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
- // ____ XChartTypeTemplate ____
- virtual sal_Bool SAL_CALL matchesTemplate(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties ) override;
- virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
- getChartTypeForNewSeries( const css::uno::Sequence<
- css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
- virtual void SAL_CALL applyStyle(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ // ____ ChartTypeTemplate ____
+ virtual bool matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties ) override;
+ virtual rtl::Reference< ::chart::ChartType >
+ getChartTypeForNewSeries2( const std::vector<
+ rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
+ virtual void applyStyle2(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
- virtual void SAL_CALL resetStyles(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
-
- // ____ ChartTypeTemplate ____
- virtual css::uno::Reference< css::chart2::XChartType >
+ virtual void resetStyles2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram ) override;
+ virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
virtual sal_Int32 getDimension() const override;
virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const override;
virtual bool isSwapXAndY() const override;
virtual void createCoordinateSystems(
- const css::uno::Reference< css::chart2::XCoordinateSystemContainer > & xCooSysCnt ) override;
+ const rtl::Reference< ::chart::Diagram > & xDiagram ) override;
private:
StackMode m_eStackMode;
diff --git a/chart2/source/model/template/BubbleChartType.cxx b/chart2/source/model/template/BubbleChartType.cxx
index d0fc66213a97..bd8bf287d96a 100644
--- a/chart2/source/model/template/BubbleChartType.cxx
+++ b/chart2/source/model/template/BubbleChartType.cxx
@@ -21,6 +21,7 @@
#include <PropertyHelper.hxx>
#include <servicenames_charttypes.hxx>
#include <CartesianCoordinateSystem.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <AxisIndexDefines.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
@@ -35,55 +36,16 @@ using ::com::sun::star::uno::Reference;
namespace
{
-struct StaticBubbleChartTypeDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- return &aStaticDefaults;
- }
-};
-
-struct StaticBubbleChartTypeDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticBubbleChartTypeDefaults_Initializer >
-{
-};
-
-struct StaticBubbleChartTypeInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-};
-
-struct StaticBubbleChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticBubbleChartTypeInfoHelper_Initializer >
-{
-};
-
-struct StaticBubbleChartTypeInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticBubbleChartTypeInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
-
-struct StaticBubbleChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticBubbleChartTypeInfo_Initializer >
+::cppu::OPropertyArrayHelper& StaticBubbleChartTypeInfoHelper()
{
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -109,16 +71,21 @@ uno::Reference< util::XCloneable > SAL_CALL BubbleChartType::createClone()
return uno::Reference< util::XCloneable >( new BubbleChartType( *this ));
}
+rtl::Reference< ChartType > BubbleChartType::cloneChartType() const
+{
+ return new BubbleChartType( *this );
+}
+
// ____ XChartType ____
-Reference< chart2::XCoordinateSystem > SAL_CALL
- BubbleChartType::createCoordinateSystem( ::sal_Int32 DimensionCount )
+rtl::Reference< ::chart::BaseCoordinateSystem >
+ BubbleChartType::createCoordinateSystem2( sal_Int32 DimensionCount )
{
rtl::Reference< CartesianCoordinateSystem > xResult =
new CartesianCoordinateSystem( DimensionCount );
for( sal_Int32 i=0; i<DimensionCount; ++i )
{
- Reference< chart2::XAxis > xAxis( xResult->getAxisByDimension( i, MAIN_AXIS_INDEX ) );
+ rtl::Reference< Axis > xAxis = xResult->getAxisByDimension2( i, MAIN_AXIS_INDEX );
if( !xAxis.is() )
{
OSL_FAIL("a created coordinate system should have an axis for each dimension");
@@ -163,9 +130,9 @@ OUString SAL_CALL BubbleChartType::getRoleOfSequenceForSeriesLabel()
// ____ OPropertySet ____
void BubbleChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticBubbleChartTypeDefaults::get();
- tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
- if( aFound == rStaticDefaults.end() )
+ static ::chart::tPropertyValueMap aStaticDefaults;
+ tPropertyValueMap::const_iterator aFound( aStaticDefaults.find( nHandle ) );
+ if( aFound == aStaticDefaults.end() )
rAny.clear();
else
rAny = (*aFound).second;
@@ -174,13 +141,15 @@ void BubbleChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
// ____ OPropertySet ____
::cppu::IPropertyArrayHelper & SAL_CALL BubbleChartType::getInfoHelper()
{
- return *StaticBubbleChartTypeInfoHelper::get();
+ return StaticBubbleChartTypeInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL BubbleChartType::getPropertySetInfo()
{
- return *StaticBubbleChartTypeInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticBubbleChartTypeInfoHelper() ) );
+ return xPropertySetInfo;
}
OUString SAL_CALL BubbleChartType::getImplementationName()
diff --git a/chart2/source/model/template/BubbleChartType.hxx b/chart2/source/model/template/BubbleChartType.hxx
index 4be938b66a88..a2afa7e6941d 100644
--- a/chart2/source/model/template/BubbleChartType.hxx
+++ b/chart2/source/model/template/BubbleChartType.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include "ChartType.hxx"
+#include <ChartType.hxx>
namespace chart
{
@@ -36,6 +36,8 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() override;
+ virtual rtl::Reference<ChartType> cloneChartType() const override;
+
private:
explicit BubbleChartType( const BubbleChartType & rOther );
@@ -45,8 +47,6 @@ private:
getSupportedMandatoryRoles() override;
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedPropertyRoles() override;
- virtual css::uno::Reference< css::chart2::XCoordinateSystem > SAL_CALL
- createCoordinateSystem( ::sal_Int32 DimensionCount ) override;
virtual OUString SAL_CALL getRoleOfSequenceForSeriesLabel() override;
// ____ OPropertySet ____
@@ -61,6 +61,9 @@ private:
// ____ XCloneable ____
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
+
+ virtual rtl::Reference< ::chart::BaseCoordinateSystem >
+ createCoordinateSystem2( sal_Int32 DimensionCount ) override;
};
} // namespace chart
diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.cxx b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
index 3d7416b288cd..55f39ef0669b 100644
--- a/chart2/source/model/template/BubbleChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
@@ -18,14 +18,14 @@
*/
#include "BubbleChartTypeTemplate.hxx"
+#include "BubbleChartType.hxx"
#include "BubbleDataInterpreter.hxx"
-#include <servicenames_charttypes.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <PropertyHelper.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <algorithm>
@@ -38,56 +38,16 @@ using ::com::sun::star::beans::Property;
namespace
{
-struct StaticBubbleChartTypeTemplateDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- return &aStaticDefaults;
- }
-};
-
-struct StaticBubbleChartTypeTemplateDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticBubbleChartTypeTemplateDefaults_Initializer >
-{
-};
-
-struct StaticBubbleChartTypeTemplateInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-
-};
-
-struct StaticBubbleChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticBubbleChartTypeTemplateInfoHelper_Initializer >
-{
-};
-
-struct StaticBubbleChartTypeTemplateInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticBubbleChartTypeTemplateInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
-
-struct StaticBubbleChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticBubbleChartTypeTemplateInfo_Initializer >
+::cppu::OPropertyArrayHelper & StaticBubbleChartTypeTemplateInfoHelper()
{
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -99,8 +59,7 @@ BubbleChartTypeTemplate::BubbleChartTypeTemplate(
Reference<
uno::XComponentContext > const & xContext,
const OUString & rServiceName ) :
- ChartTypeTemplate( xContext, rServiceName ),
- ::property::OPropertySet( m_aMutex )
+ ChartTypeTemplate( xContext, rServiceName )
{
}
@@ -110,9 +69,9 @@ BubbleChartTypeTemplate::~BubbleChartTypeTemplate()
// ____ OPropertySet ____
void BubbleChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticBubbleChartTypeTemplateDefaults::get();
- tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
- if( aFound == rStaticDefaults.end() )
+ static ::chart::tPropertyValueMap aStaticDefaults;
+ tPropertyValueMap::const_iterator aFound( aStaticDefaults.find( nHandle ) );
+ if( aFound == aStaticDefaults.end() )
rAny.clear();
else
rAny = (*aFound).second;
@@ -120,13 +79,15 @@ void BubbleChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny
::cppu::IPropertyArrayHelper & SAL_CALL BubbleChartTypeTemplate::getInfoHelper()
{
- return *StaticBubbleChartTypeTemplateInfoHelper::get();
+ return StaticBubbleChartTypeTemplateInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL BubbleChartTypeTemplate::getPropertySetInfo()
{
- return *StaticBubbleChartTypeTemplateInfo::get();
+ static const uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticBubbleChartTypeTemplateInfoHelper() ) );
+ return xPropertySetInfo;
}
sal_Int32 BubbleChartTypeTemplate::getDimension() const
@@ -139,13 +100,13 @@ StackMode BubbleChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */
return StackMode::NONE;
}
-void SAL_CALL BubbleChartTypeTemplate::applyStyle(
- const Reference< chart2::XDataSeries >& xSeries,
+void BubbleChartTypeTemplate::applyStyle2(
+ const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) );
}
@@ -155,36 +116,19 @@ sal_Bool SAL_CALL BubbleChartTypeTemplate::supportsCategories()
return false;
}
-Reference< chart2::XChartType > BubbleChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
+rtl::Reference< ChartType > BubbleChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
{
- Reference< chart2::XChartType > xResult;
-
- try
- {
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE ), uno::UNO_QUERY_THROW );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-
- return xResult;
+ return new BubbleChartType();
}
-Reference< chart2::XChartType > SAL_CALL BubbleChartTypeTemplate::getChartTypeForNewSeries(
- const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
+rtl::Reference< ChartType > BubbleChartTypeTemplate::getChartTypeForNewSeries2(
+ const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
- Reference< chart2::XChartType > xResult;
+ rtl::Reference< ChartType > xResult;
try
{
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE ), uno::UNO_QUERY_THROW );
+ xResult = new BubbleChartType();
ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( aFormerlyUsedChartTypes, xResult );
}
@@ -196,7 +140,7 @@ Reference< chart2::XChartType > SAL_CALL BubbleChartTypeTemplate::getChartTypeFo
return xResult;
}
-Reference< chart2::XDataInterpreter > SAL_CALL BubbleChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > BubbleChartTypeTemplate::getDataInterpreter2()
{
if( ! m_xDataInterpreter.is())
m_xDataInterpreter.set( new BubbleDataInterpreter );
diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.hxx b/chart2/source/model/template/BubbleChartTypeTemplate.hxx
index d04e09e38481..8a59e5e72817 100644
--- a/chart2/source/model/template/BubbleChartTypeTemplate.hxx
+++ b/chart2/source/model/template/BubbleChartTypeTemplate.hxx
@@ -20,14 +20,12 @@
#include <ChartTypeTemplate.hxx>
#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <comphelper/uno3.hxx>
namespace chart
{
class BubbleChartTypeTemplate :
- public cppu::BaseMutex,
public ChartTypeTemplate,
public ::property::OPropertySet
{
@@ -51,19 +49,20 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
- // ____ XChartTypeTemplate ____
+ // ____ ChartTypeTemplate ____
virtual sal_Bool SAL_CALL supportsCategories() override;
- virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
- getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
- virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override;
- virtual void SAL_CALL applyStyle(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ virtual rtl::Reference< ::chart::ChartType >
+ getChartTypeForNewSeries2( const std::vector<
+ rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
+ virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter2() override;
+ virtual void applyStyle2(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
// ____ ChartTypeTemplate ____
- virtual css::uno::Reference< css::chart2::XChartType >
+ virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
virtual sal_Int32 getDimension() const override;
virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const override;
diff --git a/chart2/source/model/template/BubbleDataInterpreter.cxx b/chart2/source/model/template/BubbleDataInterpreter.cxx
index 09fd1c25d7da..bb468fd9723d 100644
--- a/chart2/source/model/template/BubbleDataInterpreter.cxx
+++ b/chart2/source/model/template/BubbleDataInterpreter.cxx
@@ -17,17 +17,19 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <cstddef>
+
#include "BubbleDataInterpreter.hxx"
#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <CommonConverters.hxx>
-#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
-using namespace ::std;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -44,25 +46,25 @@ BubbleDataInterpreter::~BubbleDataInterpreter()
}
// ____ XDataInterpreter ____
-chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource(
+InterpretedData BubbleDataInterpreter::interpretDataSource(
const Reference< chart2::data::XDataSource >& xSource,
const Sequence< beans::PropertyValue >& aArguments,
- const Sequence< Reference< XDataSeries > >& aSeriesToReUse )
+ const std::vector< rtl::Reference< DataSeries > >& aSeriesToReUse )
{
if( ! xSource.is())
return InterpretedData();
- Sequence< Reference< data::XLabeledDataSequence > > aData( xSource->getDataSequences() );
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData = DataInterpreter::getDataSequences(xSource);
- Reference< data::XLabeledDataSequence > xValuesX;
- vector< Reference< data::XLabeledDataSequence > > aYValuesVector;
- vector< Reference< data::XLabeledDataSequence > > aSizeValuesVector;
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesX;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aYValuesVector;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSizeValuesVector;
- Reference< data::XLabeledDataSequence > xCategories;
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories;
bool bHasCategories = HasCategories( aArguments, aData );
bool bUseCategoriesAsX = UseCategoriesAsX( aArguments );
- sal_Int32 nDataSeqCount = aData.getLength();
+ sal_Int32 nDataSeqCount = aData.size();
bool bSetXValues = bHasCategories ? ( (nDataSeqCount-1) > 2 && (nDataSeqCount-1) % 2 != 0 )
:( nDataSeqCount > 2 && nDataSeqCount % 2 != 0 );
@@ -75,7 +77,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource(
{
if( bHasCategories && !bCategoriesUsed )
{
- xCategories.set( aData[nDataIdx] );
+ xCategories = aData[nDataIdx];
if( xCategories.is())
{
SetRole( xCategories->getValues(), "categories");
@@ -89,7 +91,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource(
}
else if( !xValuesX.is() && bSetXValues )
{
- xValuesX.set( aData[nDataIdx] );
+ xValuesX = aData[nDataIdx];
if( xValuesX.is())
SetRole( xValuesX->getValues(), "values-x");
}
@@ -115,8 +117,8 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource(
}
// create DataSeries
- sal_Int32 nSeriesIndex = 0;
- vector< Reference< XDataSeries > > aSeriesVec;
+ std::size_t nSeriesIndex = 0;
+ std::vector< rtl::Reference< DataSeries > > aSeriesVec;
aSeriesVec.reserve( aSizeValuesVector.size());
Reference< data::XLabeledDataSequence > xClonedXValues = xValuesX;
@@ -124,7 +126,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource(
for( size_t nN = 0; nN < aSizeValuesVector.size(); ++nN, ++nSeriesIndex )
{
- vector< Reference< data::XLabeledDataSequence > > aNewData;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aNewData;
if( xValuesX.is() )
{
if( nN > 0 && xCloneableX.is() )
@@ -135,51 +137,48 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource(
aNewData.push_back( aYValuesVector[nN] );
aNewData.push_back(aSizeValuesVector[nN]);
- Reference< XDataSeries > xSeries;
- if( nSeriesIndex < aSeriesToReUse.getLength())
- xSeries.set( aSeriesToReUse[nSeriesIndex] );
+ rtl::Reference< DataSeries > xSeries;
+ if( nSeriesIndex < aSeriesToReUse.size())
+ xSeries = aSeriesToReUse[nSeriesIndex];
else
- xSeries.set( new DataSeries );
- OSL_ASSERT( xSeries.is() );
- Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY );
- OSL_ASSERT( xSink.is() );
- xSink->setData( comphelper::containerToSequence( aNewData ) );
+ xSeries = new DataSeries;
+ assert( xSeries.is() );
+ xSeries->setData( aNewData );
aSeriesVec.push_back( xSeries );
}
- return InterpretedData( { comphelper::containerToSequence(aSeriesVec) }, xCategories );
+ return { { aSeriesVec }, xCategories };
}
-chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries(
- const chart2::InterpretedData& aInterpretedData )
+InterpretedData BubbleDataInterpreter::reinterpretDataSeries(
+ const InterpretedData& aInterpretedData )
{
InterpretedData aResult( aInterpretedData );
sal_Int32 i=0;
- Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
- const sal_Int32 nCount = aSeries.getLength();
+ std::vector< rtl::Reference< DataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
+ const sal_Int32 nCount = aSeries.size();
for( ; i<nCount; ++i )
{
try
{
- Reference< data::XDataSource > xSeriesSource( aSeries[i], uno::UNO_QUERY_THROW );
- Sequence< Reference< data::XLabeledDataSequence > > aNewSequences;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aNewSequences;
- Reference< data::XLabeledDataSequence > xValuesSize(
- DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-size" ));
- Reference< data::XLabeledDataSequence > xValuesY(
- DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-y" ));
- Reference< data::XLabeledDataSequence > xValuesX(
- DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-x" ));
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesSize(
+ DataSeriesHelper::getDataSequenceByRole( aSeries[i], "values-size" ));
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesY(
+ DataSeriesHelper::getDataSequenceByRole( aSeries[i], "values-y" ));
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesX(
+ DataSeriesHelper::getDataSequenceByRole( aSeries[i], "values-x" ));
if( ! xValuesX.is() ||
! xValuesY.is() ||
! xValuesSize.is() )
{
- vector< Reference< data::XLabeledDataSequence > > aValueSeqVec(
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aValueSeqVec(
DataSeriesHelper::getAllDataSequencesByRole(
- xSeriesSource->getDataSequences(), "values" ));
+ aSeries[i]->getDataSequences2(), "values" ));
if( xValuesX.is())
aValueSeqVec.erase( find( aValueSeqVec.begin(), aValueSeqVec.end(), xValuesX ));
if( xValuesY.is())
@@ -192,7 +191,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries(
if( ! xValuesSize.is() &&
aValueSeqVec.size() > nIndex )
{
- xValuesSize.set( aValueSeqVec[nIndex++] );
+ xValuesSize = aValueSeqVec[nIndex++];
if( xValuesSize.is())
SetRole( xValuesSize->getValues(), "values-size");
}
@@ -200,7 +199,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries(
if( ! xValuesY.is() &&
aValueSeqVec.size() > nIndex )
{
- xValuesY.set( aValueSeqVec[nIndex++] );
+ xValuesY = aValueSeqVec[nIndex++];
if( xValuesY.is())
SetRole( xValuesY->getValues(), "values-y");
}
@@ -208,7 +207,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries(
if( ! xValuesX.is() &&
aValueSeqVec.size() > nIndex )
{
- xValuesX.set( aValueSeqVec[nIndex++] );
+ xValuesX = aValueSeqVec[nIndex++];
if( xValuesX.is())
SetRole( xValuesY->getValues(), "values-x");
}
@@ -232,8 +231,8 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries(
}
}
- const Sequence< Reference< data::XLabeledDataSequence > > aSeqs( xSeriesSource->getDataSequences());
- if( aSeqs.getLength() != aNewSequences.getLength() )
+ const std::vector< uno::Reference< data::XLabeledDataSequence > > & aSeqs = aSeries[i]->getDataSequences2();
+ if( aSeqs.size() != aNewSequences.size() )
{
#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
for( auto const & j : aSeqs )
@@ -241,8 +240,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries(
assert( (j == xValuesY || j == xValuesX || j == xValuesSize) && "All sequences should be used" );
}
#endif
- Reference< data::XDataSink > xSink( xSeriesSource, uno::UNO_QUERY_THROW );
- xSink->setData( aNewSequences );
+ aSeries[i]->setData( aNewSequences );
}
}
catch( const uno::Exception & )
@@ -254,17 +252,15 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries(
return aResult;
}
-sal_Bool SAL_CALL BubbleDataInterpreter::isDataCompatible(
- const chart2::InterpretedData& aInterpretedData )
+bool BubbleDataInterpreter::isDataCompatible(
+ const InterpretedData& aInterpretedData )
{
- const Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
- for( Reference< XDataSeries > const & dataSeries : aSeries )
+ const std::vector< rtl::Reference< DataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
+ for( rtl::Reference< DataSeries > const & dataSeries : aSeries )
{
try
{
- Reference< data::XDataSource > xSrc( dataSeries, uno::UNO_QUERY_THROW );
- Sequence< Reference< data::XLabeledDataSequence > > aSeq( xSrc->getDataSequences());
- if( aSeq.getLength() != 3 )
+ if( dataSeries->getDataSequences2().size() != 3 )
return false;
}
catch( const uno::Exception & )
diff --git a/chart2/source/model/template/BubbleDataInterpreter.hxx b/chart2/source/model/template/BubbleDataInterpreter.hxx
index e5a9041a75e3..ff4b56de615a 100644
--- a/chart2/source/model/template/BubbleDataInterpreter.hxx
+++ b/chart2/source/model/template/BubbleDataInterpreter.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include "DataInterpreter.hxx"
+#include <DataInterpreter.hxx>
namespace chart
{
@@ -30,15 +30,15 @@ public:
virtual ~BubbleDataInterpreter() override;
protected:
- // ____ XDataInterpreter ____
- virtual css::chart2::InterpretedData SAL_CALL interpretDataSource(
+ // ____ DataInterpreter ____
+ virtual InterpretedData interpretDataSource(
const css::uno::Reference< css::chart2::data::XDataSource >& xSource,
const css::uno::Sequence< css::beans::PropertyValue >& aArguments,
- const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > >& aSeriesToReUse ) override;
- virtual css::chart2::InterpretedData SAL_CALL reinterpretDataSeries(
- const css::chart2::InterpretedData& aInterpretedData ) override;
- virtual sal_Bool SAL_CALL isDataCompatible(
- const css::chart2::InterpretedData& aInterpretedData ) override;
+ const std::vector< rtl::Reference< ::chart::DataSeries > >& aSeriesToReUse ) override;
+ virtual InterpretedData reinterpretDataSeries(
+ const InterpretedData& aInterpretedData ) override;
+ virtual bool isDataCompatible(
+ const InterpretedData& aInterpretedData ) override;
};
} // namespace chart
diff --git a/chart2/source/model/template/CandleStickChartType.cxx b/chart2/source/model/template/CandleStickChartType.cxx
index 065b8d8ca736..247a68406808 100644
--- a/chart2/source/model/template/CandleStickChartType.cxx
+++ b/chart2/source/model/template/CandleStickChartType.cxx
@@ -24,7 +24,7 @@
#include <servicenames_charttypes.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace com::sun::star::uno { class XComponentContext; }
@@ -79,66 +79,17 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT );
}
-struct StaticCandleStickChartTypeDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- // must match default in CTOR!
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CANDLESTICKCHARTTYPE_JAPANESE, false );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CANDLESTICKCHARTTYPE_SHOW_FIRST, false );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CANDLESTICKCHARTTYPE_SHOW_HIGH_LOW, true );
- }
-};
-
-struct StaticCandleStickChartTypeDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticCandleStickChartTypeDefaults_Initializer >
-{
-};
-
-struct StaticCandleStickChartTypeInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-
-};
-
-struct StaticCandleStickChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticCandleStickChartTypeInfoHelper_Initializer >
-{
-};
-
-struct StaticCandleStickChartTypeInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticCandleStickChartTypeInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
-
-struct StaticCandleStickChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticCandleStickChartTypeInfo_Initializer >
+::cppu::OPropertyArrayHelper& StaticCandleStickChartTypeInfoHelper()
{
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -206,6 +157,11 @@ uno::Reference< util::XCloneable > SAL_CALL CandleStickChartType::createClone()
return uno::Reference< util::XCloneable >( new CandleStickChartType( *this ));
}
+rtl::Reference< ChartType > CandleStickChartType::cloneChartType() const
+{
+ return new CandleStickChartType( *this );
+}
+
// ____ XChartType ____
OUString SAL_CALL CandleStickChartType::getChartType()
{
@@ -265,9 +221,17 @@ OUString SAL_CALL CandleStickChartType::getRoleOfSequenceForSeriesLabel()
// ____ OPropertySet ____
void CandleStickChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticCandleStickChartTypeDefaults::get();
- tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
- if( aFound == rStaticDefaults.end() )
+ static const ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ // must match default in CTOR!
+ ::chart::tPropertyValueMap aTmp;
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_CANDLESTICKCHARTTYPE_JAPANESE, false );
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_CANDLESTICKCHARTTYPE_SHOW_FIRST, false );
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_CANDLESTICKCHARTTYPE_SHOW_HIGH_LOW, true );
+ return aTmp;
+ }();
+ tPropertyValueMap::const_iterator aFound( aStaticDefaults.find( nHandle ) );
+ if( aFound == aStaticDefaults.end() )
rAny.clear();
else
rAny = (*aFound).second;
@@ -276,13 +240,15 @@ void CandleStickChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny )
// ____ OPropertySet ____
::cppu::IPropertyArrayHelper & SAL_CALL CandleStickChartType::getInfoHelper()
{
- return *StaticCandleStickChartTypeInfoHelper::get();
+ return StaticCandleStickChartTypeInfoHelper();
}
// ____ XPropertySet ____
Reference< beans::XPropertySetInfo > SAL_CALL CandleStickChartType::getPropertySetInfo()
{
- return *StaticCandleStickChartTypeInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticCandleStickChartTypeInfoHelper() ) );
+ return xPropertySetInfo;
}
void SAL_CALL CandleStickChartType::setFastPropertyValue_NoBroadcast(
diff --git a/chart2/source/model/template/CandleStickChartType.hxx b/chart2/source/model/template/CandleStickChartType.hxx
index eac57a5b6496..822422aac85f 100644
--- a/chart2/source/model/template/CandleStickChartType.hxx
+++ b/chart2/source/model/template/CandleStickChartType.hxx
@@ -18,14 +18,12 @@
*/
#pragma once
-#include "ChartType.hxx"
+#include <ChartType.hxx>
namespace chart
{
-// see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100797> "[10/11/12 Regression] using
-// declaration causing virtual call with wrongly adjusted this pointer" before restoring 'final'
-class CandleStickChartType /* final */ : public ChartType
+class CandleStickChartType final : public ChartType
{
public:
explicit CandleStickChartType();
@@ -38,6 +36,8 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() override;
+ virtual rtl::Reference<ChartType> cloneChartType() const override;
+
private:
explicit CandleStickChartType( const CandleStickChartType & rOther );
diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx
index b93c36806096..9448a766071c 100644
--- a/chart2/source/model/template/ChartType.cxx
+++ b/chart2/source/model/template/ChartType.cxx
@@ -17,16 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "ChartType.hxx"
+#include <ChartType.hxx>
#include <CartesianCoordinateSystem.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <CloneHelper.hxx>
#include <AxisIndexDefines.hxx>
#include <ModifyListenerHelper.hxx>
+#include <DataSeries.hxx>
#include <vcl/svapp.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/container/NoSuchElementException.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
@@ -38,20 +40,19 @@ namespace chart
{
ChartType::ChartType() :
- ::property::OPropertySet( m_aMutex ),
m_xModifyEventForwarder( new ModifyEventForwarder() ),
m_bNotifyChanges( true )
{}
ChartType::ChartType( const ChartType & rOther ) :
impl::ChartType_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_xModifyEventForwarder( new ModifyEventForwarder() ),
m_bNotifyChanges( true )
{
{
SolarMutexGuard g; // access to rOther.m_aDataSeries
- CloneHelper::CloneRefVector<css::chart2::XDataSeries>(
+ CloneHelper::CloneRefVector(
rOther.m_aDataSeries, m_aDataSeries);
}
ModifyListenerHelper::addListenerToAllElements( m_aDataSeries, m_xModifyEventForwarder );
@@ -67,12 +68,18 @@ ChartType::~ChartType()
Reference< chart2::XCoordinateSystem > SAL_CALL
ChartType::createCoordinateSystem( ::sal_Int32 DimensionCount )
{
+ return createCoordinateSystem2(DimensionCount);
+}
+
+rtl::Reference< BaseCoordinateSystem >
+ ChartType::createCoordinateSystem2( ::sal_Int32 DimensionCount )
+{
rtl::Reference< CartesianCoordinateSystem > xResult =
new CartesianCoordinateSystem( DimensionCount );
for( sal_Int32 i=0; i<DimensionCount; ++i )
{
- Reference< chart2::XAxis > xAxis( xResult->getAxisByDimension( i, MAIN_AXIS_INDEX ) );
+ rtl::Reference< Axis > xAxis = xResult->getAxisByDimension2( i, MAIN_AXIS_INDEX );
if( !xAxis.is() )
{
OSL_FAIL("a created coordinate system should have an axis for each dimension");
@@ -117,7 +124,7 @@ OUString SAL_CALL ChartType::getRoleOfSequenceForSeriesLabel()
}
void ChartType::impl_addDataSeriesWithoutNotification(
- const Reference< chart2::XDataSeries >& xDataSeries )
+ const rtl::Reference< DataSeries >& xDataSeries )
{
if( std::find( m_aDataSeries.begin(), m_aDataSeries.end(), xDataSeries )
!= m_aDataSeries.end())
@@ -130,6 +137,13 @@ void ChartType::impl_addDataSeriesWithoutNotification(
// ____ XDataSeriesContainer ____
void SAL_CALL ChartType::addDataSeries( const Reference< chart2::XDataSeries >& xDataSeries )
{
+ rtl::Reference<DataSeries> xTmp = dynamic_cast<DataSeries*>(xDataSeries.get());
+ assert(xTmp);
+ addDataSeries(xTmp);
+}
+
+void ChartType::addDataSeries( const rtl::Reference< DataSeries >& xDataSeries )
+{
SolarMutexGuard g;
impl_addDataSeriesWithoutNotification( xDataSeries );
@@ -138,13 +152,19 @@ void SAL_CALL ChartType::addDataSeries( const Reference< chart2::XDataSeries >&
void SAL_CALL ChartType::removeDataSeries( const Reference< chart2::XDataSeries >& xDataSeries )
{
+ rtl::Reference<DataSeries> xTmp = dynamic_cast<DataSeries*>(xDataSeries.get());
+ assert(xTmp);
+ removeDataSeries(xTmp);
+}
+
+void ChartType::removeDataSeries( const rtl::Reference< DataSeries >& xDataSeries )
+{
if( !xDataSeries.is())
throw container::NoSuchElementException();
SolarMutexGuard g;
- tDataSeriesContainerType::iterator aIt(
- std::find( m_aDataSeries.begin(), m_aDataSeries.end(), xDataSeries ) );
+ auto aIt = std::find( m_aDataSeries.begin(), m_aDataSeries.end(), xDataSeries );
if( aIt == m_aDataSeries.end())
throw container::NoSuchElementException(
@@ -160,18 +180,29 @@ Sequence< Reference< chart2::XDataSeries > > SAL_CALL ChartType::getDataSeries()
{
SolarMutexGuard g;
- return comphelper::containerToSequence( m_aDataSeries );
+ return comphelper::containerToSequence< Reference< chart2::XDataSeries > >( m_aDataSeries );
}
void SAL_CALL ChartType::setDataSeries( const Sequence< Reference< chart2::XDataSeries > >& aDataSeries )
{
+ std::vector< rtl::Reference<DataSeries> > aTmp;
+ for (auto const & i : aDataSeries)
+ {
+ auto p = dynamic_cast<DataSeries*>(i.get());
+ assert(p);
+ aTmp.push_back(p);
+ }
+ setDataSeries(aTmp);
+}
+
+void ChartType::setDataSeries( const std::vector< rtl::Reference< DataSeries > >& aDataSeries )
+{
SolarMutexGuard g;
m_bNotifyChanges = false;
try
{
- const Sequence< Reference< chart2::XDataSeries > > aOldSeries( getDataSeries() );
- for( auto const & i : aOldSeries )
+ for( auto const & i : m_aDataSeries )
ModifyListenerHelper::removeListener( i, m_xModifyEventForwarder );
m_aDataSeries.clear();
@@ -196,31 +227,10 @@ void ChartType::GetDefaultValue( sal_Int32 /* nHandle */, uno::Any& rAny ) const
namespace
{
-struct StaticChartTypeInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( Sequence< beans::Property >{} );
- return &aPropHelper;
- }
-};
-
-struct StaticChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticChartTypeInfoHelper_Initializer >
-{
-};
-
-struct StaticChartTypeInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticChartTypeInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
-
-struct StaticChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticChartTypeInfo_Initializer >
+::cppu::OPropertyArrayHelper& StaticChartTypeInfoHelper()
{
+ static ::cppu::OPropertyArrayHelper aPropHelper( Sequence< beans::Property >{} );
+ return aPropHelper;
};
}
@@ -228,13 +238,15 @@ struct StaticChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans:
// ____ OPropertySet ____
::cppu::IPropertyArrayHelper & SAL_CALL ChartType::getInfoHelper()
{
- return *StaticChartTypeInfoHelper::get();
+ return StaticChartTypeInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL ChartType::getPropertySetInfo()
{
- return *StaticChartTypeInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo( StaticChartTypeInfoHelper() ) );
+ return xPropertySetInfo;
}
// ____ XModifyBroadcaster ____
@@ -242,8 +254,7 @@ void SAL_CALL ChartType::addModifyListener( const uno::Reference< util::XModifyL
{
try
{
- uno::Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW );
- xBroadcaster->addModifyListener( aListener );
+ m_xModifyEventForwarder->addModifyListener( aListener );
}
catch( const uno::Exception & )
{
@@ -255,8 +266,7 @@ void SAL_CALL ChartType::removeModifyListener( const uno::Reference< util::XModi
{
try
{
- uno::Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW );
- xBroadcaster->removeModifyListener( aListener );
+ m_xModifyEventForwarder->removeModifyListener( aListener );
}
catch( const uno::Exception & )
{
diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx
index 5b639dbf31ab..2e6753444d99 100644
--- a/chart2/source/model/template/ChartTypeManager.cxx
+++ b/chart2/source/model/template/ChartTypeManager.cxx
@@ -33,13 +33,13 @@
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
#include <algorithm>
#include <iterator>
#include <o3tl/functional.hxx>
#include <map>
+#include <utility>
using namespace ::com::sun::star;
@@ -89,6 +89,8 @@ enum TemplateId
TEMPLATE_PIEALLEXPLODED,
TEMPLATE_DONUT,
TEMPLATE_DONUTALLEXPLODED,
+ TEMPLATE_BAROFPIE,
+ TEMPLATE_PIEOFPIE,
TEMPLATE_THREEDPIE,
TEMPLATE_THREEDPIEALLEXPLODED,
TEMPLATE_THREEDDONUT,
@@ -163,6 +165,9 @@ const tTemplateMapType & lcl_DefaultChartTypeMap()
{"com.sun.star.chart2.template.PieAllExploded", TEMPLATE_PIEALLEXPLODED},
{"com.sun.star.chart2.template.Donut", TEMPLATE_DONUT},
{"com.sun.star.chart2.template.DonutAllExploded", TEMPLATE_DONUTALLEXPLODED},
+ {"com.sun.star.chart2.template.BarOfPie", TEMPLATE_BAROFPIE},
+ {"com.sun.star.chart2.template.PieOfPie", TEMPLATE_PIEOFPIE},
+ {"com.sun.star.chart2.template.DonutAllExploded", TEMPLATE_DONUTALLEXPLODED},
{"com.sun.star.chart2.template.ThreeDPie", TEMPLATE_THREEDPIE},
{"com.sun.star.chart2.template.ThreeDPieAllExploded", TEMPLATE_THREEDPIEALLEXPLODED},
{"com.sun.star.chart2.template.ThreeDDonut", TEMPLATE_THREEDDONUT},
@@ -213,8 +218,8 @@ namespace chart
ChartTypeManager::ChartTypeManager(
uno::Reference<
- uno::XComponentContext > const & xContext ) :
- m_xContext( xContext )
+ uno::XComponentContext > xContext ) :
+ m_xContext(std::move( xContext ))
{}
ChartTypeManager::~ChartTypeManager()
@@ -382,35 +387,47 @@ rtl::Reference< ::chart::ChartTypeTemplate > ChartTypeManager::createTemplate(
case TEMPLATE_PIE:
xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier,
- chart2::PieChartOffsetMode_NONE, false ));
+ chart2::PieChartOffsetMode_NONE, false, chart2::PieChartSubType_NONE ));
break;
case TEMPLATE_PIEALLEXPLODED:
xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier,
- chart2::PieChartOffsetMode_ALL_EXPLODED, false ));
+ chart2::PieChartOffsetMode_ALL_EXPLODED, false,
+ chart2::PieChartSubType_NONE ));
break;
case TEMPLATE_DONUT:
xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier,
- chart2::PieChartOffsetMode_NONE, true ));
+ chart2::PieChartOffsetMode_NONE, true, chart2::PieChartSubType_NONE ));
break;
case TEMPLATE_DONUTALLEXPLODED:
xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier,
- chart2::PieChartOffsetMode_ALL_EXPLODED, true ));
+ chart2::PieChartOffsetMode_ALL_EXPLODED, true,
+ chart2::PieChartSubType_NONE ));
+ break;
+ case TEMPLATE_BAROFPIE:
+ xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier,
+ chart2::PieChartOffsetMode_NONE, false, chart2::PieChartSubType_BAR ));
+ break;
+ case TEMPLATE_PIEOFPIE:
+ xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier,
+ chart2::PieChartOffsetMode_NONE, false, chart2::PieChartSubType_PIE ));
break;
case TEMPLATE_THREEDPIE:
xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier,
- chart2::PieChartOffsetMode_NONE, false, 3 ));
+ chart2::PieChartOffsetMode_NONE, false, chart2::PieChartSubType_NONE, 3 ));
break;
case TEMPLATE_THREEDPIEALLEXPLODED:
xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier,
- chart2::PieChartOffsetMode_ALL_EXPLODED, false, 3 ));
+ chart2::PieChartOffsetMode_ALL_EXPLODED, false,
+ chart2::PieChartSubType_NONE, 3 ));
break;
case TEMPLATE_THREEDDONUT:
xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier,
- chart2::PieChartOffsetMode_NONE, true, 3 ));
+ chart2::PieChartOffsetMode_NONE, true, chart2::PieChartSubType_NONE, 3 ));
break;
case TEMPLATE_THREEDDONUTALLEXPLODED:
xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier,
- chart2::PieChartOffsetMode_ALL_EXPLODED, true, 3 ));
+ chart2::PieChartOffsetMode_ALL_EXPLODED, true,
+ chart2::PieChartSubType_NONE, 3 ));
break;
case TEMPLATE_SCATTERLINESYMBOL:
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index e6eb5e27e069..79ed5c7f4c90 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -18,29 +18,35 @@
*/
#include <ChartTypeTemplate.hxx>
-#include "DataInterpreter.hxx"
+#include <DataInterpreter.hxx>
#include <CommonConverters.hxx>
#include <ChartTypeHelper.hxx>
+#include <ChartType.hxx>
+#include <DataSeriesProperties.hxx>
+#include <DataSource.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
+#include <Diagram.hxx>
#include <DiagramHelper.hxx>
#include <AxisIndexDefines.hxx>
+#include <BaseCoordinateSystem.hxx>
#include <unonames.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/StackingDirection.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <tools/diagnose_ex.h>
+#include <com/sun/star/chart2/XColorScheme.hpp>
+#include <comphelper/diagnose_ex.hxx>
#include <comphelper/property.hxx>
-#include <comphelper/sequence.hxx>
#include <algorithm>
+#include <cstddef>
+#include <utility>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Reference;
@@ -49,18 +55,17 @@ namespace
{
void lcl_applyDefaultStyle(
- const Reference< XDataSeries > & xSeries,
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
sal_Int32 nIndex,
- const Reference< XDiagram > & xDiagram )
+ const rtl::Reference< ::chart::Diagram > & xDiagram )
{
// @deprecated: correct default color should be found by view without
// setting color as hard attribute
if( xSeries.is() && xDiagram.is())
{
- Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY );
Reference< chart2::XColorScheme > xColorScheme( xDiagram->getDefaultColorScheme());
- if( xSeriesProp.is() && xColorScheme.is() )
- xSeriesProp->setPropertyValue(
+ if( xColorScheme.is() )
+ xSeries->setPropertyValue(
"Color",
uno::Any( xColorScheme->getColorByIndex( nIndex )));
}
@@ -102,18 +107,17 @@ void lcl_resetLabelPlacementIfDefault( const Reference< beans::XPropertySet >& x
}
}
-void lcl_ensureCorrectMissingValueTreatment( const Reference< chart2::XDiagram >& xDiagram, const Reference< XChartType >& xChartType )
+void lcl_ensureCorrectMissingValueTreatment( const rtl::Reference< ::chart::Diagram >& xDiagram, const rtl::Reference< ::chart::ChartType >& xChartType )
{
- Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY );
- if( xDiaProp.is() )
+ if( xDiagram.is() )
{
uno::Sequence < sal_Int32 > aAvailableMissingValueTreatment(
::chart::ChartTypeHelper::getSupportedMissingValueTreatments( xChartType ) );
if( aAvailableMissingValueTreatment.hasElements() )
- xDiaProp->setPropertyValue( "MissingValueTreatment", uno::Any( aAvailableMissingValueTreatment[0] ) );
+ xDiagram->setPropertyValue( "MissingValueTreatment", uno::Any( aAvailableMissingValueTreatment[0] ) );
else
- xDiaProp->setPropertyValue( "MissingValueTreatment", uno::Any() );
+ xDiagram->setPropertyValue( "MissingValueTreatment", uno::Any() );
}
}
@@ -124,44 +128,39 @@ namespace chart
ChartTypeTemplate::ChartTypeTemplate(
Reference< uno::XComponentContext > const & xContext,
- const OUString & rServiceName ) :
+ OUString aServiceName ) :
m_xContext( xContext ),
- m_aServiceName( rServiceName )
+ m_aServiceName(std::move( aServiceName ))
{
}
ChartTypeTemplate::~ChartTypeTemplate()
{}
-// ____ XChartTypeTemplate ____
-uno::Reference< XDiagram > SAL_CALL ChartTypeTemplate::createDiagramByDataSource(
+// ____ ChartTypeTemplate ____
+rtl::Reference< Diagram > ChartTypeTemplate::createDiagramByDataSource2(
const uno::Reference< data::XDataSource >& xDataSource,
const uno::Sequence< beans::PropertyValue >& aArguments )
{
- Reference< XDiagram > xDia;
+ rtl::Reference< Diagram > xDia;
try
{
// create diagram
- xDia.set(
- GetComponentContext()->getServiceManager()->createInstanceWithContext(
- "com.sun.star.chart2.Diagram",
- GetComponentContext() ),
- uno::UNO_QUERY_THROW );
+ xDia = new Diagram(GetComponentContext());
// modify diagram
- Reference< chart2::XDataInterpreter > xInterpreter( getDataInterpreter());
- chart2::InterpretedData aData(
+ rtl::Reference< DataInterpreter > xInterpreter( getDataInterpreter2());
+ InterpretedData aData(
xInterpreter->interpretDataSource(
- xDataSource, aArguments, Sequence< Reference< XDataSeries > >() ));
+ xDataSource, aArguments, {} ));
- const Sequence< Sequence< Reference< XDataSeries > > > aSeries( aData.Series );
sal_Int32 nCount = 0;
- for( auto const & i : aSeries )
+ for( auto const & i : aData.Series )
for( auto const & j : i )
lcl_applyDefaultStyle( j, nCount++, xDia );
- Sequence< Reference< XChartType > > aOldChartTypesSeq;
+ std::vector< rtl::Reference< ChartType > > aOldChartTypesSeq;
FillDiagram( xDia, aData.Series, aData.Categories, aOldChartTypesSeq );
}
catch( const uno::Exception & )
@@ -177,23 +176,23 @@ sal_Bool SAL_CALL ChartTypeTemplate::supportsCategories()
return true;
}
-void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >& xDiagram )
+void ChartTypeTemplate::changeDiagram( const rtl::Reference< Diagram >& xDiagram )
{
if( ! xDiagram.is())
return;
try
{
- Sequence< Sequence< Reference< XDataSeries > > > aSeriesSeq(
- DiagramHelper::getDataSeriesGroups( xDiagram ));
- Sequence< Reference< XDataSeries > > aFlatSeriesSeq( FlattenSequence( aSeriesSeq ));
- const sal_Int32 nFormerSeriesCount = aFlatSeriesSeq.getLength();
+ std::vector< std::vector< rtl::Reference< DataSeries > > > aSeriesSeq =
+ xDiagram->getDataSeriesGroups();
+ std::vector< rtl::Reference< DataSeries > > aFlatSeriesSeq( FlattenSequence( aSeriesSeq ));
+ const sal_Int32 nFormerSeriesCount = aFlatSeriesSeq.size();
// chart-type specific interpretation of existing data series
- Reference< chart2::XDataInterpreter > xInterpreter( getDataInterpreter());
- chart2::InterpretedData aData;
+ rtl::Reference< DataInterpreter > xInterpreter( getDataInterpreter2());
+ InterpretedData aData;
aData.Series = aSeriesSeq;
- aData.Categories = DiagramHelper::getCategoriesFromDiagram( xDiagram );
+ aData.Categories = xDiagram->getCategories();
if( xInterpreter->isDataCompatible( aData ) )
{
@@ -201,7 +200,7 @@ void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >
}
else
{
- Reference< data::XDataSource > xSource( xInterpreter->mergeInterpretedData( aData ));
+ rtl::Reference< DataSource > xSource = DataInterpreter::mergeInterpretedData( aData );
// todo: get a "range-union" from the data provider by calling
// OUString aRange = getRangeRepresentationByData( xSource );
// xSource.set( getDataByRangeRepresentation( aRange, aParam ));
@@ -217,7 +216,7 @@ void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >
aSeriesSeq = aData.Series;
sal_Int32 nIndex = 0;
- for( auto const & i : std::as_const(aSeriesSeq) )
+ for (auto const& i : aSeriesSeq)
for( auto const & j : i )
{
if( nIndex >= nFormerSeriesCount )
@@ -225,21 +224,12 @@ void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >
}
// remove charttype groups from all coordinate systems
- Sequence< Reference< XChartType > > aOldChartTypesSeq(
- DiagramHelper::getChartTypesFromDiagram(xDiagram) );
+ std::vector< rtl::Reference< ChartType > > aOldChartTypesSeq =
+ xDiagram->getChartTypes();
- Reference< XCoordinateSystemContainer > xCoordSysCnt( xDiagram, uno::UNO_QUERY );
- OSL_ASSERT( xCoordSysCnt.is());
- if( xCoordSysCnt.is())
+ for( rtl::Reference< BaseCoordinateSystem > const & coords : xDiagram->getBaseCoordinateSystems() )
{
- const Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
- xCoordSysCnt->getCoordinateSystems());
- for( Reference< XCoordinateSystem > const & coords : aCooSysSeq )
- {
- Reference< XChartTypeContainer > xContainer( coords, uno::UNO_QUERY );
- if( xContainer.is() )
- xContainer->setChartTypes( Sequence< Reference< XChartType > >() );
- }
+ coords->setChartTypes( Sequence< Reference< XChartType > >() );
}
FillDiagram( xDiagram, aSeriesSeq, aData.Categories, aOldChartTypesSeq );
@@ -250,8 +240,8 @@ void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >
}
}
-void SAL_CALL ChartTypeTemplate::changeDiagramData(
- const Reference< chart2::XDiagram >& xDiagram,
+void ChartTypeTemplate::changeDiagramData(
+ const rtl::Reference< Diagram >& xDiagram,
const Reference< chart2::data::XDataSource >& xDataSource,
const Sequence< beans::PropertyValue >& aArguments )
{
@@ -262,37 +252,34 @@ void SAL_CALL ChartTypeTemplate::changeDiagramData(
try
{
// interpret new data and re-use existing series
- Sequence< Reference< XDataSeries > > aFlatSeriesSeq(
- comphelper::containerToSequence( DiagramHelper::getDataSeriesFromDiagram( xDiagram )));
- const sal_Int32 nFormerSeriesCount = aFlatSeriesSeq.getLength();
- Reference< chart2::XDataInterpreter > xInterpreter( getDataInterpreter());
- chart2::InterpretedData aData =
+ std::vector< rtl::Reference< DataSeries > > aFlatSeriesSeq =
+ xDiagram->getDataSeries();
+ const sal_Int32 nFormerSeriesCount = aFlatSeriesSeq.size();
+ rtl::Reference< DataInterpreter > xInterpreter( getDataInterpreter2());
+ InterpretedData aData =
xInterpreter->interpretDataSource( xDataSource, aArguments, aFlatSeriesSeq );
// data series
- Sequence< Sequence< Reference< XDataSeries > > > aSeriesSeq( aData.Series );
-
- sal_Int32 i, j, nIndex = 0;
- for( i=0; i<aSeriesSeq.getLength(); ++i )
- for( j=0; j<aSeriesSeq[i].getLength(); ++j, ++nIndex )
+ sal_Int32 nIndex = 0;
+ for( std::size_t i=0; i<aData.Series.size(); ++i )
+ for( std::size_t j=0; j<aData.Series[i].size(); ++j, ++nIndex )
{
if( nIndex >= nFormerSeriesCount )
{
- lcl_applyDefaultStyle( aSeriesSeq[i][j], nIndex, xDiagram );
- applyStyle( aSeriesSeq[i][j], i, j, aSeriesSeq[i].getLength() );
+ lcl_applyDefaultStyle( aData.Series[i][j], nIndex, xDiagram );
+ applyStyle2( aData.Series[i][j], i, j, aData.Series[i].size() );
}
}
// categories
- DiagramHelper::setCategoriesToDiagram( aData.Categories, xDiagram, true, supportsCategories() );
+ xDiagram->setCategories( aData.Categories, true, supportsCategories() );
- Sequence< Reference< XChartType > > aChartTypes(
- DiagramHelper::getChartTypesFromDiagram( xDiagram ));
- sal_Int32 nMax = std::min( aChartTypes.getLength(), aSeriesSeq.getLength());
- for( i=0; i<nMax; ++i )
+ std::vector< rtl::Reference< ChartType > > aChartTypes =
+ xDiagram->getChartTypes();
+ sal_Int32 nMax = std::min( aChartTypes.size(), aData.Series.size());
+ for( sal_Int32 i=0; i<nMax; ++i )
{
- Reference< XDataSeriesContainer > xDSCnt( aChartTypes[i], uno::UNO_QUERY_THROW );
- xDSCnt->setDataSeries( aSeriesSeq[i] );
+ aChartTypes[i]->setDataSeries( aData.Series[i] );
}
}
catch( const uno::Exception & )
@@ -301,9 +288,9 @@ void SAL_CALL ChartTypeTemplate::changeDiagramData(
}
}
-sal_Bool SAL_CALL ChartTypeTemplate::matchesTemplate(
- const Reference< chart2::XDiagram >& xDiagram,
- sal_Bool /* bAdaptProperties */ )
+bool ChartTypeTemplate::matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool /* bAdaptProperties */ )
{
bool bResult = false;
@@ -312,34 +299,28 @@ sal_Bool SAL_CALL ChartTypeTemplate::matchesTemplate(
try
{
- Reference< XCoordinateSystemContainer > xCooSysCnt(
- xDiagram, uno::UNO_QUERY_THROW );
- Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
- xCooSysCnt->getCoordinateSystems());
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysSeq(
+ xDiagram->getBaseCoordinateSystems());
// need to have at least one coordinate system
- bResult = aCooSysSeq.hasElements();
+ bResult = !aCooSysSeq.empty();
if( bResult )
{
- Sequence< Reference< XChartType > > aFormerlyUsedChartTypes;
- Reference<XChartType> xOldCT = getChartTypeForNewSeries(aFormerlyUsedChartTypes);
+ std::vector< rtl::Reference< ChartType > > aFormerlyUsedChartTypes;
+ rtl::Reference<ChartType> xOldCT = getChartTypeForNewSeries2(aFormerlyUsedChartTypes);
if (!xOldCT.is())
return false;
const OUString aChartTypeToMatch = xOldCT->getChartType();
const sal_Int32 nDimensionToMatch = getDimension();
- for( sal_Int32 nCooSysIdx=0; bResult && (nCooSysIdx < aCooSysSeq.getLength()); ++nCooSysIdx )
+ for( std::size_t nCooSysIdx=0; bResult && (nCooSysIdx < aCooSysSeq.size()); ++nCooSysIdx )
{
// match dimension
bResult = bResult && (aCooSysSeq[nCooSysIdx]->getDimension() == nDimensionToMatch);
- Reference< XChartTypeContainer > xCTCnt( aCooSysSeq[nCooSysIdx], uno::UNO_QUERY_THROW );
- Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes());
- for( sal_Int32 nCTIdx=0; bResult && (nCTIdx < aChartTypeSeq.getLength()); ++nCTIdx )
+ const std::vector< rtl::Reference< ChartType > > & aChartTypeSeq( aCooSysSeq[nCooSysIdx]->getChartTypes2());
+ for( std::size_t nCTIdx=0; bResult && (nCTIdx < aChartTypeSeq.size()); ++nCTIdx )
{
- if (!aChartTypeSeq[nCTIdx].is())
- return false;
-
// match chart type
bResult = bResult && aChartTypeSeq[nCTIdx]->getChartType() == aChartTypeToMatch;
bool bFound=false;
@@ -362,7 +343,7 @@ sal_Bool SAL_CALL ChartTypeTemplate::matchesTemplate(
return bResult;
}
-Reference< chart2::XDataInterpreter > SAL_CALL ChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > ChartTypeTemplate::getDataInterpreter2()
{
if( ! m_xDataInterpreter.is())
m_xDataInterpreter.set( new DataInterpreter );
@@ -370,15 +351,14 @@ Reference< chart2::XDataInterpreter > SAL_CALL ChartTypeTemplate::getDataInterpr
return m_xDataInterpreter;
}
-void SAL_CALL ChartTypeTemplate::applyStyle(
- const Reference< chart2::XDataSeries >& xSeries,
+void ChartTypeTemplate::applyStyle2(
+ const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 /* nSeriesIndex */,
::sal_Int32 /* nSeriesCount */ )
{
// sset stacking mode
- Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY );
- if( !xSeriesProp.is())
+ if( !xSeries.is())
return;
try
@@ -391,16 +371,17 @@ void SAL_CALL ChartTypeTemplate::applyStyle(
: (eStackMode == StackMode::ZStacked )
? chart2::StackingDirection_Z_STACKING
: chart2::StackingDirection_NO_STACKING );
- xSeriesProp->setPropertyValue( "StackingDirection", aPropValue );
+ xSeries->setPropertyValue( "StackingDirection", aPropValue );
//ensure valid label placement
{
uno::Sequence < sal_Int32 > aAvailablePlacements( ChartTypeHelper::getSupportedLabelPlacements(
getChartTypeForIndex( nChartTypeIndex ), isSwapXAndY(), xSeries ) );
- lcl_ensureCorrectLabelPlacement( xSeriesProp, aAvailablePlacements );
+ lcl_ensureCorrectLabelPlacement( xSeries, aAvailablePlacements );
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeriesProp->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
lcl_ensureCorrectLabelPlacement( xSeries->getDataPointByIndex(aAttributedDataPointIndexList[nN]), aAvailablePlacements );
}
@@ -411,88 +392,63 @@ void SAL_CALL ChartTypeTemplate::applyStyle(
}
}
-void ChartTypeTemplate::applyStyles( const Reference< chart2::XDiagram >& xDiagram )
+void ChartTypeTemplate::applyStyles( const rtl::Reference< ::chart::Diagram >& xDiagram )
{
// apply chart-type specific styles, like "symbols on" for example
- Sequence< Sequence< Reference< XDataSeries > > > aNewSeriesSeq(
- DiagramHelper::getDataSeriesGroups( xDiagram ));
- for( sal_Int32 i=0; i<aNewSeriesSeq.getLength(); ++i )
+ std::vector< std::vector< rtl::Reference< DataSeries > > > aNewSeriesSeq(
+ xDiagram->getDataSeriesGroups());
+ for( std::size_t i=0; i<aNewSeriesSeq.size(); ++i )
{
- const sal_Int32 nNumSeries = aNewSeriesSeq[i].getLength();
+ const sal_Int32 nNumSeries = aNewSeriesSeq[i].size();
for( sal_Int32 j=0; j<nNumSeries; ++j )
- applyStyle( aNewSeriesSeq[i][j], i, j, nNumSeries );
+ applyStyle2( aNewSeriesSeq[i][j], i, j, nNumSeries );
}
//ensure valid empty cell handling (for first chart type...)
lcl_ensureCorrectMissingValueTreatment( xDiagram, getChartTypeForIndex( 0 ) );
}
-void SAL_CALL ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram )
+void ChartTypeTemplate::resetStyles2( const rtl::Reference< ::chart::Diagram >& xDiagram )
{
// reset number format if we had percent stacking on
bool bPercent = (getStackMode(0) == StackMode::YStackedPercent);
if( bPercent )
{
- const Sequence< Reference< chart2::XAxis > > aAxisSeq( AxisHelper::getAllAxesOfDiagram( xDiagram ) );
- for( Reference< chart2::XAxis > const & axis : aAxisSeq )
+ const std::vector< rtl::Reference< Axis > > aAxisSeq( AxisHelper::getAllAxesOfDiagram( xDiagram ) );
+ for( rtl::Reference< Axis > const & axis : aAxisSeq )
{
if( AxisHelper::getDimensionIndexOfAxis( axis, xDiagram )== 1 )
{
- Reference< beans::XPropertySet > xAxisProp( axis, uno::UNO_QUERY );
- if( xAxisProp.is())
- {
- // set number format to source format
- xAxisProp->setPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT, uno::Any(true));
- xAxisProp->setPropertyValue(CHART_UNONAME_NUMFMT, uno::Any());
- }
+ // set number format to source format
+ axis->setPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT, uno::Any(true));
+ axis->setPropertyValue(CHART_UNONAME_NUMFMT, uno::Any());
}
}
}
//reset label placement if default
+ for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : xDiagram->getBaseCoordinateSystems() )
{
- uno::Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY );
- if( xCooSysContainer.is() )
+ //iterate through all chart types in the current coordinate system
+ for( rtl::Reference< ChartType > const & xChartType : xCooSys->getChartTypes2() )
{
- const uno::Sequence< uno::Reference< XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() );
- for( uno::Reference< XCoordinateSystem > const & xCooSys : aCooSysList )
+ //iterate through all series in this chart type
+ for( rtl::Reference< DataSeries > const & xSeries : xChartType->getDataSeries2() )
{
- //iterate through all chart types in the current coordinate system
- uno::Reference< XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY );
- OSL_ASSERT( xChartTypeContainer.is());
- if( !xChartTypeContainer.is() )
+ uno::Sequence < sal_Int32 > aAvailablePlacements( ChartTypeHelper::getSupportedLabelPlacements(
+ xChartType, isSwapXAndY(), xSeries ) );
+ if(!aAvailablePlacements.hasElements())
continue;
- const uno::Sequence< uno::Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() );
- for( uno::Reference< XChartType > const & xChartType : aChartTypeList )
- {
- //iterate through all series in this chart type
- uno::Reference< XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY );
- OSL_ASSERT( xDataSeriesContainer.is());
- if( !xDataSeriesContainer.is() )
- continue;
-
- const uno::Sequence< uno::Reference< XDataSeries > > aSeriesList( xDataSeriesContainer->getDataSeries() );
- for( Reference< XDataSeries > const & xSeries : aSeriesList )
- {
- Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY );
- if(!xSeries.is() || !xSeriesProp.is() )
- continue;
- uno::Sequence < sal_Int32 > aAvailablePlacements( ChartTypeHelper::getSupportedLabelPlacements(
- xChartType, isSwapXAndY(), xSeries ) );
- if(!aAvailablePlacements.hasElements())
- continue;
+ sal_Int32 nDefaultPlacement = aAvailablePlacements[0];
- sal_Int32 nDefaultPlacement = aAvailablePlacements[0];
+ lcl_resetLabelPlacementIfDefault( xSeries, nDefaultPlacement );
- lcl_resetLabelPlacementIfDefault( xSeriesProp, nDefaultPlacement );
-
- uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeriesProp->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
- for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
- lcl_resetLabelPlacementIfDefault( xSeries->getDataPointByIndex(aAttributedDataPointIndexList[nN]), nDefaultPlacement );
- }
- }
+ uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
+ for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
+ lcl_resetLabelPlacementIfDefault( xSeries->getDataPointByIndex(aAttributedDataPointIndexList[nN]), nDefaultPlacement );
}
}
}
@@ -521,36 +477,36 @@ bool ChartTypeTemplate::isSwapXAndY() const
}
void ChartTypeTemplate::createCoordinateSystems(
- const Reference< chart2::XCoordinateSystemContainer > & xOutCooSysCnt )
+ const rtl::Reference< ::chart::Diagram > & xDiagram )
{
- if( ! xOutCooSysCnt.is())
+ if( ! xDiagram.is())
return;
- Sequence< Reference< XChartType > > aFormerlyUsedChartTypes;
- Reference< XChartType > xChartType( getChartTypeForNewSeries(aFormerlyUsedChartTypes));
+ std::vector< rtl::Reference< ChartType > > aFormerlyUsedChartTypes;
+ rtl::Reference< ChartType > xChartType( getChartTypeForNewSeries2(aFormerlyUsedChartTypes));
if( ! xChartType.is())
return;
- Reference< XCoordinateSystem > xCooSys( xChartType->createCoordinateSystem( getDimension()));
+ rtl::Reference< BaseCoordinateSystem > xCooSys = xChartType->createCoordinateSystem2( getDimension());
if( ! xCooSys.is())
{
// chart type wants no coordinate systems
- xOutCooSysCnt->setCoordinateSystems( Sequence< Reference< XCoordinateSystem > >());
+ xDiagram->setCoordinateSystems( Sequence< Reference< XCoordinateSystem > >());
return;
}
// #i69680# make grid of first y-axis visible (was in the CooSys CTOR before)
if( xCooSys->getDimension() >= 2 )
{
- Reference< chart2::XAxis > xAxis( xCooSys->getAxisByDimension( 1, 0 ));
+ rtl::Reference< Axis > xAxis = xCooSys->getAxisByDimension2( 1, 0 );
if( xAxis.is())
- AxisHelper::makeGridVisible( xAxis->getGridProperties() );
+ AxisHelper::makeGridVisible( xAxis->getGridProperties2() );
}
- Sequence< Reference< XCoordinateSystem > > aCoordinateSystems(
- xOutCooSysCnt->getCoordinateSystems());
+ std::vector< rtl::Reference< BaseCoordinateSystem > > aCoordinateSystems(
+ xDiagram->getBaseCoordinateSystems());
- if( aCoordinateSystems.hasElements())
+ if( !aCoordinateSystems.empty() )
{
bool bOk = true;
- for( sal_Int32 i=0; bOk && i<aCoordinateSystems.getLength(); ++i )
+ for( std::size_t i=0; bOk && i<aCoordinateSystems.size(); ++i )
bOk = bOk && ( xCooSys->getCoordinateSystemType() == aCoordinateSystems[i]->getCoordinateSystemType() &&
(xCooSys->getDimension() == aCoordinateSystems[i]->getDimension()) );
// coordinate systems are ok
@@ -560,9 +516,9 @@ void ChartTypeTemplate::createCoordinateSystems(
}
//copy as much info from former coordinate system as possible:
- if( aCoordinateSystems.hasElements() )
+ if( !aCoordinateSystems.empty() )
{
- Reference< XCoordinateSystem > xOldCooSys( aCoordinateSystems[0] );
+ rtl::Reference< BaseCoordinateSystem > xOldCooSys( aCoordinateSystems[0] );
sal_Int32 nMaxDimensionCount = std::min( xCooSys->getDimension(), xOldCooSys->getDimension() );
for(sal_Int32 nDimensionIndex=0; nDimensionIndex<nMaxDimensionCount; nDimensionIndex++)
@@ -570,7 +526,7 @@ void ChartTypeTemplate::createCoordinateSystems(
const sal_Int32 nMaximumAxisIndex = xOldCooSys->getMaximumAxisIndexByDimension(nDimensionIndex);
for(sal_Int32 nAxisIndex=0; nAxisIndex<=nMaximumAxisIndex; ++nAxisIndex)
{
- uno::Reference< XAxis > xAxis( xOldCooSys->getAxisByDimension( nDimensionIndex, nAxisIndex ) );
+ rtl::Reference< Axis > xAxis = xOldCooSys->getAxisByDimension2( nDimensionIndex, nAxisIndex );
if( xAxis.is())
{
xCooSys->setAxisByDimension( nDimensionIndex, xAxis, nAxisIndex );
@@ -582,22 +538,19 @@ void ChartTypeTemplate::createCoordinateSystems(
// set new coordinate systems
aCoordinateSystems = { xCooSys };
- xOutCooSysCnt->setCoordinateSystems( aCoordinateSystems );
+ xDiagram->setCoordinateSystems( aCoordinateSystems );
}
void ChartTypeTemplate::adaptScales(
- const Sequence< Reference< chart2::XCoordinateSystem > > & aCooSysSeq,
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysSeq,
const Reference< data::XLabeledDataSequence > & xCategories //@todo: in future there may be more than one sequence of categories (e.g. charttype with categories at x and y axis )
)
{
bool bSupportsCategories( supportsCategories() );
- for( Reference< XCoordinateSystem > const & xCooSys : aCooSysSeq )
+ for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : aCooSysSeq )
{
try
{
- if( !xCooSys.is() )
- continue;
-
// attach categories to first axis
sal_Int32 nDim( xCooSys->getDimension());
if( nDim > 0 )
@@ -606,17 +559,23 @@ void ChartTypeTemplate::adaptScales(
const sal_Int32 nMaxIndex = xCooSys->getMaximumAxisIndexByDimension(nDimensionX);
for(sal_Int32 nI=0; nI<=nMaxIndex; ++nI)
{
- Reference< XAxis > xAxis( xCooSys->getAxisByDimension(nDimensionX,nI) );
+ rtl::Reference< Axis > xAxis = xCooSys->getAxisByDimension2(nDimensionX,nI);
if( xAxis.is())
{
ScaleData aData( xAxis->getScaleData() );
aData.Categories = xCategories;
if(bSupportsCategories)
{
- Reference< XChartType > xChartType(getChartTypeForNewSeries(Sequence< Reference< XChartType > >()));
+ rtl::Reference< ChartType > xChartType = getChartTypeForNewSeries2({});
if( aData.AxisType == AxisType::CATEGORY )
{
- aData.ShiftedCategoryPosition = m_aServiceName.indexOf("Column") != -1 || m_aServiceName.indexOf("Bar") != -1 || m_aServiceName.endsWith("Close");
+ // Shift for Column, Hi-Lo-Close, and regular
+ // Bar types, but not BarOfPie
+ aData.ShiftedCategoryPosition =
+ m_aServiceName.indexOf("Column") != -1 ||
+ (m_aServiceName.indexOf("Bar") != -1 &&
+ !m_aServiceName.indexOf("BarOfPie")) ||
+ m_aServiceName.endsWith("Close");
}
bool bSupportsDates = ::chart::ChartTypeHelper::isSupportingDateAxis( xChartType, nDimensionX );
if( aData.AxisType != AxisType::CATEGORY && ( aData.AxisType != AxisType::DATE || !bSupportsDates) )
@@ -639,7 +598,7 @@ void ChartTypeTemplate::adaptScales(
const sal_Int32 nMaxIndex = xCooSys->getMaximumAxisIndexByDimension(1);
for(sal_Int32 nI=0; nI<=nMaxIndex; ++nI)
{
- Reference< chart2::XAxis > xAxis( xCooSys->getAxisByDimension( 1,nI ));
+ rtl::Reference< Axis > xAxis = xCooSys->getAxisByDimension2( 1,nI );
if( xAxis.is())
{
bool bPercent = (getStackMode(0) == StackMode::YStackedPercent);
@@ -664,18 +623,18 @@ void ChartTypeTemplate::adaptScales(
}
}
-void ChartTypeTemplate::adaptDiagram( const Reference< XDiagram > & /* xDiagram */ )
+void ChartTypeTemplate::adaptDiagram( const rtl::Reference< ::chart::Diagram > & /* xDiagram */ )
{
- }
+}
void ChartTypeTemplate::createAxes(
- const Sequence< Reference< XCoordinateSystem > > & rCoordSys )
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & rCoordSys )
{
//create missing axes
- if( !rCoordSys.hasElements() )
+ if( rCoordSys.empty() )
return;
- Reference< XCoordinateSystem > xCooSys( rCoordSys[0] );
+ rtl::Reference< BaseCoordinateSystem > xCooSys( rCoordSys[0] );
if(!xCooSys.is())
return;
@@ -702,14 +661,14 @@ void ChartTypeTemplate::createAxes(
}
void ChartTypeTemplate::adaptAxes(
- const Sequence< Reference< XCoordinateSystem > > & rCoordSys )
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & rCoordSys )
{
//adapt properties of existing axes and remove superfluous axes
- if( !rCoordSys.hasElements() )
+ if( rCoordSys.empty() )
return;
- for( Reference< XCoordinateSystem > const & xCooSys : rCoordSys )
+ for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : rCoordSys )
{
if( !xCooSys.is() )
continue;
@@ -719,7 +678,7 @@ void ChartTypeTemplate::adaptAxes(
sal_Int32 nMaxAxisIndex = xCooSys->getMaximumAxisIndexByDimension( nDim );
for( sal_Int32 nAxisIndex=0; nAxisIndex<=nMaxAxisIndex; nAxisIndex++ )
{
- Reference< XAxis > xAxis( AxisHelper::getAxis( nDim, nAxisIndex, xCooSys ) );
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( nDim, nAxisIndex, xCooSys );
if( !xAxis.is() )
continue;
@@ -729,13 +688,9 @@ void ChartTypeTemplate::adaptAxes(
bool bPercent = (getStackMode(0) == StackMode::YStackedPercent);
if( bPercent && nDim == 1 )
{
- Reference< beans::XPropertySet > xAxisProp( xAxis, uno::UNO_QUERY );
- if( xAxisProp.is())
- {
- // set number format to source format
- xAxisProp->setPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT, uno::Any(true));
- xAxisProp->setPropertyValue(CHART_UNONAME_NUMFMT, uno::Any());
- }
+ // set number format to source format
+ xAxis->setPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT, uno::Any(true));
+ xAxis->setPropertyValue(CHART_UNONAME_NUMFMT, uno::Any());
}
}
}
@@ -749,19 +704,18 @@ sal_Int32 ChartTypeTemplate::getAxisCountByDimension( sal_Int32 nDimension )
}
void ChartTypeTemplate::FillDiagram(
- const Reference< XDiagram >& xDiagram,
- const Sequence< Sequence< Reference< XDataSeries > > >& aSeriesSeq,
- const Reference< data::XLabeledDataSequence >& xCategories,
- const Sequence< Reference< XChartType > >& aOldChartTypesSeq )
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ const std::vector< std::vector< rtl::Reference< DataSeries > > >& aSeriesSeq,
+ const uno::Reference< chart2::data::XLabeledDataSequence >& xCategories,
+ const std::vector< rtl::Reference< ChartType > >& aOldChartTypesSeq )
{
adaptDiagram( xDiagram );
try
{
// create coordinate systems and scales
- Reference< XCoordinateSystemContainer > xCoordSysCnt( xDiagram, uno::UNO_QUERY_THROW );
- createCoordinateSystems( xCoordSysCnt );
- Sequence< Reference< XCoordinateSystem > > aCoordinateSystems( xCoordSysCnt->getCoordinateSystems());
+ createCoordinateSystems( xDiagram );
+ std::vector< rtl::Reference< BaseCoordinateSystem > > aCoordinateSystems( xDiagram->getBaseCoordinateSystems());
createAxes( aCoordinateSystems );
adaptAxes( aCoordinateSystems );
adaptScales( aCoordinateSystems, xCategories );
@@ -777,62 +731,57 @@ void ChartTypeTemplate::FillDiagram(
}
void ChartTypeTemplate::createChartTypes(
- const Sequence< Sequence< Reference< XDataSeries > > > & aSeriesSeq,
- const Sequence< Reference< XCoordinateSystem > > & rCoordSys,
- const Sequence< Reference< XChartType > >& aOldChartTypesSeq )
+ const std::vector< std::vector< rtl::Reference< DataSeries > > > & aSeriesSeq,
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & rCoordSys,
+ const std::vector< rtl::Reference< ChartType > >& aOldChartTypesSeq )
{
- if( ! rCoordSys.hasElements() ||
- ! rCoordSys[0].is() )
+ if( rCoordSys.empty() )
return;
try
{
- sal_Int32 nCooSysIdx=0;
- Reference< XChartType > xCT;
- if( !aSeriesSeq.hasElements() )
+ std::size_t nCooSysIdx=0;
+ rtl::Reference< ChartType > xCT;
+ if( aSeriesSeq.empty() )
{
// we need a new chart type
- xCT.set( getChartTypeForNewSeries( aOldChartTypesSeq ));
- Reference< XChartTypeContainer > xCTCnt( rCoordSys[nCooSysIdx], uno::UNO_QUERY_THROW );
- xCTCnt->setChartTypes({ xCT });
+ xCT = getChartTypeForNewSeries2( aOldChartTypesSeq );
+ rCoordSys[nCooSysIdx]->setChartTypes(std::vector{ xCT });
}
else
{
- for( sal_Int32 nSeriesIdx=0; nSeriesIdx<aSeriesSeq.getLength(); ++nSeriesIdx )
+ for( std::size_t nSeriesIdx=0; nSeriesIdx<aSeriesSeq.size(); ++nSeriesIdx )
{
if( nSeriesIdx == nCooSysIdx )
{
// we need a new chart type
- xCT.set( getChartTypeForNewSeries( aOldChartTypesSeq ));
- Reference< XChartTypeContainer > xCTCnt( rCoordSys[nCooSysIdx], uno::UNO_QUERY_THROW );
- Sequence< Reference< XChartType > > aCTSeq( xCTCnt->getChartTypes());
- if( aCTSeq.hasElements())
+ xCT = getChartTypeForNewSeries2( aOldChartTypesSeq );
+ std::vector< rtl::Reference< ChartType > > aCTSeq( rCoordSys[nCooSysIdx]->getChartTypes2());
+ if( !aCTSeq.empty())
{
- aCTSeq.getArray()[0] = xCT;
- xCTCnt->setChartTypes( aCTSeq );
+ aCTSeq[0] = xCT;
+ rCoordSys[nCooSysIdx]->setChartTypes( aCTSeq );
}
else
- xCTCnt->addChartType( xCT );
+ rCoordSys[nCooSysIdx]->addChartType( xCT );
- Reference< chart2::XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
- xDSCnt->setDataSeries( aSeriesSeq[nSeriesIdx] );
+ xCT->setDataSeries( aSeriesSeq[nSeriesIdx] );
}
else
{
// reuse existing chart type
OSL_ASSERT( xCT.is());
- Reference< chart2::XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
- Sequence< Reference< XDataSeries > > aNewSeriesSeq( xDSCnt->getDataSeries());
- sal_Int32 nNewStartIndex = aNewSeriesSeq.getLength();
- aNewSeriesSeq.realloc( nNewStartIndex + aSeriesSeq[nSeriesIdx].getLength() );
+ std::vector< rtl::Reference< DataSeries > > aNewSeriesSeq = xCT->getDataSeries2();
+ sal_Int32 nNewStartIndex = aNewSeriesSeq.size();
+ aNewSeriesSeq.resize( nNewStartIndex + aSeriesSeq[nSeriesIdx].size() );
std::copy( aSeriesSeq[nSeriesIdx].begin(),
aSeriesSeq[nSeriesIdx].end(),
- aNewSeriesSeq.getArray() + nNewStartIndex );
- xDSCnt->setDataSeries( aNewSeriesSeq );
+ aNewSeriesSeq.begin() + nNewStartIndex );
+ xCT->setDataSeries( aNewSeriesSeq );
}
// spread the series over the available coordinate systems
- if( rCoordSys.getLength() > (nCooSysIdx + 1) )
+ if( rCoordSys.size() > (nCooSysIdx + 1) )
++nCooSysIdx;
}
}
@@ -844,27 +793,77 @@ void ChartTypeTemplate::createChartTypes(
}
void ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem(
- const Sequence< Reference< XChartType > > & rOldChartTypesSeq,
- const Reference< XChartType > & xNewChartType )
+ const std::vector< rtl::Reference< ChartType > > & rOldChartTypesSeq,
+ const rtl::Reference< ChartType > & xNewChartType )
{
- Reference< beans::XPropertySet > xDestination( xNewChartType, uno::UNO_QUERY );
- if( !xDestination.is() )
+ if( !xNewChartType.is() )
return;
OUString aNewChartType( xNewChartType->getChartType() );
Reference< beans::XPropertySet > xSource;
- for( Reference< XChartType > const & xOldType : rOldChartTypesSeq )
+ for( rtl::Reference< ChartType > const & xOldType : rOldChartTypesSeq )
{
if( xOldType.is() && xOldType->getChartType() == aNewChartType )
{
- xSource.set( Reference< beans::XPropertySet >(xOldType, uno::UNO_QUERY ) );
+ xSource = xOldType;
if( xSource.is() )
break;
}
}
if( xSource.is() )
- comphelper::copyProperties( xSource, xDestination );
+ comphelper::copyProperties( xSource, xNewChartType );
+}
+
+css::uno::Reference< css::uno::XInterface > ChartTypeTemplate::getDataInterpreter()
+{
+ return static_cast<cppu::OWeakObject*>(getDataInterpreter2().get());
+}
+css::uno::Reference< css::chart2::XDiagram > ChartTypeTemplate::createDiagramByDataSource(
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments )
+{
+ return createDiagramByDataSource2(xDataSource, aArguments);
+}
+void ChartTypeTemplate::changeDiagram(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram )
+{
+ changeDiagram(rtl::Reference<Diagram>(dynamic_cast<Diagram*>(xDiagram.get())));
+}
+void ChartTypeTemplate::changeDiagramData(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments )
+{
+ changeDiagramData(rtl::Reference<Diagram>(dynamic_cast<Diagram*>(xDiagram.get())), xDataSource, aArguments);
+}
+sal_Bool ChartTypeTemplate::matchesTemplate(
+ const css::uno::Reference<css::chart2::XDiagram >& xDiagram,
+ sal_Bool bAdaptProperties )
+{
+ return matchesTemplate2(dynamic_cast<Diagram*>(xDiagram.get()), static_cast<bool>(bAdaptProperties));
+}
+css::uno::Reference< ::css::chart2::XChartType > ChartTypeTemplate::getChartTypeForNewSeries(
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes )
+{
+ std::vector< rtl::Reference< ::chart::ChartType > > aTmp;
+ aTmp.reserve(aFormerlyUsedChartTypes.getLength());
+ for (auto const & rxChartType : aFormerlyUsedChartTypes)
+ aTmp.push_back(dynamic_cast<ChartType*>(rxChartType.get()));
+ return getChartTypeForNewSeries2(aTmp);
+}
+void ChartTypeTemplate::applyStyle(
+ const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ ::sal_Int32 nChartTypeIndex,
+ ::sal_Int32 nSeriesIndex,
+ ::sal_Int32 nSeriesCount )
+{
+ applyStyle2(dynamic_cast<DataSeries*>(xSeries.get()), nChartTypeIndex, nSeriesIndex, nSeriesCount);
+}
+void ChartTypeTemplate::resetStyles(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram )
+{
+ resetStyles2(dynamic_cast<Diagram*>(xDiagram.get()));
}
} // namespace chart
diff --git a/chart2/source/model/template/ColumnChartType.cxx b/chart2/source/model/template/ColumnChartType.cxx
index 3553e289985e..cc351e77512b 100644
--- a/chart2/source/model/template/ColumnChartType.cxx
+++ b/chart2/source/model/template/ColumnChartType.cxx
@@ -54,67 +54,19 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT );
}
-struct StaticColumnChartTypeDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- Sequence< sal_Int32 > aSeq{ 0, 0 };
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_BARCHARTTYPE_OVERLAP_SEQUENCE, aSeq );
-
- aSeq = { 100, 100 };
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_BARCHARTTYPE_GAPWIDTH_SEQUENCE, aSeq );
- }
-};
-
-struct StaticColumnChartTypeDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticColumnChartTypeDefaults_Initializer >
-{
-};
-
-struct StaticColumnChartTypeInfoHelper_Initializer
+::cppu::OPropertyArrayHelper & StaticColumnChartTypeInfoHelper()
{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
+ static ::cppu::OPropertyArrayHelper aPropHelper = []()
+ {
+ std::vector< css::beans::Property > aProperties;
+ lcl_AddPropertiesToVector( aProperties );
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-
-};
-
-struct StaticColumnChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticColumnChartTypeInfoHelper_Initializer >
-{
-};
-
-struct StaticColumnChartTypeInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticColumnChartTypeInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
-
-struct StaticColumnChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticColumnChartTypeInfo_Initializer >
-{
+ return comphelper::containerToSequence( aProperties );
+ }();
+ return aPropHelper;
};
} // anonymous namespace
@@ -139,6 +91,11 @@ uno::Reference< util::XCloneable > SAL_CALL ColumnChartType::createClone()
return uno::Reference< util::XCloneable >( new ColumnChartType( *this ));
}
+rtl::Reference< ChartType > ColumnChartType::cloneChartType() const
+{
+ return new ColumnChartType( *this );
+}
+
// ____ XChartType ____
OUString SAL_CALL ColumnChartType::getChartType()
{
@@ -153,9 +110,17 @@ uno::Sequence< OUString > ColumnChartType::getSupportedPropertyRoles()
// ____ OPropertySet ____
void ColumnChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticColumnChartTypeDefaults::get();
- tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
- if( aFound == rStaticDefaults.end() )
+ static const ::chart::tPropertyValueMap aStaticDefaults = []()
+ {
+ ::chart::tPropertyValueMap aTmp;
+ Sequence< sal_Int32 > aSeq{ 0, 0 };
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_BARCHARTTYPE_OVERLAP_SEQUENCE, aSeq );
+ aSeq = { 100, 100 };
+ ::chart::PropertyHelper::setPropertyValueDefault( aTmp, PROP_BARCHARTTYPE_GAPWIDTH_SEQUENCE, aSeq );
+ return aTmp;
+ }();
+ tPropertyValueMap::const_iterator aFound( aStaticDefaults.find( nHandle ) );
+ if( aFound == aStaticDefaults.end() )
rAny.clear();
else
rAny = (*aFound).second;
@@ -163,13 +128,15 @@ void ColumnChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
::cppu::IPropertyArrayHelper & SAL_CALL ColumnChartType::getInfoHelper()
{
- return *StaticColumnChartTypeInfoHelper::get();
+ return StaticColumnChartTypeInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL ColumnChartType::getPropertySetInfo()
{
- return *StaticColumnChartTypeInfo::get();
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticColumnChartTypeInfoHelper() ) );
+ return xPropertySetInfo;
}
OUString SAL_CALL ColumnChartType::getImplementationName()
diff --git a/chart2/source/model/template/ColumnChartType.hxx b/chart2/source/model/template/ColumnChartType.hxx
index d304092cbfc0..2c6b3d762321 100644
--- a/chart2/source/model/template/ColumnChartType.hxx
+++ b/chart2/source/model/template/ColumnChartType.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include "ChartType.hxx"
+#include <ChartType.hxx>
namespace chart
{
@@ -36,6 +36,8 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() override;
+ virtual rtl::Reference<ChartType> cloneChartType() const override;
+
private:
explicit ColumnChartType( const ColumnChartType & rOther );
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
index fad59386b2b3..7e0117cca295 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
@@ -18,24 +18,24 @@
*/
#include "ColumnLineChartTypeTemplate.hxx"
+#include "ColumnChartType.hxx"
+#include "LineChartType.hxx"
#include <CommonConverters.hxx>
+#include <BaseCoordinateSystem.hxx>
+#include <Diagram.hxx>
#include <DiagramHelper.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <servicenames_charttypes.hxx>
#include "ColumnLineDataInterpreter.hxx"
#include <PropertyHelper.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <algorithm>
-using namespace ::com::sun::star::chart2;
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
@@ -50,69 +50,44 @@ enum
PROP_COL_LINE_NUMBER_OF_LINES
};
-void lcl_AddPropertiesToVector(
- std::vector< Property > & rOutProperties )
+::chart::tPropertyValueMap& StaticColumnLineChartTypeTemplateDefaults()
{
- rOutProperties.emplace_back( "NumberOfLines",
- PROP_COL_LINE_NUMBER_OF_LINES,
- cppu::UnoType<sal_Int32>::get(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
+ static ::chart::tPropertyValueMap aStaticDefaults =
+ []()
+ {
+ ::chart::tPropertyValueMap aOutMap;
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_COL_LINE_NUMBER_OF_LINES, 1 );
+ return aOutMap;
+ }();
+ return aStaticDefaults;
}
-struct StaticColumnLineChartTypeTemplateDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aStaticDefaults, PROP_COL_LINE_NUMBER_OF_LINES, 1 );
- return &aStaticDefaults;
- }
-};
-
-struct StaticColumnLineChartTypeTemplateDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticColumnLineChartTypeTemplateDefaults_Initializer >
-{
-};
-
-struct StaticColumnLineChartTypeTemplateInfoHelper_Initializer
+::cppu::OPropertyArrayHelper& StaticColumnLineChartTypeTemplateInfoHelper()
{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static uno::Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-
-};
+ static ::cppu::OPropertyArrayHelper aPropHelper(
+ []()
+ {
+ std::vector< css::beans::Property > aProperties {
+ { "NumberOfLines",
+ PROP_COL_LINE_NUMBER_OF_LINES,
+ cppu::UnoType<sal_Int32>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT } };
-struct StaticColumnLineChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticColumnLineChartTypeTemplateInfoHelper_Initializer >
-{
-};
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticColumnLineChartTypeTemplateInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticColumnLineChartTypeTemplateInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ return comphelper::containerToSequence( aProperties );
+ }());
+ return aPropHelper;
+}
-struct StaticColumnLineChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticColumnLineChartTypeTemplateInfo_Initializer >
+uno::Reference< beans::XPropertySetInfo >& StaticColumnLineChartTypeTemplateInfo()
{
-};
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticColumnLineChartTypeTemplateInfoHelper() ) );
+ return xPropertySetInfo;
+}
} // anonymous namespace
@@ -126,7 +101,6 @@ ColumnLineChartTypeTemplate::ColumnLineChartTypeTemplate(
StackMode eStackMode,
sal_Int32 nNumberOfLines ) :
ChartTypeTemplate( xContext, rServiceName ),
- ::property::OPropertySet( m_aMutex ),
m_eStackMode( eStackMode )
{
setFastPropertyValue_NoBroadcast( PROP_COL_LINE_NUMBER_OF_LINES, uno::Any( nNumberOfLines ));
@@ -138,7 +112,7 @@ ColumnLineChartTypeTemplate::~ColumnLineChartTypeTemplate()
// ____ OPropertySet ____
void ColumnLineChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticColumnLineChartTypeTemplateDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticColumnLineChartTypeTemplateDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -148,30 +122,27 @@ void ColumnLineChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any&
::cppu::IPropertyArrayHelper & SAL_CALL ColumnLineChartTypeTemplate::getInfoHelper()
{
- return *StaticColumnLineChartTypeTemplateInfoHelper::get();
+ return StaticColumnLineChartTypeTemplateInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL ColumnLineChartTypeTemplate::getPropertySetInfo()
{
- return *StaticColumnLineChartTypeTemplateInfo::get();
+ return StaticColumnLineChartTypeTemplateInfo();
}
void ColumnLineChartTypeTemplate::createChartTypes(
- const Sequence< Sequence< Reference< XDataSeries > > > & aSeriesSeq,
- const Sequence< Reference< XCoordinateSystem > > & rCoordSys,
- const Sequence< Reference< XChartType > >& aOldChartTypesSeq )
+ const std::vector< std::vector< rtl::Reference< DataSeries > > > & aSeriesSeq,
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & rCoordSys,
+ const std::vector< rtl::Reference< ChartType > >& aOldChartTypesSeq )
{
- if( ! rCoordSys.hasElements() ||
- ! rCoordSys[0].is() )
+ if( rCoordSys.empty() )
return;
try
{
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- const Sequence< Reference< XDataSeries > > aFlatSeriesSeq( FlattenSequence( aSeriesSeq ));
- sal_Int32 nNumberOfSeries = aFlatSeriesSeq.getLength();
+ const std::vector< rtl::Reference< DataSeries > > aFlatSeriesSeq( FlattenSequence( aSeriesSeq ));
+ sal_Int32 nNumberOfSeries = aFlatSeriesSeq.size();
sal_Int32 nNumberOfLines = 0;
sal_Int32 nNumberOfColumns = 0;
@@ -195,38 +166,33 @@ void ColumnLineChartTypeTemplate::createChartTypes(
// Columns
- Reference< XChartType > xCT(
- xFact->createInstance( CHART2_SERVICE_NAME_CHARTTYPE_COLUMN ), uno::UNO_QUERY_THROW );
+ rtl::Reference< ChartType > xCT = new ColumnChartType();
ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( aOldChartTypesSeq, xCT );
- Reference< XChartTypeContainer > xCTCnt( rCoordSys[ 0 ], uno::UNO_QUERY_THROW );
- xCTCnt->setChartTypes( Sequence< Reference< chart2::XChartType > >( &xCT, 1 ));
+ rCoordSys[ 0 ]->setChartTypes( std::vector{xCT} );
if( nNumberOfColumns > 0 )
{
- Reference< XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
- Sequence< Reference< XDataSeries > > aColumnSeq( nNumberOfColumns );
+ std::vector< rtl::Reference< DataSeries > > aColumnSeq( nNumberOfColumns );
std::copy( aFlatSeriesSeq.begin(),
aFlatSeriesSeq.begin() + nNumberOfColumns,
- aColumnSeq.getArray());
- xDSCnt->setDataSeries( aColumnSeq );
+ aColumnSeq.begin());
+ xCT->setDataSeries( aColumnSeq );
}
// Lines
- xCT.set( xFact->createInstance( CHART2_SERVICE_NAME_CHARTTYPE_LINE ), uno::UNO_QUERY_THROW );
- xCTCnt.set( rCoordSys[ 0 ], uno::UNO_QUERY_THROW );
- xCTCnt->addChartType( xCT );
+ xCT = new LineChartType();
+ rCoordSys[ 0 ]->addChartType( xCT );
if( nNumberOfLines > 0 )
{
- Reference< XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
- Sequence< Reference< XDataSeries > > aLineSeq( nNumberOfLines );
+ std::vector< rtl::Reference< DataSeries > > aLineSeq( nNumberOfLines );
std::copy( aFlatSeriesSeq.begin() + nNumberOfColumns,
aFlatSeriesSeq.end(),
- aLineSeq.getArray());
- xDSCnt->setDataSeries( aLineSeq );
+ aLineSeq.begin());
+ xCT->setDataSeries( aLineSeq );
}
}
catch( const uno::Exception & )
@@ -235,13 +201,13 @@ void ColumnLineChartTypeTemplate::createChartTypes(
}
}
-void SAL_CALL ColumnLineChartTypeTemplate::applyStyle(
- const Reference< chart2::XDataSeries >& xSeries,
+void ColumnLineChartTypeTemplate::applyStyle2(
+ const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
if( nChartTypeIndex==0 ) // columns
{
@@ -249,13 +215,9 @@ void SAL_CALL ColumnLineChartTypeTemplate::applyStyle(
}
else if( nChartTypeIndex==1 ) // lines
{
- Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY );
- if( xProp.is() )
- {
- DataSeriesHelper::switchLinesOnOrOff( xProp, true );
- DataSeriesHelper::switchSymbolsOnOrOff( xProp, false, nSeriesIndex );
- DataSeriesHelper::makeLinesThickOrThin( xProp, true );
- }
+ DataSeriesHelper::switchLinesOnOrOff( xSeries, true );
+ DataSeriesHelper::switchSymbolsOnOrOff( xSeries, false, nSeriesIndex );
+ DataSeriesHelper::makeLinesThickOrThin( xSeries, true );
}
}
@@ -267,9 +229,9 @@ StackMode ColumnLineChartTypeTemplate::getStackMode( sal_Int32 nChartTypeIndex )
}
// ____ XChartTypeTemplate ____
-sal_Bool SAL_CALL ColumnLineChartTypeTemplate::matchesTemplate(
- const uno::Reference< XDiagram >& xDiagram,
- sal_Bool bAdaptProperties )
+bool ColumnLineChartTypeTemplate::matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties )
{
bool bResult = false;
@@ -278,35 +240,27 @@ sal_Bool SAL_CALL ColumnLineChartTypeTemplate::matchesTemplate(
try
{
- Reference< chart2::XChartType > xColumnChartType;
- Reference< XCoordinateSystem > xColumnChartCooSys;
- Reference< chart2::XChartType > xLineChartType;
+ rtl::Reference< ChartType > xColumnChartType;
+ rtl::Reference< BaseCoordinateSystem > xColumnChartCooSys;
+ rtl::Reference< ChartType > xLineChartType;
sal_Int32 nNumberOfChartTypes = 0;
- Reference< XCoordinateSystemContainer > xCooSysCnt(
- xDiagram, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
- xCooSysCnt->getCoordinateSystems());
- for( Reference< XCoordinateSystem > const & coords : aCooSysSeq )
+ for( rtl::Reference< BaseCoordinateSystem > const & coords : xDiagram->getBaseCoordinateSystems() )
{
- Reference< XChartTypeContainer > xCTCnt( coords, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes());
- for( Reference< XChartType > const & chartType : aChartTypeSeq )
+ const std::vector< rtl::Reference< ChartType > > aChartTypeSeq( coords->getChartTypes2());
+ for( rtl::Reference< ChartType > const & chartType : aChartTypeSeq )
{
- if( chartType.is())
+ ++nNumberOfChartTypes;
+ if( nNumberOfChartTypes > 2 )
+ break;
+ OUString aCTService = chartType->getChartType();
+ if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_COLUMN )
{
- ++nNumberOfChartTypes;
- if( nNumberOfChartTypes > 2 )
- break;
- OUString aCTService = chartType->getChartType();
- if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_COLUMN )
- {
- xColumnChartType.set( chartType );
- xColumnChartCooSys.set( coords );
- }
- else if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_LINE )
- xLineChartType.set( chartType );
+ xColumnChartType = chartType;
+ xColumnChartCooSys = coords;
}
+ else if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_LINE )
+ xLineChartType = chartType;
}
if( nNumberOfChartTypes > 2 )
break;
@@ -331,10 +285,9 @@ sal_Bool SAL_CALL ColumnLineChartTypeTemplate::matchesTemplate(
if( bResult && bAdaptProperties )
{
- Reference< XDataSeriesContainer > xSeriesContainer( xLineChartType, uno::UNO_QUERY );
- if( xSeriesContainer.is() )
+ if( xLineChartType.is() )
{
- sal_Int32 nNumberOfLines = xSeriesContainer->getDataSeries().getLength();
+ sal_Int32 nNumberOfLines = xLineChartType->getDataSeries().getLength();
setFastPropertyValue_NoBroadcast( PROP_COL_LINE_NUMBER_OF_LINES, uno::Any( nNumberOfLines ));
}
}
@@ -349,32 +302,22 @@ sal_Bool SAL_CALL ColumnLineChartTypeTemplate::matchesTemplate(
return bResult;
}
-Reference< chart2::XChartType > ColumnLineChartTypeTemplate::getChartTypeForIndex( sal_Int32 nChartTypeIndex )
+rtl::Reference< ChartType > ColumnLineChartTypeTemplate::getChartTypeForIndex( sal_Int32 nChartTypeIndex )
{
- Reference< chart2::XChartType > xCT;
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY );
- if(xFact.is())
- {
- if( nChartTypeIndex == 0 )
- xCT.set( xFact->createInstance( CHART2_SERVICE_NAME_CHARTTYPE_COLUMN ), uno::UNO_QUERY );
- else
- xCT.set( xFact->createInstance( CHART2_SERVICE_NAME_CHARTTYPE_LINE ), uno::UNO_QUERY );
- }
- return xCT;
+ if( nChartTypeIndex == 0 )
+ return new ColumnChartType();
+ else
+ return new LineChartType();
}
-Reference< XChartType > SAL_CALL ColumnLineChartTypeTemplate::getChartTypeForNewSeries(
- const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
+rtl::Reference< ChartType > ColumnLineChartTypeTemplate::getChartTypeForNewSeries2(
+ const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
- Reference< chart2::XChartType > xResult;
+ rtl::Reference< ChartType > xResult;
try
{
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_LINE ), uno::UNO_QUERY_THROW );
+ xResult = new LineChartType();
ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( aFormerlyUsedChartTypes, xResult );
}
catch( const uno::Exception & )
@@ -385,13 +328,13 @@ Reference< XChartType > SAL_CALL ColumnLineChartTypeTemplate::getChartTypeForNew
return xResult;
}
-Reference< XDataInterpreter > SAL_CALL ColumnLineChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > ColumnLineChartTypeTemplate::getDataInterpreter2()
{
if( ! m_xDataInterpreter.is())
{
sal_Int32 nNumberOfLines = 1;
getFastPropertyValue( PROP_COL_LINE_NUMBER_OF_LINES ) >>= nNumberOfLines;
- m_xDataInterpreter.set( new ColumnLineDataInterpreter( nNumberOfLines ) );
+ m_xDataInterpreter = new ColumnLineDataInterpreter( nNumberOfLines );
}
else
{
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
index d112b81f58ad..68f144d6fedb 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
@@ -22,14 +22,12 @@
#include <StackMode.hxx>
#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <comphelper/uno3.hxx>
namespace chart
{
class ColumnLineChartTypeTemplate :
- public cppu::BaseMutex,
public ChartTypeTemplate,
public ::property::OPropertySet
{
@@ -55,35 +53,33 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
- // ____ XChartTypeTemplate ____
- virtual sal_Bool SAL_CALL matchesTemplate(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties ) override;
- virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
- getChartTypeForNewSeries( const css::uno::Sequence<
- css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
- virtual void SAL_CALL applyStyle(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ // ____ ChartTypeTemplate ____
+ virtual bool matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties ) override;
+ virtual rtl::Reference< ::chart::ChartType >
+ getChartTypeForNewSeries2( const std::vector<
+ rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
+ virtual void applyStyle2(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
- virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override;
+ virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter2() override;
// ____ ChartTypeTemplate ____
virtual void createChartTypes(
- const css::uno::Sequence<
- css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XDataSeries > > > & aSeriesSeq,
- const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XCoordinateSystem > > & rCoordSys,
- const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XChartType > > & aOldChartTypesSeq
+ const std::vector<
+ std::vector<
+ rtl::Reference<
+ ::chart::DataSeries > > > & aSeriesSeq,
+ const std::vector<
+ rtl::Reference<
+ ::chart::BaseCoordinateSystem > > & rCoordSys,
+ const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq
) override;
- virtual css::uno::Reference< css::chart2::XChartType >
+ virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const override;
diff --git a/chart2/source/model/template/ColumnLineDataInterpreter.cxx b/chart2/source/model/template/ColumnLineDataInterpreter.cxx
index 658bf2fd62d9..5cce30cd97a0 100644
--- a/chart2/source/model/template/ColumnLineDataInterpreter.cxx
+++ b/chart2/source/model/template/ColumnLineDataInterpreter.cxx
@@ -18,13 +18,13 @@
*/
#include "ColumnLineDataInterpreter.hxx"
+#include <DataSeries.hxx>
#include <osl/diagnose.h>
#include <algorithm>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
-using namespace ::std;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -41,34 +41,33 @@ ColumnLineDataInterpreter::ColumnLineDataInterpreter(
ColumnLineDataInterpreter::~ColumnLineDataInterpreter()
{}
-// ____ XDataInterpreter ____
-InterpretedData SAL_CALL ColumnLineDataInterpreter::interpretDataSource(
+// ____ DataInterpreter ____
+InterpretedData ColumnLineDataInterpreter::interpretDataSource(
const Reference< data::XDataSource >& xSource,
const Sequence< beans::PropertyValue >& aArguments,
- const Sequence< Reference< XDataSeries > >& aSeriesToReUse )
+ const std::vector< rtl::Reference< DataSeries > >& aSeriesToReUse )
{
InterpretedData aResult( DataInterpreter::interpretDataSource( xSource, aArguments, aSeriesToReUse ));
// the base class should return one group
- OSL_ASSERT( aResult.Series.getLength() == 1 );
- if( aResult.Series.getLength() == 1 )
+ OSL_ASSERT( aResult.Series.size() == 1 );
+ if( aResult.Series.size() == 1 )
{
- sal_Int32 nNumberOfSeries = aResult.Series[0].getLength();
+ sal_Int32 nNumberOfSeries = aResult.Series[0].size();
// if we have more than one series put the last nNumOfLines ones into a new group
if( nNumberOfSeries > 1 && m_nNumberOfLines > 0 )
{
sal_Int32 nNumOfLines = std::min( m_nNumberOfLines, nNumberOfSeries - 1 );
- aResult.Series.realloc(2);
- auto pSeries = aResult.Series.getArray();
+ aResult.Series.resize(2);
- Sequence< Reference< XDataSeries > > & rColumnDataSeries = pSeries[0];
- Sequence< Reference< XDataSeries > > & rLineDataSeries = pSeries[1];
- rLineDataSeries.realloc( nNumOfLines );
+ std::vector< rtl::Reference< DataSeries > > & rColumnDataSeries = aResult.Series[0];
+ std::vector< rtl::Reference< DataSeries > > & rLineDataSeries = aResult.Series[1];
+ rLineDataSeries.resize( nNumOfLines );
std::copy( std::cbegin(rColumnDataSeries) + nNumberOfSeries - nNumOfLines,
std::cbegin(rColumnDataSeries) + nNumberOfSeries,
- rLineDataSeries.getArray() );
- rColumnDataSeries.realloc( nNumberOfSeries - nNumOfLines );
+ rLineDataSeries.begin() );
+ rColumnDataSeries.resize( nNumberOfSeries - nNumOfLines );
}
}
diff --git a/chart2/source/model/template/ColumnLineDataInterpreter.hxx b/chart2/source/model/template/ColumnLineDataInterpreter.hxx
index 43801bc249d3..c2ec75826007 100644
--- a/chart2/source/model/template/ColumnLineDataInterpreter.hxx
+++ b/chart2/source/model/template/ColumnLineDataInterpreter.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include "DataInterpreter.hxx"
+#include <DataInterpreter.hxx>
namespace chart
{
@@ -29,12 +29,11 @@ public:
virtual ~ColumnLineDataInterpreter() override;
protected:
- // ____ XDataInterpreter ____
- virtual css::chart2::InterpretedData SAL_CALL interpretDataSource(
+ // ____ DataInterpreter ____
+ virtual InterpretedData interpretDataSource(
const css::uno::Reference<css::chart2::data::XDataSource>& xSource,
const css::uno::Sequence<css::beans::PropertyValue>& aArguments,
- const css::uno::Sequence<css::uno::Reference<css::chart2::XDataSeries>>& aSeriesToReUse)
- override;
+ const std::vector<rtl::Reference<::chart::DataSeries>>& aSeriesToReUse) override;
private:
sal_Int32 m_nNumberOfLines;
diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx
index 524ce73d0d2d..0f5cebc3bbec 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -17,22 +17,20 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "DataInterpreter.hxx"
+#include <DataInterpreter.hxx>
#include <DataSeries.hxx>
-#include <DataSourceHelper.hxx>
+#include <DataSource.hxx>
#include <DataSeriesHelper.hxx>
#include <CommonConverters.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
-#include <vector>
#include <algorithm>
+#include <cstddef>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
-using namespace ::std;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -54,10 +52,10 @@ DataInterpreter::~DataInterpreter()
{}
// ____ XDataInterpreter ____
-InterpretedData SAL_CALL DataInterpreter::interpretDataSource(
+InterpretedData DataInterpreter::interpretDataSource(
const Reference< data::XDataSource >& xSource,
const Sequence< beans::PropertyValue >& aArguments,
- const Sequence< Reference< XDataSeries > >& aSeriesToReUse )
+ const std::vector< rtl::Reference< DataSeries > >& aSeriesToReUse )
{
if( ! xSource.is())
return InterpretedData();
@@ -66,10 +64,10 @@ InterpretedData SAL_CALL DataInterpreter::interpretDataSource(
lcl_ShowDataSource( xSource );
#endif
- const Sequence< Reference< data::XLabeledDataSequence > > aData( xSource->getDataSequences() );
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData = getDataSequences(xSource);
- Reference< data::XLabeledDataSequence > xCategories;
- vector< Reference< data::XLabeledDataSequence > > aSequencesVec;
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSequencesVec;
// check if we should use categories
@@ -77,13 +75,13 @@ InterpretedData SAL_CALL DataInterpreter::interpretDataSource(
// parse data
bool bCategoriesUsed = false;
- for( Reference< data::XLabeledDataSequence > const & labeledData : aData )
+ for( uno::Reference< chart2::data::XLabeledDataSequence > const & labeledData : aData )
{
try
{
if( bHasCategories && ! bCategoriesUsed )
{
- xCategories.set( labeledData );
+ xCategories = labeledData;
if( xCategories.is())
SetRole( xCategories->getValues(), "categories");
bCategoriesUsed = true;
@@ -102,53 +100,50 @@ InterpretedData SAL_CALL DataInterpreter::interpretDataSource(
}
// create DataSeries
- sal_Int32 nSeriesIndex = 0;
- vector< Reference< XDataSeries > > aSeriesVec;
+ std::size_t nSeriesIndex = 0;
+ std::vector< rtl::Reference< DataSeries > > aSeriesVec;
aSeriesVec.reserve( aSequencesVec.size());
for (auto const& elem : aSequencesVec)
{
- Sequence< Reference< data::XLabeledDataSequence > > aNewData( &elem, 1 );
- Reference< XDataSeries > xSeries;
- if( nSeriesIndex < aSeriesToReUse.getLength())
- xSeries.set( aSeriesToReUse[nSeriesIndex] );
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aNewData { elem };
+ rtl::Reference< DataSeries > xSeries;
+ if( nSeriesIndex < aSeriesToReUse.size())
+ xSeries = aSeriesToReUse[nSeriesIndex];
else
- xSeries.set( new DataSeries );
- OSL_ASSERT( xSeries.is() );
- Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY );
- OSL_ASSERT( xSink.is() );
- xSink->setData( aNewData );
+ xSeries = new DataSeries;
+ assert( xSeries.is() );
+ xSeries->setData( aNewData );
aSeriesVec.push_back( xSeries );
++nSeriesIndex;
}
- return InterpretedData( { comphelper::containerToSequence( aSeriesVec ) }, xCategories );
+ return { { aSeriesVec }, xCategories };
}
-InterpretedData SAL_CALL DataInterpreter::reinterpretDataSeries(
+InterpretedData DataInterpreter::reinterpretDataSeries(
const InterpretedData& aInterpretedData )
{
InterpretedData aResult( aInterpretedData );
sal_Int32 i=0;
- Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
- const sal_Int32 nCount = aSeries.getLength();
+ std::vector< rtl::Reference< DataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
+ const sal_Int32 nCount = aSeries.size();
for( ; i<nCount; ++i )
{
try
{
- Reference< data::XDataSource > xSeriesSource( aSeries[i], uno::UNO_QUERY_THROW );
- Sequence< Reference< data::XLabeledDataSequence > > aNewSequences;
+ std::vector< uno::Reference< data::XLabeledDataSequence > > aNewSequences;
// values-y
- Reference< data::XLabeledDataSequence > xValuesY(
- DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-y" ));
+ uno::Reference< data::XLabeledDataSequence > xValuesY =
+ DataSeriesHelper::getDataSequenceByRole( aSeries[i], "values-y" );
// re-use values-... as values-y
if( ! xValuesY.is())
{
- xValuesY.set(
- DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values", true ));
+ xValuesY =
+ DataSeriesHelper::getDataSequenceByRole( aSeries[i], "values", true );
if( xValuesY.is())
SetRole( xValuesY->getValues(), "values-y");
}
@@ -157,8 +152,8 @@ InterpretedData SAL_CALL DataInterpreter::reinterpretDataSeries(
aNewSequences = { xValuesY };
}
- Sequence< Reference< data::XLabeledDataSequence > > aSeqs( xSeriesSource->getDataSequences());
- if( aSeqs.getLength() != aNewSequences.getLength() )
+ const std::vector< uno::Reference< data::XLabeledDataSequence > > & aSeqs = aSeries[i]->getDataSequences2();
+ if( aSeqs.size() != aNewSequences.size() )
{
#ifdef DEBUG_CHART2_TEMPLATE
sal_Int32 j=0;
@@ -167,8 +162,7 @@ InterpretedData SAL_CALL DataInterpreter::reinterpretDataSeries(
assert( aSeqs[j] == xValuesY && "All sequences should be used" );
}
#endif
- Reference< data::XDataSink > xSink( xSeriesSource, uno::UNO_QUERY_THROW );
- xSink->setData( aNewSequences );
+ aSeries[i]->setData( aNewSequences );
}
}
catch( const uno::Exception & )
@@ -181,17 +175,15 @@ InterpretedData SAL_CALL DataInterpreter::reinterpretDataSeries(
}
// criterion: all series must have exactly one data::XLabeledDataSequence
-sal_Bool SAL_CALL DataInterpreter::isDataCompatible(
- const chart2::InterpretedData& aInterpretedData )
+bool DataInterpreter::isDataCompatible(
+ const InterpretedData& aInterpretedData )
{
- const Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
- for( Reference< XDataSeries > const & i : aSeries )
+ const std::vector< rtl::Reference< DataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
+ for( rtl::Reference< DataSeries > const & i : aSeries )
{
try
{
- Reference< data::XDataSource > xSrc( i, uno::UNO_QUERY_THROW );
- Sequence< Reference< data::XLabeledDataSequence > > aSeq( xSrc->getDataSequences());
- if( aSeq.getLength() != 1 )
+ if( i->getDataSequences2().size() != 1 )
return false;
}
catch( const uno::Exception & )
@@ -256,27 +248,24 @@ private:
} // anonymous namespace
-Reference< data::XDataSource > SAL_CALL DataInterpreter::mergeInterpretedData(
+rtl::Reference< DataSource > DataInterpreter::mergeInterpretedData(
const InterpretedData& aInterpretedData )
{
- vector< Reference< data::XLabeledDataSequence > > aResultVec;
- aResultVec.reserve( aInterpretedData.Series.getLength() +
+ std::vector< Reference< data::XLabeledDataSequence > > aResultVec;
+ aResultVec.reserve( aInterpretedData.Series.size() +
1 // categories
);
if( aInterpretedData.Categories.is())
aResultVec.push_back( aInterpretedData.Categories );
- const Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
- for( Reference< XDataSeries > const & dataSeries : aSeries )
+ const std::vector< rtl::Reference< DataSeries > > aSeries = FlattenSequence( aInterpretedData.Series );
+ for( rtl::Reference< DataSeries > const & dataSeries : aSeries )
{
try
{
- Reference< data::XDataSource > xSrc( dataSeries, uno::UNO_QUERY_THROW );
- const Sequence< Reference< data::XLabeledDataSequence > > aSeq( xSrc->getDataSequences());
-
// add all sequences of data series
- for( Reference< data::XLabeledDataSequence > const & xAdd : aSeq )
+ for( uno::Reference< data::XLabeledDataSequence > const & xAdd : dataSeries->getDataSequences2() )
{
// only add if sequence is not yet in the result
if( none_of( aResultVec.begin(), aResultVec.end(),
@@ -292,10 +281,10 @@ Reference< data::XDataSource > SAL_CALL DataInterpreter::mergeInterpretedData(
}
}
- return DataSourceHelper::createDataSource( comphelper::containerToSequence( aResultVec ) );
+ return new DataSource(aResultVec);
}
-uno::Any SAL_CALL DataInterpreter::getChartTypeSpecificData(
+uno::Any DataInterpreter::getChartTypeSpecificData(
const OUString & )
{
return uno::Any();
@@ -350,14 +339,14 @@ uno::Any DataInterpreter::GetProperty(
bool DataInterpreter::HasCategories(
const Sequence< beans::PropertyValue > & rArguments,
- const Sequence< Reference< data::XLabeledDataSequence > > & rData )
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & rData )
{
bool bHasCategories = false;
if( rArguments.hasElements() )
GetProperty( rArguments, u"HasCategories" ) >>= bHasCategories;
- for( sal_Int32 nLSeqIdx=0; ! bHasCategories && nLSeqIdx<rData.getLength(); ++nLSeqIdx )
+ for( std::size_t nLSeqIdx=0; ! bHasCategories && nLSeqIdx<rData.size(); ++nLSeqIdx )
bHasCategories = ( rData[nLSeqIdx].is() && GetRole( rData[nLSeqIdx]->getValues() ) == "categories");
return bHasCategories;
@@ -386,6 +375,17 @@ css::uno::Sequence< OUString > SAL_CALL DataInterpreter::getSupportedServiceName
return { "com.sun.star.chart2.DataInterpreter" };
}
+std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > DataInterpreter::getDataSequences(
+ const css::uno::Reference< css::chart2::data::XDataSource >& xSource)
+{
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData;
+ for (const Reference< data::XLabeledDataSequence > & rLDS : xSource->getDataSequences() )
+ {
+ aData.push_back(rLDS);
+ }
+ return aData;
+}
+
} // namespace chart
#ifdef DEBUG_CHART2_TEMPLATE
diff --git a/chart2/source/model/template/DataInterpreter.hxx b/chart2/source/model/template/DataInterpreter.hxx
deleted file mode 100644
index 5f9a9239202f..000000000000
--- a/chart2/source/model/template/DataInterpreter.hxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- 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 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 .
- */
-#pragma once
-
-#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/chart2/XDataInterpreter.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-
-namespace chart
-{
-
-class DataInterpreter : public ::cppu::WeakImplHelper<
- css::chart2::XDataInterpreter,
- css::lang::XServiceInfo >
-{
-public:
- explicit DataInterpreter();
- virtual ~DataInterpreter() override;
-
- /// XServiceInfo declarations
- virtual OUString SAL_CALL getImplementationName() override;
- virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
- virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
-
- // convenience methods
- static OUString GetRole( const css::uno::Reference< css::chart2::data::XDataSequence > & xSeq );
-
- static void SetRole(
- const css::uno::Reference< css::chart2::data::XDataSequence > & xSeq,
- const OUString & rRole );
-
- static css::uno::Any GetProperty(
- const css::uno::Sequence<css::beans::PropertyValue > & aArguments,
- std::u16string_view rName );
-
- static bool HasCategories(
- const css::uno::Sequence< css::beans::PropertyValue > & rArguments,
- const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rData );
-
- static bool UseCategoriesAsX(
- const css::uno::Sequence< css::beans::PropertyValue > & rArguments );
-
-protected:
- // ____ XDataInterpreter ____
- virtual css::chart2::InterpretedData SAL_CALL interpretDataSource(
- const css::uno::Reference< css::chart2::data::XDataSource >& xSource,
- const css::uno::Sequence< css::beans::PropertyValue >& aArguments,
- const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > >& aSeriesToReUse ) override;
- virtual css::chart2::InterpretedData SAL_CALL reinterpretDataSeries(
- const css::chart2::InterpretedData& aInterpretedData ) override;
- virtual sal_Bool SAL_CALL isDataCompatible(
- const css::chart2::InterpretedData& aInterpretedData ) override;
- virtual css::uno::Reference< css::chart2::data::XDataSource > SAL_CALL mergeInterpretedData(
- const css::chart2::InterpretedData& aInterpretedData ) override;
- virtual css::uno::Any SAL_CALL getChartTypeSpecificData(
- const OUString& sKey ) override;
-};
-
-} // namespace chart
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/template/FilledNetChartType.cxx b/chart2/source/model/template/FilledNetChartType.cxx
index 3179317daee5..60672259b905 100644
--- a/chart2/source/model/template/FilledNetChartType.cxx
+++ b/chart2/source/model/template/FilledNetChartType.cxx
@@ -24,7 +24,6 @@
namespace com::sun::star::uno { class XComponentContext; }
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Sequence;
@@ -48,6 +47,11 @@ uno::Reference< util::XCloneable > SAL_CALL FilledNetChartType::createClone()
return uno::Reference< util::XCloneable >( new FilledNetChartType( *this ));
}
+rtl::Reference< ChartType > FilledNetChartType::cloneChartType() const
+{
+ return new FilledNetChartType( *this );
+}
+
// ____ XChartType ____
OUString SAL_CALL FilledNetChartType::getChartType()
{
diff --git a/chart2/source/model/template/FilledNetChartType.hxx b/chart2/source/model/template/FilledNetChartType.hxx
index 0ca41b60ba55..b2d239aeca36 100644
--- a/chart2/source/model/template/FilledNetChartType.hxx
+++ b/chart2/source/model/template/FilledNetChartType.hxx
@@ -32,6 +32,8 @@ public:
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+ virtual rtl::Reference<ChartType> cloneChartType() const override;
+
private:
explicit FilledNetChartType(const FilledNetChartType& rOther);
diff --git a/chart2/source/model/template/LineChartType.cxx b/chart2/source/model/template/LineChartType.cxx
index f0d595f27102..e9d7cf808e53 100644
--- a/chart2/source/model/template/LineChartType.cxx
+++ b/chart2/source/model/template/LineChartType.cxx
@@ -43,90 +43,59 @@ enum
PROP_LINECHARTTYPE_SPLINE_ORDER
};
-void lcl_AddPropertiesToVector(
- std::vector< Property > & rOutProperties )
+::chart::tPropertyValueMap& StaticLineChartTypeDefaults()
+{
+ static ::chart::tPropertyValueMap aStaticDefaults =
+ []()
+ {
+ ::chart::tPropertyValueMap aOutMap;
+ ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_LINECHARTTYPE_CURVE_STYLE, ::chart2::CurveStyle_LINES );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_LINECHARTTYPE_CURVE_RESOLUTION, 20 );
+
+ // todo: check whether order 3 means polygons of order 3 or 2. (see
+ // http://www.people.nnov.ru/fractal/Splines/Basis.htm )
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_LINECHARTTYPE_SPLINE_ORDER, 3 );
+ return aOutMap;
+ }();
+ return aStaticDefaults;
+}
+
+::cppu::OPropertyArrayHelper& StaticLineChartTypeInfoHelper()
{
- rOutProperties.emplace_back( CHART_UNONAME_CURVE_STYLE,
+ static ::cppu::OPropertyArrayHelper aPropHelper(
+ []()
+ {
+ std::vector< css::beans::Property > aProperties {
+ { CHART_UNONAME_CURVE_STYLE,
PROP_LINECHARTTYPE_CURVE_STYLE,
cppu::UnoType<chart2::CurveStyle>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
-
- rOutProperties.emplace_back( CHART_UNONAME_CURVE_RESOLUTION,
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { CHART_UNONAME_CURVE_RESOLUTION,
PROP_LINECHARTTYPE_CURVE_RESOLUTION,
cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( CHART_UNONAME_SPLINE_ORDER,
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { CHART_UNONAME_SPLINE_ORDER,
PROP_LINECHARTTYPE_SPLINE_ORDER,
cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
-}
-
-struct StaticLineChartTypeDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_LINECHARTTYPE_CURVE_STYLE, ::chart2::CurveStyle_LINES );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_LINECHARTTYPE_CURVE_RESOLUTION, 20 );
-
- // todo: check whether order 3 means polygons of order 3 or 2. (see
- // http://www.people.nnov.ru/fractal/Splines/Basis.htm )
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_LINECHARTTYPE_SPLINE_ORDER, 3 );
- }
-};
-
-struct StaticLineChartTypeDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticLineChartTypeDefaults_Initializer >
-{
-};
-
-struct StaticLineChartTypeInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
+ | beans::PropertyAttribute::MAYBEDEFAULT } };
- return comphelper::containerToSequence( aProperties );
- }
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-};
-
-struct StaticLineChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticLineChartTypeInfoHelper_Initializer >
-{
-};
-
-struct StaticLineChartTypeInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticLineChartTypeInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ return comphelper::containerToSequence( aProperties );
+ }());
+ return aPropHelper;
+}
-struct StaticLineChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticLineChartTypeInfo_Initializer >
+uno::Reference< beans::XPropertySetInfo >& StaticLineChartTypeInfo()
{
-};
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticLineChartTypeInfoHelper() ) );
+ return xPropertySetInfo;
+}
} // anonymous namespace
@@ -151,6 +120,11 @@ uno::Reference< util::XCloneable > SAL_CALL LineChartType::createClone()
return uno::Reference< util::XCloneable >( new LineChartType( *this ));
}
+rtl::Reference< ChartType > LineChartType::cloneChartType() const
+{
+ return new LineChartType( *this );
+}
+
// ____ XChartType ____
OUString SAL_CALL LineChartType::getChartType()
{
@@ -160,7 +134,7 @@ OUString SAL_CALL LineChartType::getChartType()
// ____ OPropertySet ____
void LineChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticLineChartTypeDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticLineChartTypeDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -170,13 +144,13 @@ void LineChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
::cppu::IPropertyArrayHelper & SAL_CALL LineChartType::getInfoHelper()
{
- return *StaticLineChartTypeInfoHelper::get();
+ return StaticLineChartTypeInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL LineChartType::getPropertySetInfo()
{
- return *StaticLineChartTypeInfo::get();
+ return StaticLineChartTypeInfo();
}
OUString SAL_CALL LineChartType::getImplementationName()
diff --git a/chart2/source/model/template/LineChartType.hxx b/chart2/source/model/template/LineChartType.hxx
index a655670d852e..4c44cca9c349 100644
--- a/chart2/source/model/template/LineChartType.hxx
+++ b/chart2/source/model/template/LineChartType.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include "ChartType.hxx"
+#include <ChartType.hxx>
namespace chart
{
@@ -36,6 +36,8 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() override;
+ virtual rtl::Reference<ChartType> cloneChartType() const override;
+
private:
explicit LineChartType( const LineChartType & rOther );
diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx
index bbde1bebc3f1..e4d347960f18 100644
--- a/chart2/source/model/template/LineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/LineChartTypeTemplate.cxx
@@ -18,10 +18,12 @@
*/
#include "LineChartTypeTemplate.hxx"
-#include <DiagramHelper.hxx>
-#include <servicenames_charttypes.hxx>
+#include "LineChartType.hxx"
+#include <Diagram.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <PropertyHelper.hxx>
+#include <ChartType.hxx>
#include <unonames.hxx>
#include <com/sun/star/chart2/CurveStyle.hpp>
@@ -30,8 +32,7 @@
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <algorithm>
@@ -52,89 +53,58 @@ enum
};
-void lcl_AddPropertiesToVector(
- std::vector< Property > & rOutProperties )
+::chart::tPropertyValueMap& StaticLineChartTypeTemplateDefaults()
{
- rOutProperties.emplace_back( CHART_UNONAME_CURVE_STYLE,
+ static ::chart::tPropertyValueMap aStaticDefaults =
+ []()
+ {
+ ::chart::tPropertyValueMap aOutMap;
+ ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE, chart2::CurveStyle_LINES );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION, 20 );
+
+ // todo: check whether order 3 means polygons of order 3 or 2. (see
+ // http://www.people.nnov.ru/fractal/Splines/Basis.htm )
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER, 3 );
+ return aOutMap;
+ }();
+ return aStaticDefaults;
+}
+
+::cppu::OPropertyArrayHelper& StaticLineChartTypeTemplateInfoHelper()
+{
+ static ::cppu::OPropertyArrayHelper aPropHelper(
+ []()
+ {
+ std::vector< css::beans::Property > aProperties {
+ { CHART_UNONAME_CURVE_STYLE,
PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE,
cppu::UnoType<chart2::CurveStyle>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( CHART_UNONAME_CURVE_RESOLUTION,
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { CHART_UNONAME_CURVE_RESOLUTION,
PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION,
cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( CHART_UNONAME_SPLINE_ORDER,
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { CHART_UNONAME_SPLINE_ORDER,
PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER,
cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
-}
-
-struct StaticLineChartTypeTemplateDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE, chart2::CurveStyle_LINES );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION, 20 );
-
- // todo: check whether order 3 means polygons of order 3 or 2. (see
- // http://www.people.nnov.ru/fractal/Splines/Basis.htm )
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER, 3 );
- }
-};
-
-struct StaticLineChartTypeTemplateDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticLineChartTypeTemplateDefaults_Initializer >
-{
-};
-
-struct StaticLineChartTypeTemplateInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-
-};
+ | beans::PropertyAttribute::MAYBEDEFAULT } };
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-struct StaticLineChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticLineChartTypeTemplateInfoHelper_Initializer >
-{
-};
-
-struct StaticLineChartTypeTemplateInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticLineChartTypeTemplateInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ return comphelper::containerToSequence( aProperties );
+ }());
+ return aPropHelper;
+}
-struct StaticLineChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticLineChartTypeTemplateInfo_Initializer >
+uno::Reference< beans::XPropertySetInfo >& StaticLineChartTypeTemplateInfo()
{
-};
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticLineChartTypeTemplateInfoHelper() ) );
+ return xPropertySetInfo;
+}
} // anonymous namespace
@@ -150,7 +120,6 @@ LineChartTypeTemplate::LineChartTypeTemplate(
bool bHasLines /* = true */,
sal_Int32 nDim /* = 2 */ ) :
ChartTypeTemplate( xContext, rServiceName ),
- ::property::OPropertySet( m_aMutex ),
m_eStackMode( eStackMode ),
m_bHasSymbols( bSymbols ),
m_bHasLines( bHasLines ),
@@ -166,7 +135,7 @@ LineChartTypeTemplate::~LineChartTypeTemplate()
// ____ OPropertySet ____
void LineChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticLineChartTypeTemplateDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticLineChartTypeTemplateDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -176,13 +145,13 @@ void LineChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny )
::cppu::IPropertyArrayHelper & SAL_CALL LineChartTypeTemplate::getInfoHelper()
{
- return *StaticLineChartTypeTemplateInfoHelper::get();
+ return StaticLineChartTypeTemplateInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL LineChartTypeTemplate::getPropertySetInfo()
{
- return *StaticLineChartTypeTemplateInfo::get();
+ return StaticLineChartTypeTemplateInfo();
}
sal_Int32 LineChartTypeTemplate::getDimension() const
@@ -195,12 +164,12 @@ StackMode LineChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ )
return m_eStackMode;
}
-// ____ XChartTypeTemplate ____
-sal_Bool SAL_CALL LineChartTypeTemplate::matchesTemplate(
- const uno::Reference< chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties )
+// ____ ChartTypeTemplate ____
+bool LineChartTypeTemplate::matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties )
{
- bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
+ bool bResult = ChartTypeTemplate::matchesTemplate2( xDiagram, bAdaptProperties );
// check symbol-style and line-style
// for a template with symbols (or with lines) it is ok, if there is at least one series
@@ -210,8 +179,8 @@ sal_Bool SAL_CALL LineChartTypeTemplate::matchesTemplate(
bool bSymbolFound = false;
bool bLineFound = false;
- std::vector< Reference< chart2::XDataSeries > > aSeriesVec(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
+ std::vector< rtl::Reference< DataSeries > > aSeriesVec =
+ xDiagram->getDataSeries();
for (auto const& series : aSeriesVec)
{
@@ -219,9 +188,8 @@ sal_Bool SAL_CALL LineChartTypeTemplate::matchesTemplate(
{
chart2::Symbol aSymbProp;
drawing::LineStyle eLineStyle;
- Reference< beans::XPropertySet > xProp(series, uno::UNO_QUERY_THROW);
- bool bCurrentHasSymbol = (xProp->getPropertyValue( "Symbol") >>= aSymbProp) &&
+ bool bCurrentHasSymbol = (series->getPropertyValue( "Symbol") >>= aSymbProp) &&
(aSymbProp.Style != chart2::SymbolStyle_NONE);
if( bCurrentHasSymbol )
@@ -233,7 +201,7 @@ sal_Bool SAL_CALL LineChartTypeTemplate::matchesTemplate(
break;
}
- bool bCurrentHasLine = (xProp->getPropertyValue( "LineStyle") >>= eLineStyle) &&
+ bool bCurrentHasLine = (series->getPropertyValue( "LineStyle") >>= eLineStyle) &&
( eLineStyle != drawing::LineStyle_NONE );
if( bCurrentHasLine )
@@ -267,12 +235,10 @@ sal_Bool SAL_CALL LineChartTypeTemplate::matchesTemplate(
{
try
{
- uno::Reference< beans::XPropertySet > xChartTypeProp(
- DiagramHelper::getChartTypeByIndex( xDiagram, 0 ),
- uno::UNO_QUERY_THROW );
- setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE, xChartTypeProp->getPropertyValue(CHART_UNONAME_CURVE_STYLE) );
- setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION, xChartTypeProp->getPropertyValue(CHART_UNONAME_CURVE_RESOLUTION) );
- setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER, xChartTypeProp->getPropertyValue(CHART_UNONAME_SPLINE_ORDER) );
+ rtl::Reference< ChartType > xChartType = xDiagram->getChartTypeByIndex( 0 );
+ setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE, xChartType->getPropertyValue(CHART_UNONAME_CURVE_STYLE) );
+ setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION, xChartType->getPropertyValue(CHART_UNONAME_CURVE_RESOLUTION) );
+ setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER, xChartType->getPropertyValue(CHART_UNONAME_SPLINE_ORDER) );
}
catch( const uno::Exception & )
{
@@ -283,27 +249,20 @@ sal_Bool SAL_CALL LineChartTypeTemplate::matchesTemplate(
return bResult;
}
-Reference< chart2::XChartType > LineChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
+rtl::Reference< ChartType > LineChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
{
- Reference< chart2::XChartType > xResult;
+ rtl::Reference< ChartType > xResult;
try
{
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_LINE ), uno::UNO_QUERY_THROW );
-
- Reference< beans::XPropertySet > xCTProp( xResult, uno::UNO_QUERY );
- if( xCTProp.is())
- {
- xCTProp->setPropertyValue(
- CHART_UNONAME_CURVE_STYLE, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE ));
- xCTProp->setPropertyValue(
- CHART_UNONAME_CURVE_RESOLUTION, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
- xCTProp->setPropertyValue(
- CHART_UNONAME_SPLINE_ORDER, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER ));
- }
+ xResult = new LineChartType();
+
+ xResult->setPropertyValue(
+ CHART_UNONAME_CURVE_STYLE, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE ));
+ xResult->setPropertyValue(
+ CHART_UNONAME_CURVE_RESOLUTION, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
+ xResult->setPropertyValue(
+ CHART_UNONAME_SPLINE_ORDER, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER ));
}
catch( const uno::Exception & )
{
@@ -313,30 +272,23 @@ Reference< chart2::XChartType > LineChartTypeTemplate::getChartTypeForIndex( sal
return xResult;
}
-Reference< chart2::XChartType > SAL_CALL LineChartTypeTemplate::getChartTypeForNewSeries(
- const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
+rtl::Reference< ChartType > LineChartTypeTemplate::getChartTypeForNewSeries2(
+ const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
- Reference< chart2::XChartType > xResult;
+ rtl::Reference< ChartType > xResult;
try
{
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_LINE ), uno::UNO_QUERY_THROW );
+ xResult = new LineChartType();
ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( aFormerlyUsedChartTypes, xResult );
- Reference< beans::XPropertySet > xCTProp( xResult, uno::UNO_QUERY );
- if( xCTProp.is())
- {
- xCTProp->setPropertyValue(
- CHART_UNONAME_CURVE_STYLE, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE ));
- xCTProp->setPropertyValue(
- CHART_UNONAME_CURVE_RESOLUTION, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
- xCTProp->setPropertyValue(
- CHART_UNONAME_SPLINE_ORDER, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER ));
- }
+ xResult->setPropertyValue(
+ CHART_UNONAME_CURVE_STYLE, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE ));
+ xResult->setPropertyValue(
+ CHART_UNONAME_CURVE_RESOLUTION, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
+ xResult->setPropertyValue(
+ CHART_UNONAME_SPLINE_ORDER, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER ));
}
catch( const uno::Exception & )
{
@@ -346,21 +298,19 @@ Reference< chart2::XChartType > SAL_CALL LineChartTypeTemplate::getChartTypeForN
return xResult;
}
-void SAL_CALL LineChartTypeTemplate::applyStyle(
- const Reference< chart2::XDataSeries >& xSeries,
+void LineChartTypeTemplate::applyStyle2(
+ const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
try
{
- Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY_THROW );
-
- DataSeriesHelper::switchSymbolsOnOrOff( xProp, m_bHasSymbols, nSeriesIndex );
- DataSeriesHelper::switchLinesOnOrOff( xProp, m_bHasLines );
- DataSeriesHelper::makeLinesThickOrThin( xProp, m_nDim==2 );
+ DataSeriesHelper::switchSymbolsOnOrOff( xSeries, m_bHasSymbols, nSeriesIndex );
+ DataSeriesHelper::switchLinesOnOrOff( xSeries, m_bHasLines );
+ DataSeriesHelper::makeLinesThickOrThin( xSeries, m_nDim==2 );
}
catch( const uno::Exception & )
{
diff --git a/chart2/source/model/template/LineChartTypeTemplate.hxx b/chart2/source/model/template/LineChartTypeTemplate.hxx
index 84d87a32185c..a634fb390aae 100644
--- a/chart2/source/model/template/LineChartTypeTemplate.hxx
+++ b/chart2/source/model/template/LineChartTypeTemplate.hxx
@@ -20,7 +20,6 @@
#include <ChartTypeTemplate.hxx>
#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <StackMode.hxx>
#include <comphelper/uno3.hxx>
@@ -28,7 +27,6 @@ namespace chart
{
class LineChartTypeTemplate :
- public cppu::BaseMutex,
public ChartTypeTemplate,
public ::property::OPropertySet
{
@@ -56,20 +54,19 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
- // ____ XChartTypeTemplate ____
- virtual sal_Bool SAL_CALL matchesTemplate(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties ) override;
- virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
- getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
- virtual void SAL_CALL applyStyle(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ // ____ ChartTypeTemplate ____
+ virtual bool matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties ) override;
+ virtual rtl::Reference< ::chart::ChartType >
+ getChartTypeForNewSeries2( const std::vector<
+ rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
+ virtual void applyStyle2(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
-
- // ____ ChartTypeTemplate ____
- virtual css::uno::Reference< css::chart2::XChartType >
+ virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
virtual sal_Int32 getDimension() const override;
virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const override;
diff --git a/chart2/source/model/template/NetChartType.cxx b/chart2/source/model/template/NetChartType.cxx
index 8aecbec7b60c..cb4512c74884 100644
--- a/chart2/source/model/template/NetChartType.cxx
+++ b/chart2/source/model/template/NetChartType.cxx
@@ -22,6 +22,7 @@
#include <servicenames_charttypes.hxx>
#include <AxisIndexDefines.hxx>
#include <AxisHelper.hxx>
+#include <Axis.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
@@ -47,8 +48,8 @@ NetChartType_Base::NetChartType_Base( const NetChartType_Base & rOther ) :
NetChartType_Base::~NetChartType_Base()
{}
-Reference< XCoordinateSystem > SAL_CALL
- NetChartType_Base::createCoordinateSystem( ::sal_Int32 DimensionCount )
+rtl::Reference< ::chart::BaseCoordinateSystem >
+ NetChartType_Base::createCoordinateSystem2( sal_Int32 DimensionCount )
{
if( DimensionCount != 2 )
throw lang::IllegalArgumentException(
@@ -58,7 +59,7 @@ Reference< XCoordinateSystem > SAL_CALL
rtl::Reference< PolarCoordinateSystem > xResult =
new PolarCoordinateSystem( DimensionCount );
- Reference< XAxis > xAxis( xResult->getAxisByDimension( 0, MAIN_AXIS_INDEX ) );
+ rtl::Reference< Axis > xAxis = xResult->getAxisByDimension2( 0, MAIN_AXIS_INDEX );
if( xAxis.is() )
{
ScaleData aScaleData = xAxis->getScaleData();
@@ -68,7 +69,7 @@ Reference< XCoordinateSystem > SAL_CALL
xAxis->setScaleData( aScaleData );
}
- xAxis = xResult->getAxisByDimension( 1, MAIN_AXIS_INDEX );
+ xAxis = xResult->getAxisByDimension2( 1, MAIN_AXIS_INDEX );
if( xAxis.is() )
{
ScaleData aScaleData = xAxis->getScaleData();
@@ -89,45 +90,31 @@ void NetChartType_Base::GetDefaultValue( sal_Int32 /*nHandle*/, uno::Any& rAny )
namespace
{
-struct StaticNetChartTypeInfoHelper_Initializer
+::cppu::OPropertyArrayHelper& StaticNetChartTypeInfoHelper()
{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper(Sequence< beans::Property >{});
- return &aPropHelper;
- }
-};
-
-struct StaticNetChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticNetChartTypeInfoHelper_Initializer >
-{
-};
-
-struct StaticNetChartTypeInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticNetChartTypeInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ static ::cppu::OPropertyArrayHelper aPropHelper(Sequence< beans::Property >{});
+ return aPropHelper;
+}
-struct StaticNetChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticNetChartTypeInfo_Initializer >
+uno::Reference< beans::XPropertySetInfo >& StaticNetChartTypeInfo()
{
-};
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticNetChartTypeInfoHelper() ) );
+ return xPropertySetInfo;
+}
}
// ____ OPropertySet ____
::cppu::IPropertyArrayHelper & SAL_CALL NetChartType_Base::getInfoHelper()
{
- return *StaticNetChartTypeInfoHelper::get();
+ return StaticNetChartTypeInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL NetChartType_Base::getPropertySetInfo()
{
- return *StaticNetChartTypeInfo::get();
+ return StaticNetChartTypeInfo();
}
NetChartType::NetChartType()
@@ -147,6 +134,11 @@ uno::Reference< util::XCloneable > SAL_CALL NetChartType::createClone()
return uno::Reference< util::XCloneable >( new NetChartType( *this ));
}
+rtl::Reference< ChartType > NetChartType::cloneChartType() const
+{
+ return new NetChartType( *this );
+}
+
// ____ XChartType ____
OUString SAL_CALL NetChartType::getChartType()
{
diff --git a/chart2/source/model/template/NetChartType.hxx b/chart2/source/model/template/NetChartType.hxx
index 7f1c16d60dd8..ae414a27c4e1 100644
--- a/chart2/source/model/template/NetChartType.hxx
+++ b/chart2/source/model/template/NetChartType.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include "ChartType.hxx"
+#include <ChartType.hxx>
namespace chart
{
@@ -32,10 +32,6 @@ public:
protected:
explicit NetChartType_Base( const NetChartType_Base & rOther );
- // ____ XChartType ____
- virtual css::uno::Reference< css::chart2::XCoordinateSystem > SAL_CALL
- createCoordinateSystem( ::sal_Int32 DimensionCount ) override;
-
// ____ OPropertySet ____
virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
@@ -44,6 +40,9 @@ protected:
// ____ XPropertySet ____
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
+
+ virtual rtl::Reference< ::chart::BaseCoordinateSystem >
+ createCoordinateSystem2( sal_Int32 DimensionCount ) override;
};
class NetChartType final : public NetChartType_Base
@@ -59,6 +58,8 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() override;
+ virtual rtl::Reference<ChartType> cloneChartType() const override;
+
private:
explicit NetChartType( const NetChartType & rOther );
diff --git a/chart2/source/model/template/NetChartTypeTemplate.cxx b/chart2/source/model/template/NetChartTypeTemplate.cxx
index fed499cb3970..0acd07d7b928 100644
--- a/chart2/source/model/template/NetChartTypeTemplate.cxx
+++ b/chart2/source/model/template/NetChartTypeTemplate.cxx
@@ -18,20 +18,21 @@
*/
#include "NetChartTypeTemplate.hxx"
-#include <DiagramHelper.hxx>
-#include <servicenames_charttypes.hxx>
+#include "FilledNetChartType.hxx"
+#include "NetChartType.hxx"
+#include <Diagram.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <ChartType.hxx>
#include <com/sun/star/chart2/SymbolStyle.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
namespace chart
{
@@ -58,21 +59,19 @@ StackMode NetChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ )
return m_eStackMode;
}
-void SAL_CALL NetChartTypeTemplate::applyStyle(
- const Reference< chart2::XDataSeries >& xSeries,
+void NetChartTypeTemplate::applyStyle2(
+ const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
try
{
- Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY_THROW );
-
- DataSeriesHelper::switchSymbolsOnOrOff( xProp, m_bHasSymbols, nSeriesIndex );
- DataSeriesHelper::switchLinesOnOrOff( xProp, m_bHasLines );
- DataSeriesHelper::makeLinesThickOrThin( xProp, true );
+ DataSeriesHelper::switchSymbolsOnOrOff( xSeries, m_bHasSymbols, nSeriesIndex );
+ DataSeriesHelper::switchLinesOnOrOff( xSeries, m_bHasLines );
+ DataSeriesHelper::makeLinesThickOrThin( xSeries, true );
}
catch( const uno::Exception & )
{
@@ -80,15 +79,12 @@ void SAL_CALL NetChartTypeTemplate::applyStyle(
}
}
-// ____ XChartTypeTemplate ____
-sal_Bool SAL_CALL NetChartTypeTemplate::matchesTemplate(
- const Reference< chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties )
+// ____ ChartTypeTemplate ____
+bool NetChartTypeTemplate::matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties )
{
- bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
-
- uno::Reference< beans::XPropertySet > xChartTypeProp(
- DiagramHelper::getChartTypeByIndex( xDiagram, 0 ), uno::UNO_QUERY_THROW );
+ bool bResult = ChartTypeTemplate::matchesTemplate2( xDiagram, bAdaptProperties );
if( bResult )
{
@@ -102,8 +98,8 @@ sal_Bool SAL_CALL NetChartTypeTemplate::matchesTemplate(
bool bSymbolFound = false;
bool bLineFound = false;
- std::vector< Reference< chart2::XDataSeries > > aSeriesVec(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
+ std::vector< rtl::Reference< DataSeries > > aSeriesVec =
+ xDiagram->getDataSeries();
for (auto const& series : aSeriesVec)
{
@@ -111,9 +107,8 @@ sal_Bool SAL_CALL NetChartTypeTemplate::matchesTemplate(
{
chart2::Symbol aSymbProp;
drawing::LineStyle eLineStyle;
- Reference< beans::XPropertySet > xProp(series, uno::UNO_QUERY_THROW);
- bool bCurrentHasSymbol = (xProp->getPropertyValue( "Symbol") >>= aSymbProp) &&
+ bool bCurrentHasSymbol = (series->getPropertyValue( "Symbol") >>= aSymbProp) &&
(aSymbProp.Style != chart2::SymbolStyle_NONE);
if( bCurrentHasSymbol )
@@ -125,7 +120,7 @@ sal_Bool SAL_CALL NetChartTypeTemplate::matchesTemplate(
break;
}
- bool bCurrentHasLine = (xProp->getPropertyValue( "LineStyle") >>= eLineStyle) &&
+ bool bCurrentHasLine = (series->getPropertyValue( "LineStyle") >>= eLineStyle) &&
( eLineStyle != drawing::LineStyle_NONE );
if( bCurrentHasLine )
@@ -157,34 +152,18 @@ sal_Bool SAL_CALL NetChartTypeTemplate::matchesTemplate(
return bResult;
}
-Reference< chart2::XChartType > NetChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
+rtl::Reference< ChartType > NetChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
{
- Reference< chart2::XChartType > xResult;
-
- try
- {
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
-
- if( m_bHasFilledArea )
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET ), uno::UNO_QUERY_THROW );
- else
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_NET ), uno::UNO_QUERY_THROW );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-
- return xResult;
+ if( m_bHasFilledArea )
+ return new FilledNetChartType();
+ else
+ return new NetChartType();
}
-Reference< chart2::XChartType > SAL_CALL NetChartTypeTemplate::getChartTypeForNewSeries(
- const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
+rtl::Reference< ChartType > NetChartTypeTemplate::getChartTypeForNewSeries2(
+ const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
- Reference< chart2::XChartType > xResult( getChartTypeForIndex( 0 ) );
+ rtl::Reference< ChartType > xResult( getChartTypeForIndex( 0 ) );
ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( aFormerlyUsedChartTypes, xResult );
return xResult;
}
diff --git a/chart2/source/model/template/NetChartTypeTemplate.hxx b/chart2/source/model/template/NetChartTypeTemplate.hxx
index ac0ee3aebf0b..b1f5ac9dbd83 100644
--- a/chart2/source/model/template/NetChartTypeTemplate.hxx
+++ b/chart2/source/model/template/NetChartTypeTemplate.hxx
@@ -38,20 +38,21 @@ public:
virtual ~NetChartTypeTemplate() override;
protected:
- // ____ XChartTypeTemplate ____
- virtual sal_Bool SAL_CALL matchesTemplate(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties ) override;
- virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
- getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
- virtual void SAL_CALL applyStyle(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ // ____ ChartTypeTemplate ____
+ virtual bool matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties ) override;
+ virtual rtl::Reference< ::chart::ChartType >
+ getChartTypeForNewSeries2( const std::vector<
+ rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
+ virtual void applyStyle2(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
// ____ ChartTypeTemplate ____
- virtual css::uno::Reference< css::chart2::XChartType >
+ virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const override;
diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx
index 777fb55c316d..a835f6357f6c 100644
--- a/chart2/source/model/template/PieChartType.cxx
+++ b/chart2/source/model/template/PieChartType.cxx
@@ -20,12 +20,14 @@
#include "PieChartType.hxx"
#include <PropertyHelper.hxx>
#include <PolarCoordinateSystem.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <servicenames_charttypes.hxx>
#include <AxisIndexDefines.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
+#include <com/sun/star/chart2/PieChartSubType.hpp>
using namespace ::com::sun::star;
@@ -36,85 +38,54 @@ using ::com::sun::star::uno::Reference;
namespace
{
-enum
+::chart::tPropertyValueMap& StaticPieChartTypeDefaults()
{
- PROP_PIECHARTTYPE_USE_RINGS,
- PROP_PIECHARTTYPE_3DRELATIVEHEIGHT
-};
+ static ::chart::tPropertyValueMap aStaticDefaults =
+ []()
+ {
+ ::chart::tPropertyValueMap aOutMap;
+ ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, ::chart::PROP_PIECHARTTYPE_USE_RINGS, false );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, ::chart::PROP_PIECHARTTYPE_3DRELATIVEHEIGHT, 100 );
+ ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, ::chart::PROP_PIECHARTTYPE_SUBTYPE, chart2::PieChartSubType_NONE );
+ return aOutMap;
+ }();
+ return aStaticDefaults;
+}
-void lcl_AddPropertiesToVector(
- std::vector< Property > & rOutProperties )
+::cppu::OPropertyArrayHelper& StaticPieChartTypeInfoHelper()
{
- rOutProperties.emplace_back( "UseRings",
- PROP_PIECHARTTYPE_USE_RINGS,
+ static ::cppu::OPropertyArrayHelper aPropHelper(
+ []()
+ {
+ std::vector< css::beans::Property > aProperties {
+ { "UseRings",
+ ::chart::PROP_PIECHARTTYPE_USE_RINGS,
cppu::UnoType<bool>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( "3DRelativeHeight",
- PROP_PIECHARTTYPE_3DRELATIVEHEIGHT,
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { "3DRelativeHeight",
+ ::chart::PROP_PIECHARTTYPE_3DRELATIVEHEIGHT,
cppu::UnoType<sal_Int32>::get(),
- beans::PropertyAttribute::MAYBEVOID );
+ beans::PropertyAttribute::MAYBEVOID },
+ { "SubPieType",
+ ::chart::PROP_PIECHARTTYPE_SUBTYPE,
+ cppu::UnoType<chart2::PieChartSubType>::get(),
+ beans::PropertyAttribute::MAYBEDEFAULT }
+ };
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+
+ return comphelper::containerToSequence( aProperties );
+ }());
+ return aPropHelper;
}
-struct StaticPieChartTypeDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PIECHARTTYPE_USE_RINGS, false );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_PIECHARTTYPE_3DRELATIVEHEIGHT, 100 );
- }
-};
-
-struct StaticPieChartTypeDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticPieChartTypeDefaults_Initializer >
-{
-};
-
-struct StaticPieChartTypeInfoHelper_Initializer
+uno::Reference< beans::XPropertySetInfo >& StaticPieChartTypeInfo()
{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-
-};
-
-struct StaticPieChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticPieChartTypeInfoHelper_Initializer >
-{
-};
-
-struct StaticPieChartTypeInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticPieChartTypeInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
-
-struct StaticPieChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticPieChartTypeInfo_Initializer >
-{
-};
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo( StaticPieChartTypeInfoHelper() ) );
+ return xPropertySetInfo;
+}
} // anonymous namespace
@@ -139,21 +110,26 @@ uno::Reference< util::XCloneable > SAL_CALL PieChartType::createClone()
return uno::Reference< util::XCloneable >( new PieChartType( *this ));
}
+rtl::Reference< ChartType > PieChartType::cloneChartType() const
+{
+ return new PieChartType( *this );
+}
+
// ____ XChartType ____
OUString SAL_CALL PieChartType::getChartType()
{
return CHART2_SERVICE_NAME_CHARTTYPE_PIE;
}
-Reference< chart2::XCoordinateSystem > SAL_CALL
- PieChartType::createCoordinateSystem( ::sal_Int32 DimensionCount )
+rtl::Reference< ::chart::BaseCoordinateSystem >
+ PieChartType::createCoordinateSystem2( sal_Int32 DimensionCount )
{
rtl::Reference< PolarCoordinateSystem > xResult =
new PolarCoordinateSystem( DimensionCount );
for( sal_Int32 i=0; i<DimensionCount; ++i )
{
- Reference< chart2::XAxis > xAxis( xResult->getAxisByDimension( i, MAIN_AXIS_INDEX ) );
+ rtl::Reference< Axis > xAxis = xResult->getAxisByDimension2( i, MAIN_AXIS_INDEX );
if( !xAxis.is() )
{
OSL_FAIL("a created coordinate system should have an axis for each dimension");
@@ -188,7 +164,7 @@ uno::Sequence< OUString > PieChartType::getSupportedPropertyRoles()
// ____ OPropertySet ____
void PieChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticPieChartTypeDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticPieChartTypeDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -199,13 +175,13 @@ void PieChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
// ____ OPropertySet ____
::cppu::IPropertyArrayHelper & SAL_CALL PieChartType::getInfoHelper()
{
- return *StaticPieChartTypeInfoHelper::get();
+ return StaticPieChartTypeInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL PieChartType::getPropertySetInfo()
{
- return *StaticPieChartTypeInfo::get();
+ return StaticPieChartTypeInfo();
}
OUString SAL_CALL PieChartType::getImplementationName()
diff --git a/chart2/source/model/template/PieChartType.hxx b/chart2/source/model/template/PieChartType.hxx
index c3164d4308a6..083bd78facd3 100644
--- a/chart2/source/model/template/PieChartType.hxx
+++ b/chart2/source/model/template/PieChartType.hxx
@@ -18,7 +18,8 @@
*/
#pragma once
-#include "ChartType.hxx"
+#include <ChartType.hxx>
+#include <com/sun/star/chart2/PieChartSubType.hpp>
namespace chart
{
@@ -36,13 +37,13 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() override;
+ virtual rtl::Reference<ChartType> cloneChartType() const override;
+
private:
explicit PieChartType( const PieChartType & rOther );
// ____ XChartType ____
virtual OUString SAL_CALL getChartType() override;
- virtual css::uno::Reference< css::chart2::XCoordinateSystem > SAL_CALL
- createCoordinateSystem( ::sal_Int32 DimensionCount ) override;
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedPropertyRoles() override;
@@ -58,6 +59,9 @@ private:
// ____ XCloneable ____
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
+
+ virtual rtl::Reference< ::chart::BaseCoordinateSystem >
+ createCoordinateSystem2( sal_Int32 DimensionCount ) override;
};
} // namespace chart
diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx
index 218ee48ff520..df97c53aaef9 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.cxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.cxx
@@ -18,28 +18,29 @@
*/
#include "PieChartTypeTemplate.hxx"
+#include "PieChartType.hxx"
+#include <BaseCoordinateSystem.hxx>
#include <CommonConverters.hxx>
-#include <DiagramHelper.hxx>
-#include <servicenames_charttypes.hxx>
+#include <ChartType.hxx>
+#include <Diagram.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
+#include <DataSeriesProperties.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
-#include <ThreeDHelper.hxx>
#include <PropertyHelper.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <officecfg/Office/Compatibility.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <rtl/math.hxx>
#include <algorithm>
using namespace ::com::sun::star;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::beans::Property;
using ::com::sun::star::uno::Sequence;
@@ -53,95 +54,72 @@ enum
PROP_PIE_TEMPLATE_DEFAULT_OFFSET,
PROP_PIE_TEMPLATE_OFFSET_MODE,
PROP_PIE_TEMPLATE_DIMENSION,
- PROP_PIE_TEMPLATE_USE_RINGS
+ PROP_PIE_TEMPLATE_USE_RINGS,
+ PROP_PIE_TEMPLATE_SUB_PIE_TYPE
};
-void lcl_AddPropertiesToVector(
- std::vector< Property > & rOutProperties )
+::chart::tPropertyValueMap& StaticPieChartTypeTemplateDefaults()
{
- rOutProperties.emplace_back( "OffsetMode",
+ static ::chart::tPropertyValueMap aStaticDefaults =
+ []{
+ ::chart::tPropertyValueMap aOutMap;
+ ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_PIE_TEMPLATE_OFFSET_MODE, chart2::PieChartOffsetMode_NONE );
+ ::chart::PropertyHelper::setPropertyValueDefault< double >( aOutMap, PROP_PIE_TEMPLATE_DEFAULT_OFFSET, 0.5 );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_PIE_TEMPLATE_DIMENSION, 2 );
+ ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_PIE_TEMPLATE_USE_RINGS, false );
+ ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_PIE_TEMPLATE_SUB_PIE_TYPE, chart2::PieChartSubType_NONE );
+ return aOutMap;
+ }();
+ return aStaticDefaults;
+}
+
+::cppu::OPropertyArrayHelper& StaticPieChartTypeTemplateInfoHelper()
+{
+ static ::cppu::OPropertyArrayHelper aPropHelper(
+ []()
+ {
+ std::vector< css::beans::Property > aProperties {
+ { "OffsetMode",
PROP_PIE_TEMPLATE_OFFSET_MODE,
cppu::UnoType<chart2::PieChartOffsetMode>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( "DefaultOffset",
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { "DefaultOffset",
PROP_PIE_TEMPLATE_DEFAULT_OFFSET,
cppu::UnoType<double>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( "Dimension",
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { "Dimension",
PROP_PIE_TEMPLATE_DIMENSION,
cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( "UseRings",
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { "UseRings",
PROP_PIE_TEMPLATE_USE_RINGS,
cppu::UnoType<bool>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
-}
-
-struct StaticPieChartTypeTemplateDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PIE_TEMPLATE_OFFSET_MODE, chart2::PieChartOffsetMode_NONE );
- ::chart::PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_PIE_TEMPLATE_DEFAULT_OFFSET, 0.5 );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_PIE_TEMPLATE_DIMENSION, 2 );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PIE_TEMPLATE_USE_RINGS, false );
- }
-};
-
-struct StaticPieChartTypeTemplateDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticPieChartTypeTemplateDefaults_Initializer >
-{
-};
-
-struct StaticPieChartTypeTemplateInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static uno::Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { "SubPieType",
+ PROP_PIE_TEMPLATE_SUB_PIE_TYPE,
+ cppu::UnoType<chart2::PieChartSubType>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT }
+ };
- return comphelper::containerToSequence( aProperties );
- }
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
-};
-
-struct StaticPieChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticPieChartTypeTemplateInfoHelper_Initializer >
-{
-};
-
-struct StaticPieChartTypeTemplateInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticPieChartTypeTemplateInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ return comphelper::containerToSequence( aProperties );
+ }() );
+ return aPropHelper;
+}
-struct StaticPieChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticPieChartTypeTemplateInfo_Initializer >
+uno::Reference< beans::XPropertySetInfo >& StaticPieChartTypeTemplateInfo()
{
-};
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticPieChartTypeTemplateInfoHelper() ) );
+ return xPropertySetInfo;
+}
} // anonymous namespace
@@ -153,14 +131,15 @@ PieChartTypeTemplate::PieChartTypeTemplate(
uno::XComponentContext > const & xContext,
const OUString & rServiceName,
chart2::PieChartOffsetMode eMode,
- bool bRings /* = false */,
+ bool bRings,
+ chart2::PieChartSubType eSubType,
sal_Int32 nDim /* = 2 */ ) :
- ChartTypeTemplate( xContext, rServiceName ),
- ::property::OPropertySet( m_aMutex )
+ ChartTypeTemplate( xContext, rServiceName )
{
setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_OFFSET_MODE, uno::Any( eMode ));
setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_DIMENSION, uno::Any( nDim ));
setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_USE_RINGS, uno::Any( bRings ));
+ setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_SUB_PIE_TYPE, uno::Any( eSubType ));
}
PieChartTypeTemplate::~PieChartTypeTemplate()
@@ -169,7 +148,7 @@ PieChartTypeTemplate::~PieChartTypeTemplate()
// ____ OPropertySet ____
void PieChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticPieChartTypeTemplateDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticPieChartTypeTemplateDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -179,13 +158,13 @@ void PieChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny )
::cppu::IPropertyArrayHelper & SAL_CALL PieChartTypeTemplate::getInfoHelper()
{
- return *StaticPieChartTypeTemplateInfoHelper::get();
+ return StaticPieChartTypeTemplateInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL PieChartTypeTemplate::getPropertySetInfo()
{
- return *StaticPieChartTypeTemplateInfo::get();
+ return StaticPieChartTypeTemplateInfo();
}
// ____ ChartTypeTemplate ____
@@ -212,14 +191,14 @@ sal_Int32 PieChartTypeTemplate::getAxisCountByDimension( sal_Int32 /*nDimension*
}
void PieChartTypeTemplate::adaptAxes(
- const uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > & /*rCoordSys*/ )
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & /*rCoordSys*/ )
{
// hide existing axes
//hhhh todo
}
void PieChartTypeTemplate::adaptScales(
- const Sequence< Reference< chart2::XCoordinateSystem > > & aCooSysSeq,
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysSeq,
const Reference< chart2::data::XLabeledDataSequence > & xCategories //@todo: in future there may be more than one sequence of categories (e.g. charttype with categories at x and y axis )
)
{
@@ -228,12 +207,12 @@ void PieChartTypeTemplate::adaptScales(
//remove explicit scalings from radius axis
//and ensure correct orientation of scales for donuts
- for( Reference< chart2::XCoordinateSystem > const & coords : aCooSysSeq )
+ for( rtl::Reference< BaseCoordinateSystem > const & coords : aCooSysSeq )
{
try
{
- Reference< chart2::XAxis > xAxis( AxisHelper::getAxis( 1 /*nDimensionIndex*/,0 /*nAxisIndex*/
- , coords ) );
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( 1 /*nDimensionIndex*/,0 /*nAxisIndex*/
+ , coords );
if( xAxis.is() )
{
chart2::ScaleData aScaleData( xAxis->getScaleData() );
@@ -272,35 +251,26 @@ void PieChartTypeTemplate::adaptScales(
}
void PieChartTypeTemplate::createChartTypes(
- const Sequence< Sequence< Reference< chart2::XDataSeries > > > & aSeriesSeq,
- const Sequence< Reference< chart2::XCoordinateSystem > > & rCoordSys,
- const Sequence< Reference< chart2::XChartType > >& /* aOldChartTypesSeq */ )
+ const std::vector< std::vector< rtl::Reference< DataSeries > > > & aSeriesSeq,
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & rCoordSys,
+ const std::vector< rtl::Reference< ChartType > >& /* aOldChartTypesSeq */ )
{
- if( ! rCoordSys.hasElements() ||
- ! rCoordSys[0].is() )
+ if( rCoordSys.empty() )
return;
try
{
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
-
- Reference< chart2::XChartType > xCT(
- xFact->createInstance( CHART2_SERVICE_NAME_CHARTTYPE_PIE ), uno::UNO_QUERY_THROW );
- Reference< beans::XPropertySet > xCTProp( xCT, uno::UNO_QUERY );
- if( xCTProp.is())
+ rtl::Reference< ChartType > xCT = new PieChartType();
+ xCT->setFastPropertyValue(
+ PROP_PIECHARTTYPE_USE_RINGS, getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); // "UseRings"
+ xCT->setFastPropertyValue(
+ PROP_PIECHARTTYPE_SUBTYPE, getFastPropertyValue( PROP_PIE_TEMPLATE_SUB_PIE_TYPE )); // "SubType"
+ rCoordSys[0]->setChartTypes( std::vector{xCT} );
+
+ if( !aSeriesSeq.empty() )
{
- xCTProp->setPropertyValue(
- "UseRings", getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS ));
- }
- Reference< chart2::XChartTypeContainer > xCTCnt( rCoordSys[0], uno::UNO_QUERY_THROW );
- xCTCnt->setChartTypes( Sequence< Reference< chart2::XChartType > >( &xCT, 1 ));
-
- if( aSeriesSeq.hasElements() )
- {
- Reference< chart2::XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
- Sequence< Reference< chart2::XDataSeries > > aFlatSeriesSeq( FlattenSequence( aSeriesSeq ));
- xDSCnt->setDataSeries( aFlatSeriesSeq );
+ std::vector< rtl::Reference< DataSeries > > aFlatSeriesSeq = FlattenSequence( aSeriesSeq );
+ xCT->setDataSeries( aFlatSeriesSeq );
DataSeriesHelper::setStackModeAtSeries(
aFlatSeriesSeq, rCoordSys[0], getStackMode( 0 ));
@@ -313,16 +283,18 @@ void PieChartTypeTemplate::createChartTypes(
}
// ____ XChartTypeTemplate ____
-sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate(
- const uno::Reference< chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties )
+bool PieChartTypeTemplate::matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties )
{
- bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
+ bool bResult = ChartTypeTemplate::matchesTemplate2( xDiagram, bAdaptProperties );
bool bTemplateUsesRings = false;
getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS ) >>= bTemplateUsesRings;
chart2::PieChartOffsetMode ePieOffsetMode;
getFastPropertyValue( PROP_PIE_TEMPLATE_OFFSET_MODE ) >>= ePieOffsetMode;
+ chart2::PieChartSubType eTemplateSubType;
+ getFastPropertyValue( PROP_PIE_TEMPLATE_SUB_PIE_TYPE ) >>= eTemplateSubType;
//check offset-mode
if( bResult )
@@ -333,8 +305,8 @@ sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate(
bool bAllOffsetsEqual = true;
sal_Int32 nOuterSeriesIndex = 0;
- std::vector< Reference< chart2::XDataSeries > > aSeriesVec(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
+ std::vector< rtl::Reference< DataSeries > > aSeriesVec =
+ xDiagram->getDataSeries();
//tdf#108067 The outer series is the last series in OOXML-heavy environments
if( !officecfg::Office::Compatibility::View::ReverseXAxisOrientationDoughnutChart::get() )
@@ -344,13 +316,12 @@ sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate(
if( !aSeriesVec.empty() )
{
//@todo in future this will depend on Orientation of the radius axis scale
- Reference< chart2::XDataSeries > xSeries( aSeriesVec[nOuterSeriesIndex] );
- Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY_THROW );
- xProp->getPropertyValue( "Offset") >>= fOffset;
+ rtl::Reference< DataSeries > xSeries( aSeriesVec[nOuterSeriesIndex] );
+ xSeries->getPropertyValue( "Offset") >>= fOffset;
- //get AttributedDataPoints
+ // "AttributedDataPoints"
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xProp->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
{
@@ -358,7 +329,7 @@ sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate(
if(xPointProp.is())
{
double fPointOffset=0.0;
- if( xProp->getPropertyValue( "Offset") >>= fPointOffset )
+ if( xSeries->getPropertyValue( "Offset") >>= fPointOffset )
{
if( ! ::rtl::math::approxEqual( fPointOffset, fOffset ) )
{
@@ -391,35 +362,37 @@ sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate(
//check UseRings
if( bResult )
{
- uno::Reference< beans::XPropertySet > xCTProp(
- DiagramHelper::getChartTypeByIndex( xDiagram, 0 ), uno::UNO_QUERY_THROW );
+ rtl::Reference< ChartType > xCTProp = xDiagram->getChartTypeByIndex( 0 );
bool bUseRings = false;
- if( xCTProp->getPropertyValue( "UseRings") >>= bUseRings )
+ if( xCTProp->getFastPropertyValue( PROP_PIECHARTTYPE_USE_RINGS ) >>= bUseRings ) // "UseRings"
{
bResult = ( bTemplateUsesRings == bUseRings );
}
}
+ if( bResult )
+ {
+ rtl::Reference< ChartType > xCTProp = xDiagram->getChartTypeByIndex( 0 );
+ chart2::PieChartSubType eSubType = chart2::PieChartSubType_NONE;
+ if( xCTProp->getFastPropertyValue( PROP_PIECHARTTYPE_SUBTYPE ) >>= eSubType )
+ {
+ bResult = ( eTemplateSubType == eSubType );
+ }
+ }
return bResult;
}
-Reference< chart2::XChartType > PieChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
+rtl::Reference< ChartType > PieChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
{
- Reference< chart2::XChartType > xResult;
+ rtl::Reference< ChartType > xResult;
try
{
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_PIE ), uno::UNO_QUERY_THROW );
- Reference< beans::XPropertySet > xCTProp( xResult, uno::UNO_QUERY );
- if( xCTProp.is())
- {
- xCTProp->setPropertyValue(
- "UseRings", getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS ));
- }
-
+ xResult = new PieChartType();
+ xResult->setFastPropertyValue(
+ PROP_PIECHARTTYPE_USE_RINGS, getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); // "UseRings"
+ xResult->setFastPropertyValue(
+ PROP_PIECHARTTYPE_SUBTYPE, getFastPropertyValue( PROP_PIE_TEMPLATE_SUB_PIE_TYPE ));
}
catch( const uno::Exception & )
{
@@ -429,25 +402,19 @@ Reference< chart2::XChartType > PieChartTypeTemplate::getChartTypeForIndex( sal_
return xResult;
}
-Reference< chart2::XChartType > SAL_CALL PieChartTypeTemplate::getChartTypeForNewSeries(
- const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
+rtl::Reference< ChartType > PieChartTypeTemplate::getChartTypeForNewSeries2(
+ const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
- Reference< chart2::XChartType > xResult;
+ rtl::Reference< ChartType > xResult;
try
{
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_PIE ), uno::UNO_QUERY_THROW );
+ xResult = new PieChartType();
ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( aFormerlyUsedChartTypes, xResult );
- Reference< beans::XPropertySet > xCTProp( xResult, uno::UNO_QUERY );
- if( xCTProp.is())
- {
- xCTProp->setPropertyValue(
- "UseRings", getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS ));
- }
-
+ xResult->setFastPropertyValue(
+ PROP_PIECHARTTYPE_USE_RINGS, getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); // "UseRings"
+ xResult->setFastPropertyValue(
+ PROP_PIECHARTTYPE_SUBTYPE, getFastPropertyValue( PROP_PIE_TEMPLATE_SUB_PIE_TYPE ));
}
catch( const uno::Exception & )
{
@@ -457,18 +424,16 @@ Reference< chart2::XChartType > SAL_CALL PieChartTypeTemplate::getChartTypeForNe
return xResult;
}
-void SAL_CALL PieChartTypeTemplate::applyStyle(
- const Reference< chart2::XDataSeries >& xSeries,
+void PieChartTypeTemplate::applyStyle2(
+ const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
try
{
- uno::Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY_THROW );
-
bool bTemplateUsesRings = false;
sal_Int32 nOuterSeriesIndex = 0;
getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS ) >>= bTemplateUsesRings;
@@ -479,7 +444,7 @@ void SAL_CALL PieChartTypeTemplate::applyStyle(
if( nSeriesIndex == nOuterSeriesIndex ) //@todo in future this will depend on Orientation of the radius axis scale
{
- static const OUStringLiteral aOffsetPropName( u"Offset" );
+ static constexpr OUString aOffsetPropName( u"Offset"_ustr );
// get offset mode
chart2::PieChartOffsetMode ePieOffsetMode;
getFastPropertyValue( PROP_PIE_TEMPLATE_OFFSET_MODE ) >>= ePieOffsetMode;
@@ -490,7 +455,8 @@ void SAL_CALL PieChartTypeTemplate::applyStyle(
double fOffsetToSet = fDefaultOffset;
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- xProp->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList;
+ // "AttributedDataPoints"
+ xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList;
// determine whether to set the new offset
bool bSetOffset = ( ePieOffsetMode == chart2::PieChartOffsetMode_ALL_EXPLODED );
@@ -500,12 +466,12 @@ void SAL_CALL PieChartTypeTemplate::applyStyle(
// set offset to 0 if the offset was exactly "all exploded"
// before (individual offsets are kept)
double fOffset = 0.0;
- if( (xProp->getPropertyValue( aOffsetPropName ) >>= fOffset) &&
+ if( (xSeries->getPropertyValue( aOffsetPropName ) >>= fOffset) &&
::rtl::math::approxEqual( fOffset, fDefaultOffset ))
{
fOffsetToSet = 0.0;
bSetOffset = true;
- for( auto const & pointIndex : std::as_const(aAttributedDataPointIndexList) )
+ for (auto const& pointIndex : aAttributedDataPointIndexList)
{
uno::Reference< beans::XPropertySet > xPointProp(
xSeries->getDataPointByIndex( pointIndex ));
@@ -527,10 +493,10 @@ void SAL_CALL PieChartTypeTemplate::applyStyle(
if( bSetOffset )
{
// set the offset to the series and to the attributed data points
- xProp->setPropertyValue( aOffsetPropName, uno::Any( fOffsetToSet ));
+ xSeries->setPropertyValue( aOffsetPropName, uno::Any( fOffsetToSet ));
// remove hard attributes from data points
- for( auto const & pointIndex : std::as_const(aAttributedDataPointIndexList) )
+ for (auto const& pointIndex : aAttributedDataPointIndexList)
{
uno::Reference< beans::XPropertyState > xPointState(
xSeries->getDataPointByIndex( pointIndex ), uno::UNO_QUERY );
@@ -544,7 +510,7 @@ void SAL_CALL PieChartTypeTemplate::applyStyle(
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) );
// vary colors by point
- xProp->setPropertyValue( "VaryColorsByPoint", uno::Any( true ));
+ xSeries->setFastPropertyValue( PROP_DATASERIES_VARY_COLORS_BY_POINT, uno::Any( true )); // "VaryColorsByPoint"
}
catch( const uno::Exception & )
{
@@ -552,22 +518,21 @@ void SAL_CALL PieChartTypeTemplate::applyStyle(
}
}
-void SAL_CALL PieChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram )
+void PieChartTypeTemplate::resetStyles2( const rtl::Reference< ::chart::Diagram >& xDiagram )
{
// reset axes and grids
- Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY );
- if( xCooSysCnt.is())
+ if( xDiagram.is())
{
- const Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems());
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > aCooSysSeq( xDiagram->getBaseCoordinateSystems());
ChartTypeTemplate::createAxes( aCooSysSeq );
//reset scale orientation
- for( Reference< chart2::XCoordinateSystem > const & coords : aCooSysSeq )
+ for( rtl::Reference< BaseCoordinateSystem > const & coords : aCooSysSeq )
{
try
{
- Reference< chart2::XAxis > xAxis( AxisHelper::getAxis( 0 /*nDimensionIndex*/,0 /*nAxisIndex*/
- , coords ) );
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( 0 /*nDimensionIndex*/,0 /*nAxisIndex*/
+ , coords );
if( xAxis.is() )
{
chart2::ScaleData aScaleData( xAxis->getScaleData() );
@@ -590,40 +555,34 @@ void SAL_CALL PieChartTypeTemplate::resetStyles( const Reference< chart2::XDiagr
}
}
- ChartTypeTemplate::resetStyles( xDiagram );
+ ChartTypeTemplate::resetStyles2( xDiagram );
// vary colors by point,
// line style
- std::vector< Reference< chart2::XDataSeries > > aSeriesVec(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
+ std::vector< rtl::Reference< DataSeries > > aSeriesVec =
+ xDiagram->getDataSeries();
uno::Any aLineStyleAny( drawing::LineStyle_NONE );
for (auto const& series : aSeriesVec)
{
- Reference< beans::XPropertyState > xState(series, uno::UNO_QUERY);
- if( xState.is())
+ series->setPropertyToDefault( "VaryColorsByPoint");
+ if( series->getPropertyValue( "BorderStyle") == aLineStyleAny )
{
- xState->setPropertyToDefault( "VaryColorsByPoint");
- Reference< beans::XPropertySet > xProp( xState, uno::UNO_QUERY );
- if( xProp.is() &&
- xProp->getPropertyValue( "BorderStyle") == aLineStyleAny )
- {
- xState->setPropertyToDefault( "BorderStyle");
- }
+ series->setPropertyToDefault( "BorderStyle");
}
}
//reset scene properties
- ThreeDHelper::setDefaultRotation( uno::Reference< beans::XPropertySet >( xDiagram, uno::UNO_QUERY ), false );
+ xDiagram->setDefaultRotation( false );
}
// ____ XChartTypeTemplate ____
-void PieChartTypeTemplate::adaptDiagram( const uno::Reference< chart2::XDiagram >& xDiagram )
+void PieChartTypeTemplate::adaptDiagram( const rtl::Reference< ::chart::Diagram >& xDiagram )
{
if( !xDiagram.is() )
return;
//different default for scene geometry:
- ThreeDHelper::setDefaultRotation( uno::Reference< beans::XPropertySet >( xDiagram, uno::UNO_QUERY ), true );
+ xDiagram->setDefaultRotation( true );
}
IMPLEMENT_FORWARD_XINTERFACE2( PieChartTypeTemplate, ChartTypeTemplate, OPropertySet )
diff --git a/chart2/source/model/template/PieChartTypeTemplate.hxx b/chart2/source/model/template/PieChartTypeTemplate.hxx
index c749be57447a..b603392e7009 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.hxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.hxx
@@ -19,17 +19,16 @@
#pragma once
#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <comphelper/uno3.hxx>
#include <ChartTypeTemplate.hxx>
#include <com/sun/star/chart2/PieChartOffsetMode.hpp>
+#include <com/sun/star/chart2/PieChartSubType.hpp>
namespace chart
{
class PieChartTypeTemplate :
- public cppu::BaseMutex,
public ChartTypeTemplate,
public ::property::OPropertySet
{
@@ -39,6 +38,7 @@ public:
const OUString & rServiceName,
css::chart2::PieChartOffsetMode eMode,
bool bRings,
+ css::chart2::PieChartSubType eSubType,
sal_Int32 nDim = 2 );
virtual ~PieChartTypeTemplate() override;
@@ -56,50 +56,48 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
- // ____ XChartTypeTemplate ____
- virtual sal_Bool SAL_CALL matchesTemplate(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties ) override;
- virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
- getChartTypeForNewSeries( const css::uno::Sequence<
- css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
- virtual void SAL_CALL applyStyle(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ // ____ ChartTypeTemplate ____
+ virtual bool matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties ) override;
+ virtual rtl::Reference< ::chart::ChartType >
+ getChartTypeForNewSeries2( const std::vector<
+ rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
+ virtual void applyStyle2(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
- virtual void SAL_CALL resetStyles(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
+ virtual void resetStyles2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram ) override;
// ____ ChartTypeTemplate ____
virtual sal_Int32 getDimension() const override;
virtual void adaptDiagram(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram ) override;
+ const rtl::Reference< ::chart::Diagram > & xDiagram ) override;
virtual sal_Int32 getAxisCountByDimension( sal_Int32 nDimension ) override;
virtual void adaptAxes(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XCoordinateSystem > > & rCoordSys ) override;
+ const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > & rCoordSys ) override;
virtual void adaptScales(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XCoordinateSystem > > & aCooSysSeq,
+ const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > & aCooSysSeq,
const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & xCategories ) override;
virtual void createChartTypes(
- const css::uno::Sequence<
- css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XDataSeries > > >& aSeriesSeq,
- const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XCoordinateSystem > > & rCoordSys,
- const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XChartType > > & aOldChartTypesSeq
+ const std::vector<
+ std::vector<
+ rtl::Reference<
+ ::chart::DataSeries > > >& aSeriesSeq,
+ const std::vector<
+ rtl::Reference<
+ ::chart::BaseCoordinateSystem > > & rCoordSys,
+ const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq
) override;
- virtual css::uno::Reference< css::chart2::XChartType >
+ virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
};
diff --git a/chart2/source/model/template/ScatterChartType.cxx b/chart2/source/model/template/ScatterChartType.cxx
index 4693df06d674..cee026913b7f 100644
--- a/chart2/source/model/template/ScatterChartType.cxx
+++ b/chart2/source/model/template/ScatterChartType.cxx
@@ -21,6 +21,7 @@
#include <PropertyHelper.hxx>
#include <servicenames_charttypes.hxx>
#include <CartesianCoordinateSystem.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <AxisIndexDefines.hxx>
#include <unonames.hxx>
@@ -46,90 +47,57 @@ enum
PROP_SCATTERCHARTTYPE_SPLINE_ORDER
};
-void lcl_AddPropertiesToVector(
- std::vector< Property > & rOutProperties )
+::chart::tPropertyValueMap& StaticScatterChartTypeDefaults()
{
- rOutProperties.emplace_back( CHART_UNONAME_CURVE_STYLE,
+ static ::chart::tPropertyValueMap aStaticDefaults =
+ []()
+ {
+ ::chart::tPropertyValueMap aOutMap;
+ ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_SCATTERCHARTTYPE_CURVE_STYLE, chart2::CurveStyle_LINES );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_SCATTERCHARTTYPE_CURVE_RESOLUTION, 20 );
+
+ // todo: check whether order 3 means polygons of order 3 or 2. (see
+ // http://www.people.nnov.ru/fractal/Splines/Basis.htm )
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_SCATTERCHARTTYPE_SPLINE_ORDER, 3 );
+ return aOutMap;
+ }();
+ return aStaticDefaults;
+}
+
+::cppu::OPropertyArrayHelper& StaticScatterChartTypeInfoHelper()
+{
+ static ::cppu::OPropertyArrayHelper aPropHelper(
+ []()
+ {
+ std::vector< css::beans::Property > aProperties {
+ { CHART_UNONAME_CURVE_STYLE,
PROP_SCATTERCHARTTYPE_CURVE_STYLE,
cppu::UnoType<chart2::CurveStyle>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
-
- rOutProperties.emplace_back( CHART_UNONAME_CURVE_RESOLUTION,
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { CHART_UNONAME_CURVE_RESOLUTION,
PROP_SCATTERCHARTTYPE_CURVE_RESOLUTION,
cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( CHART_UNONAME_SPLINE_ORDER,
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { CHART_UNONAME_SPLINE_ORDER,
PROP_SCATTERCHARTTYPE_SPLINE_ORDER,
cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
+ | beans::PropertyAttribute::MAYBEDEFAULT } };
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+ return comphelper::containerToSequence( aProperties );
+ }() );
+ return aPropHelper;
}
-struct StaticScatterChartTypeDefaults_Initializer
+const uno::Reference< beans::XPropertySetInfo >& StaticScatterChartTypeInfo()
{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCATTERCHARTTYPE_CURVE_STYLE, chart2::CurveStyle_LINES );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_SCATTERCHARTTYPE_CURVE_RESOLUTION, 20 );
-
- // todo: check whether order 3 means polygons of order 3 or 2. (see
- // http://www.people.nnov.ru/fractal/Splines/Basis.htm )
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_SCATTERCHARTTYPE_SPLINE_ORDER, 3 );
- }
-};
-
-struct StaticScatterChartTypeDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticScatterChartTypeDefaults_Initializer >
-{
-};
-
-struct StaticScatterChartTypeInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-
-};
-
-struct StaticScatterChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticScatterChartTypeInfoHelper_Initializer >
-{
-};
-
-struct StaticScatterChartTypeInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticScatterChartTypeInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
-
-struct StaticScatterChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticScatterChartTypeInfo_Initializer >
-{
-};
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticScatterChartTypeInfoHelper() ) );
+ return xPropertySetInfo;
+}
} // anonymous namespace
@@ -154,16 +122,21 @@ uno::Reference< util::XCloneable > SAL_CALL ScatterChartType::createClone()
return uno::Reference< util::XCloneable >( new ScatterChartType( *this ));
}
+rtl::Reference< ChartType > ScatterChartType::cloneChartType() const
+{
+ return new ScatterChartType( *this );
+}
+
// ____ XChartType ____
-Reference< chart2::XCoordinateSystem > SAL_CALL
- ScatterChartType::createCoordinateSystem( ::sal_Int32 DimensionCount )
+rtl::Reference< ::chart::BaseCoordinateSystem >
+ ScatterChartType::createCoordinateSystem2( sal_Int32 DimensionCount )
{
rtl::Reference< CartesianCoordinateSystem > xResult =
new CartesianCoordinateSystem( DimensionCount );
for( sal_Int32 i=0; i<DimensionCount; ++i )
{
- Reference< chart2::XAxis > xAxis( xResult->getAxisByDimension( i, MAIN_AXIS_INDEX ) );
+ rtl::Reference< Axis > xAxis = xResult->getAxisByDimension2( i, MAIN_AXIS_INDEX );
if( !xAxis.is() )
{
OSL_FAIL("a created coordinate system should have an axis for each dimension");
@@ -198,7 +171,7 @@ uno::Sequence< OUString > SAL_CALL ScatterChartType::getSupportedMandatoryRoles(
// ____ OPropertySet ____
void ScatterChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticScatterChartTypeDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticScatterChartTypeDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -209,13 +182,13 @@ void ScatterChartType::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) cons
// ____ OPropertySet ____
::cppu::IPropertyArrayHelper & SAL_CALL ScatterChartType::getInfoHelper()
{
- return *StaticScatterChartTypeInfoHelper::get();
+ return StaticScatterChartTypeInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL ScatterChartType::getPropertySetInfo()
{
- return *StaticScatterChartTypeInfo::get();
+ return StaticScatterChartTypeInfo();
}
OUString SAL_CALL ScatterChartType::getImplementationName()
diff --git a/chart2/source/model/template/ScatterChartType.hxx b/chart2/source/model/template/ScatterChartType.hxx
index da14efb0df3f..f490c108ca56 100644
--- a/chart2/source/model/template/ScatterChartType.hxx
+++ b/chart2/source/model/template/ScatterChartType.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include "ChartType.hxx"
+#include <ChartType.hxx>
namespace chart
{
@@ -36,6 +36,8 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() override;
+ virtual rtl::Reference<ChartType> cloneChartType() const override;
+
private:
explicit ScatterChartType( const ScatterChartType & rOther );
@@ -43,8 +45,6 @@ private:
virtual OUString SAL_CALL getChartType() override;
virtual css::uno::Sequence< OUString > SAL_CALL
getSupportedMandatoryRoles() override;
- virtual css::uno::Reference< css::chart2::XCoordinateSystem > SAL_CALL
- createCoordinateSystem( ::sal_Int32 DimensionCount ) override;
// ____ OPropertySet ____
virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
@@ -58,6 +58,9 @@ private:
// ____ XCloneable ____
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
+
+ virtual rtl::Reference< ::chart::BaseCoordinateSystem >
+ createCoordinateSystem2( sal_Int32 DimensionCount ) override;
};
} // namespace chart
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
index cf22e22c6d55..3457bfa00126 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
@@ -18,9 +18,11 @@
*/
#include "ScatterChartTypeTemplate.hxx"
+#include "ScatterChartType.hxx"
#include "XYDataInterpreter.hxx"
-#include <DiagramHelper.hxx>
-#include <servicenames_charttypes.hxx>
+#include <ChartType.hxx>
+#include <Diagram.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <PropertyHelper.hxx>
#include <unonames.hxx>
@@ -31,8 +33,7 @@
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <algorithm>
@@ -53,89 +54,58 @@ enum
};
-void lcl_AddPropertiesToVector(
- std::vector< Property > & rOutProperties )
+const ::chart::tPropertyValueMap& StaticScatterChartTypeTemplateDefaults()
{
- rOutProperties.emplace_back( CHART_UNONAME_CURVE_STYLE,
- PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE,
- cppu::UnoType<chart2::CurveStyle>::get(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( CHART_UNONAME_CURVE_RESOLUTION,
- PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION,
- cppu::UnoType<sal_Int32>::get(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
- rOutProperties.emplace_back( CHART_UNONAME_SPLINE_ORDER,
- PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER,
- cppu::UnoType<sal_Int32>::get(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT );
+ static const ::chart::tPropertyValueMap aStaticDefaults =
+ []()
+ {
+ ::chart::tPropertyValueMap aOutMap;
+ ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE, chart2::CurveStyle_LINES );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION, 20 );
+
+ // todo: check whether order 3 means polygons of order 3 or 2. (see
+ // http://www.people.nnov.ru/fractal/Splines/Basis.htm )
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER, 3 );
+ return aOutMap;
+ }();
+ return aStaticDefaults;
}
-struct StaticScatterChartTypeTemplateDefaults_Initializer
-{
- ::chart::tPropertyValueMap* operator()()
- {
- static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
- return &aStaticDefaults;
- }
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE, chart2::CurveStyle_LINES );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION, 20 );
-
- // todo: check whether order 3 means polygons of order 3 or 2. (see
- // http://www.people.nnov.ru/fractal/Splines/Basis.htm )
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER, 3 );
- }
-};
-
-struct StaticScatterChartTypeTemplateDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticScatterChartTypeTemplateDefaults_Initializer >
-{
-};
-
-struct StaticScatterChartTypeTemplateInfoHelper_Initializer
-{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
- return &aPropHelper;
- }
-
-private:
- static Sequence< Property > lcl_GetPropertySequence()
- {
- std::vector< css::beans::Property > aProperties;
- lcl_AddPropertiesToVector( aProperties );
-
- std::sort( aProperties.begin(), aProperties.end(),
- ::chart::PropertyNameLess() );
-
- return comphelper::containerToSequence( aProperties );
- }
-
-};
-
-struct StaticScatterChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticScatterChartTypeTemplateInfoHelper_Initializer >
-{
-};
-struct StaticScatterChartTypeTemplateInfo_Initializer
+::cppu::OPropertyArrayHelper& StaticScatterChartTypeTemplateInfoHelper()
{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticScatterChartTypeTemplateInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ static ::cppu::OPropertyArrayHelper aPropHelper(
+ []()
+ {
+ std::vector< css::beans::Property > aProperties {
+ { CHART_UNONAME_CURVE_STYLE,
+ PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE,
+ cppu::UnoType<chart2::CurveStyle>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { CHART_UNONAME_CURVE_RESOLUTION,
+ PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION,
+ cppu::UnoType<sal_Int32>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT },
+ { CHART_UNONAME_SPLINE_ORDER,
+ PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER,
+ cppu::UnoType<sal_Int32>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT } };
+ std::sort( aProperties.begin(), aProperties.end(),
+ ::chart::PropertyNameLess() );
+ return comphelper::containerToSequence( aProperties );
+ }() );
+ return aPropHelper;
+}
-struct StaticScatterChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticScatterChartTypeTemplateInfo_Initializer >
+const uno::Reference< beans::XPropertySetInfo >& StaticScatterChartTypeTemplateInfo()
{
-};
+ static const uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticScatterChartTypeTemplateInfoHelper() ) );
+ return xPropertySetInfo;
+}
} // anonymous namespace
@@ -150,7 +120,6 @@ ScatterChartTypeTemplate::ScatterChartTypeTemplate(
bool bHasLines /* = true */,
sal_Int32 nDim /* = 2 */ ) :
ChartTypeTemplate( xContext, rServiceName ),
- ::property::OPropertySet( m_aMutex ),
m_bHasSymbols( bSymbols ),
m_bHasLines( bHasLines ),
m_nDim( nDim )
@@ -165,7 +134,7 @@ ScatterChartTypeTemplate::~ScatterChartTypeTemplate()
// ____ OPropertySet ____
void ScatterChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
{
- const tPropertyValueMap& rStaticDefaults = *StaticScatterChartTypeTemplateDefaults::get();
+ const tPropertyValueMap& rStaticDefaults = StaticScatterChartTypeTemplateDefaults();
tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
if( aFound == rStaticDefaults.end() )
rAny.clear();
@@ -175,13 +144,13 @@ void ScatterChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAn
::cppu::IPropertyArrayHelper & SAL_CALL ScatterChartTypeTemplate::getInfoHelper()
{
- return *StaticScatterChartTypeTemplateInfoHelper::get();
+ return StaticScatterChartTypeTemplateInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL ScatterChartTypeTemplate::getPropertySetInfo()
{
- return *StaticScatterChartTypeTemplateInfo::get();
+ return StaticScatterChartTypeTemplateInfo();
}
sal_Int32 ScatterChartTypeTemplate::getDimension() const
@@ -196,21 +165,19 @@ StackMode ScatterChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex *
return StackMode::NONE;
}
-void SAL_CALL ScatterChartTypeTemplate::applyStyle(
- const Reference< chart2::XDataSeries >& xSeries,
+void ScatterChartTypeTemplate::applyStyle2(
+ const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
try
{
- Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY_THROW );
-
- DataSeriesHelper::switchSymbolsOnOrOff( xProp, m_bHasSymbols, nSeriesIndex );
- DataSeriesHelper::switchLinesOnOrOff( xProp, m_bHasLines );
- DataSeriesHelper::makeLinesThickOrThin( xProp, m_nDim==2 );
+ DataSeriesHelper::switchSymbolsOnOrOff( xSeries, m_bHasSymbols, nSeriesIndex );
+ DataSeriesHelper::switchLinesOnOrOff( xSeries, m_bHasLines );
+ DataSeriesHelper::makeLinesThickOrThin( xSeries, m_nDim==2 );
if( m_nDim==3 )
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) );
}
@@ -226,11 +193,11 @@ sal_Bool SAL_CALL ScatterChartTypeTemplate::supportsCategories()
return false;
}
-sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate(
- const Reference< chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties )
+bool ScatterChartTypeTemplate::matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties )
{
- bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
+ bool bResult = ChartTypeTemplate::matchesTemplate2( xDiagram, bAdaptProperties );
// check symbol-style and line-style
// for a template with symbols (or with lines) it is ok, if there is at least one series
@@ -240,8 +207,8 @@ sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate(
bool bSymbolFound = false;
bool bLineFound = false;
- std::vector< Reference< chart2::XDataSeries > > aSeriesVec(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
+ std::vector< rtl::Reference< DataSeries > > aSeriesVec =
+ xDiagram->getDataSeries();
for (auto const& series : aSeriesVec)
{
@@ -249,9 +216,8 @@ sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate(
{
chart2::Symbol aSymbProp;
drawing::LineStyle eLineStyle;
- Reference< beans::XPropertySet > xProp(series, uno::UNO_QUERY_THROW);
- bool bCurrentHasSymbol = (xProp->getPropertyValue( "Symbol") >>= aSymbProp) &&
+ bool bCurrentHasSymbol = (series->getPropertyValue( "Symbol") >>= aSymbProp) &&
(aSymbProp.Style != chart2::SymbolStyle_NONE);
if( bCurrentHasSymbol )
@@ -263,7 +229,7 @@ sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate(
break;
}
- bool bCurrentHasLine = (xProp->getPropertyValue( "LineStyle") >>= eLineStyle) &&
+ bool bCurrentHasLine = (series->getPropertyValue( "LineStyle") >>= eLineStyle) &&
( eLineStyle != drawing::LineStyle_NONE );
if( bCurrentHasLine )
@@ -297,9 +263,8 @@ sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate(
{
try
{
- uno::Reference< beans::XPropertySet > xChartTypeProp(
- DiagramHelper::getChartTypeByIndex( xDiagram, 0 ),
- uno::UNO_QUERY_THROW );
+ rtl::Reference< ChartType > xChartTypeProp =
+ xDiagram->getChartTypeByIndex(0);
setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE, xChartTypeProp->getPropertyValue(CHART_UNONAME_CURVE_STYLE) );
setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION, xChartTypeProp->getPropertyValue(CHART_UNONAME_CURVE_RESOLUTION) );
setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER, xChartTypeProp->getPropertyValue(CHART_UNONAME_SPLINE_ORDER) );
@@ -313,27 +278,20 @@ sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate(
return bResult;
}
-Reference< chart2::XChartType > ScatterChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
+rtl::Reference< ChartType > ScatterChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
{
- Reference< chart2::XChartType > xResult;
+ rtl::Reference< ChartType > xResult;
try
{
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_SCATTER ), uno::UNO_QUERY_THROW );
-
- Reference< beans::XPropertySet > xCTProp( xResult, uno::UNO_QUERY );
- if( xCTProp.is())
- {
- xCTProp->setPropertyValue(
- CHART_UNONAME_CURVE_STYLE, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE ));
- xCTProp->setPropertyValue(
- CHART_UNONAME_CURVE_RESOLUTION, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
- xCTProp->setPropertyValue(
- CHART_UNONAME_SPLINE_ORDER, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER ));
- }
+ xResult = new ScatterChartType();
+
+ xResult->setPropertyValue(
+ CHART_UNONAME_CURVE_STYLE, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE ));
+ xResult->setPropertyValue(
+ CHART_UNONAME_CURVE_RESOLUTION, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
+ xResult->setPropertyValue(
+ CHART_UNONAME_SPLINE_ORDER, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER ));
}
catch( const uno::Exception & )
{
@@ -343,30 +301,23 @@ Reference< chart2::XChartType > ScatterChartTypeTemplate::getChartTypeForIndex(
return xResult;
}
-Reference< chart2::XChartType > SAL_CALL ScatterChartTypeTemplate::getChartTypeForNewSeries(
- const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
+rtl::Reference< ChartType > ScatterChartTypeTemplate::getChartTypeForNewSeries2(
+ const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
- Reference< chart2::XChartType > xResult;
+ rtl::Reference< ChartType > xResult;
try
{
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_SCATTER ), uno::UNO_QUERY_THROW );
+ xResult = new ScatterChartType();
ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( aFormerlyUsedChartTypes, xResult );
- Reference< beans::XPropertySet > xCTProp( xResult, uno::UNO_QUERY );
- if( xCTProp.is())
- {
- xCTProp->setPropertyValue(
- CHART_UNONAME_CURVE_STYLE, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE ));
- xCTProp->setPropertyValue(
- CHART_UNONAME_CURVE_RESOLUTION, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
- xCTProp->setPropertyValue(
- CHART_UNONAME_SPLINE_ORDER, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER ));
- }
+ xResult->setPropertyValue(
+ CHART_UNONAME_CURVE_STYLE, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE ));
+ xResult->setPropertyValue(
+ CHART_UNONAME_CURVE_RESOLUTION, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
+ xResult->setPropertyValue(
+ CHART_UNONAME_SPLINE_ORDER, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER ));
}
catch( const uno::Exception & )
{
@@ -376,7 +327,7 @@ Reference< chart2::XChartType > SAL_CALL ScatterChartTypeTemplate::getChartTypeF
return xResult;
}
-Reference< chart2::XDataInterpreter > SAL_CALL ScatterChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > ScatterChartTypeTemplate::getDataInterpreter2()
{
if( ! m_xDataInterpreter.is())
m_xDataInterpreter.set( new XYDataInterpreter );
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.hxx b/chart2/source/model/template/ScatterChartTypeTemplate.hxx
index f25d6ebcbf49..0d7aec7ad188 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.hxx
@@ -20,14 +20,12 @@
#include <ChartTypeTemplate.hxx>
#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <comphelper/uno3.hxx>
namespace chart
{
class ScatterChartTypeTemplate :
- public cppu::BaseMutex,
public ChartTypeTemplate,
public ::property::OPropertySet
{
@@ -54,23 +52,23 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
- // ____ XChartTypeTemplate ____
+ // ____ ChartTypeTemplate ____
virtual sal_Bool SAL_CALL supportsCategories() override;
- virtual sal_Bool SAL_CALL matchesTemplate(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties ) override;
- virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
- getChartTypeForNewSeries( const css::uno::Sequence<
- css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
- virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override;
- virtual void SAL_CALL applyStyle(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ virtual bool matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties ) override;
+ virtual rtl::Reference< ::chart::ChartType >
+ getChartTypeForNewSeries2( const std::vector<
+ rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
+ virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter2() override;
+ virtual void applyStyle2(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
// ____ ChartTypeTemplate ____
- virtual css::uno::Reference< css::chart2::XChartType >
+ virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
virtual sal_Int32 getDimension() const override;
virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const override;
diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx
index 9f54c44cbca4..b0ff53d2a2c3 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.cxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.cxx
@@ -18,25 +18,25 @@
*/
#include "StockChartTypeTemplate.hxx"
+#include "ColumnChartType.hxx"
+#include "CandleStickChartType.hxx"
+#include "LineChartType.hxx"
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include "StockDataInterpreter.hxx"
-#include <DiagramHelper.hxx>
+#include <Diagram.hxx>
+#include <BaseCoordinateSystem.hxx>
#include <servicenames_charttypes.hxx>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <PropertyHelper.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
-#include <vector>
#include <algorithm>
+#include <cstddef>
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -127,7 +127,6 @@ StockChartTypeTemplate::StockChartTypeTemplate(
StockVariant eVariant,
bool bJapaneseStyle ) :
ChartTypeTemplate( xContext, rServiceName ),
- ::property::OPropertySet( m_aMutex ),
m_eStockVariant( eVariant )
{
setFastPropertyValue_NoBroadcast(
@@ -184,13 +183,13 @@ sal_Int32 StockChartTypeTemplate::getAxisCountByDimension( sal_Int32 nDimension
return bHasVolume ? 2 : 1;
}
-void SAL_CALL StockChartTypeTemplate::applyStyle(
- const Reference< chart2::XDataSeries >& xSeries,
+void StockChartTypeTemplate::applyStyle2(
+ const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
try
{
sal_Int32 nNewAxisIndex = 0;
@@ -200,9 +199,7 @@ void SAL_CALL StockChartTypeTemplate::applyStyle(
if( bHasVolume && nChartTypeIndex != 0 )
nNewAxisIndex = 1;
- Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY );
- if( xProp.is() )
- xProp->setPropertyValue( "AttachedAxisIndex", uno::Any( nNewAxisIndex ) );
+ xSeries->setPropertyValue( "AttachedAxisIndex", uno::Any( nNewAxisIndex ) );
if( bHasVolume && nChartTypeIndex==0 )
{
@@ -212,13 +209,10 @@ void SAL_CALL StockChartTypeTemplate::applyStyle(
else
{
//ensure that lines are on
- if( xProp.is() )
- {
- drawing::LineStyle eStyle = drawing::LineStyle_NONE;
- xProp->getPropertyValue( "LineStyle" ) >>= eStyle;
- if( eStyle == drawing::LineStyle_NONE )
- xProp->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_SOLID ));
- }
+ drawing::LineStyle eStyle = drawing::LineStyle_NONE;
+ xSeries->getPropertyValue( "LineStyle" ) >>= eStyle;
+ if( eStyle == drawing::LineStyle_NONE )
+ xSeries->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_SOLID ));
}
}
@@ -228,66 +222,57 @@ void SAL_CALL StockChartTypeTemplate::applyStyle(
}
}
-void SAL_CALL StockChartTypeTemplate::resetStyles(
- const Reference< chart2::XDiagram >& xDiagram )
+void StockChartTypeTemplate::resetStyles2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram )
{
- ChartTypeTemplate::resetStyles( xDiagram );
+ ChartTypeTemplate::resetStyles2( xDiagram );
if( getDimension() == 3 )
{
- std::vector< Reference< chart2::XDataSeries > > aSeriesVec(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
+ std::vector< rtl::Reference< DataSeries > > aSeriesVec =
+ xDiagram->getDataSeries();
for (auto const& series : aSeriesVec)
{
- Reference< beans::XPropertySet > xProp(series, uno::UNO_QUERY);
- if( xProp.is() )
- xProp->setPropertyValue( "AttachedAxisIndex", uno::Any( sal_Int32(0) ) );
+ series->setPropertyValue( "AttachedAxisIndex", uno::Any( sal_Int32(0) ) );
}
}
- DiagramHelper::setVertical( xDiagram, false );
+ xDiagram->setVertical( false );
}
-Reference< XChartType > StockChartTypeTemplate::getChartTypeForIndex( sal_Int32 nChartTypeIndex )
+rtl::Reference< ChartType > StockChartTypeTemplate::getChartTypeForIndex( sal_Int32 nChartTypeIndex )
{
- Reference< XChartType > xCT;
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY );
- if(xFact.is())
+ rtl::Reference< ChartType > xCT;
+ bool bHasVolume = false;
+ getFastPropertyValue( PROP_STOCKCHARTTYPE_TEMPLATE_VOLUME ) >>= bHasVolume;
+ if( bHasVolume )
{
- bool bHasVolume = false;
- getFastPropertyValue( PROP_STOCKCHARTTYPE_TEMPLATE_VOLUME ) >>= bHasVolume;
- if( bHasVolume )
- {
- if( nChartTypeIndex == 0 )
- xCT.set( xFact->createInstance( CHART2_SERVICE_NAME_CHARTTYPE_COLUMN ), uno::UNO_QUERY );
- else if( nChartTypeIndex == 1 )
- xCT.set( xFact->createInstance( CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK ), uno::UNO_QUERY );
- else
- xCT.set( xFact->createInstance( CHART2_SERVICE_NAME_CHARTTYPE_LINE ), uno::UNO_QUERY );
- }
+ if( nChartTypeIndex == 0 )
+ xCT = new ColumnChartType();
+ else if( nChartTypeIndex == 1 )
+ xCT = new CandleStickChartType();
else
- {
- if( nChartTypeIndex == 0 )
- xCT.set( xFact->createInstance( CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK ), uno::UNO_QUERY );
- else
- xCT.set( xFact->createInstance( CHART2_SERVICE_NAME_CHARTTYPE_LINE ), uno::UNO_QUERY );
- }
+ xCT = new LineChartType();
+ }
+ else
+ {
+ if( nChartTypeIndex == 0 )
+ xCT = new CandleStickChartType();
+ else
+ xCT = new LineChartType();
}
return xCT;
}
void StockChartTypeTemplate::createChartTypes(
- const Sequence< Sequence< Reference< XDataSeries > > > & aSeriesSeq,
- const Sequence< Reference< XCoordinateSystem > > & rCoordSys,
- const Sequence< Reference< XChartType > >& /* aOldChartTypesSeq */ )
+ const std::vector< std::vector< rtl::Reference< DataSeries > > > & aSeriesSeq,
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & rCoordSys,
+ const std::vector< rtl::Reference< ChartType > >& /* aOldChartTypesSeq */ )
{
- if( !rCoordSys.hasElements() )
+ if( rCoordSys.empty() )
return;
try
{
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
bool bHasVolume = false;
bool bShowFirst = false;
bool bJapaneseStyle = false;
@@ -298,63 +283,49 @@ void StockChartTypeTemplate::createChartTypes(
getFastPropertyValue( PROP_STOCKCHARTTYPE_TEMPLATE_JAPANESE ) >>= bJapaneseStyle;
getFastPropertyValue( PROP_STOCKCHARTTYPE_TEMPLATE_LOW_HIGH ) >>= bShowHighLow;
- sal_Int32 nSeriesIndex = 0;
+ std::size_t nSeriesIndex = 0;
- std::vector< Reference< chart2::XChartType > > aChartTypeVec;
+ std::vector< rtl::Reference< ChartType > > aChartTypeVec;
// Bars (Volume)
if( bHasVolume )
{
// chart type
- Reference< XChartType > xCT(
- xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_COLUMN ), uno::UNO_QUERY_THROW );
+ rtl::Reference< ChartType > xCT = new ColumnChartType();
aChartTypeVec.push_back( xCT );
- if( aSeriesSeq.getLength() > nSeriesIndex &&
- aSeriesSeq[nSeriesIndex].hasElements() )
+ if( aSeriesSeq.size() > nSeriesIndex &&
+ !aSeriesSeq[nSeriesIndex].empty() )
{
- Reference< XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
- xDSCnt->setDataSeries( aSeriesSeq[ nSeriesIndex ] );
+ xCT->setDataSeries( aSeriesSeq[ nSeriesIndex ] );
}
++nSeriesIndex;
}
- Reference< XChartType > xCT(
- xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK ), uno::UNO_QUERY_THROW );
+ rtl::Reference< ChartType > xCT = new CandleStickChartType();
aChartTypeVec.push_back( xCT );
- Reference< beans::XPropertySet > xCTProp( xCT, uno::UNO_QUERY );
- if( xCTProp.is())
- {
- xCTProp->setPropertyValue( "Japanese", uno::Any( bJapaneseStyle ));
- xCTProp->setPropertyValue( "ShowFirst", uno::Any( bShowFirst ));
- xCTProp->setPropertyValue( "ShowHighLow", uno::Any( bShowHighLow ));
- }
+ xCT->setPropertyValue( "Japanese", uno::Any( bJapaneseStyle ));
+ xCT->setPropertyValue( "ShowFirst", uno::Any( bShowFirst ));
+ xCT->setPropertyValue( "ShowHighLow", uno::Any( bShowHighLow ));
- if( aSeriesSeq.getLength() > nSeriesIndex &&
- aSeriesSeq[ nSeriesIndex ].hasElements() )
+ if( aSeriesSeq.size() > nSeriesIndex &&
+ !aSeriesSeq[ nSeriesIndex ].empty() )
{
- Reference< XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
- xDSCnt->setDataSeries( aSeriesSeq[ nSeriesIndex ] );
+ xCT->setDataSeries( aSeriesSeq[ nSeriesIndex ] );
}
++nSeriesIndex;
// Lines (remaining series)
- if( aSeriesSeq.getLength() > nSeriesIndex &&
- aSeriesSeq[ nSeriesIndex ].hasElements() )
+ if( aSeriesSeq.size() > nSeriesIndex &&
+ !aSeriesSeq[ nSeriesIndex ].empty() )
{
- xCT.set(
- xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_LINE ), uno::UNO_QUERY_THROW );
+ xCT = new LineChartType();
aChartTypeVec.push_back( xCT );
- Reference< XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
- xDSCnt->setDataSeries( aSeriesSeq[ nSeriesIndex ] );
+ xCT->setDataSeries( aSeriesSeq[ nSeriesIndex ] );
}
- Reference< XChartTypeContainer > xCTCnt( rCoordSys[ 0 ], uno::UNO_QUERY_THROW );
- xCTCnt->setChartTypes( comphelper::containerToSequence(aChartTypeVec) );
+ rCoordSys[ 0 ]->setChartTypes( aChartTypeVec );
}
catch( const uno::Exception & )
{
@@ -362,10 +333,10 @@ void StockChartTypeTemplate::createChartTypes(
}
}
-// ____ XChartTypeTemplate ____
-sal_Bool SAL_CALL StockChartTypeTemplate::matchesTemplate(
- const uno::Reference< XDiagram >& xDiagram,
- sal_Bool /* bAdaptProperties */ )
+// ____ ChartTypeTemplate ____
+bool StockChartTypeTemplate::matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool /* bAdaptProperties */ )
{
bool bResult = false;
@@ -380,34 +351,25 @@ sal_Bool SAL_CALL StockChartTypeTemplate::matchesTemplate(
getFastPropertyValue( PROP_STOCKCHARTTYPE_TEMPLATE_OPEN ) >>= bHasOpenValue;
getFastPropertyValue( PROP_STOCKCHARTTYPE_TEMPLATE_JAPANESE ) >>= bHasJapaneseStyle;
- Reference< chart2::XChartType > xVolumeChartType;
- Reference< chart2::XChartType > xCandleStickChartType;
- Reference< chart2::XChartType > xLineChartType;
+ rtl::Reference< ChartType > xVolumeChartType;
+ rtl::Reference< ChartType > xCandleStickChartType;
+ rtl::Reference< ChartType > xLineChartType;
sal_Int32 nNumberOfChartTypes = 0;
- Reference< XCoordinateSystemContainer > xCooSysCnt(
- xDiagram, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
- xCooSysCnt->getCoordinateSystems());
- for( Reference< XCoordinateSystem > const & coords : aCooSysSeq )
+ for( rtl::Reference< BaseCoordinateSystem > const & coords : xDiagram->getBaseCoordinateSystems() )
{
- Reference< XChartTypeContainer > xCTCnt( coords, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes());
- for( Reference< XChartType > const & chartType : aChartTypeSeq )
+ for( rtl::Reference< ChartType > const & chartType : coords->getChartTypes2() )
{
- if( chartType.is())
- {
- ++nNumberOfChartTypes;
- if( nNumberOfChartTypes > 3 )
- break;
- OUString aCTService = chartType->getChartType();
- if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_COLUMN )
- xVolumeChartType.set( chartType );
- else if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
- xCandleStickChartType.set( chartType );
- else if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_LINE )
- xLineChartType.set( chartType );
- }
+ ++nNumberOfChartTypes;
+ if( nNumberOfChartTypes > 3 )
+ break;
+ OUString aCTService = chartType->getChartType();
+ if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_COLUMN )
+ xVolumeChartType = chartType;
+ else if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
+ xCandleStickChartType = chartType;
+ else if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_LINE )
+ xLineChartType = chartType;
}
if( nNumberOfChartTypes > 3 )
break;
@@ -418,18 +380,14 @@ sal_Bool SAL_CALL StockChartTypeTemplate::matchesTemplate(
bResult = true;
// check for japanese style
- Reference< beans::XPropertySet > xCTProp( xCandleStickChartType, uno::UNO_QUERY );
- if( xCTProp.is())
- {
- bool bJapaneseProp = false;
- xCTProp->getPropertyValue( "Japanese") >>= bJapaneseProp;
- bResult = bResult && ( bHasJapaneseStyle == bJapaneseProp );
-
- // in old chart japanese == showFirst
- bool bShowFirstProp = false;
- xCTProp->getPropertyValue( "ShowFirst") >>= bShowFirstProp;
- bResult = bResult && ( bHasOpenValue == bShowFirstProp );
- }
+ bool bJapaneseProp = false;
+ xCandleStickChartType->getPropertyValue( "Japanese") >>= bJapaneseProp;
+ bResult = bResult && ( bHasJapaneseStyle == bJapaneseProp );
+
+ // in old chart japanese == showFirst
+ bool bShowFirstProp = false;
+ xCandleStickChartType->getPropertyValue( "ShowFirst") >>= bShowFirstProp;
+ bResult = bResult && ( bHasOpenValue == bShowFirstProp );
}
}
catch( const uno::Exception & )
@@ -440,17 +398,14 @@ sal_Bool SAL_CALL StockChartTypeTemplate::matchesTemplate(
return bResult;
}
-Reference< XChartType > SAL_CALL StockChartTypeTemplate::getChartTypeForNewSeries(
- const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes )
+rtl::Reference< ChartType > StockChartTypeTemplate::getChartTypeForNewSeries2(
+ const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
- Reference< chart2::XChartType > xResult;
+ rtl::Reference< ChartType > xResult;
try
{
- Reference< lang::XMultiServiceFactory > xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW );
- xResult.set( xFact->createInstance(
- CHART2_SERVICE_NAME_CHARTTYPE_LINE ), uno::UNO_QUERY_THROW );
+ xResult = new LineChartType();
ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( aFormerlyUsedChartTypes, xResult );
}
catch( const uno::Exception & )
@@ -461,7 +416,7 @@ Reference< XChartType > SAL_CALL StockChartTypeTemplate::getChartTypeForNewSerie
return xResult;
}
-Reference< XDataInterpreter > SAL_CALL StockChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > StockChartTypeTemplate::getDataInterpreter2()
{
if( ! m_xDataInterpreter.is())
m_xDataInterpreter.set( new StockDataInterpreter( m_eStockVariant ) );
diff --git a/chart2/source/model/template/StockChartTypeTemplate.hxx b/chart2/source/model/template/StockChartTypeTemplate.hxx
index 99eb7da8c8cf..aed35a000919 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.hxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.hxx
@@ -20,14 +20,12 @@
#include <ChartTypeTemplate.hxx>
#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <comphelper/uno3.hxx>
namespace chart
{
class StockChartTypeTemplate :
- public cppu::BaseMutex,
public ChartTypeTemplate,
public ::property::OPropertySet
{
@@ -70,40 +68,37 @@ protected:
getPropertySetInfo() override;
// ____ XChartTypeTemplate ____
- virtual sal_Bool SAL_CALL matchesTemplate(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- sal_Bool bAdaptProperties ) override;
- virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL
- getChartTypeForNewSeries( const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override;
- virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override;
- virtual void SAL_CALL applyStyle(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ virtual bool matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties ) override;
+ virtual rtl::Reference< ::chart::ChartType >
+ getChartTypeForNewSeries2( const std::vector<
+ rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
+ virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter2() override;
+ virtual void applyStyle2(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
- virtual void SAL_CALL resetStyles(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
+ virtual void resetStyles2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram ) override;
// ChartTypeTemplate
virtual sal_Int32 getAxisCountByDimension( sal_Int32 nDimension ) override;
// ____ ChartTypeTemplate ____
virtual void createChartTypes(
- const css::uno::Sequence<
- css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XDataSeries > > >& aSeriesSeq,
- const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XCoordinateSystem > > & rCoordSys,
- const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XChartType > > & aOldChartTypesSeq
+ const std::vector<
+ std::vector<
+ rtl::Reference<
+ ::chart::DataSeries > > >& aSeriesSeq,
+ const std::vector<
+ rtl::Reference<
+ ::chart::BaseCoordinateSystem > > & rCoordSys,
+ const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq
) override;
- virtual css::uno::Reference< css::chart2::XChartType >
+ virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
private:
diff --git a/chart2/source/model/template/StockDataInterpreter.cxx b/chart2/source/model/template/StockDataInterpreter.cxx
index 7647f475f1f8..1575bba1b223 100644
--- a/chart2/source/model/template/StockDataInterpreter.cxx
+++ b/chart2/source/model/template/StockDataInterpreter.cxx
@@ -17,15 +17,17 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <cstddef>
+
#include "StockDataInterpreter.hxx"
#include "StockChartTypeTemplate.hxx"
#include <DataSeries.hxx>
-#include <com/sun/star/chart2/data/XDataSink.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
-using namespace ::std;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -43,17 +45,17 @@ StockDataInterpreter::~StockDataInterpreter()
{}
// ____ XDataInterpreter ____
-InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
+InterpretedData StockDataInterpreter::interpretDataSource(
const Reference< data::XDataSource >& xSource,
const Sequence< beans::PropertyValue >& rArguments,
- const Sequence< Reference< XDataSeries > >& rSeriesToReUse )
+ const std::vector< rtl::Reference< ::chart::DataSeries > >& rSeriesToReUse )
{
if( ! xSource.is())
return InterpretedData();
- Reference< data::XLabeledDataSequence > xCategories;
- Sequence< Reference< data::XLabeledDataSequence > > aData( xSource->getDataSequences() );
- const sal_Int32 nDataCount( aData.getLength());
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData = DataInterpreter::getDataSequences(xSource);
+ const sal_Int32 nDataCount( aData.size());
// sub-type properties
const StockChartTypeTemplate::StockVariant eVar( GetStockVariant());
@@ -87,16 +89,15 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
sal_Int32 nNumberOfGroups( bHasVolume ? 2 : 1 );
// sequences of data::XLabeledDataSequence per series per group
- Sequence< Sequence< Sequence< Reference< data::XLabeledDataSequence > > > > aSequences( nNumberOfGroups );
- auto pSequences = aSequences.getArray();
+ std::vector< std::vector< std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > > > aSequences( nNumberOfGroups );
const sal_Int32 nBarGroupIndex( 0 );
const sal_Int32 nCandleStickGroupIndex( nNumberOfGroups - 1 );
// allocate space for labeled sequences
if( nRemaining > 0 )
++nCandleStickSeries;
- pSequences[nCandleStickGroupIndex].realloc( nCandleStickSeries );
- auto pCandleStickGroup = pSequences[nCandleStickGroupIndex].getArray();
+ aSequences[nCandleStickGroupIndex].resize( nCandleStickSeries );
+ auto & pCandleStickGroup = aSequences[nCandleStickGroupIndex];
if( bHasVolume )
{
// if there are remaining sequences, the first one is taken for
@@ -104,9 +105,9 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
// is used
if( nRemaining > 1 )
++nVolumeSeries;
- pSequences[nBarGroupIndex].realloc( nVolumeSeries );
+ aSequences[nBarGroupIndex].resize( nVolumeSeries );
}
- auto pBarGroup = pSequences[nBarGroupIndex].getArray();
+ auto & pBarGroup = aSequences[nBarGroupIndex];
// create data
sal_Int32 nSourceIndex = 0; // index into aData sequence
@@ -114,7 +115,7 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
// 1. categories
if( bHasCategories )
{
- xCategories.set( aData[nSourceIndex] );
+ xCategories = aData[nSourceIndex];
++nSourceIndex;
}
@@ -124,8 +125,8 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
// bar
if( bHasVolume )
{
- pBarGroup[nLabeledSeqIdx].realloc( 1 );
- pBarGroup[nLabeledSeqIdx].getArray()[0].set( aData[nSourceIndex] );
+ pBarGroup[nLabeledSeqIdx].resize( 1 );
+ pBarGroup[nLabeledSeqIdx][0] = aData[nSourceIndex];
if( aData[nSourceIndex].is())
SetRole( aData[nSourceIndex]->getValues(), "values-y");
++nSourceIndex;
@@ -134,30 +135,30 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
sal_Int32 nSeqIdx = 0;
if( bHasOpenValues )
{
- pCandleStickGroup[nLabeledSeqIdx].realloc( 4 );
- pCandleStickGroup[nLabeledSeqIdx].getArray()[nSeqIdx].set( aData[nSourceIndex] );
+ pCandleStickGroup[nLabeledSeqIdx].resize( 4 );
+ pCandleStickGroup[nLabeledSeqIdx][nSeqIdx] = aData[nSourceIndex];
if( aData[nSourceIndex].is())
SetRole( aData[nSourceIndex]->getValues(), "values-first");
++nSourceIndex;
++nSeqIdx;
}
else
- pCandleStickGroup[nLabeledSeqIdx].realloc( 3 );
- auto pLabeledSeq = pCandleStickGroup[nLabeledSeqIdx].getArray();
+ pCandleStickGroup[nLabeledSeqIdx].resize( 3 );
+ auto & pLabeledSeq = pCandleStickGroup[nLabeledSeqIdx];
- pLabeledSeq[nSeqIdx].set( aData[nSourceIndex] );
+ pLabeledSeq[nSeqIdx] = aData[nSourceIndex];
if( aData[nSourceIndex].is())
SetRole( aData[nSourceIndex]->getValues(), "values-min");
++nSourceIndex;
++nSeqIdx;
- pLabeledSeq[nSeqIdx].set( aData[nSourceIndex] );
+ pLabeledSeq[nSeqIdx] = aData[nSourceIndex];
if( aData[nSourceIndex].is())
SetRole( aData[nSourceIndex]->getValues(), "values-max");
++nSourceIndex;
++nSeqIdx;
- pLabeledSeq[nSeqIdx].set( aData[nSourceIndex] );
+ pLabeledSeq[nSeqIdx] = aData[nSourceIndex];
if( aData[nSourceIndex].is())
SetRole( aData[nSourceIndex]->getValues(), "values-last");
++nSourceIndex;
@@ -168,11 +169,11 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
if( bHasVolume && nRemaining > 1 )
{
OSL_ASSERT( nVolumeSeries > nNumOfFullSeries );
- pBarGroup[nVolumeSeries - 1].realloc( 1 );
+ pBarGroup[nVolumeSeries - 1].resize( 1 );
OSL_ASSERT( nDataCount > nSourceIndex );
if( aData[nSourceIndex].is())
SetRole( aData[nSourceIndex]->getValues(), "values-y");
- pBarGroup[nVolumeSeries - 1].getArray()[0].set( aData[nSourceIndex] );
+ pBarGroup[nVolumeSeries - 1][0] = aData[nSourceIndex];
++nSourceIndex;
--nRemaining;
OSL_ENSURE( nRemaining, "additional bar should only be used if there is at least one more sequence for a candle stick" );
@@ -183,13 +184,13 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
{
OSL_ASSERT( nCandleStickSeries > nNumOfFullSeries );
const sal_Int32 nSeriesIndex = nCandleStickSeries - 1;
- pCandleStickGroup[nSeriesIndex].realloc( nRemaining );
- auto pLabeledSeq = pCandleStickGroup[nSeriesIndex].getArray();
+ pCandleStickGroup[nSeriesIndex].resize( nRemaining );
+ auto & pLabeledSeq = pCandleStickGroup[nSeriesIndex];
OSL_ASSERT( nDataCount > nSourceIndex );
// 1. low
sal_Int32 nSeqIdx( 0 );
- pLabeledSeq[nSeqIdx].set( aData[nSourceIndex] );
+ pLabeledSeq[nSeqIdx] = aData[nSourceIndex];
if( aData[nSourceIndex].is())
SetRole( aData[nSourceIndex]->getValues(), "values-min");
++nSourceIndex;
@@ -198,7 +199,7 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
// 2. high
if( nSeqIdx < nRemaining )
{
- pLabeledSeq[nSeqIdx].set( aData[nSourceIndex] );
+ pLabeledSeq[nSeqIdx] = aData[nSourceIndex];
if( aData[nSourceIndex].is())
SetRole( aData[nSourceIndex]->getValues(), "values-max");
++nSourceIndex;
@@ -209,7 +210,7 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
OSL_ENSURE( bHasOpenValues || nSeqIdx >= nRemaining, "could have created full series" );
if( nSeqIdx < nRemaining )
{
- pLabeledSeq[nSeqIdx].set( aData[nSourceIndex] );
+ pLabeledSeq[nSeqIdx] = aData[nSourceIndex];
if( aData[nSourceIndex].is())
SetRole( aData[nSourceIndex]->getValues(), "values-last");
++nSourceIndex;
@@ -221,27 +222,26 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
}
// create DataSeries
- Sequence< Sequence< Reference< XDataSeries > > > aResultSeries( nNumberOfGroups );
- auto pResultSeries = aResultSeries.getArray();
- sal_Int32 nGroupIndex, nReUsedSeriesIdx = 0;
+ std::vector< std::vector< rtl::Reference< DataSeries > > > aResultSeries( nNumberOfGroups );
+ sal_Int32 nGroupIndex;
+ std::size_t nReUsedSeriesIdx = 0;
for( nGroupIndex=0; nGroupIndex<nNumberOfGroups; ++nGroupIndex )
{
- const sal_Int32 nNumSeriesData = aSequences[nGroupIndex].getLength();
- pResultSeries[nGroupIndex].realloc( nNumSeriesData );
- auto pResultSerie = pResultSeries[nGroupIndex].getArray();
+ const sal_Int32 nNumSeriesData = aSequences[nGroupIndex].size();
+ aResultSeries[nGroupIndex].resize( nNumSeriesData );
+ auto & pResultSerie = aResultSeries[nGroupIndex];
for( sal_Int32 nSeriesIdx = 0; nSeriesIdx < nNumSeriesData; ++nSeriesIdx, ++nReUsedSeriesIdx )
{
try
{
- Reference< XDataSeries > xSeries;
- if( nReUsedSeriesIdx < rSeriesToReUse.getLength())
- xSeries.set( rSeriesToReUse[nReUsedSeriesIdx] );
+ rtl::Reference< DataSeries > xSeries;
+ if( nReUsedSeriesIdx < rSeriesToReUse.size())
+ xSeries = rSeriesToReUse[nReUsedSeriesIdx];
else
- xSeries.set( new DataSeries );
- OSL_ASSERT( xSeries.is() );
- Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY_THROW );
- xSink->setData( aSequences[nGroupIndex][nSeriesIdx] );
- pResultSerie[nSeriesIdx].set( xSeries );
+ xSeries = new DataSeries;
+ assert( xSeries.is() );
+ xSeries->setData( aSequences[nGroupIndex][nSeriesIdx] );
+ pResultSerie[nSeriesIdx] = xSeries;
}
catch( const uno::Exception & )
{
@@ -250,7 +250,7 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
}
}
- return InterpretedData( aResultSeries, xCategories );
+ return { aResultSeries, xCategories };
}
// criterion: there must be two groups for stock-charts with volume and all
@@ -258,11 +258,11 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
// todo: skip first criterion? (to allow easy switch from stock-chart without
// volume to one with volume)
-sal_Bool SAL_CALL StockDataInterpreter::isDataCompatible(
+bool StockDataInterpreter::isDataCompatible(
const InterpretedData& aInterpretedData )
{
// high/low/close
- sal_Int32 nNumberOfNecessarySequences = 3;
+ std::size_t nNumberOfNecessarySequences = 3;
// open
StockChartTypeTemplate::StockVariant eVar( GetStockVariant());
if( ( eVar == StockChartTypeTemplate::StockVariant::Open ) ||
@@ -273,32 +273,30 @@ sal_Bool SAL_CALL StockDataInterpreter::isDataCompatible(
( eVar == StockChartTypeTemplate::StockVariant::VolumeOpen ));
// 1. correct number of sub-types
- if( aInterpretedData.Series.getLength() < (bHasVolume ? 2 : 1 ))
+ if( aInterpretedData.Series.size() < (bHasVolume ? 2U : 1U ))
return false;
// 2. a. volume -- use default check
if( bHasVolume )
{
if( ! DataInterpreter::isDataCompatible(
- InterpretedData( Sequence< Sequence< Reference< XDataSeries > > >(
- aInterpretedData.Series.getConstArray(), 1 ),
- aInterpretedData.Categories )))
+ { std::vector< std::vector< rtl::Reference< DataSeries > > >{
+ aInterpretedData.Series[0] },
+ aInterpretedData.Categories }))
return false;
}
// 2. b. candlestick
{
- OSL_ASSERT( aInterpretedData.Series.getLength() > (bHasVolume ? 1 : 0));
- const Sequence< Reference< XDataSeries > > aSeries( aInterpretedData.Series[(bHasVolume ? 1 : 0)] );
- if(!aSeries.hasElements())
+ OSL_ASSERT( aInterpretedData.Series.size() > (bHasVolume ? 1U : 0U));
+ const std::vector< rtl::Reference< DataSeries > > & aSeries = aInterpretedData.Series[(bHasVolume ? 1 : 0)];
+ if(aSeries.empty())
return false;
- for( Reference< XDataSeries > const & dataSeries : aSeries )
+ for( rtl::Reference< DataSeries > const & dataSeries : aSeries )
{
try
{
- Reference< data::XDataSource > xSrc( dataSeries, uno::UNO_QUERY_THROW );
- Sequence< Reference< data::XLabeledDataSequence > > aSeq( xSrc->getDataSequences());
- if( aSeq.getLength() != nNumberOfNecessarySequences )
+ if( dataSeries->getDataSequences2().size() != nNumberOfNecessarySequences )
return false;
}
catch( const uno::Exception & )
@@ -314,14 +312,14 @@ sal_Bool SAL_CALL StockDataInterpreter::isDataCompatible(
return true;
}
-InterpretedData SAL_CALL StockDataInterpreter::reinterpretDataSeries(
+InterpretedData StockDataInterpreter::reinterpretDataSeries(
const InterpretedData& aInterpretedData )
{
// prerequisite: StockDataInterpreter::isDataCompatible() returned true
return aInterpretedData;
}
-uno::Any SAL_CALL StockDataInterpreter::getChartTypeSpecificData(
+uno::Any StockDataInterpreter::getChartTypeSpecificData(
const OUString& sKey )
{
if( sKey == "stock variant" )
diff --git a/chart2/source/model/template/StockDataInterpreter.hxx b/chart2/source/model/template/StockDataInterpreter.hxx
index ba2d5ee79111..4617da5974a9 100644
--- a/chart2/source/model/template/StockDataInterpreter.hxx
+++ b/chart2/source/model/template/StockDataInterpreter.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include "DataInterpreter.hxx"
+#include <DataInterpreter.hxx>
#include "StockChartTypeTemplate.hxx"
@@ -34,15 +34,15 @@ public:
protected:
// ____ XDataInterpreter ____
- virtual css::chart2::InterpretedData SAL_CALL interpretDataSource(
+ virtual InterpretedData interpretDataSource(
const css::uno::Reference< css::chart2::data::XDataSource >& xSource,
const css::uno::Sequence< css::beans::PropertyValue >& aArguments,
- const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > >& aSeriesToReUse ) override;
- virtual sal_Bool SAL_CALL isDataCompatible(
- const css::chart2::InterpretedData& aInterpretedData ) override;
- virtual css::chart2::InterpretedData SAL_CALL reinterpretDataSeries(
- const css::chart2::InterpretedData& aInterpretedData ) override;
- virtual css::uno::Any SAL_CALL getChartTypeSpecificData(
+ const std::vector< rtl::Reference< ::chart::DataSeries > >& aSeriesToReUse ) override;
+ virtual bool isDataCompatible(
+ const InterpretedData& aInterpretedData ) override;
+ virtual InterpretedData reinterpretDataSeries(
+ const InterpretedData& aInterpretedData ) override;
+ virtual css::uno::Any getChartTypeSpecificData(
const OUString& sKey ) override;
private:
diff --git a/chart2/source/model/template/XYDataInterpreter.cxx b/chart2/source/model/template/XYDataInterpreter.cxx
index 1f0480a28c39..1fc053f14c24 100644
--- a/chart2/source/model/template/XYDataInterpreter.cxx
+++ b/chart2/source/model/template/XYDataInterpreter.cxx
@@ -17,18 +17,20 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <cstddef>
+
#include "XYDataInterpreter.hxx"
#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <CommonConverters.hxx>
-#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
-using namespace ::std;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -45,33 +47,33 @@ XYDataInterpreter::~XYDataInterpreter()
}
// ____ XDataInterpreter ____
-chart2::InterpretedData SAL_CALL XYDataInterpreter::interpretDataSource(
+InterpretedData XYDataInterpreter::interpretDataSource(
const Reference< chart2::data::XDataSource >& xSource,
const Sequence< beans::PropertyValue >& aArguments,
- const Sequence< Reference< XDataSeries > >& aSeriesToReUse )
+ const std::vector< rtl::Reference< DataSeries > >& aSeriesToReUse )
{
if( ! xSource.is())
return InterpretedData();
- const Sequence< Reference< data::XLabeledDataSequence > > aData( xSource->getDataSequences() );
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData = DataInterpreter::getDataSequences(xSource);
- Reference< data::XLabeledDataSequence > xValuesX;
- vector< Reference< data::XLabeledDataSequence > > aSequencesVec;
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesX;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSequencesVec;
- Reference< data::XLabeledDataSequence > xCategories;
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories;
bool bHasCategories = HasCategories( aArguments, aData );
bool bUseCategoriesAsX = UseCategoriesAsX( aArguments );
// parse data
bool bCategoriesUsed = false;
- bool bSetXValues = aData.getLength()>1;
- for( Reference< data::XLabeledDataSequence > const & labelData : aData )
+ bool bSetXValues = aData.size()>1;
+ for( uno::Reference< chart2::data::XLabeledDataSequence > const & labelData : aData )
{
try
{
if( bHasCategories && ! bCategoriesUsed )
{
- xCategories.set( labelData );
+ xCategories = labelData;
if( xCategories.is())
{
SetRole( xCategories->getValues(), "categories");
@@ -82,7 +84,7 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::interpretDataSource(
}
else if( !xValuesX.is() && bSetXValues )
{
- xValuesX.set( labelData );
+ xValuesX = labelData;
if( xValuesX.is())
SetRole( xValuesX->getValues(), "values-x");
}
@@ -100,16 +102,16 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::interpretDataSource(
}
// create DataSeries
- vector< Reference< XDataSeries > > aSeriesVec;
+ std::vector< rtl::Reference< DataSeries > > aSeriesVec;
aSeriesVec.reserve( aSequencesVec.size());
Reference< data::XLabeledDataSequence > xClonedXValues = xValuesX;
Reference< util::XCloneable > xCloneable( xValuesX, uno::UNO_QUERY );
- sal_Int32 nSeriesIndex = 0;
+ std::size_t nSeriesIndex = 0;
for (auto const& elem : aSequencesVec)
{
- vector< Reference< data::XLabeledDataSequence > > aNewData;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aNewData;
if( nSeriesIndex && xCloneable.is() )
xClonedXValues.set( xCloneable->createClone(), uno::UNO_QUERY );
@@ -118,50 +120,47 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::interpretDataSource(
aNewData.push_back(elem);
- Reference< XDataSeries > xSeries;
- if( nSeriesIndex < aSeriesToReUse.getLength())
- xSeries.set( aSeriesToReUse[nSeriesIndex] );
+ rtl::Reference< DataSeries > xSeries;
+ if( nSeriesIndex < aSeriesToReUse.size())
+ xSeries = aSeriesToReUse[nSeriesIndex];
else
- xSeries.set( new DataSeries );
- OSL_ASSERT( xSeries.is() );
- Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY );
- OSL_ASSERT( xSink.is() );
- xSink->setData( comphelper::containerToSequence( aNewData ) );
+ xSeries = new DataSeries;
+ assert( xSeries.is() );
+ xSeries->setData( aNewData );
aSeriesVec.push_back( xSeries );
++nSeriesIndex;
}
- return InterpretedData( { comphelper::containerToSequence( aSeriesVec ) }, xCategories );
+ return { { aSeriesVec }, xCategories };
}
-chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries(
- const chart2::InterpretedData& aInterpretedData )
+InterpretedData XYDataInterpreter::reinterpretDataSeries(
+ const InterpretedData& aInterpretedData )
{
InterpretedData aResult( aInterpretedData );
sal_Int32 i=0;
- Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
- const sal_Int32 nCount = aSeries.getLength();
+ std::vector< rtl::Reference< DataSeries > > aSeries = FlattenSequence( aInterpretedData.Series );
+ const sal_Int32 nCount = aSeries.size();
for( ; i<nCount; ++i )
{
try
{
- Reference< data::XDataSource > xSeriesSource( aSeries[i], uno::UNO_QUERY_THROW );
- Sequence< Reference< data::XLabeledDataSequence > > aNewSequences;
+ std::vector< uno::Reference< data::XLabeledDataSequence > > aNewSequences;
// values-y
- Reference< data::XLabeledDataSequence > xValuesY(
- DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-y" ));
- Reference< data::XLabeledDataSequence > xValuesX(
- DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-x" ));
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesY(
+ DataSeriesHelper::getDataSequenceByRole( aSeries[i], "values-y" ));
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesX(
+ DataSeriesHelper::getDataSequenceByRole( aSeries[i], "values-x" ));
// re-use values-... as values-x/values-y
if( ! xValuesX.is() ||
! xValuesY.is())
{
- vector< Reference< data::XLabeledDataSequence > > aValueSeqVec(
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aValueSeqVec(
DataSeriesHelper::getAllDataSequencesByRole(
- xSeriesSource->getDataSequences(), "values" ));
+ aSeries[i]->getDataSequences2(), "values" ));
if( xValuesX.is())
aValueSeqVec.erase( find( aValueSeqVec.begin(), aValueSeqVec.end(), xValuesX ));
if( xValuesY.is())
@@ -171,7 +170,7 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries(
if( ! xValuesY.is() &&
aValueSeqVec.size() > nIndex )
{
- xValuesY.set( aValueSeqVec[nIndex++] );
+ xValuesY = aValueSeqVec[nIndex++];
if( xValuesY.is())
SetRole( xValuesY->getValues(), "values-y");
}
@@ -179,7 +178,7 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries(
if( ! xValuesX.is() &&
aValueSeqVec.size() > nIndex )
{
- xValuesX.set( aValueSeqVec[nIndex++] );
+ xValuesX = aValueSeqVec[nIndex++];
if( xValuesX.is())
SetRole( xValuesY->getValues(), "values-x");
}
@@ -196,8 +195,8 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries(
}
}
- const Sequence< Reference< data::XLabeledDataSequence > > aSeqs( xSeriesSource->getDataSequences());
- if( aSeqs.getLength() != aNewSequences.getLength() )
+ const std::vector< uno::Reference< data::XLabeledDataSequence > > & aSeqs = aSeries[i]->getDataSequences2();
+ if( aSeqs.size() != aNewSequences.size() )
{
#ifdef DBG_UTIL
for( auto const & j : aSeqs )
@@ -205,8 +204,7 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries(
SAL_WARN_IF((j == xValuesY || j == xValuesX), "chart2.template", "All sequences should be used" );
}
#endif
- Reference< data::XDataSink > xSink( xSeriesSource, uno::UNO_QUERY_THROW );
- xSink->setData( aNewSequences );
+ aSeries[i]->setData( aNewSequences );
}
}
catch( const uno::Exception & )
@@ -219,17 +217,15 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries(
}
// criterion: all series must have exactly two data::XLabeledDataSequences
-sal_Bool SAL_CALL XYDataInterpreter::isDataCompatible(
- const chart2::InterpretedData& aInterpretedData )
+bool XYDataInterpreter::isDataCompatible(
+ const InterpretedData& aInterpretedData )
{
- const Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
- for( Reference< XDataSeries > const & dataSeries : aSeries )
+ const std::vector< rtl::Reference< DataSeries > > aSeries = FlattenSequence( aInterpretedData.Series );
+ for( rtl::Reference< DataSeries > const & dataSeries : aSeries )
{
try
{
- Reference< data::XDataSource > xSrc( dataSeries, uno::UNO_QUERY_THROW );
- Sequence< Reference< data::XLabeledDataSequence > > aSeq( xSrc->getDataSequences());
- if( aSeq.getLength() != 2 )
+ if( dataSeries->getDataSequences2().size() != 2 )
return false;
}
catch( const uno::Exception & )
diff --git a/chart2/source/model/template/XYDataInterpreter.hxx b/chart2/source/model/template/XYDataInterpreter.hxx
index 24f640c143f6..56343013da08 100644
--- a/chart2/source/model/template/XYDataInterpreter.hxx
+++ b/chart2/source/model/template/XYDataInterpreter.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include "DataInterpreter.hxx"
+#include <DataInterpreter.hxx>
namespace chart
{
@@ -30,15 +30,15 @@ public:
virtual ~XYDataInterpreter() override;
protected:
- // ____ XDataInterpreter ____
- virtual css::chart2::InterpretedData SAL_CALL interpretDataSource(
+ // ____ DataInterpreter ____
+ virtual InterpretedData interpretDataSource(
const css::uno::Reference< css::chart2::data::XDataSource >& xSource,
const css::uno::Sequence< css::beans::PropertyValue >& aArguments,
- const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > >& aSeriesToReUse ) override;
- virtual css::chart2::InterpretedData SAL_CALL reinterpretDataSeries(
- const css::chart2::InterpretedData& aInterpretedData ) override;
- virtual sal_Bool SAL_CALL isDataCompatible(
- const css::chart2::InterpretedData& aInterpretedData ) override;
+ const std::vector< rtl::Reference< ::chart::DataSeries > >& aSeriesToReUse ) override;
+ virtual InterpretedData reinterpretDataSeries(
+ const InterpretedData& aInterpretedData ) override;
+ virtual bool isDataCompatible(
+ const InterpretedData& aInterpretedData ) override;
};
} // namespace chart
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index d936cf59c92b..b48fd313a91c 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -21,9 +21,13 @@
#include <DiagramHelper.hxx>
#include <Diagram.hxx>
#include <ChartTypeHelper.hxx>
+#include <ChartType.hxx>
+#include <Axis.hxx>
#include <AxisIndexDefines.hxx>
+#include <DataSource.hxx>
#include <LinePropertiesHelper.hxx>
#include <servicenames_coosystems.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <Scaling.hxx>
#include <ChartModel.hxx>
@@ -33,23 +37,21 @@
#include <ExplicitCategoriesProvider.hxx>
#include <unonames.hxx>
#include <BaseCoordinateSystem.hxx>
+#include <GridProperties.hxx>
+#include <o3tl/safeint.hxx>
#include <unotools/saveopt.hxx>
#include <com/sun/star/chart/ChartAxisPosition.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
-#include <com/sun/star/chart2/data/XDataSource.hpp>
#include <sal/log.hxx>
#include <com/sun/star/lang/XServiceName.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <comphelper/sequence.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <cstddef>
#include <map>
namespace chart
@@ -75,15 +77,13 @@ ScaleData AxisHelper::createDefaultScale()
aScaleData.AxisType = chart2::AxisType::REALNUMBER;
aScaleData.AutoDateAxis = true;
aScaleData.ShiftedCategoryPosition = false;
- Sequence< SubIncrement > aSubIncrements{ SubIncrement() };
- aScaleData.IncrementData.SubIncrements = aSubIncrements;
+ aScaleData.IncrementData.SubIncrements = { SubIncrement() };
return aScaleData;
}
void AxisHelper::removeExplicitScaling( ScaleData& rScaleData )
{
- uno::Any aEmpty;
- rScaleData.Minimum = rScaleData.Maximum = rScaleData.Origin = aEmpty;
+ rScaleData.Minimum = rScaleData.Maximum = rScaleData.Origin = uno::Any();
rScaleData.Scaling = nullptr;
ScaleData aDefaultScale( createDefaultScale() );
rScaleData.IncrementData = aDefaultScale.IncrementData;
@@ -97,10 +97,10 @@ bool AxisHelper::isLogarithmic( const Reference< XScaling >& xScaling )
&& xServiceName->getServiceName() == "com.sun.star.chart2.LogarithmicScaling";
}
-chart2::ScaleData AxisHelper::getDateCheckedScale( const Reference< chart2::XAxis >& xAxis, ChartModel& rModel )
+chart2::ScaleData AxisHelper::getDateCheckedScale( const rtl::Reference< Axis >& xAxis, ChartModel& rModel )
{
ScaleData aScale = xAxis->getScaleData();
- Reference< chart2::XCoordinateSystem > xCooSys( ChartModelHelper::getFirstCoordinateSystem( rModel ) );
+ rtl::Reference< BaseCoordinateSystem > xCooSys( ChartModelHelper::getFirstCoordinateSystem( &rModel ) );
if( aScale.AutoDateAxis && aScale.AxisType == AxisType::CATEGORY )
{
sal_Int32 nDimensionIndex=0; sal_Int32 nAxisIndex=0;
@@ -133,41 +133,33 @@ void AxisHelper::checkDateAxis( chart2::ScaleData& rScale, ExplicitCategoriesPro
}
sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis(
- const Reference< chart2::XAxis >& xAxis
- , const Reference< chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
- , const Reference<chart2::XChartDocument>& xChartDoc
+ const rtl::Reference< Axis >& xAxis
+ , const rtl::Reference< BaseCoordinateSystem > & xCorrespondingCoordinateSystem
+ , const rtl::Reference<ChartModel>& xChartDoc
, bool bSearchForParallelAxisIfNothingIsFound )
{
sal_Int32 nNumberFormatKey(0);
sal_Int32 nAxisIndex = 0;
sal_Int32 nDimensionIndex = 1;
AxisHelper::getIndicesForAxis( xAxis, xCorrespondingCoordinateSystem, nDimensionIndex, nAxisIndex );
- Reference<util::XNumberFormatsSupplier> const xNumberFormatsSupplier(xChartDoc, uno::UNO_QUERY);
- Reference< beans::XPropertySet > xProp( xAxis, uno::UNO_QUERY );
- if (!xProp.is())
+ if (!xAxis.is())
return 0;
bool bLinkToSource = true;
- xProp->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkToSource;
- xProp->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormatKey;
+ xAxis->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkToSource;
+ xAxis->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormatKey;
if (bLinkToSource)
{
bool bFormatSet = false;
//check whether we have a percent scale -> use percent format
- ChartModel* pModel = nullptr;
- if( xNumberFormatsSupplier.is() )
+ if (xChartDoc)
{
- pModel = dynamic_cast<ChartModel*>( xChartDoc.get() );
- assert(pModel);
- }
- if (pModel)
- {
- ScaleData aData = AxisHelper::getDateCheckedScale( xAxis, *pModel );
+ ScaleData aData = AxisHelper::getDateCheckedScale( xAxis, *xChartDoc );
if( aData.AxisType==AxisType::PERCENT )
{
- sal_Int32 nPercentFormat = DiagramHelper::getPercentNumberFormat( xNumberFormatsSupplier );
+ sal_Int32 nPercentFormat = DiagramHelper::getPercentNumberFormat( xChartDoc );
if( nPercentFormat != -1 )
{
nNumberFormatKey = nPercentFormat;
@@ -182,27 +174,27 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis(
if( xSeq.is() && !( xChartDoc.is() && xChartDoc->hasInternalDataProvider()) )
nNumberFormatKey = xSeq->getNumberFormatKeyByIndex( -1 );
else
- nNumberFormatKey = DiagramHelper::getDateNumberFormat( xNumberFormatsSupplier );
+ nNumberFormatKey = DiagramHelper::getDateNumberFormat( xChartDoc );
bFormatSet = true;
}
}
else if( xChartDoc.is() && xChartDoc->hasInternalDataProvider() && nDimensionIndex == 0 ) //maybe date axis
{
- Reference< chart2::XDiagram > xDiagram( xChartDoc->getFirstDiagram() );
- if( DiagramHelper::isSupportingDateAxis( xDiagram ) )
+ rtl::Reference< Diagram > xDiagram( xChartDoc->getFirstChartDiagram() );
+ if( xDiagram->isSupportingDateAxis() )
{
- nNumberFormatKey = DiagramHelper::getDateNumberFormat( xNumberFormatsSupplier );
+ nNumberFormatKey = DiagramHelper::getDateNumberFormat( xChartDoc );
}
else
{
- Reference< data::XDataSource > xSource( DataSourceHelper::getUsedData( xChartDoc ) );
+ rtl::Reference< DataSource > xSource = DataSourceHelper::getUsedData( *xChartDoc );
if( xSource.is() )
{
- std::vector< Reference< chart2::data::XLabeledDataSequence > > aXValues(
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aXValues(
DataSeriesHelper::getAllDataSequencesByRole( xSource->getDataSequences(), "values-x" ) );
if( aXValues.empty() )
{
- Reference< data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) );
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories( xDiagram->getCategories() );
if( xCategories.is() )
{
Reference< data::XDataSequence > xSeq( xCategories->getValues());
@@ -221,7 +213,7 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis(
}
}
if( bHasValidDoubles )
- nNumberFormatKey = DiagramHelper::getDateNumberFormat( xNumberFormatsSupplier );
+ nNumberFormatKey = DiagramHelper::getDateNumberFormat( xChartDoc );
}
}
}
@@ -238,21 +230,16 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis(
try
{
- Reference< XChartTypeContainer > xCTCnt( xCorrespondingCoordinateSystem, uno::UNO_QUERY_THROW );
OUString aRoleToMatch;
if( nDimensionIndex == 0 )
aRoleToMatch = "values-x";
- const Sequence< Reference< XChartType > > aChartTypes( xCTCnt->getChartTypes());
- for( Reference< XChartType > const & chartType : aChartTypes )
+ const std::vector< rtl::Reference< ChartType > > & aChartTypes( xCorrespondingCoordinateSystem->getChartTypes2());
+ for( rtl::Reference< ChartType > const & chartType : aChartTypes )
{
if( nDimensionIndex != 0 )
aRoleToMatch = ChartTypeHelper::getRoleOfSequenceForYAxisNumberFormatDetection( chartType );
- Reference< XDataSeriesContainer > xDSCnt( chartType, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XDataSeries > > aDataSeriesSeq( xDSCnt->getDataSeries());
- for( Reference< chart2::XDataSeries > const & xDataSeries : aDataSeriesSeq )
+ for( rtl::Reference< DataSeries > const & xDataSeries : chartType->getDataSeries2() )
{
- Reference< data::XDataSource > xSource( xDataSeries, uno::UNO_QUERY_THROW );
-
if( nDimensionIndex == 1 )
{
//only take those series into account that are attached to this axis
@@ -262,7 +249,7 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis(
}
Reference< data::XLabeledDataSequence > xLabeledSeq(
- DataSeriesHelper::getDataSequenceByRole( xSource, aRoleToMatch ) );
+ DataSeriesHelper::getDataSequenceByRole( xDataSeries, aRoleToMatch ) );
if( !xLabeledSeq.is() && nDimensionIndex==0 )
{
@@ -315,7 +302,7 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis(
if( !bNumberFormatKeyFoundViaAttachedData && nDimensionIndex == 1 )
{
sal_Int32 nParallelAxisIndex = (nAxisIndex==1) ?0 :1;
- Reference< XAxis > xParallelAxis( AxisHelper::getAxis( 1, nParallelAxisIndex, xCorrespondingCoordinateSystem ) );
+ rtl::Reference< Axis > xParallelAxis = AxisHelper::getAxis( 1, nParallelAxisIndex, xCorrespondingCoordinateSystem );
nNumberFormatKey = AxisHelper::getExplicitNumberFormatKeyForAxis(xParallelAxis, xCorrespondingCoordinateSystem, xChartDoc, false);
}
}
@@ -325,10 +312,10 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis(
return nNumberFormatKey;
}
-Reference< XAxis > AxisHelper::createAxis(
+rtl::Reference< Axis > AxisHelper::createAxis(
sal_Int32 nDimensionIndex
, sal_Int32 nAxisIndex // 0==main or 1==secondary axis
- , const Reference< XCoordinateSystem >& xCooSys
+ , const rtl::Reference< BaseCoordinateSystem >& xCooSys
, const Reference< uno::XComponentContext > & xContext
, ReferenceSizeProvider * pRefSizeProvider )
{
@@ -337,65 +324,53 @@ Reference< XAxis > AxisHelper::createAxis(
if( nDimensionIndex >= xCooSys->getDimension() )
return nullptr;
- Reference< XAxis > xAxis( xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.chart2.Axis", xContext ), uno::UNO_QUERY );
+ rtl::Reference< Axis > xAxis = new Axis();
- OSL_ASSERT( xAxis.is());
- if( xAxis.is())
+ xCooSys->setAxisByDimension( nDimensionIndex, xAxis, nAxisIndex );
+
+ if( nAxisIndex>0 )//when inserting secondary axes copy some things from the main axis
{
- xCooSys->setAxisByDimension( nDimensionIndex, xAxis, nAxisIndex );
+ css::chart::ChartAxisPosition eNewAxisPos( css::chart::ChartAxisPosition_END );
- if( nAxisIndex>0 )//when inserting secondary axes copy some things from the main axis
+ rtl::Reference< Axis > xMainAxis = xCooSys->getAxisByDimension2( nDimensionIndex, 0 );
+ if( xMainAxis.is() )
{
- css::chart::ChartAxisPosition eNewAxisPos( css::chart::ChartAxisPosition_END );
-
- Reference< XAxis > xMainAxis( xCooSys->getAxisByDimension( nDimensionIndex, 0 ) );
- if( xMainAxis.is() )
- {
- ScaleData aScale = xAxis->getScaleData();
- ScaleData aMainScale = xMainAxis->getScaleData();
-
- aScale.AxisType = aMainScale.AxisType;
- aScale.AutoDateAxis = aMainScale.AutoDateAxis;
- aScale.Categories = aMainScale.Categories;
- aScale.Orientation = aMainScale.Orientation;
- aScale.ShiftedCategoryPosition = aMainScale.ShiftedCategoryPosition;
-
- xAxis->setScaleData( aScale );
-
- //ensure that the second axis is not placed on the main axis
- Reference< beans::XPropertySet > xMainProp( xMainAxis, uno::UNO_QUERY );
- if( xMainProp.is() )
- {
- css::chart::ChartAxisPosition eMainAxisPos( css::chart::ChartAxisPosition_ZERO );
- xMainProp->getPropertyValue("CrossoverPosition") >>= eMainAxisPos;
- if( eMainAxisPos == css::chart::ChartAxisPosition_END )
- eNewAxisPos = css::chart::ChartAxisPosition_START;
- }
- }
-
- Reference< beans::XPropertySet > xProp( xAxis, uno::UNO_QUERY );
- if( xProp.is() )
- xProp->setPropertyValue("CrossoverPosition", uno::Any(eNewAxisPos) );
+ ScaleData aScale = xAxis->getScaleData();
+ ScaleData aMainScale = xMainAxis->getScaleData();
+
+ aScale.AxisType = aMainScale.AxisType;
+ aScale.AutoDateAxis = aMainScale.AutoDateAxis;
+ aScale.Categories = aMainScale.Categories;
+ aScale.Orientation = aMainScale.Orientation;
+ aScale.ShiftedCategoryPosition = aMainScale.ShiftedCategoryPosition;
+
+ xAxis->setScaleData( aScale );
+
+ //ensure that the second axis is not placed on the main axis
+ css::chart::ChartAxisPosition eMainAxisPos( css::chart::ChartAxisPosition_ZERO );
+ xMainAxis->getPropertyValue("CrossoverPosition") >>= eMainAxisPos;
+ if( eMainAxisPos == css::chart::ChartAxisPosition_END )
+ eNewAxisPos = css::chart::ChartAxisPosition_START;
}
- Reference< beans::XPropertySet > xProp( xAxis, uno::UNO_QUERY );
- if( xProp.is() ) try
- {
- // set correct initial AutoScale
- if( pRefSizeProvider )
- pRefSizeProvider->setValuesAtPropertySet( xProp );
- }
- catch( const uno::Exception& )
- {
- TOOLS_WARN_EXCEPTION("chart2", "" );
- }
+ xAxis->setPropertyValue("CrossoverPosition", uno::Any(eNewAxisPos) );
+ }
+
+ try
+ {
+ // set correct initial AutoScale
+ if( pRefSizeProvider )
+ pRefSizeProvider->setValuesAtPropertySet( xAxis );
+ }
+ catch( const uno::Exception& )
+ {
+ TOOLS_WARN_EXCEPTION("chart2", "" );
}
return xAxis;
}
-Reference< XAxis > AxisHelper::createAxis( sal_Int32 nDimensionIndex, bool bMainAxis
- , const Reference< chart2::XDiagram >& xDiagram
+rtl::Reference< Axis > AxisHelper::createAxis( sal_Int32 nDimensionIndex, bool bMainAxis
+ , const rtl::Reference< Diagram >& xDiagram
, const Reference< uno::XComponentContext >& xContext
, ReferenceSizeProvider * pRefSizeProvider )
{
@@ -404,7 +379,7 @@ Reference< XAxis > AxisHelper::createAxis( sal_Int32 nDimensionIndex, bool bMain
return nullptr;
sal_Int32 nAxisIndex = bMainAxis ? MAIN_AXIS_INDEX : SECONDARY_AXIS_INDEX;
- Reference< XCoordinateSystem > xCooSys = AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 );
+ rtl::Reference< BaseCoordinateSystem > xCooSys = AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 );
// create axis
return AxisHelper::createAxis(
@@ -412,7 +387,7 @@ Reference< XAxis > AxisHelper::createAxis( sal_Int32 nDimensionIndex, bool bMain
}
void AxisHelper::showAxis( sal_Int32 nDimensionIndex, bool bMainAxis
- , const Reference< chart2::XDiagram >& xDiagram
+ , const rtl::Reference< Diagram >& xDiagram
, const Reference< uno::XComponentContext >& xContext
, ReferenceSizeProvider * pRefSizeProvider )
{
@@ -420,12 +395,12 @@ void AxisHelper::showAxis( sal_Int32 nDimensionIndex, bool bMainAxis
return;
bool bNewAxisCreated = false;
- Reference< XAxis > xAxis( AxisHelper::getAxis( nDimensionIndex, bMainAxis, xDiagram ) );
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( nDimensionIndex, bMainAxis, xDiagram );
if( !xAxis.is() && xContext.is() )
{
// create axis
bNewAxisCreated = true;
- xAxis.set( AxisHelper::createAxis( nDimensionIndex, bMainAxis, xDiagram, xContext, pRefSizeProvider ) );
+ xAxis = AxisHelper::createAxis( nDimensionIndex, bMainAxis, xDiagram, xContext, pRefSizeProvider );
}
OSL_ASSERT( xAxis.is());
@@ -434,16 +409,16 @@ void AxisHelper::showAxis( sal_Int32 nDimensionIndex, bool bMainAxis
}
void AxisHelper::showGrid( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid
- , const Reference< XDiagram >& xDiagram )
+ , const rtl::Reference< Diagram >& xDiagram )
{
if( !xDiagram.is() )
return;
- Reference< XCoordinateSystem > xCooSys = AxisHelper::getCoordinateSystemByIndex( xDiagram, nCooSysIndex );
+ rtl::Reference< BaseCoordinateSystem > xCooSys = AxisHelper::getCoordinateSystemByIndex( xDiagram, nCooSysIndex );
if(!xCooSys.is())
return;
- Reference< XAxis > xAxis( AxisHelper::getAxis( nDimensionIndex, MAIN_AXIS_INDEX, xCooSys ) );
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( nDimensionIndex, MAIN_AXIS_INDEX, xCooSys );
if(!xAxis.is())
{
//hhhh todo create axis without axis visibility
@@ -452,27 +427,26 @@ void AxisHelper::showGrid( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bo
return;
if( bMainGrid )
- AxisHelper::makeGridVisible( xAxis->getGridProperties() );
+ AxisHelper::makeGridVisible( xAxis->getGridProperties2() );
else
{
- const Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );
+ std::vector< rtl::Reference< GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
for( auto const & i : aSubGrids )
AxisHelper::makeGridVisible( i );
}
}
-void AxisHelper::makeAxisVisible( const Reference< XAxis >& xAxis )
+void AxisHelper::makeAxisVisible( const rtl::Reference< Axis >& xAxis )
{
- Reference< beans::XPropertySet > xProps( xAxis, uno::UNO_QUERY );
- if( xProps.is() )
+ if( xAxis.is() )
{
- xProps->setPropertyValue( "Show", uno::Any( true ) );
- LinePropertiesHelper::SetLineVisible( xProps );
- xProps->setPropertyValue( "DisplayLabels", uno::Any( true ) );
+ xAxis->setPropertyValue( "Show", uno::Any( true ) );
+ LinePropertiesHelper::SetLineVisible( xAxis );
+ xAxis->setPropertyValue( "DisplayLabels", uno::Any( true ) );
}
}
-void AxisHelper::makeGridVisible( const Reference< beans::XPropertySet >& xGridProperties )
+void AxisHelper::makeGridVisible( const rtl::Reference< GridProperties >& xGridProperties )
{
if( xGridProperties.is() )
{
@@ -482,28 +456,27 @@ void AxisHelper::makeGridVisible( const Reference< beans::XPropertySet >& xGridP
}
void AxisHelper::hideAxis( sal_Int32 nDimensionIndex, bool bMainAxis
- , const Reference< XDiagram >& xDiagram )
+ , const rtl::Reference< Diagram >& xDiagram )
{
AxisHelper::makeAxisInvisible( AxisHelper::getAxis( nDimensionIndex, bMainAxis, xDiagram ) );
}
-void AxisHelper::makeAxisInvisible( const Reference< XAxis >& xAxis )
+void AxisHelper::makeAxisInvisible( const rtl::Reference< Axis >& xAxis )
{
- Reference< beans::XPropertySet > xProps( xAxis, uno::UNO_QUERY );
- if( xProps.is() )
+ if( xAxis.is() )
{
- xProps->setPropertyValue( "Show", uno::Any( false ) );
+ xAxis->setPropertyValue( "Show", uno::Any( false ) );
}
}
-void AxisHelper::hideAxisIfNoDataIsAttached( const Reference< XAxis >& xAxis, const Reference< XDiagram >& xDiagram )
+void AxisHelper::hideAxisIfNoDataIsAttached( const rtl::Reference< Axis >& xAxis, const rtl::Reference< Diagram >& xDiagram )
{
//axis is hidden if no data is attached anymore but data is available
bool bOtherSeriesAttachedToThisAxis = false;
- std::vector< Reference< chart2::XDataSeries > > aSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector = xDiagram->getDataSeries();
for (auto const& series : aSeriesVector)
{
- uno::Reference< chart2::XAxis > xCurrentAxis = DiagramHelper::getAttachedAxis(series, xDiagram );
+ rtl::Reference< Axis > xCurrentAxis = xDiagram->getAttachedAxis(series);
if( xCurrentAxis==xAxis )
{
bOtherSeriesAttachedToThisAxis = true;
@@ -515,30 +488,30 @@ void AxisHelper::hideAxisIfNoDataIsAttached( const Reference< XAxis >& xAxis, co
}
void AxisHelper::hideGrid( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid
- , const Reference< XDiagram >& xDiagram )
+ , const rtl::Reference< Diagram >& xDiagram )
{
if( !xDiagram.is() )
return;
- Reference< XCoordinateSystem > xCooSys = AxisHelper::getCoordinateSystemByIndex( xDiagram, nCooSysIndex );
+ rtl::Reference< BaseCoordinateSystem > xCooSys = AxisHelper::getCoordinateSystemByIndex( xDiagram, nCooSysIndex );
if(!xCooSys.is())
return;
- Reference< XAxis > xAxis( AxisHelper::getAxis( nDimensionIndex, MAIN_AXIS_INDEX, xCooSys ) );
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( nDimensionIndex, MAIN_AXIS_INDEX, xCooSys );
if(!xAxis.is())
return;
if( bMainGrid )
- AxisHelper::makeGridInvisible( xAxis->getGridProperties() );
+ AxisHelper::makeGridInvisible( xAxis->getGridProperties2() );
else
{
- const Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );
+ std::vector< rtl::Reference< ::chart::GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
for( auto const & i : aSubGrids)
AxisHelper::makeGridInvisible( i );
}
}
-void AxisHelper::makeGridInvisible( const Reference< beans::XPropertySet >& xGridProperties )
+void AxisHelper::makeGridInvisible( const rtl::Reference< ::chart::GridProperties >& xGridProperties )
{
if( xGridProperties.is() )
{
@@ -547,24 +520,24 @@ void AxisHelper::makeGridInvisible( const Reference< beans::XPropertySet >& xGri
}
bool AxisHelper::isGridShown( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid
- , const Reference< css::chart2::XDiagram >& xDiagram )
+ , const rtl::Reference< Diagram >& xDiagram )
{
bool bRet = false;
- Reference< XCoordinateSystem > xCooSys = AxisHelper::getCoordinateSystemByIndex( xDiagram, nCooSysIndex );
+ rtl::Reference< BaseCoordinateSystem > xCooSys = AxisHelper::getCoordinateSystemByIndex( xDiagram, nCooSysIndex );
if(!xCooSys.is())
return bRet;
- Reference< XAxis > xAxis( AxisHelper::getAxis( nDimensionIndex, MAIN_AXIS_INDEX, xCooSys ) );
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( nDimensionIndex, MAIN_AXIS_INDEX, xCooSys );
if(!xAxis.is())
return bRet;
if( bMainGrid )
- bRet = AxisHelper::isGridVisible( xAxis->getGridProperties() );
+ bRet = AxisHelper::isGridVisible( xAxis->getGridProperties2() );
else
{
- Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );
- if( aSubGrids.hasElements() )
+ std::vector< rtl::Reference< ::chart::GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
+ if( !aSubGrids.empty() )
bRet = AxisHelper::isGridVisible( aSubGrids[0] );
}
@@ -572,26 +545,24 @@ bool AxisHelper::isGridShown( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex,
}
rtl::Reference< ::chart::BaseCoordinateSystem > AxisHelper::getCoordinateSystemByIndex(
- const Reference< XDiagram >& xDiagram, sal_Int32 nIndex )
+ const rtl::Reference< Diagram >& xDiagram, sal_Int32 nIndex )
{
if(!xDiagram.is())
return nullptr;
- ::chart::Diagram* pDiagram = dynamic_cast<::chart::Diagram*>(xDiagram.get());
- assert(pDiagram);
- auto & rCooSysList = pDiagram->getBaseCoordinateSystems();
- if(0<=nIndex && nIndex < static_cast<sal_Int32>(rCooSysList.size()))
- return rCooSysList[nIndex];
+ auto aCooSysList = xDiagram->getBaseCoordinateSystems();
+ if(0<=nIndex && o3tl::make_unsigned(nIndex) < aCooSysList.size())
+ return aCooSysList[nIndex];
return nullptr;
}
-Reference< XAxis > AxisHelper::getAxis( sal_Int32 nDimensionIndex, bool bMainAxis
- , const Reference< XDiagram >& xDiagram )
+rtl::Reference< Axis > AxisHelper::getAxis( sal_Int32 nDimensionIndex, bool bMainAxis
+ , const rtl::Reference< Diagram >& xDiagram )
{
- Reference< XAxis > xRet;
+ rtl::Reference< Axis > xRet;
try
{
- Reference< XCoordinateSystem > xCooSys = AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 );
- xRet.set( AxisHelper::getAxis( nDimensionIndex, bMainAxis ? 0 : 1, xCooSys ) );
+ rtl::Reference< BaseCoordinateSystem > xCooSys = AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 );
+ xRet = AxisHelper::getAxis( nDimensionIndex, bMainAxis ? 0 : 1, xCooSys );
}
catch( const uno::Exception & )
{
@@ -599,10 +570,10 @@ Reference< XAxis > AxisHelper::getAxis( sal_Int32 nDimensionIndex, bool bMainAxi
return xRet;
}
-Reference< XAxis > AxisHelper::getAxis( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex
- , const Reference< XCoordinateSystem >& xCooSys )
+rtl::Reference< Axis > AxisHelper::getAxis( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex
+ , const rtl::Reference< BaseCoordinateSystem >& xCooSys )
{
- Reference< XAxis > xRet;
+ rtl::Reference< Axis > xRet;
if(!xCooSys.is())
return xRet;
@@ -614,12 +585,12 @@ Reference< XAxis > AxisHelper::getAxis( sal_Int32 nDimensionIndex, sal_Int32 nAx
assert(nAxisIndex >= 0);
assert(nDimensionIndex >= 0);
- xRet.set( xCooSys->getAxisByDimension( nDimensionIndex, nAxisIndex ) );
+ xRet = xCooSys->getAxisByDimension2( nDimensionIndex, nAxisIndex );
return xRet;
}
-Reference< XAxis > AxisHelper::getCrossingMainAxis( const Reference< XAxis >& xAxis
- , const Reference< XCoordinateSystem >& xCooSys )
+rtl::Reference< Axis > AxisHelper::getCrossingMainAxis( const rtl::Reference< Axis >& xAxis
+ , const rtl::Reference< BaseCoordinateSystem >& xCooSys )
{
sal_Int32 nDimensionIndex = 0;
sal_Int32 nAxisIndex = 0;
@@ -628,8 +599,7 @@ Reference< XAxis > AxisHelper::getCrossingMainAxis( const Reference< XAxis >& xA
{
nDimensionIndex=1;
bool bSwapXY = false;
- Reference< beans::XPropertySet > xCooSysProp( xCooSys, uno::UNO_QUERY );
- if( xCooSysProp.is() && (xCooSysProp->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXY) && bSwapXY )
+ if( (xCooSys->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXY) && bSwapXY )
nDimensionIndex=0;
}
else if( nDimensionIndex==1 )
@@ -639,8 +609,8 @@ Reference< XAxis > AxisHelper::getCrossingMainAxis( const Reference< XAxis >& xA
return AxisHelper::getAxis( nDimensionIndex, 0, xCooSys );
}
-Reference< XAxis > AxisHelper::getParallelAxis( const Reference< XAxis >& xAxis
- , const Reference< XDiagram >& xDiagram )
+rtl::Reference< Axis > AxisHelper::getParallelAxis( const rtl::Reference< Axis >& xAxis
+ , const rtl::Reference< Diagram >& xDiagram )
{
try
{
@@ -660,37 +630,36 @@ Reference< XAxis > AxisHelper::getParallelAxis( const Reference< XAxis >& xAxis
}
bool AxisHelper::isAxisShown( sal_Int32 nDimensionIndex, bool bMainAxis
- , const Reference< XDiagram >& xDiagram )
+ , const rtl::Reference< Diagram >& xDiagram )
{
return AxisHelper::isAxisVisible( AxisHelper::getAxis( nDimensionIndex, bMainAxis, xDiagram ) );
}
-bool AxisHelper::isAxisVisible( const Reference< XAxis >& xAxis )
+bool AxisHelper::isAxisVisible( const rtl::Reference< Axis >& xAxis )
{
bool bRet = false;
- Reference< beans::XPropertySet > xProps( xAxis, uno::UNO_QUERY );
- if( xProps.is() )
+ if( xAxis.is() )
{
- xProps->getPropertyValue( "Show" ) >>= bRet;
- bRet = bRet && ( LinePropertiesHelper::IsLineVisible( xProps )
- || areAxisLabelsVisible( xProps ) );
+ xAxis->getPropertyValue( "Show" ) >>= bRet;
+ bRet = bRet && ( LinePropertiesHelper::IsLineVisible( xAxis )
+ || areAxisLabelsVisible( xAxis ) );
}
return bRet;
}
-bool AxisHelper::areAxisLabelsVisible( const Reference< beans::XPropertySet >& xAxisProperties )
+bool AxisHelper::areAxisLabelsVisible( const rtl::Reference< Axis >& xAxis )
{
bool bRet = false;
- if( xAxisProperties.is() )
+ if( xAxis.is() )
{
- xAxisProperties->getPropertyValue( "DisplayLabels" ) >>= bRet;
+ xAxis->getPropertyValue( "DisplayLabels" ) >>= bRet;
}
return bRet;
}
-bool AxisHelper::isGridVisible( const Reference< beans::XPropertySet >& xGridproperties )
+bool AxisHelper::isGridVisible( const rtl::Reference< ::chart::GridProperties >& xGridproperties )
{
bool bRet = false;
@@ -703,22 +672,22 @@ bool AxisHelper::isGridVisible( const Reference< beans::XPropertySet >& xGridpro
return bRet;
}
-Reference< beans::XPropertySet > AxisHelper::getGridProperties(
- const Reference< XCoordinateSystem >& xCooSys
+rtl::Reference< GridProperties > AxisHelper::getGridProperties(
+ const rtl::Reference< BaseCoordinateSystem >& xCooSys
, sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex, sal_Int32 nSubGridIndex )
{
- Reference< beans::XPropertySet > xRet;
+ rtl::Reference< GridProperties > xRet;
- Reference< XAxis > xAxis( AxisHelper::getAxis( nDimensionIndex, nAxisIndex, xCooSys ) );
+ rtl::Reference< Axis > xAxis( AxisHelper::getAxis( nDimensionIndex, nAxisIndex, xCooSys ) );
if( xAxis.is() )
{
if( nSubGridIndex<0 )
- xRet.set( xAxis->getGridProperties() );
+ xRet = xAxis->getGridProperties2();
else
{
- Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );
- if (nSubGridIndex < aSubGrids.getLength())
- xRet.set( aSubGrids[nSubGridIndex] );
+ std::vector< rtl::Reference< GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
+ if (nSubGridIndex < static_cast<sal_Int32>(aSubGrids.size()))
+ xRet = aSubGrids[nSubGridIndex];
}
}
@@ -726,8 +695,8 @@ Reference< beans::XPropertySet > AxisHelper::getGridProperties(
}
sal_Int32 AxisHelper::getDimensionIndexOfAxis(
- const Reference< XAxis >& xAxis
- , const Reference< XDiagram >& xDiagram )
+ const rtl::Reference< Axis >& xAxis
+ , const rtl::Reference< Diagram >& xDiagram )
{
sal_Int32 nDimensionIndex = -1;
sal_Int32 nCooSysIndex = -1;
@@ -737,8 +706,8 @@ sal_Int32 AxisHelper::getDimensionIndexOfAxis(
}
bool AxisHelper::getIndicesForAxis(
- const Reference< XAxis >& xAxis
- , const Reference< XCoordinateSystem >& xCooSys
+ const rtl::Reference< Axis >& xAxis
+ , const rtl::Reference< BaseCoordinateSystem >& xCooSys
, sal_Int32& rOutDimensionIndex, sal_Int32& rOutAxisIndex )
{
//returns true if indices are found
@@ -749,14 +718,14 @@ bool AxisHelper::getIndicesForAxis(
if( !xCooSys || !xAxis )
return false;
- Reference< XAxis > xCurrentAxis;
+ rtl::Reference< Axis > xCurrentAxis;
sal_Int32 nDimensionCount( xCooSys->getDimension() );
for( sal_Int32 nDimensionIndex = 0; nDimensionIndex < nDimensionCount; nDimensionIndex++ )
{
sal_Int32 nMaxAxisIndex = xCooSys->getMaximumAxisIndexByDimension(nDimensionIndex);
for( sal_Int32 nAxisIndex = 0; nAxisIndex <= nMaxAxisIndex; nAxisIndex++ )
{
- xCurrentAxis = xCooSys->getAxisByDimension(nDimensionIndex,nAxisIndex);
+ xCurrentAxis = xCooSys->getAxisByDimension2(nDimensionIndex,nAxisIndex);
if( xCurrentAxis == xAxis )
{
rOutDimensionIndex = nDimensionIndex;
@@ -768,7 +737,7 @@ bool AxisHelper::getIndicesForAxis(
return false;
}
-bool AxisHelper::getIndicesForAxis( const Reference< XAxis >& xAxis, const Reference< XDiagram >& xDiagram
+bool AxisHelper::getIndicesForAxis( const rtl::Reference< Axis >& xAxis, const rtl::Reference< Diagram >& xDiagram
, sal_Int32& rOutCooSysIndex, sal_Int32& rOutDimensionIndex, sal_Int32& rOutAxisIndex )
{
//returns true if indices are found
@@ -777,28 +746,24 @@ bool AxisHelper::getIndicesForAxis( const Reference< XAxis >& xAxis, const Refer
rOutDimensionIndex = -1;
rOutAxisIndex = -1;
- Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY );
- if(xCooSysContainer.is())
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysList = xDiagram->getBaseCoordinateSystems();
+ for( std::size_t nC=0; nC < aCooSysList.size(); ++nC )
{
- Sequence< Reference< XCoordinateSystem > > aCooSysList = xCooSysContainer->getCoordinateSystems();
- for( sal_Int32 nC=0; nC<aCooSysList.getLength(); ++nC )
+ if( AxisHelper::getIndicesForAxis( xAxis, aCooSysList[nC], rOutDimensionIndex, rOutAxisIndex ) )
{
- if( AxisHelper::getIndicesForAxis( xAxis, aCooSysList[nC], rOutDimensionIndex, rOutAxisIndex ) )
- {
- rOutCooSysIndex = nC;
- return true;
- }
+ rOutCooSysIndex = nC;
+ return true;
}
}
return false;
}
-std::vector< Reference< XAxis > > AxisHelper::getAllAxesOfCoordinateSystem(
- const Reference< XCoordinateSystem >& xCooSys
+std::vector< rtl::Reference< Axis > > AxisHelper::getAllAxesOfCoordinateSystem(
+ const rtl::Reference< BaseCoordinateSystem >& xCooSys
, bool bOnlyVisible /* = false */ )
{
- std::vector< Reference< XAxis > > aAxisVector;
+ std::vector< rtl::Reference< Axis > > aAxisVector;
if(xCooSys.is())
{
@@ -813,15 +778,13 @@ std::vector< Reference< XAxis > > AxisHelper::getAllAxesOfCoordinateSystem(
{
try
{
- Reference< XAxis > xAxis( xCooSys->getAxisByDimension( nDimensionIndex, nAxisIndex ) );
+ rtl::Reference< Axis > xAxis = xCooSys->getAxisByDimension2( nDimensionIndex, nAxisIndex );
if( xAxis.is() )
{
bool bAddAxis = true;
if( bOnlyVisible )
{
- Reference< beans::XPropertySet > xAxisProp( xAxis, uno::UNO_QUERY );
- if( !xAxisProp.is() ||
- !(xAxisProp->getPropertyValue( "Show") >>= bAddAxis) )
+ if( !(xAxis->getPropertyValue( "Show") >>= bAddAxis) )
bAddAxis = false;
}
if( bAddAxis )
@@ -840,61 +803,58 @@ std::vector< Reference< XAxis > > AxisHelper::getAllAxesOfCoordinateSystem(
return aAxisVector;
}
-Sequence< Reference< XAxis > > AxisHelper::getAllAxesOfDiagram(
- const Reference< XDiagram >& xDiagram
+std::vector< rtl::Reference< Axis > > AxisHelper::getAllAxesOfDiagram(
+ const rtl::Reference< Diagram >& xDiagram
, bool bOnlyVisible )
{
- std::vector< Reference< XAxis > > aAxisVector;
+ std::vector< rtl::Reference< Axis > > aAxisVector;
- Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY );
- if(xCooSysContainer.is())
+ for( rtl::Reference< BaseCoordinateSystem > const & coords : xDiagram->getBaseCoordinateSystems() )
{
- const Sequence< Reference< XCoordinateSystem > > aCooSysList = xCooSysContainer->getCoordinateSystems();
- for( Reference< XCoordinateSystem > const & coords : aCooSysList )
- {
- std::vector< Reference< XAxis > > aAxesPerCooSys( AxisHelper::getAllAxesOfCoordinateSystem( coords, bOnlyVisible ) );
- aAxisVector.insert( aAxisVector.end(), aAxesPerCooSys.begin(), aAxesPerCooSys.end() );
- }
+ std::vector< rtl::Reference< Axis > > aAxesPerCooSys = AxisHelper::getAllAxesOfCoordinateSystem( coords, bOnlyVisible );
+ aAxisVector.insert( aAxisVector.end(), aAxesPerCooSys.begin(), aAxesPerCooSys.end() );
}
- return comphelper::containerToSequence( aAxisVector );
+ return aAxisVector;
}
-Sequence< Reference< beans::XPropertySet > > AxisHelper::getAllGrids( const Reference< XDiagram >& xDiagram )
+std::vector< rtl::Reference< GridProperties > > AxisHelper::getAllGrids( const rtl::Reference< Diagram >& xDiagram )
{
- const Sequence< Reference< XAxis > > aAllAxes( AxisHelper::getAllAxesOfDiagram( xDiagram ) );
- std::vector< Reference< beans::XPropertySet > > aGridVector;
+ const std::vector< rtl::Reference< Axis > > aAllAxes = AxisHelper::getAllAxesOfDiagram( xDiagram );
+ std::vector< rtl::Reference< GridProperties > > aGridVector;
- for( Reference< XAxis > const & xAxis : aAllAxes )
+ for( rtl::Reference< Axis > const & xAxis : aAllAxes )
{
- if(!xAxis.is())
- continue;
- Reference< beans::XPropertySet > xGridProperties( xAxis->getGridProperties() );
+ rtl::Reference< GridProperties > xGridProperties( xAxis->getGridProperties2() );
if( xGridProperties.is() )
aGridVector.push_back( xGridProperties );
- const Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );
- for( Reference< beans::XPropertySet > const & xSubGrid : aSubGrids )
+ std::vector< rtl::Reference< GridProperties > > aSubGrids( xAxis->getSubGridProperties2() );
+ for( rtl::Reference< GridProperties > const & xSubGrid : aSubGrids )
{
if( xSubGrid.is() )
aGridVector.push_back( xSubGrid );
}
}
- return comphelper::containerToSequence( aGridVector );
+ return aGridVector;
}
void AxisHelper::getAxisOrGridPossibilities( Sequence< sal_Bool >& rPossibilityList
- , const Reference< XDiagram>& xDiagram, bool bAxis )
+ , const rtl::Reference< Diagram>& xDiagram, bool bAxis )
{
rPossibilityList.realloc(6);
sal_Bool* pPossibilityList = rPossibilityList.getArray();
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
+ sal_Int32 nDimensionCount = -1;
+ if (xDiagram)
+ nDimensionCount = xDiagram->getDimension();
//set possibilities:
sal_Int32 nIndex=0;
- Reference< XChartType > xChartType = DiagramHelper::getChartTypeByIndex( xDiagram, 0 );
+ rtl::Reference< ChartType > xChartType;
+ if (xDiagram)
+ xChartType = xDiagram->getChartTypeByIndex( 0 );
for(nIndex=0;nIndex<3;nIndex++)
pPossibilityList[nIndex]=ChartTypeHelper::isSupportingMainAxis(xChartType,nDimensionCount,nIndex);
for(nIndex=3;nIndex<6;nIndex++)
@@ -904,36 +864,28 @@ void AxisHelper::getAxisOrGridPossibilities( Sequence< sal_Bool >& rPossibilityL
pPossibilityList[nIndex] = rPossibilityList[nIndex-3];
}
-bool AxisHelper::isSecondaryYAxisNeeded( const Reference< XCoordinateSystem >& xCooSys )
+bool AxisHelper::isSecondaryYAxisNeeded( const rtl::Reference< BaseCoordinateSystem >& xCooSys )
{
- Reference< chart2::XChartTypeContainer > xCTCnt( xCooSys, uno::UNO_QUERY );
- if( !xCTCnt.is() )
+ if( !xCooSys.is() )
return false;
- const Sequence< Reference< chart2::XChartType > > aChartTypes( xCTCnt->getChartTypes() );
- for( Reference< chart2::XChartType > const & chartType : aChartTypes )
+ const std::vector< rtl::Reference< ChartType > > & aChartTypes( xCooSys->getChartTypes2() );
+ for( rtl::Reference< ChartType > const & chartType : aChartTypes )
{
- Reference< XDataSeriesContainer > xSeriesContainer( chartType, uno::UNO_QUERY );
- if( !xSeriesContainer.is() )
- continue;
-
- Sequence< Reference< XDataSeries > > aSeriesList( xSeriesContainer->getDataSeries() );
- for( sal_Int32 nS = aSeriesList.getLength(); nS-- ; )
+ const std::vector< rtl::Reference< DataSeries > > & aSeriesList = chartType->getDataSeries2();
+ for( sal_Int32 nS = aSeriesList.size(); nS-- ; )
{
- Reference< beans::XPropertySet > xProp( aSeriesList[nS], uno::UNO_QUERY );
- if(xProp.is())
- {
- sal_Int32 nAttachedAxisIndex = 0;
- if( ( xProp->getPropertyValue( "AttachedAxisIndex" ) >>= nAttachedAxisIndex ) && nAttachedAxisIndex>0 )
- return true;
- }
+ sal_Int32 nAttachedAxisIndex = 0;
+ if( ( aSeriesList[nS]->getPropertyValue( "AttachedAxisIndex" ) >>= nAttachedAxisIndex ) &&
+ nAttachedAxisIndex>0 )
+ return true;
}
}
return false;
}
-bool AxisHelper::shouldAxisBeDisplayed( const Reference< XAxis >& xAxis
- , const Reference< XCoordinateSystem >& xCooSys )
+bool AxisHelper::shouldAxisBeDisplayed( const rtl::Reference< Axis >& xAxis
+ , const rtl::Reference< BaseCoordinateSystem >& xCooSys )
{
bool bRet = false;
@@ -944,7 +896,7 @@ bool AxisHelper::shouldAxisBeDisplayed( const Reference< XAxis >& xAxis
if( AxisHelper::getIndicesForAxis( xAxis, xCooSys, nDimensionIndex, nAxisIndex ) )
{
sal_Int32 nDimensionCount = xCooSys->getDimension();
- Reference< XChartType > xChartType( AxisHelper::getChartTypeByIndex( xCooSys, 0 ) );
+ rtl::Reference< ChartType > xChartType( AxisHelper::getChartTypeByIndex( xCooSys, 0 ) );
bool bMainAxis = (nAxisIndex==MAIN_AXIS_INDEX);
if( bMainAxis )
@@ -958,7 +910,7 @@ bool AxisHelper::shouldAxisBeDisplayed( const Reference< XAxis >& xAxis
}
void AxisHelper::getAxisOrGridExistence( Sequence< sal_Bool >& rExistenceList
- , const Reference< XDiagram>& xDiagram, bool bAxis )
+ , const rtl::Reference< Diagram>& xDiagram, bool bAxis )
{
rExistenceList.realloc(6);
sal_Bool* pExistenceList = rExistenceList.getArray();
@@ -982,7 +934,7 @@ void AxisHelper::getAxisOrGridExistence( Sequence< sal_Bool >& rExistenceList
}
}
-bool AxisHelper::changeVisibilityOfAxes( const Reference< XDiagram >& xDiagram
+bool AxisHelper::changeVisibilityOfAxes( const rtl::Reference< Diagram >& xDiagram
, const Sequence< sal_Bool >& rOldExistenceList
, const Sequence< sal_Bool >& rNewExistenceList
, const Reference< uno::XComponentContext >& xContext
@@ -1005,7 +957,7 @@ bool AxisHelper::changeVisibilityOfAxes( const Reference< XDiagram >& xDiagram
return bChanged;
}
-bool AxisHelper::changeVisibilityOfGrids( const Reference< XDiagram >& xDiagram
+bool AxisHelper::changeVisibilityOfGrids( const rtl::Reference< Diagram >& xDiagram
, const Sequence< sal_Bool >& rOldExistenceList
, const Sequence< sal_Bool >& rNewExistenceList )
{
@@ -1025,21 +977,18 @@ bool AxisHelper::changeVisibilityOfGrids( const Reference< XDiagram >& xDiagram
}
rtl::Reference< BaseCoordinateSystem > AxisHelper::getCoordinateSystemOfAxis(
- const Reference< XAxis >& xAxis
- , const Reference< XDiagram >& xDiagram )
+ const rtl::Reference< Axis >& xAxis
+ , const rtl::Reference< Diagram >& xDiagram )
{
if (!xDiagram)
return nullptr;
- ::chart::Diagram* pDiagram = dynamic_cast<::chart::Diagram*>(xDiagram.get());
- assert(pDiagram);
rtl::Reference< BaseCoordinateSystem > xRet;
- for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : pDiagram->getBaseCoordinateSystems() )
+ for( rtl::Reference< BaseCoordinateSystem > const & xCooSys : xDiagram->getBaseCoordinateSystems() )
{
- std::vector< Reference< XAxis > > aAllAxis( AxisHelper::getAllAxesOfCoordinateSystem( xCooSys ) );
+ std::vector< rtl::Reference< Axis > > aAllAxis = AxisHelper::getAllAxesOfCoordinateSystem( xCooSys );
- std::vector< Reference< XAxis > >::iterator aFound =
- std::find( aAllAxis.begin(), aAllAxis.end(), xAxis );
+ auto aFound = std::find( aAllAxis.begin(), aAllAxis.end(), xAxis );
if( aFound != aAllAxis.end())
{
xRet = xCooSys;
@@ -1049,22 +998,21 @@ rtl::Reference< BaseCoordinateSystem > AxisHelper::getCoordinateSystemOfAxis(
return xRet;
}
-Reference< XChartType > AxisHelper::getChartTypeByIndex( const Reference< XCoordinateSystem >& xCooSys, sal_Int32 nIndex )
+rtl::Reference< ChartType > AxisHelper::getChartTypeByIndex( const rtl::Reference< BaseCoordinateSystem >& xCooSys, sal_Int32 nIndex )
{
- Reference< XChartType > xChartType;
+ rtl::Reference< ChartType > xChartType;
- Reference< XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY );
- if( xChartTypeContainer.is() )
+ if( xCooSys.is() )
{
- Sequence< Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() );
- if( nIndex >= 0 && nIndex < aChartTypeList.getLength() )
- xChartType.set( aChartTypeList[nIndex] );
+ const std::vector< rtl::Reference< ChartType > > aChartTypeList( xCooSys->getChartTypes2() );
+ if( nIndex >= 0 && o3tl::make_unsigned(nIndex) < aChartTypeList.size() )
+ xChartType = aChartTypeList[nIndex];
}
return xChartType;
}
-void AxisHelper::setRTLAxisLayout( const Reference< XCoordinateSystem >& xCooSys )
+void AxisHelper::setRTLAxisLayout( const rtl::Reference< BaseCoordinateSystem >& xCooSys )
{
if( !xCooSys.is() )
return;
@@ -1074,9 +1022,7 @@ void AxisHelper::setRTLAxisLayout( const Reference< XCoordinateSystem >& xCooSys
return;
bool bVertical = false;
- Reference< beans::XPropertySet > xCooSysProp( xCooSys, uno::UNO_QUERY );
- if( xCooSysProp.is() )
- xCooSysProp->getPropertyValue( "SwapXAndYAxis" ) >>= bVertical;
+ xCooSys->getPropertyValue( "SwapXAndYAxis" ) >>= bVertical;
sal_Int32 nHorizontalAxisDimension = bVertical ? 1 : 0;
sal_Int32 nVerticalAxisDimension = bVertical ? 0 : 1;
@@ -1084,7 +1030,7 @@ void AxisHelper::setRTLAxisLayout( const Reference< XCoordinateSystem >& xCooSys
try
{
//reverse direction for horizontal main axis
- Reference< chart2::XAxis > xHorizontalMainAxis( AxisHelper::getAxis( nHorizontalAxisDimension, MAIN_AXIS_INDEX, xCooSys ) );
+ rtl::Reference< Axis > xHorizontalMainAxis = AxisHelper::getAxis( nHorizontalAxisDimension, MAIN_AXIS_INDEX, xCooSys );
if( xHorizontalMainAxis.is() )
{
chart2::ScaleData aScale = xHorizontalMainAxis->getScaleData();
@@ -1093,7 +1039,7 @@ void AxisHelper::setRTLAxisLayout( const Reference< XCoordinateSystem >& xCooSys
}
//mathematical direction for vertical main axis
- Reference< chart2::XAxis > xVerticalMainAxis( AxisHelper::getAxis( nVerticalAxisDimension, MAIN_AXIS_INDEX, xCooSys ) );
+ rtl::Reference< Axis > xVerticalMainAxis = AxisHelper::getAxis( nVerticalAxisDimension, MAIN_AXIS_INDEX, xCooSys );
if( xVerticalMainAxis.is() )
{
chart2::ScaleData aScale = xVerticalMainAxis->getScaleData();
@@ -1109,7 +1055,7 @@ void AxisHelper::setRTLAxisLayout( const Reference< XCoordinateSystem >& xCooSys
try
{
//reverse direction for horizontal secondary axis
- Reference< chart2::XAxis > xHorizontalSecondaryAxis( AxisHelper::getAxis( nHorizontalAxisDimension, SECONDARY_AXIS_INDEX, xCooSys ) );
+ rtl::Reference< Axis > xHorizontalSecondaryAxis = AxisHelper::getAxis( nHorizontalAxisDimension, SECONDARY_AXIS_INDEX, xCooSys );
if( xHorizontalSecondaryAxis.is() )
{
chart2::ScaleData aScale = xHorizontalSecondaryAxis->getScaleData();
@@ -1118,7 +1064,7 @@ void AxisHelper::setRTLAxisLayout( const Reference< XCoordinateSystem >& xCooSys
}
//mathematical direction for vertical secondary axis
- Reference< chart2::XAxis > xVerticalSecondaryAxis( AxisHelper::getAxis( nVerticalAxisDimension, SECONDARY_AXIS_INDEX, xCooSys ) );
+ rtl::Reference< Axis > xVerticalSecondaryAxis = AxisHelper::getAxis( nVerticalAxisDimension, SECONDARY_AXIS_INDEX, xCooSys );
if( xVerticalSecondaryAxis.is() )
{
chart2::ScaleData aScale = xVerticalSecondaryAxis->getScaleData();
@@ -1132,16 +1078,16 @@ void AxisHelper::setRTLAxisLayout( const Reference< XCoordinateSystem >& xCooSys
}
}
-Reference< XChartType > AxisHelper::getFirstChartTypeWithSeriesAttachedToAxisIndex( const Reference< chart2::XDiagram >& xDiagram, const sal_Int32 nAttachedAxisIndex )
+rtl::Reference< ChartType > AxisHelper::getFirstChartTypeWithSeriesAttachedToAxisIndex( const rtl::Reference< Diagram >& xDiagram, const sal_Int32 nAttachedAxisIndex )
{
- Reference< XChartType > xChartType;
- std::vector< Reference< XDataSeries > > aSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ rtl::Reference< ChartType > xChartType;
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector = xDiagram->getDataSeries();
for (auto const& series : aSeriesVector)
{
sal_Int32 nCurrentIndex = DataSeriesHelper::getAttachedAxisIndex(series);
if( nAttachedAxisIndex == nCurrentIndex )
{
- xChartType = DiagramHelper::getChartTypeOfSeries(xDiagram, series);
+ xChartType = xDiagram->getChartTypeOfSeries(series);
if(xChartType.is())
break;
}
diff --git a/chart2/source/tools/BaseGFXHelper.cxx b/chart2/source/tools/BaseGFXHelper.cxx
index b518e7dd8b8c..17bd4f5e1809 100644
--- a/chart2/source/tools/BaseGFXHelper.cxx
+++ b/chart2/source/tools/BaseGFXHelper.cxx
@@ -113,6 +113,12 @@ awt::Size B2IRectangleToAWTSize( const ::basegfx::B2IRectangle& rB2IRectangle )
static_cast< sal_Int32 >( rB2IRectangle.getHeight()));
}
+awt::Rectangle toAwtRectangle(const basegfx::B2IRectangle& rRectangle)
+{
+ return awt::Rectangle(rRectangle.getMinX(), rRectangle.getMinY(),
+ rRectangle.getWidth(), rRectangle.getHeight());
+}
+
B3DVector Direction3DToB3DVector( const Direction3D& rDirection )
{
return B3DVector(
diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx
index 0ca95f9ebdf2..152b48cf9bd8 100644
--- a/chart2/source/tools/CachedDataSequence.cxx
+++ b/chart2/source/tools/CachedDataSequence.cxx
@@ -23,7 +23,6 @@
#include <comphelper/sequenceashashmap.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
#include <algorithm>
@@ -35,14 +34,11 @@ using ::com::sun::star::uno::Any;
using ::osl::MutexGuard;
// necessary for MS compiler
-using ::comphelper::OPropertyContainer;
-using ::comphelper::OMutexAndBroadcastHelper;
-using ::comphelper::OPropertyArrayUsageHelper;
using ::chart::impl::CachedDataSequence_Base;
namespace
{
-constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence";
+constexpr OUString lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence"_ustr;
enum
{
@@ -56,26 +52,20 @@ namespace chart
{
CachedDataSequence::CachedDataSequence()
- : OPropertyContainer( GetBroadcastHelper()),
- CachedDataSequence_Base( GetMutex()),
- m_eCurrentDataType( NUMERICAL ),
+ : m_eCurrentDataType( NUMERICAL ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
registerProperties();
}
CachedDataSequence::CachedDataSequence( const Reference< uno::XComponentContext > & /*xContext*/ )
- : OPropertyContainer( GetBroadcastHelper()),
- CachedDataSequence_Base( GetMutex()),
- m_eCurrentDataType( MIXED ),
+ : m_eCurrentDataType( MIXED ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
registerProperties();
}
CachedDataSequence::CachedDataSequence( const OUString & rSingleText )
- : OPropertyContainer( GetBroadcastHelper()),
- CachedDataSequence_Base( GetMutex()),
- m_eCurrentDataType( TEXTUAL ),
+ : m_eCurrentDataType( TEXTUAL ),
m_aTextualSequence({rSingleText}),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
@@ -83,9 +73,7 @@ CachedDataSequence::CachedDataSequence( const OUString & rSingleText )
}
CachedDataSequence::CachedDataSequence( const CachedDataSequence & rSource )
- : OPropertyContainer( GetBroadcastHelper()),
- CachedDataSequence_Base( GetMutex()),
- m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
+ : m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
m_sRole( rSource.m_sRole ),
m_eCurrentDataType( rSource.m_eCurrentDataType ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
@@ -129,29 +117,11 @@ Sequence< double > CachedDataSequence::Impl_getNumericalData() const
if( m_eCurrentDataType == NUMERICAL )
return m_aNumericalSequence;
- sal_Int32 nSize = ( m_eCurrentDataType == TEXTUAL )
- ? m_aTextualSequence.getLength()
- : m_aMixedSequence.getLength();
-
- Sequence< double > aResult( nSize );
- double * pResultArray = aResult.getArray();
-
if( m_eCurrentDataType == TEXTUAL )
- {
- const OUString * pTextArray = m_aTextualSequence.getConstArray();
- std::transform( pTextArray, pTextArray + nSize,
- pResultArray,
- CommonFunctors::OUStringToDouble() );
- }
- else
- {
- OSL_ASSERT( m_eCurrentDataType == MIXED );
- const Any * pMixedArray = m_aMixedSequence.getConstArray();
- std::transform( pMixedArray, pMixedArray + nSize,
- pResultArray,
- CommonFunctors::AnyToDouble() );
- }
- return aResult;
+ return CommonFunctors::convertToSequence(m_aTextualSequence, CommonFunctors::ToDouble());
+
+ OSL_ASSERT(m_eCurrentDataType == MIXED);
+ return CommonFunctors::convertToSequence(m_aMixedSequence, CommonFunctors::ToDouble());
}
Sequence< OUString > CachedDataSequence::Impl_getTextualData() const
@@ -159,30 +129,11 @@ Sequence< OUString > CachedDataSequence::Impl_getTextualData() const
if( m_eCurrentDataType == TEXTUAL )
return m_aTextualSequence;
- sal_Int32 nSize = ( m_eCurrentDataType == NUMERICAL )
- ? m_aNumericalSequence.getLength()
- : m_aMixedSequence.getLength();
-
- Sequence< OUString > aResult( nSize );
- OUString * pResultArray = aResult.getArray();
-
if( m_eCurrentDataType == NUMERICAL )
- {
- const double * pTextArray = m_aNumericalSequence.getConstArray();
- std::transform( pTextArray, pTextArray + nSize,
- pResultArray,
- CommonFunctors::DoubleToOUString() );
- }
- else
- {
- OSL_ASSERT( m_eCurrentDataType == MIXED );
- const Any * pMixedArray = m_aMixedSequence.getConstArray();
- std::transform( pMixedArray, pMixedArray + nSize,
- pResultArray,
- CommonFunctors::AnyToString() );
- }
+ return CommonFunctors::convertToSequence(m_aNumericalSequence, CommonFunctors::ToString());
- return aResult;
+ OSL_ASSERT(m_eCurrentDataType == MIXED);
+ return CommonFunctors::convertToSequence(m_aMixedSequence, CommonFunctors::ToString());
}
Sequence< Any > CachedDataSequence::Impl_getMixedData() const
@@ -190,34 +141,15 @@ Sequence< Any > CachedDataSequence::Impl_getMixedData() const
if( m_eCurrentDataType == MIXED )
return m_aMixedSequence;
- sal_Int32 nSize = ( m_eCurrentDataType == NUMERICAL )
- ? m_aNumericalSequence.getLength()
- : m_aTextualSequence.getLength();
-
- Sequence< Any > aResult( nSize );
- Any * pResultArray = aResult.getArray();
-
if( m_eCurrentDataType == NUMERICAL )
- {
- const double * pTextArray = m_aNumericalSequence.getConstArray();
- std::transform( pTextArray, pTextArray + nSize,
- pResultArray,
- CommonFunctors::makeAny< double >() );
- }
- else
- {
- OSL_ASSERT( m_eCurrentDataType == TEXTUAL );
- const OUString * pMixedArray = m_aTextualSequence.getConstArray();
- std::transform( pMixedArray, pMixedArray + nSize,
- pResultArray,
- CommonFunctors::makeAny< OUString >() );
- }
+ return CommonFunctors::convertToSequence(m_aNumericalSequence, CommonFunctors::makeAny());
- return aResult;
+ OSL_ASSERT(m_eCurrentDataType == TEXTUAL);
+ return CommonFunctors::convertToSequence(m_aTextualSequence, CommonFunctors::makeAny());
}
-IMPLEMENT_FORWARD_XINTERFACE2( CachedDataSequence, CachedDataSequence_Base, OPropertyContainer )
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( CachedDataSequence, CachedDataSequence_Base, OPropertyContainer )
+IMPLEMENT_FORWARD_XINTERFACE2( CachedDataSequence, CachedDataSequence_Base, comphelper::OPropertyContainer2 )
+IMPLEMENT_FORWARD_XTYPEPROVIDER2( CachedDataSequence, CachedDataSequence_Base, comphelper::OPropertyContainer2 )
// ____ XPropertySet ____
Reference< beans::XPropertySetInfo > SAL_CALL CachedDataSequence::getPropertySetInfo()
@@ -264,7 +196,7 @@ css::uno::Sequence< OUString > SAL_CALL CachedDataSequence::getSupportedServiceN
// ________ XNumericalDataSequence ________
Sequence< double > SAL_CALL CachedDataSequence::getNumericalData()
{
- MutexGuard aGuard( GetMutex() );
+ std::unique_lock aGuard( m_aMutex );
if( m_eCurrentDataType == NUMERICAL )
return m_aNumericalSequence;
@@ -275,7 +207,7 @@ Sequence< double > SAL_CALL CachedDataSequence::getNumericalData()
// ________ XTextualDataSequence ________
Sequence< OUString > SAL_CALL CachedDataSequence::getTextualData()
{
- MutexGuard aGuard( GetMutex() );
+ std::unique_lock aGuard( m_aMutex );
if( m_eCurrentDataType == TEXTUAL )
return m_aTextualSequence;
@@ -286,7 +218,7 @@ Sequence< OUString > SAL_CALL CachedDataSequence::getTextualData()
// ________ XDataSequence ________
Sequence< Any > SAL_CALL CachedDataSequence::getData()
{
- MutexGuard aGuard( GetMutex() );
+ std::unique_lock aGuard( m_aMutex );
return Impl_getMixedData();
}
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index 659ef6d955f3..bf44c6a4c08f 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -35,7 +35,9 @@
#include <unotools/lingucfg.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <i18nlangtag/languagetag.hxx>
+#include <tools/color.hxx>
#include <vcl/outdev.hxx>
+#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -339,15 +341,16 @@ void CharacterProperties::AddPropertiesToVector(
void CharacterProperties::AddDefaultsToMap(
::chart::tPropertyValueMap & rOutMap )
{
+ SolarMutexGuard aGuard;
const float fDefaultFontHeight = 13.0;
SvtLinguConfig aLinguConfig;
lang::Locale aDefaultLocale;
- aLinguConfig.GetProperty("DefaultLocale") >>= aDefaultLocale;
+ aLinguConfig.GetProperty(u"DefaultLocale") >>= aDefaultLocale;
lang::Locale aDefaultLocale_CJK;
- aLinguConfig.GetProperty("DefaultLocale_CJK") >>= aDefaultLocale_CJK;
+ aLinguConfig.GetProperty(u"DefaultLocale_CJK") >>= aDefaultLocale_CJK;
lang::Locale aDefaultLocale_CTL;
- aLinguConfig.GetProperty("DefaultLocale_CTL") >>= aDefaultLocale_CTL;
+ aLinguConfig.GetProperty(u"DefaultLocale_CTL") >>= aDefaultLocale_CTL;
using namespace ::com::sun::star::i18n::ScriptType;
LanguageType nLang;
@@ -363,19 +366,19 @@ void CharacterProperties::AddDefaultsToMap(
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_FAMILY, sal_Int16(aFont.GetFamilyType()) );//awt::FontFamily::SWISS
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_CHAR_SET, sal_Int16(aFont.GetCharSet()) );//use awt::CharSet::DONTKNOW instead of SYSTEM to avoid assertion issue 50249
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_PITCH, sal_Int16(aFont.GetPitch()) );//awt::FontPitch::VARIABLE
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_CHAR_COLOR, -1 ); //automatic color (COL_AUTO)
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COLOR, COL_AUTO ); //automatic color
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_CHAR_HEIGHT, fDefaultFontHeight );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE, awt::FontUnderline::NONE );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_CHAR_UNDERLINE_COLOR, -1 ); //automatic color (COL_AUTO)
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE_COLOR, COL_AUTO ); //automatic color
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE_HAS_COLOR, false );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_OVERLINE, awt::FontUnderline::NONE );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_CHAR_OVERLINE_COLOR, -1 ); //automatic color (COL_AUTO)
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_OVERLINE_COLOR, COL_AUTO ); //automatic color
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_OVERLINE_HAS_COLOR, false );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_WEIGHT, awt::FontWeight::NORMAL );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_POSTURE, awt::FontSlant_NONE );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_AUTO_KERNING, true );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_CHAR_KERNING, 0 );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_CHAR_STRIKE_OUT, awt::FontStrikeout::NONE );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_KERNING, sal_Int16(0) );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_STRIKE_OUT, awt::FontStrikeout::NONE );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_WORD_MODE, false );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_LOCALE, aDefaultLocale );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_SHADOWED, false );
diff --git a/chart2/source/tools/ChartModelHelper.cxx b/chart2/source/tools/ChartModelHelper.cxx
index b81d047cc39d..6c2420e7bd7c 100644
--- a/chart2/source/tools/ChartModelHelper.cxx
+++ b/chart2/source/tools/ChartModelHelper.cxx
@@ -18,38 +18,29 @@
*/
#include <ChartModelHelper.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
+#include <DataSource.hxx>
#include <DataSourceHelper.hxx>
#include <ControllerLockGuard.hxx>
-#include <RangeHighlighter.hxx>
#include <InternalDataProvider.hxx>
#include <ChartModel.hxx>
#include <BaseCoordinateSystem.hxx>
+#include <ChartType.hxx>
+#include <DataSeries.hxx>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart/XChartDocument.hpp>
-#include <com/sun/star/chart2/data/XDataReceiver.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/embed/Aspects.hpp>
-#include <com/sun/star/embed/XVisualObject.hpp>
#include <com/sun/star/view/XSelectionChangeListener.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
-uno::Reference< chart2::data::XRangeHighlighter > ChartModelHelper::createRangeHighlighter(
- const uno::Reference< view::XSelectionSupplier > & xSelectionSupplier )
-{
- return new RangeHighlighter( xSelectionSupplier );
-}
-
rtl::Reference< InternalDataProvider > ChartModelHelper::createInternalDataProvider(
- const uno::Reference< css::chart2::XChartDocument >& xChartDoc, bool bConnectToModel )
+ const rtl::Reference<::chart::ChartModel>& xChartDoc, bool bConnectToModel )
{
bool bDefaultDataInColumns(true);
@@ -57,7 +48,8 @@ rtl::Reference< InternalDataProvider > ChartModelHelper::createInternalDataProvi
// chart data and use it as default for creating a new InternalDataProvider
if(xChartDoc.is())
{
- css::uno::Reference< css::chart::XChartDocument > xDoc(xChartDoc, uno::UNO_QUERY);
+ // old XChartDocument interface
+ css::uno::Reference< css::chart::XChartDocument > xDoc(static_cast<cppu::OWeakObject*>(xChartDoc.get()), uno::UNO_QUERY);
if(xDoc.is())
{
@@ -82,111 +74,36 @@ rtl::Reference< InternalDataProvider > ChartModelHelper::createInternalDataProvi
return new InternalDataProvider( xChartDoc, bConnectToModel, bDefaultDataInColumns );
}
-rtl::Reference< Diagram > ChartModelHelper::findDiagram( const uno::Reference< frame::XModel >& xModel )
-{
- uno::Reference< XChartDocument > xChartDoc( xModel, uno::UNO_QUERY );
- if( xChartDoc.is())
- return ChartModelHelper::findDiagram( xChartDoc );
- return nullptr;
-}
-
-rtl::Reference< Diagram > ChartModelHelper::findDiagram( const uno::Reference< chart2::XChartDocument >& xChartDoc )
-{
- try
- {
- if( !xChartDoc )
- return nullptr;
- uno::Reference<chart2::XDiagram> xDiagram = xChartDoc->getFirstDiagram();
- ::chart::Diagram* pDiagram = dynamic_cast<::chart::Diagram*>(xDiagram.get());
- assert(!xDiagram || pDiagram);
- return pDiagram;
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
- return nullptr;
-}
-
-rtl::Reference< Diagram > ChartModelHelper::findDiagram( const rtl::Reference< ::chart::ChartModel >& xChartDoc )
+rtl::Reference< BaseCoordinateSystem > ChartModelHelper::getFirstCoordinateSystem( const rtl::Reference<::chart::ChartModel>& xModel )
{
- if( !xChartDoc )
- return nullptr;
- rtl::Reference<::chart::Diagram> xDiagram = xChartDoc->getFirstChartDiagram();
- return xDiagram;
-}
-
-rtl::Reference< BaseCoordinateSystem > ChartModelHelper::getFirstCoordinateSystem( ChartModel& rModel )
-{
- rtl::Reference< Diagram > xDiagram = rModel.getFirstChartDiagram();
+ rtl::Reference< Diagram > xDiagram = xModel->getFirstChartDiagram();
if( xDiagram.is() )
{
- auto& rCooSysSeq( xDiagram->getBaseCoordinateSystems() );
- if( !rCooSysSeq.empty() )
- return rCooSysSeq[0];
+ auto aCooSysSeq( xDiagram->getBaseCoordinateSystems() );
+ if( !aCooSysSeq.empty() )
+ return aCooSysSeq[0];
}
return nullptr;
}
-rtl::Reference< BaseCoordinateSystem > ChartModelHelper::getFirstCoordinateSystem( const uno::Reference< frame::XModel >& xModel )
+std::vector< rtl::Reference< DataSeries > > ChartModelHelper::getDataSeries(
+ const rtl::Reference<::chart::ChartModel> & xChartDoc )
{
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xModel );
- if( xDiagram.is() )
- {
- auto& rCooSysSeq( xDiagram->getBaseCoordinateSystems() );
- if( !rCooSysSeq.empty() )
- return rCooSysSeq[0];
- }
- return nullptr;
-}
-
-std::vector< uno::Reference< XDataSeries > > ChartModelHelper::getDataSeries(
- ChartModel& rModel )
-{
- std::vector< uno::Reference< XDataSeries > > aResult;
-
- uno::Reference< XDiagram > xDiagram = rModel.getFirstDiagram();
- if( xDiagram.is())
- aResult = DiagramHelper::getDataSeriesFromDiagram( xDiagram );
-
- return aResult;
-}
-
-std::vector< uno::Reference< XDataSeries > > ChartModelHelper::getDataSeries(
- const uno::Reference< XChartDocument > & xChartDoc )
-{
- std::vector< uno::Reference< XDataSeries > > aResult;
+ std::vector< rtl::Reference< DataSeries > > aResult;
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartDoc );
+ rtl::Reference< Diagram > xDiagram = xChartDoc->getFirstChartDiagram();
if( xDiagram.is())
- aResult = DiagramHelper::getDataSeriesFromDiagram( xDiagram );
+ aResult = xDiagram->getDataSeries();
return aResult;
}
-std::vector< uno::Reference< XDataSeries > > ChartModelHelper::getDataSeries(
- const rtl::Reference< ::chart::ChartModel > & xChartDoc )
-{
- std::vector< uno::Reference< XDataSeries > > aResult;
-
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartDoc );
- if( xDiagram.is())
- aResult = DiagramHelper::getDataSeriesFromDiagram( xDiagram );
-
- return aResult;
-}
-
-std::vector< uno::Reference< XDataSeries > > ChartModelHelper::getDataSeries(
- const uno::Reference< frame::XModel > & xModel )
-{
- return getDataSeries( uno::Reference< chart2::XChartDocument >( xModel, uno::UNO_QUERY ));
-}
-
-uno::Reference< XChartType > ChartModelHelper::getChartTypeOfSeries(
- const uno::Reference< frame::XModel >& xModel
- , const uno::Reference< XDataSeries >& xGivenDataSeries )
+rtl::Reference< ChartType > ChartModelHelper::getChartTypeOfSeries(
+ const rtl::Reference<::chart::ChartModel>& xModel
+ , const rtl::Reference< DataSeries >& xGivenDataSeries )
{
- return DiagramHelper::getChartTypeOfSeries( ChartModelHelper::findDiagram( xModel ), xGivenDataSeries );
+ rtl::Reference<Diagram> xDiagram = xModel->getFirstChartDiagram();
+ return xDiagram ? xDiagram->getChartTypeOfSeries( xGivenDataSeries ) : nullptr;
}
awt::Size ChartModelHelper::getDefaultPageSize()
@@ -194,22 +111,20 @@ awt::Size ChartModelHelper::getDefaultPageSize()
return awt::Size( 16000, 9000 );
}
-awt::Size ChartModelHelper::getPageSize( const uno::Reference< frame::XModel >& xModel )
+awt::Size ChartModelHelper::getPageSize( const rtl::Reference<::chart::ChartModel>& xModel )
{
awt::Size aPageSize( ChartModelHelper::getDefaultPageSize() );
- uno::Reference< embed::XVisualObject > xVisualObject(xModel,uno::UNO_QUERY);
- OSL_ENSURE(xVisualObject.is(),"need xVisualObject for page size");
- if( xVisualObject.is() )
- aPageSize = xVisualObject->getVisualAreaSize( embed::Aspects::MSOLE_CONTENT );
+ OSL_ENSURE(xModel.is(),"need xVisualObject for page size");
+ if( xModel.is() )
+ aPageSize = xModel->getVisualAreaSize( embed::Aspects::MSOLE_CONTENT );
return aPageSize;
}
-void ChartModelHelper::triggerRangeHighlighting( const uno::Reference< frame::XModel >& xModel )
+void ChartModelHelper::triggerRangeHighlighting( const rtl::Reference<::chart::ChartModel>& xModel )
{
- uno::Reference< chart2::data::XDataReceiver > xDataReceiver( xModel, uno::UNO_QUERY );
- if( xDataReceiver.is() )
+ if( xModel.is() )
{
- uno::Reference< view::XSelectionChangeListener > xSelectionChangeListener( xDataReceiver->getRangeHighlighter(), uno::UNO_QUERY );
+ uno::Reference< view::XSelectionChangeListener > xSelectionChangeListener( xModel->getRangeHighlighter(), uno::UNO_QUERY );
//trigger selection of cell range
if( xSelectionChangeListener.is() )
{
@@ -219,11 +134,11 @@ void ChartModelHelper::triggerRangeHighlighting( const uno::Reference< frame::XM
}
}
-bool ChartModelHelper::isIncludeHiddenCells( const uno::Reference< frame::XModel >& xChartModel )
+bool ChartModelHelper::isIncludeHiddenCells( const rtl::Reference<::chart::ChartModel>& xChartModel )
{
bool bIncluded = true; // hidden cells are included by default.
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram(xChartModel) );
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
if (!xDiagram.is())
return bIncluded;
@@ -270,7 +185,7 @@ bool ChartModelHelper::setIncludeHiddenCells( bool bIncludeHiddenCells, ChartMod
try
{
- uno::Reference< chart2::data::XDataSource > xUsedData( DataSourceHelper::getUsedData( rModel ) );
+ rtl::Reference< DataSource > xUsedData = DataSourceHelper::getUsedData( rModel );
if( xUsedData.is() )
{
uno::Reference< beans::XPropertySet > xProp;
diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx
index 323e68197969..b8df30edfbd5 100644
--- a/chart2/source/tools/ChartTypeHelper.cxx
+++ b/chart2/source/tools/ChartTypeHelper.cxx
@@ -18,24 +18,27 @@
*/
#include <ChartTypeHelper.hxx>
+#include <ChartType.hxx>
+#include <BaseCoordinateSystem.hxx>
+#include <DataSeriesProperties.hxx>
#include <DiagramHelper.hxx>
#include <servicenames_charttypes.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
+#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/StackingDirection.hpp>
-#include <com/sun/star/chart/MissingValueTreatment.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
namespace chart
{
bool ChartTypeHelper::isSupportingAxisSideBySide(
- const uno::Reference< chart2::XChartType >& xChartType, sal_Int32 nDimensionCount )
+ const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount )
{
bool bResult = false;
@@ -56,7 +59,7 @@ bool ChartTypeHelper::isSupportingAxisSideBySide(
return bResult;
}
-bool ChartTypeHelper::isSupportingGeometryProperties( const uno::Reference< XChartType >& xChartType, sal_Int32 nDimensionCount )
+bool ChartTypeHelper::isSupportingGeometryProperties( const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionCount )
{
//form tab only for 3D-bar and 3D-column charts.
@@ -75,7 +78,7 @@ bool ChartTypeHelper::isSupportingGeometryProperties( const uno::Reference< XCha
return false;
}
-bool ChartTypeHelper::isSupportingStatisticProperties( const uno::Reference< XChartType >& xChartType, sal_Int32 nDimensionCount )
+bool ChartTypeHelper::isSupportingStatisticProperties( const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionCount )
{
//3D charts, pie, net and stock do not support statistic properties
@@ -100,13 +103,13 @@ bool ChartTypeHelper::isSupportingStatisticProperties( const uno::Reference< XCh
return true;
}
-bool ChartTypeHelper::isSupportingRegressionProperties( const uno::Reference< XChartType >& xChartType, sal_Int32 nDimensionCount )
+bool ChartTypeHelper::isSupportingRegressionProperties( const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionCount )
{
// note: old chart: only scatter chart
return isSupportingStatisticProperties( xChartType, nDimensionCount );
}
-bool ChartTypeHelper::isSupportingAreaProperties( const uno::Reference< XChartType >& xChartType, sal_Int32 nDimensionCount )
+bool ChartTypeHelper::isSupportingAreaProperties( const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionCount )
{
//2D line charts, net and stock do not support area properties
@@ -129,7 +132,7 @@ bool ChartTypeHelper::isSupportingAreaProperties( const uno::Reference< XChartTy
return true;
}
-bool ChartTypeHelper::isSupportingSymbolProperties( const uno::Reference< XChartType >& xChartType, sal_Int32 nDimensionCount )
+bool ChartTypeHelper::isSupportingSymbolProperties( const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionCount )
{
//2D line charts, 2D scatter charts and 2D net charts do support symbols
@@ -150,7 +153,7 @@ bool ChartTypeHelper::isSupportingSymbolProperties( const uno::Reference< XChart
return false;
}
-bool ChartTypeHelper::isSupportingMainAxis( const uno::Reference< XChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex )
+bool ChartTypeHelper::isSupportingMainAxis( const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex )
{
//pie charts do not support axis at all
//no 3rd axis for 2D charts
@@ -168,7 +171,7 @@ bool ChartTypeHelper::isSupportingMainAxis( const uno::Reference< XChartType >&
return true;
}
-bool ChartTypeHelper::isSupportingSecondaryAxis( const uno::Reference< XChartType >& xChartType, sal_Int32 nDimensionCount )
+bool ChartTypeHelper::isSupportingSecondaryAxis( const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionCount )
{
//3D, pie and net charts do not support a secondary axis at all
@@ -190,7 +193,7 @@ bool ChartTypeHelper::isSupportingSecondaryAxis( const uno::Reference< XChartTyp
}
bool ChartTypeHelper::isSupportingOverlapAndGapWidthProperties(
- const uno::Reference< XChartType >& xChartType, sal_Int32 nDimensionCount )
+ const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionCount )
{
//2D bar charts do support a this special properties
@@ -210,7 +213,7 @@ bool ChartTypeHelper::isSupportingOverlapAndGapWidthProperties(
}
bool ChartTypeHelper::isSupportingBarConnectors(
- const uno::Reference< chart2::XChartType >& xChartType, sal_Int32 nDimensionCount )
+ const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionCount )
{
//2D bar charts with stacked series support this
@@ -235,9 +238,9 @@ bool ChartTypeHelper::isSupportingBarConnectors(
return false;
}
-uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const uno::Reference< chart2::XChartType >& xChartType
+uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const rtl::Reference< ChartType >& xChartType
, bool bSwapXAndY
- , const uno::Reference< chart2::XDataSeries >& xSeries )
+ , const rtl::Reference< DataSeries >& xSeries )
{
uno::Sequence < sal_Int32 > aRet;
if( !xChartType.is() )
@@ -247,8 +250,7 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const
if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_PIE) )
{
bool bDonut = false;
- uno::Reference< beans::XPropertySet > xChartTypeProp( xChartType, uno::UNO_QUERY_THROW );
- xChartTypeProp->getPropertyValue( "UseRings") >>= bDonut;
+ xChartType->getFastPropertyValue( PROP_PIECHARTTYPE_USE_RINGS ) >>= bDonut; // "UseRings"
if(!bDonut)
{
@@ -286,9 +288,8 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const
bool bStacked = false;
{
- uno::Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY );
chart2::StackingDirection eStacking = chart2::StackingDirection_NO_STACKING;
- xSeriesProp->getPropertyValue( "StackingDirection" ) >>= eStacking;
+ xSeries->getFastPropertyValue( PROP_DATASERIES_STACKING_DIRECTION ) >>= eStacking; // "StackingDirection"
bStacked = (eStacking == chart2::StackingDirection_Y_STACKING);
}
@@ -317,9 +318,8 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const
{
bool bStacked = false;
{
- uno::Reference<beans::XPropertySet> xSeriesProp(xSeries, uno::UNO_QUERY);
chart2::StackingDirection eStacking = chart2::StackingDirection_NO_STACKING;
- xSeriesProp->getPropertyValue("StackingDirection") >>= eStacking;
+ xSeries->getFastPropertyValue(PROP_DATASERIES_STACKING_DIRECTION) >>= eStacking; // "StackingDirection"
bStacked = (eStacking == chart2::StackingDirection_Y_STACKING);
}
@@ -367,7 +367,7 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const
return aRet;
}
-bool ChartTypeHelper::isSupportingRightAngledAxes( const uno::Reference< chart2::XChartType >& xChartType )
+bool ChartTypeHelper::isSupportingRightAngledAxes( const rtl::Reference< ChartType >& xChartType )
{
if(xChartType.is())
{
@@ -378,7 +378,7 @@ bool ChartTypeHelper::isSupportingRightAngledAxes( const uno::Reference< chart2:
return true;
}
-bool ChartTypeHelper::isSupportingStartingAngle( const uno::Reference< chart2::XChartType >& xChartType )
+bool ChartTypeHelper::isSupportingStartingAngle( const rtl::Reference< ChartType >& xChartType )
{
if(xChartType.is())
{
@@ -388,7 +388,7 @@ bool ChartTypeHelper::isSupportingStartingAngle( const uno::Reference< chart2::X
}
return false;
}
-bool ChartTypeHelper::isSupportingBaseValue( const uno::Reference< chart2::XChartType >& xChartType )
+bool ChartTypeHelper::isSupportingBaseValue( const rtl::Reference< ChartType >& xChartType )
{
if(xChartType.is())
{
@@ -402,7 +402,7 @@ bool ChartTypeHelper::isSupportingBaseValue( const uno::Reference< chart2::XChar
return false;
}
-bool ChartTypeHelper::isSupportingAxisPositioning( const uno::Reference< chart2::XChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex )
+bool ChartTypeHelper::isSupportingAxisPositioning( const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex )
{
if(xChartType.is())
{
@@ -417,7 +417,7 @@ bool ChartTypeHelper::isSupportingAxisPositioning( const uno::Reference< chart2:
return true;
}
-bool ChartTypeHelper::isSupportingDateAxis( const uno::Reference< chart2::XChartType >& xChartType, sal_Int32 nDimensionIndex )
+bool ChartTypeHelper::isSupportingDateAxis( const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionIndex )
{
if( nDimensionIndex!=0 )
return false;
@@ -437,7 +437,7 @@ bool ChartTypeHelper::isSupportingDateAxis( const uno::Reference< chart2::XChart
return true;
}
-bool ChartTypeHelper::isSupportingComplexCategory( const uno::Reference< chart2::XChartType >& xChartType )
+bool ChartTypeHelper::isSupportingComplexCategory( const rtl::Reference< ChartType >& xChartType )
{
if( xChartType.is() )
{
@@ -448,7 +448,7 @@ bool ChartTypeHelper::isSupportingComplexCategory( const uno::Reference< chart2:
return true;
}
-bool ChartTypeHelper::isSupportingCategoryPositioning( const uno::Reference< chart2::XChartType >& xChartType, sal_Int32 nDimensionCount )
+bool ChartTypeHelper::isSupportingCategoryPositioning( const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionCount )
{
if( xChartType.is() )
{
@@ -464,7 +464,7 @@ bool ChartTypeHelper::isSupportingCategoryPositioning( const uno::Reference< cha
return false;
}
-bool ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( const uno::Reference< chart2::XChartType >& xChartType )
+bool ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( const rtl::Reference< ChartType >& xChartType )
{
if(xChartType.is())
{
@@ -477,7 +477,7 @@ bool ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( const uno::Reference< c
return false;
}
-bool ChartTypeHelper::noBordersForSimpleScheme( const uno::Reference< chart2::XChartType >& xChartType )
+bool ChartTypeHelper::noBordersForSimpleScheme( const rtl::Reference< ChartType >& xChartType )
{
if(xChartType.is())
{
@@ -488,7 +488,7 @@ bool ChartTypeHelper::noBordersForSimpleScheme( const uno::Reference< chart2::XC
return false;
}
-sal_Int32 ChartTypeHelper::getDefaultDirectLightColor( bool bSimple, const uno::Reference< chart2::XChartType >& xChartType )
+sal_Int32 ChartTypeHelper::getDefaultDirectLightColor( bool bSimple, const rtl::Reference< ChartType >& xChartType )
{
sal_Int32 nRet = static_cast< sal_Int32 >( 0x808080 ); // grey
if( xChartType .is() )
@@ -508,7 +508,7 @@ sal_Int32 ChartTypeHelper::getDefaultDirectLightColor( bool bSimple, const uno::
return nRet;
}
-sal_Int32 ChartTypeHelper::getDefaultAmbientLightColor( bool bSimple, const uno::Reference< chart2::XChartType >& xChartType )
+sal_Int32 ChartTypeHelper::getDefaultAmbientLightColor( bool bSimple, const rtl::Reference< ChartType >& xChartType )
{
sal_Int32 nRet = static_cast< sal_Int32 >( 0x999999 ); // grey40
if( xChartType .is() )
@@ -525,7 +525,7 @@ sal_Int32 ChartTypeHelper::getDefaultAmbientLightColor( bool bSimple, const uno:
return nRet;
}
-drawing::Direction3D ChartTypeHelper::getDefaultSimpleLightDirection( const uno::Reference< chart2::XChartType >& xChartType )
+drawing::Direction3D ChartTypeHelper::getDefaultSimpleLightDirection( const rtl::Reference< ChartType >& xChartType )
{
drawing::Direction3D aRet(0.0, 0.0, 1.0);
if( xChartType .is() )
@@ -540,7 +540,7 @@ drawing::Direction3D ChartTypeHelper::getDefaultSimpleLightDirection( const uno:
return aRet;
}
-drawing::Direction3D ChartTypeHelper::getDefaultRealisticLightDirection( const uno::Reference< chart2::XChartType >& xChartType )
+drawing::Direction3D ChartTypeHelper::getDefaultRealisticLightDirection( const rtl::Reference< ChartType >& xChartType )
{
drawing::Direction3D aRet(0.0, 0.0, 1.0);
if( xChartType .is() )
@@ -555,8 +555,8 @@ drawing::Direction3D ChartTypeHelper::getDefaultRealisticLightDirection( const u
return aRet;
}
-sal_Int32 ChartTypeHelper::getAxisType( const uno::Reference<
- XChartType >& xChartType, sal_Int32 nDimensionIndex )
+sal_Int32 ChartTypeHelper::getAxisType( const rtl::Reference<
+ ChartType >& xChartType, sal_Int32 nDimensionIndex )
{
//returned is a constant from constant group css::chart2::AxisType
@@ -580,7 +580,7 @@ sal_Int32 ChartTypeHelper::getAxisType( const uno::Reference<
}
sal_Int32 ChartTypeHelper::getNumberOfDisplayedSeries(
- const uno::Reference< XChartType >& xChartType,
+ const rtl::Reference< ChartType >& xChartType,
sal_Int32 nNumberOfSeries )
{
if( xChartType.is() )
@@ -590,9 +590,8 @@ sal_Int32 ChartTypeHelper::getNumberOfDisplayedSeries(
OUString aChartTypeName = xChartType->getChartType();
if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_PIE )
{
- uno::Reference< beans::XPropertySet > xChartTypeProp( xChartType, uno::UNO_QUERY_THROW );
bool bDonut = false;
- if( (xChartTypeProp->getPropertyValue( "UseRings") >>= bDonut)
+ if( (xChartType->getFastPropertyValue( PROP_PIECHARTTYPE_USE_RINGS ) >>= bDonut) // "UseRings"
&& !bDonut )
{
return nNumberOfSeries>0 ? 1 : 0;
@@ -607,7 +606,7 @@ sal_Int32 ChartTypeHelper::getNumberOfDisplayedSeries(
return nNumberOfSeries;
}
-uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedMissingValueTreatments( const uno::Reference< XChartType >& xChartType )
+uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedMissingValueTreatments( const rtl::Reference< ChartType >& xChartType )
{
uno::Sequence < sal_Int32 > aRet;
if( !xChartType.is() )
@@ -668,7 +667,7 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedMissingValueTreatments(
return aRet;
}
-bool ChartTypeHelper::isSeriesInFrontOfAxisLine( const uno::Reference< XChartType >& xChartType )
+bool ChartTypeHelper::isSeriesInFrontOfAxisLine( const rtl::Reference< ChartType >& xChartType )
{
if( xChartType.is() )
{
@@ -679,7 +678,7 @@ bool ChartTypeHelper::isSeriesInFrontOfAxisLine( const uno::Reference< XChartTyp
return true;
}
-OUString ChartTypeHelper::getRoleOfSequenceForYAxisNumberFormatDetection( const uno::Reference< XChartType >& xChartType )
+OUString ChartTypeHelper::getRoleOfSequenceForYAxisNumberFormatDetection( const rtl::Reference< ChartType >& xChartType )
{
OUString aRet( "values-y" );
if( !xChartType.is() )
@@ -690,7 +689,7 @@ OUString ChartTypeHelper::getRoleOfSequenceForYAxisNumberFormatDetection( const
return aRet;
}
-OUString ChartTypeHelper::getRoleOfSequenceForDataLabelNumberFormatDetection( const uno::Reference< XChartType >& xChartType )
+OUString ChartTypeHelper::getRoleOfSequenceForDataLabelNumberFormatDetection( const rtl::Reference< ChartType >& xChartType )
{
OUString aRet( "values-y" );
if( !xChartType.is() )
@@ -702,7 +701,7 @@ OUString ChartTypeHelper::getRoleOfSequenceForDataLabelNumberFormatDetection( co
return aRet;
}
-bool ChartTypeHelper::isSupportingOnlyDeepStackingFor3D( const uno::Reference< XChartType >& xChartType )
+bool ChartTypeHelper::isSupportingOnlyDeepStackingFor3D( const rtl::Reference< ChartType >& xChartType )
{
bool bRet = false;
if( !xChartType.is() )
diff --git a/chart2/source/tools/ChartViewHelper.cxx b/chart2/source/tools/ChartViewHelper.cxx
index 8caaeddb1e94..8011da3c171c 100644
--- a/chart2/source/tools/ChartViewHelper.cxx
+++ b/chart2/source/tools/ChartViewHelper.cxx
@@ -18,30 +18,29 @@
*/
#include <ChartViewHelper.hxx>
+#include <ChartModel.hxx>
#include <servicenames.hxx>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
-void ChartViewHelper::setViewToDirtyState(const uno::Reference<frame::XModel>& xChartModel)
+void ChartViewHelper::setViewToDirtyState(const rtl::Reference<::chart::ChartModel>& xChartModel)
{
try
{
- uno::Reference<lang::XMultiServiceFactory> xFact(xChartModel, uno::UNO_QUERY);
- if (xFact.is())
+ if (xChartModel.is())
{
Reference<util::XModifyListener> xModifyListener(
- xFact->createInstance(CHART_VIEW_SERVICE_NAME), uno::UNO_QUERY);
+ xChartModel->createInstance(CHART_VIEW_SERVICE_NAME), uno::UNO_QUERY);
if (xModifyListener.is())
{
- lang::EventObject aEvent(xChartModel);
+ lang::EventObject aEvent(static_cast<cppu::OWeakObject*>(xChartModel.get()));
xModifyListener->modified(aEvent);
}
}
@@ -51,6 +50,13 @@ void ChartViewHelper::setViewToDirtyState(const uno::Reference<frame::XModel>& x
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
+
+void ChartViewHelper::setViewToDirtyState_UNO(
+ const css::uno::Reference<css::chart2::XChartDocument>& xChartModel)
+{
+ if (auto pChartModel = dynamic_cast<ChartModel*>(xChartModel.get()))
+ setViewToDirtyState(rtl::Reference(pChartModel));
+}
} //namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/tools/ColorPerPointHelper.cxx b/chart2/source/tools/ColorPerPointHelper.cxx
index 34aeb7866021..bced72bb473a 100644
--- a/chart2/source/tools/ColorPerPointHelper.cxx
+++ b/chart2/source/tools/ColorPerPointHelper.cxx
@@ -18,33 +18,34 @@
*/
#include <ColorPerPointHelper.hxx>
+#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <algorithm>
+using namespace ::com::sun::star;
+using namespace ::chart::DataSeriesProperties;
+
namespace chart
{
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
bool ColorPerPointHelper::hasPointOwnColor(
- const css::uno::Reference< css::beans::XPropertySet >& xDataSeriesProperties
+ const rtl::Reference< DataSeries >& xDataSeries
, sal_Int32 nPointIndex
, const css::uno::Reference< css::beans::XPropertySet >& xDataPointProperties //may be NULL this is just for performance
)
{
- if( !xDataSeriesProperties.is() )
+ if( !xDataSeries.is() )
return false;
- if( hasPointOwnProperties( xDataSeriesProperties, nPointIndex ))
+ if( hasPointOwnProperties( xDataSeries, nPointIndex ))
{
uno::Reference< beans::XPropertyState > xPointState( xDataPointProperties, uno::UNO_QUERY );
if( !xPointState.is() )
{
- uno::Reference< XDataSeries > xSeries( xDataSeriesProperties, uno::UNO_QUERY );
- if(xSeries.is())
- xPointState.set( xSeries->getDataPointByIndex( nPointIndex ), uno::UNO_QUERY );
+ xPointState.set( xDataSeries->getDataPointByIndex( nPointIndex ), uno::UNO_QUERY );
}
if( !xPointState.is() )
return false;
@@ -56,17 +57,15 @@ bool ColorPerPointHelper::hasPointOwnColor(
}
bool ColorPerPointHelper::hasPointOwnProperties(
- const css::uno::Reference< css::beans::XPropertySet >& xSeriesProperties
+ const rtl::Reference< ::chart::DataSeries >& xDataSeries
, sal_Int32 nPointIndex )
{
- if( xSeriesProperties.is() )
+ if( xDataSeries.is() )
{
uno::Sequence< sal_Int32 > aIndexList;
- if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aIndexList )
+ if( xDataSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aIndexList ) // "AttributedDataPoints"
{
- const sal_Int32 * pBegIt = aIndexList.getConstArray();
- const sal_Int32 * pEndIt = pBegIt + aIndexList.getLength();
- return ( std::find( pBegIt, pEndIt, nPointIndex ) != pEndIt );
+ return (std::find(aIndexList.begin(), aIndexList.end(), nPointIndex) != aIndexList.end());
}
}
diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx
index 20a3346f69b0..293fa7b11ddf 100644
--- a/chart2/source/tools/CommonConverters.cxx
+++ b/chart2/source/tools/CommonConverters.cxx
@@ -24,10 +24,12 @@
#include <com/sun/star/chart2/data/XDataSequence.hpp>
#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
+#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <basegfx/matrix/b3dhommatrix.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <cstddef>
#include <limits>
namespace chart
@@ -90,9 +92,10 @@ drawing::HomogenMatrix B3DHomMatrixToHomogenMatrix( const ::basegfx::B3DHomMatri
aM.set(1, 0, rM.get(1, 0));
aM.set(1, 1, rM.get(1, 1));
aM.set(1, 2, rM.get(1, 3));
- aM.set(2, 0, rM.get(3, 0));
- aM.set(2, 1, rM.get(3, 1));
- aM.set(2, 2, rM.get(3, 3));
+ // For this to be a valid 2D transform matrix, the last row must be [0,0,1]
+ assert( rM.get(3, 0) == 0 );
+ assert( rM.get(3, 1) == 0 );
+ assert( rM.get(3, 3) == 1 );
return aM;
}
@@ -105,9 +108,9 @@ drawing::HomogenMatrix3 B2DHomMatrixToHomogenMatrix3( const ::basegfx::B2DHomMat
aHM.Line2.Column1 = rM.get(1, 0);
aHM.Line2.Column2 = rM.get(1, 1);
aHM.Line2.Column3 = rM.get(1, 2);
- aHM.Line3.Column1 = rM.get(2, 0);
- aHM.Line3.Column2 = rM.get(2, 1);
- aHM.Line3.Column3 = rM.get(2, 2);
+ aHM.Line3.Column1 = 0;
+ aHM.Line3.Column2 = 0;
+ aHM.Line3.Column3 = 1;
return aHM;
}
@@ -190,7 +193,7 @@ void AddPointToPoly( std::vector<std::vector<css::drawing::Position3D>>& rPoly,
}
//make sure that we have enough polygons
- if(nPolygonIndex >= static_cast<sal_Int32>(rPoly.size()) )
+ if(o3tl::make_unsigned(nPolygonIndex) >= rPoly.size() )
{
rPoly.resize(nPolygonIndex+1);
}
@@ -227,7 +230,7 @@ drawing::Position3D getPointFromPoly( const std::vector<std::vector<css::drawing
{
drawing::Position3D aRet(0.0,0.0,0.0);
- if( nPolyIndex>=0 && nPolyIndex<static_cast<sal_Int32>(rPolygon.size()))
+ if( nPolyIndex>=0 && o3tl::make_unsigned(nPolyIndex)<rPolygon.size())
{
if(nPointIndex<static_cast<sal_Int32>(rPolygon[nPolyIndex].size()))
{
@@ -267,15 +270,15 @@ void addPolygon( std::vector<std::vector<css::drawing::Position3D>>& rRet, const
void appendPoly( std::vector<std::vector<css::drawing::Position3D>>& rRet, const std::vector<std::vector<css::drawing::Position3D>>& rAdd )
{
- sal_Int32 nOuterCount = std::max( rRet.size(), rAdd.size() );
+ std::size_t nOuterCount = std::max( rRet.size(), rAdd.size() );
rRet.resize(nOuterCount);
auto pSequence = rRet.data();
- for( sal_Int32 nOuter=0;nOuter<nOuterCount;nOuter++ )
+ for( std::size_t nOuter=0;nOuter<nOuterCount;nOuter++ )
{
sal_Int32 nOldPointCount = rRet[nOuter].size();
sal_Int32 nAddPointCount = 0;
- if(nOuter<static_cast<sal_Int32>(rAdd.size()))
+ if(nOuter<rAdd.size())
nAddPointCount = rAdd[nOuter].size();
if(!nAddPointCount)
continue;
@@ -377,7 +380,7 @@ drawing::PointSequenceSequence PolyToPointSequence(
aRet.realloc( rPolyPolygon.size() );
auto pRet = aRet.getArray();
- for(sal_Int32 nN = 0; nN < static_cast<sal_Int32>(rPolyPolygon.size()); nN++)
+ for(std::size_t nN = 0; nN < rPolyPolygon.size(); nN++)
{
sal_Int32 nInnerLength = rPolyPolygon[nN].size();
pRet[nN].realloc( nInnerLength );
@@ -396,17 +399,17 @@ basegfx::B2DPolyPolygon PolyToB2DPolyPolygon(
{
basegfx::B2DPolyPolygon aRetval;
- for(sal_Int32 nN = 0; nN < static_cast<sal_Int32>(rPolyPolygon.size()); nN++)
+ for(auto const & nN: rPolyPolygon)
{
basegfx::B2DPolygon aNewPolygon;
- sal_Int32 nInnerLength = rPolyPolygon[nN].size();
+ sal_Int32 nInnerLength = nN.size();
if(nInnerLength)
{
aNewPolygon.reserve(nInnerLength);
for( sal_Int32 nM = 0; nM < nInnerLength; nM++)
{
- auto X = static_cast<sal_Int32>(rPolyPolygon[nN][nM].PositionX);
- auto Y = static_cast<sal_Int32>(rPolyPolygon[nN][nM].PositionY);
+ auto X = static_cast<sal_Int32>(nN[nM].PositionX);
+ auto Y = static_cast<sal_Int32>(nN[nM].PositionY);
aNewPolygon.append(basegfx::B2DPoint(X, Y));
}
// check for closed state flag
@@ -419,7 +422,7 @@ basegfx::B2DPolyPolygon PolyToB2DPolyPolygon(
}
void appendPointSequence( drawing::PointSequenceSequence& rTarget
- , drawing::PointSequenceSequence& rAdd )
+ , const drawing::PointSequenceSequence& rAdd )
{
sal_Int32 nAddCount = rAdd.getLength();
if(!nAddCount)
@@ -581,7 +584,7 @@ sal_Int16 getShortForLongAlso( const uno::Any& rAny )
}
bool replaceParamterInString( OUString & rInOutResourceString,
- const OUString & rParamToReplace,
+ std::u16string_view rParamToReplace,
std::u16string_view rReplaceWith )
{
sal_Int32 nPos = rInOutResourceString.indexOf( rParamToReplace );
@@ -589,7 +592,7 @@ bool replaceParamterInString( OUString & rInOutResourceString,
return false;
rInOutResourceString = rInOutResourceString.replaceAt( nPos
- , rParamToReplace.getLength(), rReplaceWith );
+ , rParamToReplace.size(), rReplaceWith );
return true;
}
diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx
index 50d72a88207e..6ea26d99c5fb 100644
--- a/chart2/source/tools/ConfigColorScheme.cxx
+++ b/chart2/source/tools/ConfigColorScheme.cxx
@@ -20,11 +20,7 @@
#include <ConfigColorScheme.hxx>
#include <unotools/configitem.hxx>
-#include <sal/macros.h>
#include <cppuhelper/supportsservice.hxx>
-#include <comphelper/sequence.hxx>
-
-#include <set>
using namespace ::com::sun::star;
@@ -34,7 +30,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-constexpr OUStringLiteral aSeriesPropName = u"Series";
+constexpr OUString aSeriesPropName = u"Series"_ustr;
} // anonymous namespace
@@ -53,7 +49,6 @@ class ChartConfigItem : public ::utl::ConfigItem
public:
explicit ChartConfigItem( ConfigColorScheme & rListener );
- void addPropertyNotification( const OUString & rPropertyName );
uno::Any getProperty( const OUString & aPropertyName );
protected:
@@ -63,32 +58,27 @@ protected:
private:
ConfigColorScheme & m_rListener;
- std::set< OUString > m_aPropertiesToNotify;
};
ChartConfigItem::ChartConfigItem( ConfigColorScheme & rListener ) :
::utl::ConfigItem( "Office.Chart/DefaultColor" ),
m_rListener( rListener )
-{}
+{
+ EnableNotification( { aSeriesPropName } );
+}
void ChartConfigItem::Notify( const Sequence< OUString > & aPropertyNames )
{
for( OUString const & s : aPropertyNames )
{
- if( m_aPropertiesToNotify.find( s ) != m_aPropertiesToNotify.end())
- m_rListener.notify( s );
+ if( s == aSeriesPropName )
+ m_rListener.notify();
}
}
void ChartConfigItem::ImplCommit()
{}
-void ChartConfigItem::addPropertyNotification( const OUString & rPropertyName )
-{
- m_aPropertiesToNotify.insert( rPropertyName );
- EnableNotification( comphelper::containerToSequence( m_aPropertiesToNotify ));
-}
-
uno::Any ChartConfigItem::getProperty( const OUString & aPropertyName )
{
Sequence< uno::Any > aValues(
@@ -122,11 +112,8 @@ void ConfigColorScheme::retrieveConfigColors()
{
m_apChartConfigItem.reset(
new impl::ChartConfigItem( *this ));
- m_apChartConfigItem->addPropertyNotification( aSeriesPropName );
}
- OSL_ASSERT(m_apChartConfigItem);
- if (!m_apChartConfigItem)
- return;
+ assert(m_apChartConfigItem && "this can only be set at this point");
// retrieve colors
uno::Any aValue(
@@ -153,14 +140,13 @@ void ConfigColorScheme::retrieveConfigColors()
0xff00ff, 0x00ffff, 0xffff00
};
- static const sal_Int32 nMaxDefaultColors = SAL_N_ELEMENTS( nDefaultColors );
+ static const sal_Int32 nMaxDefaultColors = std::size( nDefaultColors );
return nDefaultColors[ nIndex % nMaxDefaultColors ];
}
-void ConfigColorScheme::notify( std::u16string_view rPropertyName )
+void ConfigColorScheme::notify()
{
- if( rPropertyName == aSeriesPropName )
- m_bNeedsUpdate = true;
+ m_bNeedsUpdate = true;
}
OUString SAL_CALL ConfigColorScheme::getImplementationName()
diff --git a/chart2/source/tools/ControllerLockGuard.cxx b/chart2/source/tools/ControllerLockGuard.cxx
index 7719755e9aff..6bfe8e4a95d2 100644
--- a/chart2/source/tools/ControllerLockGuard.cxx
+++ b/chart2/source/tools/ControllerLockGuard.cxx
@@ -19,16 +19,15 @@
#include <ControllerLockGuard.hxx>
#include <ChartModel.hxx>
+#include <utility>
using namespace ::com::sun::star;
-using ::com::sun::star::uno::Reference;
-
namespace chart
{
-ControllerLockGuardUNO::ControllerLockGuardUNO( const uno::Reference< frame::XModel >& xModel ) :
- mxModel( xModel )
+ControllerLockGuardUNO::ControllerLockGuardUNO( rtl::Reference<::chart::ChartModel> xModel ) :
+ mxModel(std::move( xModel ))
{
mxModel->lockControllers();
}
@@ -49,8 +48,8 @@ ControllerLockGuard::~ControllerLockGuard()
mrModel.unlockControllers();
}
-ControllerLockHelper::ControllerLockHelper( const Reference< frame::XModel > & xModel ) :
- m_xModel( xModel )
+ControllerLockHelper::ControllerLockHelper( rtl::Reference<::chart::ChartModel> xModel ) :
+ m_xModel(std::move( xModel ))
{}
ControllerLockHelper::~ControllerLockHelper()
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index ed90d3a8c207..45f235cd2810 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -18,36 +18,36 @@
*/
#include <DataSeriesHelper.hxx>
+#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <DataSource.hxx>
+#include <ChartType.hxx>
#include <unonames.hxx>
#include <Diagram.hxx>
#include <BaseCoordinateSystem.hxx>
+#include <Axis.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/chart2/DataPointLabel.hpp>
-#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
#include <com/sun/star/chart2/StackingDirection.hpp>
-#include <com/sun/star/chart2/data/LabelOrigin.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/SymbolStyle.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <comphelper/sequence.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <algorithm>
#include <iterator>
+#include <utility>
#include <vector>
#include <set>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -58,8 +58,8 @@ namespace
class lcl_MatchesRole
{
public:
- explicit lcl_MatchesRole( const OUString & aRole, bool bMatchPrefix ) :
- m_aRole( aRole ),
+ explicit lcl_MatchesRole( OUString aRole, bool bMatchPrefix ) :
+ m_aRole(std::move( aRole )),
m_bMatchPrefix( bMatchPrefix )
{}
@@ -85,33 +85,11 @@ private:
bool m_bMatchPrefix;
};
-Reference< chart2::data::XLabeledDataSequence > lcl_findLSequenceWithOnlyLabel(
- const Reference< chart2::data::XDataSource > & xDataSource )
-{
- Reference< chart2::data::XLabeledDataSequence > xResult;
- const Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences( xDataSource->getDataSequences());
-
- for( auto const & labeledData : aSequences )
- {
- OSL_ENSURE( labeledData.is(), "empty LabeledDataSequence" );
- // no values are set but a label exists
- if( labeledData.is() &&
- ( ! labeledData->getValues().is() &&
- labeledData->getLabel().is()))
- {
- xResult.set( labeledData );
- break;
- }
- }
-
- return xResult;
-}
-
void lcl_getCooSysAndChartTypeOfSeries(
- const Reference< chart2::XDataSeries > & xSeries,
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
const Reference< chart2::XDiagram > & xDiagram,
rtl::Reference< ::chart::BaseCoordinateSystem > & xOutCooSys,
- Reference< chart2::XChartType > & xOutChartType )
+ rtl::Reference< ::chart::ChartType > & xOutChartType )
{
if( !xDiagram.is())
return;
@@ -119,44 +97,38 @@ void lcl_getCooSysAndChartTypeOfSeries(
for( rtl::Reference< ::chart::BaseCoordinateSystem > const & coords : pDiagram->getBaseCoordinateSystems() )
{
- const Sequence< Reference< chart2::XChartType > > aChartTypes( coords->getChartTypes());
- for( Reference< chart2::XChartType > const & chartType : aChartTypes )
+ for( rtl::Reference< ::chart::ChartType > const & chartType : coords->getChartTypes2() )
{
- Reference< chart2::XDataSeriesContainer > xSeriesCnt( chartType, uno::UNO_QUERY );
- if( xSeriesCnt.is())
+ for( rtl::Reference< ::chart::DataSeries > const & dataSeries : chartType->getDataSeries2() )
{
- const Sequence< Reference< chart2::XDataSeries > > aSeries( xSeriesCnt->getDataSeries());
- for( Reference< chart2::XDataSeries > const & dataSeries : aSeries )
+ if( dataSeries == xSeries )
{
- if( dataSeries == xSeries )
- {
- xOutCooSys = coords;
- xOutChartType.set( chartType );
- }
+ xOutCooSys = coords;
+ xOutChartType = chartType;
}
}
}
}
}
-void lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( const Reference< chart2::XDataSeries >& xSeries, bool bInsert )
+void lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( const rtl::Reference< ::chart::DataSeries >& xSeries, bool bInsert )
{
try
{
- Reference< beans::XPropertySet > xSeriesProperties( xSeries, uno::UNO_QUERY );
- if( xSeriesProperties.is() )
+ if( xSeries.is() )
{
DataPointLabel aLabelAtSeries;
- xSeriesProperties->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabelAtSeries;
+ xSeries->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabelAtSeries;
aLabelAtSeries.ShowNumber = bInsert;
if( !bInsert )
{
aLabelAtSeries.ShowNumberInPercent = false;
aLabelAtSeries.ShowCategoryName = false;
}
- xSeriesProperties->setPropertyValue(CHART_UNONAME_LABEL, uno::Any(aLabelAtSeries));
+ xSeries->setPropertyValue(CHART_UNONAME_LABEL, uno::Any(aLabelAtSeries));
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
{
@@ -203,186 +175,79 @@ OUString getRole( const uno::Reference< chart2::data::XLabeledDataSequence >& xL
return aRet;
}
-Reference< chart2::data::XLabeledDataSequence >
+uno::Reference< chart2::data::XLabeledDataSequence >
getDataSequenceByRole(
const Reference< chart2::data::XDataSource > & xSource,
const OUString& aRole,
bool bMatchPrefix /* = false */ )
{
- Reference< chart2::data::XLabeledDataSequence > aNoResult;
+ uno::Reference< chart2::data::XLabeledDataSequence > aNoResult;
if( ! xSource.is())
return aNoResult;
- Sequence< Reference< chart2::data::XLabeledDataSequence > > aLabeledSeq( xSource->getDataSequences());
-
- const Reference< chart2::data::XLabeledDataSequence > * pBegin = aLabeledSeq.getConstArray();
- const Reference< chart2::data::XLabeledDataSequence > * pEnd = pBegin + aLabeledSeq.getLength();
- const Reference< chart2::data::XLabeledDataSequence > * pMatch =
- std::find_if( pBegin, pEnd, lcl_MatchesRole( aRole, bMatchPrefix ));
-
- if( pMatch != pEnd )
- return *pMatch;
+ const Sequence< Reference< chart2::data::XLabeledDataSequence > > aLabeledSeq( xSource->getDataSequences());
+ try
+ {
+ for (auto const & i : aLabeledSeq)
+ {
+ if (lcl_MatchesRole(aRole, bMatchPrefix)(i))
+ return i;
+ }
+ }
+ catch (const lang::DisposedException&)
+ {
+ TOOLS_WARN_EXCEPTION( "chart2", "unexpected exception caught" );
+ }
return aNoResult;
}
-std::vector< Reference< chart2::data::XLabeledDataSequence > >
+std::vector< uno::Reference< chart2::data::XLabeledDataSequence > >
getAllDataSequencesByRole( const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aDataSequences,
const OUString& aRole )
{
- std::vector< Reference< chart2::data::XLabeledDataSequence > > aResultVec;
- std::copy_if( aDataSequences.begin(), aDataSequences.end(),
- std::back_inserter( aResultVec ),
- lcl_MatchesRole(aRole, /*bMatchPrefix*/true) );
- return aResultVec;
-}
-
-std::vector<Reference<css::chart2::data::XLabeledDataSequence> >
-getAllDataSequences( const uno::Sequence<uno::Reference<chart2::XDataSeries> >& aSeries )
-{
- std::vector< Reference< chart2::data::XLabeledDataSequence > > aSeqVec;
-
- for( uno::Reference<chart2::XDataSeries> const & dataSeries : aSeries )
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aResultVec;
+ for (const auto & i : aDataSequences)
{
- Reference< chart2::data::XDataSource > xSource( dataSeries, uno::UNO_QUERY );
- if( xSource.is())
- {
- const Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeq( xSource->getDataSequences());
- aSeqVec.insert( aSeqVec.end(), aSeq.begin(), aSeq.end() );
- }
+ if (lcl_MatchesRole(aRole, /*bMatchPrefix*/true)(i))
+ aResultVec.push_back(i);
}
-
- return aSeqVec;
+ return aResultVec;
}
-Reference< chart2::data::XDataSource >
- getDataSource( const Sequence< Reference< chart2::XDataSeries > > & aSeries )
+std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
+ getAllDataSequencesByRole( const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aDataSequences,
+ const OUString& aRole )
{
- return Reference< chart2::data::XDataSource >(
- new DataSource(comphelper::containerToSequence(getAllDataSequences(aSeries))));
+ std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > aResultVec;
+ std::copy_if( aDataSequences.begin(), aDataSequences.end(),
+ std::back_inserter( aResultVec ),
+ lcl_MatchesRole(aRole, /*bMatchPrefix*/true) );
+ return aResultVec;
}
-namespace
-{
-OUString lcl_getDataSequenceLabel( const Reference< chart2::data::XDataSequence > & xSequence )
+std::vector<uno::Reference<chart2::data::XLabeledDataSequence> >
+getAllDataSequences( const std::vector<rtl::Reference<DataSeries> >& aSeries )
{
- OUString aResult;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSeqVec;
- Reference< chart2::data::XTextualDataSequence > xTextSeq( xSequence, uno::UNO_QUERY );
- if( xTextSeq.is())
+ for( rtl::Reference<DataSeries> const & dataSeries : aSeries )
{
- Sequence< OUString > aSeq( xTextSeq->getTextualData());
-
- const sal_Int32 nMax = aSeq.getLength() - 1;
- OUStringBuffer aBuf;
-
- for( sal_Int32 i = 0; i <= nMax; ++i )
- {
- aBuf.append( aSeq[i] );
- if( i < nMax )
- aBuf.append( ' ');
- }
- aResult = aBuf.makeStringAndClear();
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aSeq( dataSeries->getDataSequences2());
+ aSeqVec.insert( aSeqVec.end(), aSeq.begin(), aSeq.end() );
}
- else if( xSequence.is())
- {
- Sequence< uno::Any > aSeq( xSequence->getData());
- const sal_Int32 nMax = aSeq.getLength() - 1;
- OUString aVal;
- OUStringBuffer aBuf;
- double fNum = 0;
-
- for( sal_Int32 i = 0; i <= nMax; ++i )
- {
- if( aSeq[i] >>= aVal )
- {
- aBuf.append( aVal );
- if( i < nMax )
- aBuf.append( ' ');
- }
- else if( aSeq[ i ] >>= fNum )
- {
- aBuf.append( fNum );
- if( i < nMax )
- aBuf.append( ' ');
- }
- }
- aResult = aBuf.makeStringAndClear();
- }
-
- return aResult;
-}
-}
-
-OUString getLabelForLabeledDataSequence(
- const Reference< chart2::data::XLabeledDataSequence > & xLabeledSeq )
-{
- OUString aResult;
- if( xLabeledSeq.is())
- {
- Reference< chart2::data::XDataSequence > xSeq( xLabeledSeq->getLabel());
- if( xSeq.is() )
- aResult = lcl_getDataSequenceLabel( xSeq );
- if( !xSeq.is() || aResult.isEmpty() )
- {
- // no label set or label content is empty -> use auto-generated one
- Reference< chart2::data::XDataSequence > xValueSeq( xLabeledSeq->getValues() );
- if( xValueSeq.is() )
- {
- Sequence< OUString > aLabels( xValueSeq->generateLabel(
- chart2::data::LabelOrigin_SHORT_SIDE ) );
- // no labels returned is interpreted as: auto-generation not
- // supported by sequence
- if( aLabels.hasElements() )
- aResult=aLabels[0];
- else
- {
- //todo?: maybe use the index of the series as name
- //but as the index may change it would be better to have such a name persistent
- //what is not possible at the moment
- //--> maybe use the identifier as part of the name ...
- aResult = lcl_getDataSequenceLabel( xValueSeq );
- }
- }
- }
- }
- return aResult;
+ return aSeqVec;
}
-OUString getDataSeriesLabel(
- const Reference< chart2::XDataSeries > & xSeries,
- const OUString & rLabelSequenceRole )
+rtl::Reference< DataSource >
+ getDataSource( const std::vector< rtl::Reference< DataSeries > > & aSeries )
{
- OUString aResult;
-
- Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY );
- if( xSource.is())
- {
- Reference< chart2::data::XLabeledDataSequence > xLabeledSeq(
- ::chart::DataSeriesHelper::getDataSequenceByRole( xSource, rLabelSequenceRole ));
- if( xLabeledSeq.is())
- aResult = getLabelForLabeledDataSequence( xLabeledSeq );
- else
- {
- // special case: labeled data series with only a label and no values may
- // serve as label
- xLabeledSeq.set( lcl_findLSequenceWithOnlyLabel( xSource ));
- if( xLabeledSeq.is())
- {
- Reference< chart2::data::XDataSequence > xSeq( xLabeledSeq->getLabel());
- if( xSeq.is())
- aResult = lcl_getDataSequenceLabel( xSeq );
- }
- }
-
- }
-
- return aResult;
+ return new DataSource(getAllDataSequences(aSeries));
}
void setStackModeAtSeries(
- const Sequence< Reference< chart2::XDataSeries > > & aSeries,
- const Reference< chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem,
+ const std::vector< rtl::Reference< DataSeries > > & aSeries,
+ const rtl::Reference< BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
StackMode eStackMode )
{
const uno::Any aPropValue(
@@ -394,17 +259,16 @@ void setStackModeAtSeries(
: chart2::StackingDirection_NO_STACKING );
std::set< sal_Int32 > aAxisIndexSet;
- for( Reference< chart2::XDataSeries > const & dataSeries : aSeries )
+ for( rtl::Reference< DataSeries > const & dataSeries : aSeries )
{
try
{
- Reference< beans::XPropertySet > xProp( dataSeries, uno::UNO_QUERY );
- if( xProp.is() )
+ if( dataSeries.is() )
{
- xProp->setPropertyValue( "StackingDirection", aPropValue );
+ dataSeries->setPropertyValue( "StackingDirection", aPropValue );
- sal_Int32 nAxisIndex;
- xProp->getPropertyValue( "AttachedAxisIndex" ) >>= nAxisIndex;
+ sal_Int32 nAxisIndex = 0;
+ dataSeries->getPropertyValue( "AttachedAxisIndex" ) >>= nAxisIndex;
aAxisIndexSet.insert(nAxisIndex);
}
}
@@ -425,8 +289,8 @@ void setStackModeAtSeries(
for (auto const& axisIndex : aAxisIndexSet)
{
- Reference< chart2::XAxis > xAxis(
- xCorrespondingCoordinateSystem->getAxisByDimension(1, axisIndex));
+ rtl::Reference< Axis > xAxis =
+ xCorrespondingCoordinateSystem->getAxisByDimension2(1, axisIndex);
if( xAxis.is())
{
bool bPercent = (eStackMode == StackMode::YStackedPercent);
@@ -444,15 +308,14 @@ void setStackModeAtSeries(
}
}
-sal_Int32 getAttachedAxisIndex( const Reference< chart2::XDataSeries > & xSeries )
+sal_Int32 getAttachedAxisIndex( const rtl::Reference< DataSeries > & xSeries )
{
sal_Int32 nRet = 0;
try
{
- Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY );
- if( xProp.is() )
+ if( xSeries.is() )
{
- xProp->getPropertyValue( "AttachedAxisIndex" ) >>= nRet;
+ xSeries->getFastPropertyValue( PROP_DATASERIES_ATTACHED_AXIS_INDEX ) >>= nRet;
}
}
catch( const uno::Exception & )
@@ -463,8 +326,8 @@ sal_Int32 getAttachedAxisIndex( const Reference< chart2::XDataSeries > & xSeries
}
sal_Int32 getNumberFormatKeyFromAxis(
- const Reference< chart2::XDataSeries > & xSeries,
- const Reference< chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem,
+ const rtl::Reference< DataSeries > & xSeries,
+ const rtl::Reference< BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
sal_Int32 nDimensionIndex,
sal_Int32 nAxisIndex /* = -1 */ )
{
@@ -473,8 +336,8 @@ sal_Int32 getNumberFormatKeyFromAxis(
nAxisIndex = getAttachedAxisIndex( xSeries );
try
{
- Reference< beans::XPropertySet > xAxisProp(
- xCorrespondingCoordinateSystem->getAxisByDimension( nDimensionIndex, nAxisIndex ), uno::UNO_QUERY );
+ rtl::Reference< Axis > xAxisProp =
+ xCorrespondingCoordinateSystem->getAxisByDimension2( nDimensionIndex, nAxisIndex );
if( xAxisProp.is())
xAxisProp->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nResult;
}
@@ -487,21 +350,21 @@ sal_Int32 getNumberFormatKeyFromAxis(
}
rtl::Reference< ::chart::BaseCoordinateSystem > getCoordinateSystemOfSeries(
- const Reference< chart2::XDataSeries > & xSeries,
- const Reference< chart2::XDiagram > & xDiagram )
+ const rtl::Reference< DataSeries > & xSeries,
+ const rtl::Reference< Diagram > & xDiagram )
{
rtl::Reference< ::chart::BaseCoordinateSystem > xResult;
- Reference< chart2::XChartType > xDummy;
+ rtl::Reference< ::chart::ChartType > xDummy;
lcl_getCooSysAndChartTypeOfSeries( xSeries, xDiagram, xResult, xDummy );
return xResult;
}
-Reference< chart2::XChartType > getChartTypeOfSeries(
- const Reference< chart2::XDataSeries > & xSeries,
- const Reference< chart2::XDiagram > & xDiagram )
+rtl::Reference< ::chart::ChartType > getChartTypeOfSeries(
+ const rtl::Reference< DataSeries > & xSeries,
+ const rtl::Reference< Diagram > & xDiagram )
{
- Reference< chart2::XChartType > xResult;
+ rtl::Reference< ::chart::ChartType > xResult;
rtl::Reference< ::chart::BaseCoordinateSystem > xDummy;
lcl_getCooSysAndChartTypeOfSeries( xSeries, xDiagram, xDummy, xResult );
@@ -509,20 +372,17 @@ Reference< chart2::XChartType > getChartTypeOfSeries(
}
void deleteSeries(
- const Reference< chart2::XDataSeries > & xSeries,
- const Reference< chart2::XChartType > & xChartType )
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
+ const rtl::Reference< ::chart::ChartType > & xChartType )
{
try
{
- Reference< chart2::XDataSeriesContainer > xSeriesCnt( xChartType, uno::UNO_QUERY_THROW );
- auto aSeries(
- comphelper::sequenceToContainer<std::vector< Reference< chart2::XDataSeries > > >( xSeriesCnt->getDataSeries()));
- std::vector< Reference< chart2::XDataSeries > >::iterator aIt =
- std::find( aSeries.begin(), aSeries.end(), xSeries );
+ std::vector< rtl::Reference< DataSeries > > aSeries = xChartType->getDataSeries2();
+ auto aIt = std::find( aSeries.begin(), aSeries.end(), xSeries );
if( aIt != aSeries.end())
{
aSeries.erase( aIt );
- xSeriesCnt->setDataSeries( comphelper::containerToSequence( aSeries ));
+ xChartType->setDataSeries( aSeries );
}
}
catch( const uno::Exception & )
@@ -531,14 +391,14 @@ void deleteSeries(
}
}
-void switchSymbolsOnOrOff( const Reference< beans::XPropertySet > & xSeriesProperties,
+void switchSymbolsOnOrOff( const rtl::Reference< DataSeries > & xSeries,
bool bSymbolsOn, sal_Int32 nSeriesIndex )
{
- if( !xSeriesProperties.is() )
+ if( !xSeries )
return;
chart2::Symbol aSymbProp;
- if( xSeriesProperties->getPropertyValue( "Symbol") >>= aSymbProp )
+ if( xSeries->getPropertyValue( "Symbol") >>= aSymbProp )
{
if( !bSymbolsOn )
aSymbProp.Style = chart2::SymbolStyle_NONE;
@@ -547,55 +407,55 @@ void switchSymbolsOnOrOff( const Reference< beans::XPropertySet > & xSeriesPrope
aSymbProp.Style = chart2::SymbolStyle_STANDARD;
aSymbProp.StandardSymbol = nSeriesIndex;
}
- xSeriesProperties->setPropertyValue( "Symbol", uno::Any( aSymbProp ));
+ xSeries->setPropertyValue( "Symbol", uno::Any( aSymbProp ));
}
//todo: check attributed data points
}
-void switchLinesOnOrOff( const Reference< beans::XPropertySet > & xSeriesProperties, bool bLinesOn )
+void switchLinesOnOrOff( const rtl::Reference< DataSeries > & xSeries, bool bLinesOn )
{
- if( !xSeriesProperties.is() )
+ if( !xSeries )
return;
if( bLinesOn )
{
// keep line-styles that are not NONE
drawing::LineStyle eLineStyle;
- if( (xSeriesProperties->getPropertyValue( "LineStyle") >>= eLineStyle ) &&
+ if( (xSeries->getPropertyValue( "LineStyle") >>= eLineStyle ) &&
eLineStyle == drawing::LineStyle_NONE )
{
- xSeriesProperties->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_SOLID ) );
+ xSeries->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_SOLID ) );
}
}
else
- xSeriesProperties->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_NONE ) );
+ xSeries->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_NONE ) );
}
-void makeLinesThickOrThin( const Reference< beans::XPropertySet > & xSeriesProperties, bool bThick )
+void makeLinesThickOrThin( const rtl::Reference< ::chart::DataSeries > & xSeries, bool bThick )
{
- if( !xSeriesProperties.is() )
+ if( !xSeries )
return;
sal_Int32 nNewValue = bThick ? 80 : 0;
sal_Int32 nOldValue = 0;
- if( (xSeriesProperties->getPropertyValue( "LineWidth") >>= nOldValue ) &&
+ if( (xSeries->getPropertyValue( "LineWidth") >>= nOldValue ) &&
nOldValue != nNewValue )
{
if( !(bThick && nOldValue>0))
- xSeriesProperties->setPropertyValue( "LineWidth", uno::Any( nNewValue ) );
+ xSeries->setPropertyValue( "LineWidth", uno::Any( nNewValue ) );
}
}
-void setPropertyAlsoToAllAttributedDataPoints( const Reference< chart2::XDataSeries >& xSeries,
+void setPropertyAlsoToAllAttributedDataPoints( const rtl::Reference< ::chart::DataSeries >& xSeries,
const OUString& rPropertyName, const uno::Any& rPropertyValue )
{
- Reference< beans::XPropertySet > xSeriesProperties( xSeries, uno::UNO_QUERY );
- if( !xSeriesProperties.is() )
+ if( !xSeries.is() )
return;
- xSeriesProperties->setPropertyValue( rPropertyName, rPropertyValue );
+ xSeries->setPropertyValue( rPropertyName, rPropertyValue );
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
{
@@ -604,20 +464,23 @@ void setPropertyAlsoToAllAttributedDataPoints( const Reference< chart2::XDataSer
continue;
xPointProp->setPropertyValue( rPropertyName, rPropertyValue );
if( rPropertyName == "LabelPlacement" )
+ {
xPointProp->setPropertyValue("CustomLabelPosition", uno::Any());
+ xPointProp->setPropertyValue("CustomLabelSize", uno::Any());
+ }
}
}
}
-bool hasAttributedDataPointDifferentValue( const Reference< chart2::XDataSeries >& xSeries,
+bool hasAttributedDataPointDifferentValue( const rtl::Reference< DataSeries >& xSeries,
const OUString& rPropertyName, const uno::Any& rPropertyValue )
{
- Reference< beans::XPropertySet > xSeriesProperties( xSeries, uno::UNO_QUERY );
- if( !xSeriesProperties.is() )
+ if( !xSeries.is() )
return false;
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
{
@@ -635,46 +498,6 @@ bool hasAttributedDataPointDifferentValue( const Reference< chart2::XDataSeries
namespace
{
-bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSequence >& xDataSequence )
-{
- if( !xDataSequence.is() )
- return false;
- uno::Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY );
- if( xProp.is() )
- {
- uno::Sequence< sal_Int32 > aHiddenValues;
- try
- {
- xProp->getPropertyValue( "HiddenValues" ) >>= aHiddenValues;
- if( !aHiddenValues.hasElements() )
- return true;
- }
- catch( const uno::Exception& )
- {
- return true;
- }
- }
- return xDataSequence->getData().hasElements();
-}
-
-}
-
-bool hasUnhiddenData( const uno::Reference< chart2::XDataSeries >& xSeries )
-{
- uno::Reference< chart2::data::XDataSource > xDataSource( xSeries, uno::UNO_QUERY );
-
- uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aDataSequences = xDataSource->getDataSequences();
-
- for(sal_Int32 nN = aDataSequences.getLength();nN--;)
- {
- if( !aDataSequences[nN].is() )
- continue;
- if( lcl_SequenceHasUnhiddenData( aDataSequences[nN]->getValues() ) )
- return true;
- if( lcl_SequenceHasUnhiddenData( aDataSequences[nN]->getLabel() ) )
- return true;
- }
- return false;
}
sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nIndex, const Reference< chart2::data::XDataSequence >& xDataSequence, bool bTranslate )
@@ -711,16 +534,15 @@ sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nIndex, const Refere
return nIndex;
}
-bool hasDataLabelsAtSeries( const Reference< chart2::XDataSeries >& xSeries )
+bool hasDataLabelsAtSeries( const rtl::Reference< DataSeries >& xSeries )
{
bool bRet = false;
try
{
- Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY );
- if( xProp.is() )
+ if( xSeries.is() )
{
DataPointLabel aLabel;
- if( xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel )
+ if( xSeries->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel )
bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName
|| aLabel.ShowSeriesName;
}
@@ -732,16 +554,16 @@ bool hasDataLabelsAtSeries( const Reference< chart2::XDataSeries >& xSeries )
return bRet;
}
-bool hasDataLabelsAtPoints( const Reference< chart2::XDataSeries >& xSeries )
+bool hasDataLabelsAtPoints( const rtl::Reference< DataSeries >& xSeries )
{
bool bRet = false;
try
{
- Reference< beans::XPropertySet > xSeriesProperties( xSeries, uno::UNO_QUERY );
- if( xSeriesProperties.is() )
+ if( xSeries.is() )
{
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
{
@@ -767,24 +589,23 @@ bool hasDataLabelsAtPoints( const Reference< chart2::XDataSeries >& xSeries )
return bRet;
}
-bool hasDataLabelAtPoint( const Reference< chart2::XDataSeries >& xSeries, sal_Int32 nPointIndex )
+bool hasDataLabelAtPoint( const rtl::Reference< DataSeries >& xSeries, sal_Int32 nPointIndex )
{
bool bRet = false;
try
{
Reference< beans::XPropertySet > xProp;
- Reference< beans::XPropertySet > xSeriesProperties( xSeries, uno::UNO_QUERY );
- if( xSeriesProperties.is() )
+ if( xSeries.is() )
{
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
- auto aIndices( comphelper::sequenceToContainer<std::vector< sal_Int32 >>( aAttributedDataPointIndexList ) );
- std::vector< sal_Int32 >::iterator aIt = std::find( aIndices.begin(), aIndices.end(), nPointIndex );
- if( aIt != aIndices.end())
+ auto aIt = std::find( aAttributedDataPointIndexList.begin(), aAttributedDataPointIndexList.end(), nPointIndex );
+ if (aIt != aAttributedDataPointIndexList.end())
xProp = xSeries->getDataPointByIndex(nPointIndex);
else
- xProp = xSeriesProperties;
+ xProp = xSeries;
}
if( xProp.is() )
{
@@ -803,12 +624,12 @@ bool hasDataLabelAtPoint( const Reference< chart2::XDataSeries >& xSeries, sal_I
return bRet;
}
-void insertDataLabelsToSeriesAndAllPoints( const Reference< chart2::XDataSeries >& xSeries )
+void insertDataLabelsToSeriesAndAllPoints( const rtl::Reference< DataSeries >& xSeries )
{
lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( xSeries, true /*bInsert*/ );
}
-void deleteDataLabelsFromSeriesAndAllPoints( const Reference< chart2::XDataSeries >& xSeries )
+void deleteDataLabelsFromSeriesAndAllPoints( const rtl::Reference< DataSeries >& xSeries )
{
lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( xSeries, false /*bInsert*/ );
}
diff --git a/chart2/source/tools/DataSource.cxx b/chart2/source/tools/DataSource.cxx
index bdcac98ef1e6..c74687c1485a 100644
--- a/chart2/source/tools/DataSource.cxx
+++ b/chart2/source/tools/DataSource.cxx
@@ -19,6 +19,7 @@
#include <DataSource.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <comphelper/sequence.hxx>
namespace com::sun::star::uno { class XComponentContext; }
@@ -39,6 +40,12 @@ DataSource::DataSource(
m_aDataSeq( rSequences )
{}
+DataSource::DataSource(
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & rSequences )
+{
+ m_aDataSeq = comphelper::containerToSequence< Reference< chart2::data::XLabeledDataSequence > >(rSequences);
+}
+
DataSource::~DataSource()
{}
diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index 1881df79097e..dc6c1b9c87f1 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -20,8 +20,9 @@
#include <DataSourceHelper.hxx>
#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
-#include <DiagramHelper.hxx>
+#include <ChartTypeManager.hxx>
#include <Diagram.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <DataSource.hxx>
#include <ControllerLockGuard.hxx>
@@ -29,13 +30,12 @@
#include <LabeledDataSequence.hxx>
#include <unonames.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
@@ -73,16 +73,15 @@ void lcl_addDataSourceRanges(
void lcl_addErrorBarRanges(
std::vector< OUString > & rOutResult,
- const uno::Reference< XDataSeries > & xDataSeries )
+ const rtl::Reference< DataSeries > & xDataSeries )
{
- uno::Reference< beans::XPropertySet > xSeriesProp( xDataSeries, uno::UNO_QUERY );
- if( !xSeriesProp.is())
+ if( !xDataSeries.is())
return;
try
{
uno::Reference< beans::XPropertySet > xErrorBarProp;
- if( ( xSeriesProp->getPropertyValue( CHART_UNONAME_ERRORBAR_Y) >>= xErrorBarProp ) &&
+ if( ( xDataSeries->getPropertyValue( CHART_UNONAME_ERRORBAR_Y) >>= xErrorBarProp ) &&
xErrorBarProp.is())
{
sal_Int32 eStyle = css::chart::ErrorBarStyle::NONE;
@@ -95,7 +94,7 @@ void lcl_addErrorBarRanges(
}
}
- if( ( xSeriesProp->getPropertyValue(CHART_UNONAME_ERRORBAR_X) >>= xErrorBarProp ) && xErrorBarProp.is())
+ if( ( xDataSeries->getPropertyValue(CHART_UNONAME_ERRORBAR_X) >>= xErrorBarProp ) && xErrorBarProp.is())
{
sal_Int32 eStyle = css::chart::ErrorBarStyle::NONE;
if( ( xErrorBarProp->getPropertyValue("ErrorBarStyle") >>= eStyle ) &&
@@ -115,12 +114,6 @@ void lcl_addErrorBarRanges(
} // anonymous namespace
-Reference< chart2::data::XDataSource > DataSourceHelper::createDataSource(
- const Sequence< Reference< chart2::data::XLabeledDataSequence > >& rSequences )
-{
- return new DataSource(rSequences);
-}
-
Reference< chart2::data::XDataSequence > DataSourceHelper::createCachedDataSequence()
{
return new ::chart::CachedDataSequence();
@@ -131,20 +124,20 @@ Reference< chart2::data::XDataSequence > DataSourceHelper::createCachedDataSeque
return new ::chart::CachedDataSequence( rSingleText );
}
-Reference< chart2::data::XLabeledDataSequence > DataSourceHelper::createLabeledDataSequence(
+rtl::Reference< LabeledDataSequence > DataSourceHelper::createLabeledDataSequence(
const Reference< chart2::data::XDataSequence >& xValues ,
const Reference< chart2::data::XDataSequence >& xLabels )
{
return new ::chart::LabeledDataSequence( xValues, xLabels );
}
-Reference< chart2::data::XLabeledDataSequence > DataSourceHelper::createLabeledDataSequence(
+rtl::Reference< LabeledDataSequence > DataSourceHelper::createLabeledDataSequence(
const Reference< chart2::data::XDataSequence >& xValues )
{
return new ::chart::LabeledDataSequence( xValues );
}
-Reference< chart2::data::XLabeledDataSequence > DataSourceHelper::createLabeledDataSequence()
+rtl::Reference< LabeledDataSequence > DataSourceHelper::createLabeledDataSequence()
{
return new ::chart::LabeledDataSequence;
}
@@ -217,21 +210,25 @@ void DataSourceHelper::readArguments( const uno::Sequence< beans::PropertyValue
}
}
-uno::Reference< chart2::data::XDataSource > DataSourceHelper::pressUsedDataIntoRectangularFormat(
- const uno::Reference< chart2::XChartDocument >& xChartDoc )
+rtl::Reference< DataSource > DataSourceHelper::pressUsedDataIntoRectangularFormat(
+ const rtl::Reference< ChartModel >& xChartDoc )
{
std::vector< Reference< chart2::data::XLabeledDataSequence > > aResultVector;
//categories are always the first sequence
- Reference< chart2::XDiagram > xDiagram( xChartDoc->getFirstDiagram());
+ rtl::Reference< Diagram > xDiagram( xChartDoc->getFirstChartDiagram());
- Reference< chart2::data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) );
+ Reference< chart2::data::XLabeledDataSequence > xCategories;
+ if (xDiagram)
+ xCategories = xDiagram->getCategories();
if( xCategories.is() )
aResultVector.push_back( xCategories );
- std::vector< Reference< chart2::XDataSeries > > aSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
- uno::Reference< chart2::data::XDataSource > xSeriesSource(
- DataSeriesHelper::getDataSource( comphelper::containerToSequence(aSeriesVector) ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector;
+ if (xDiagram)
+ aSeriesVector = xDiagram->getDataSeries();
+ uno::Reference< chart2::data::XDataSource > xSeriesSource =
+ DataSeriesHelper::getDataSource( aSeriesVector );
const Sequence< Reference< chart2::data::XLabeledDataSequence > > aDataSequences( xSeriesSource->getDataSequences() );
//the first x-values is always the next sequence //todo ... other x-values get lost for old format
@@ -248,25 +245,24 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::pressUsedDataIntoR
aResultVector.push_back( labeledData );
}
- return new DataSource( comphelper::containerToSequence(aResultVector) );
+ return new DataSource( aResultVector );
}
uno::Sequence< OUString > DataSourceHelper::getUsedDataRanges(
- const uno::Reference< chart2::XDiagram > & xDiagram )
+ const rtl::Reference< Diagram > & xDiagram )
{
std::vector< OUString > aResult;
if( xDiagram.is())
{
- uno::Reference< data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) );
+ uno::Reference< data::XLabeledDataSequence > xCategories( xDiagram->getCategories() );
if( xCategories.is() )
lcl_addRanges( aResult, xCategories );
- std::vector< uno::Reference< XDataSeries > > aSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector( xDiagram->getDataSeries() );
for (auto const& series : aSeriesVector)
{
- uno::Reference< data::XDataSource > xDataSource(series, uno::UNO_QUERY);
- lcl_addDataSourceRanges( aResult, xDataSource );
+ lcl_addDataSourceRanges( aResult, series );
lcl_addErrorBarRanges( aResult, series );
}
}
@@ -274,69 +270,34 @@ uno::Sequence< OUString > DataSourceHelper::getUsedDataRanges(
return comphelper::containerToSequence( aResult );
}
-uno::Sequence< OUString > DataSourceHelper::getUsedDataRanges( const uno::Reference< frame::XModel > & xChartModel )
+uno::Sequence< OUString > DataSourceHelper::getUsedDataRanges( const rtl::Reference<::chart::ChartModel> & xChartModel )
{
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
return getUsedDataRanges( xDiagram );
}
-uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
- const uno::Reference< chart2::XChartDocument >& xChartDoc )
-{
- return pressUsedDataIntoRectangularFormat( xChartDoc );
-}
-
-uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
- const uno::Reference< frame::XModel >& xChartModel )
-{
- std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aResult;
-
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
- uno::Reference< data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) );
- if( xCategories.is() )
- aResult.push_back( xCategories );
-
- std::vector< uno::Reference< XDataSeries > > aSeriesVector( ChartModelHelper::getDataSeries( xChartModel ) );
- for (auto const& series : aSeriesVector)
- {
- uno::Reference< data::XDataSource > xDataSource(series, uno::UNO_QUERY);
- if( !xDataSource.is() )
- continue;
- const uno::Sequence< uno::Reference< data::XLabeledDataSequence > > aDataSequences( xDataSource->getDataSequences() );
- aResult.insert( aResult.end(), aDataSequences.begin(), aDataSequences.end() );
- }
-
- return uno::Reference< chart2::data::XDataSource >(
- new DataSource( comphelper::containerToSequence( aResult )));
-}
-
-uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
+rtl::Reference< DataSource > DataSourceHelper::getUsedData(
ChartModel& rModel )
{
std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aResult;
- uno::Reference< XDiagram > xDiagram( rModel.getFirstDiagram() );
- uno::Reference< data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) );
+ rtl::Reference< Diagram > xDiagram = rModel.getFirstChartDiagram();
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories( xDiagram->getCategories() );
if( xCategories.is() )
aResult.push_back( xCategories );
- std::vector< uno::Reference< XDataSeries > > aSeriesVector( ChartModelHelper::getDataSeries( rModel ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector = ChartModelHelper::getDataSeries( &rModel );
for (auto const& series : aSeriesVector)
{
- uno::Reference< data::XDataSource > xDataSource(series, uno::UNO_QUERY);
- if( !xDataSource.is() )
- continue;
- const uno::Sequence< uno::Reference< data::XLabeledDataSequence > > aDataSequences( xDataSource->getDataSequences() );
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aDataSequences( series->getDataSequences2() );
aResult.insert( aResult.end(), aDataSequences.begin(), aDataSequences.end() );
}
- return uno::Reference< chart2::data::XDataSource >(
- new DataSource( comphelper::containerToSequence( aResult )));
+ return new DataSource( aResult );
}
bool DataSourceHelper::detectRangeSegmentation(
- const uno::Reference<
- frame::XModel >& xChartModel
+ const rtl::Reference<::chart::ChartModel>& xChartModel
, OUString& rOutRangeString
, css::uno::Sequence< sal_Int32 >& rSequenceMapping
, bool& rOutUseColumns
@@ -345,22 +306,23 @@ bool DataSourceHelper::detectRangeSegmentation(
{
bool bSomethingDetected = false;
- uno::Reference< XChartDocument > xChartDocument( xChartModel, uno::UNO_QUERY );
- if( !xChartDocument.is() )
+ if( !xChartModel.is() )
return bSomethingDetected;
- uno::Reference< data::XDataProvider > xDataProvider( xChartDocument->getDataProvider() );
+ uno::Reference< data::XDataProvider > xDataProvider( xChartModel->getDataProvider() );
if( !xDataProvider.is() )
return bSomethingDetected;
try
{
DataSourceHelper::readArguments(
- xDataProvider->detectArguments( pressUsedDataIntoRectangularFormat( xChartDocument ) ),
+ xDataProvider->detectArguments( pressUsedDataIntoRectangularFormat( xChartModel ) ),
rOutRangeString, rSequenceMapping, rOutUseColumns, rOutFirstCellAsLabel, rOutHasCategories );
bSomethingDetected = !rOutRangeString.isEmpty();
- uno::Reference< chart2::data::XLabeledDataSequence > xCategories(
- DiagramHelper::getCategoriesFromDiagram( xChartDocument->getFirstDiagram() ));
+ rtl::Reference<Diagram> xDiagram = xChartModel->getFirstChartDiagram();
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories;
+ if (xDiagram)
+ xCategories = xDiagram->getCategories();
rOutHasCategories = xCategories.is();
}
catch( uno::Exception & )
@@ -371,7 +333,7 @@ bool DataSourceHelper::detectRangeSegmentation(
}
bool DataSourceHelper::allArgumentsForRectRangeDetected(
- const uno::Reference< chart2::XChartDocument >& xChartDocument )
+ const rtl::Reference<::chart::ChartModel>& xChartDocument )
{
bool bHasDataRowSource = false;
bool bHasFirstCellAsLabel = false;
@@ -415,30 +377,24 @@ bool DataSourceHelper::allArgumentsForRectRangeDetected(
}
void DataSourceHelper::setRangeSegmentation(
- const uno::Reference< frame::XModel >& xChartModel
+ const rtl::Reference<::chart::ChartModel>& xChartModel
, const css::uno::Sequence< sal_Int32 >& rSequenceMapping
, bool bUseColumns , bool bFirstCellAsLabel, bool bUseCategories )
{
- uno::Reference< XChartDocument > xChartDocument( xChartModel, uno::UNO_QUERY );
- if( !xChartDocument.is() )
- return;
- uno::Reference< data::XDataProvider > xDataProvider( xChartDocument->getDataProvider() );
+ uno::Reference< data::XDataProvider > xDataProvider( xChartModel->getDataProvider() );
if( !xDataProvider.is() )
return;
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
if( !xDiagram.is() )
return;
- uno::Reference< chart2::XChartTypeManager > xChartTypeManager( xChartDocument->getChartTypeManager() );
+ rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = xChartModel->getTypeManager();
if( !xChartTypeManager.is() )
return;
- uno::Reference< lang::XMultiServiceFactory > xTemplateFactory( xChartTypeManager, uno::UNO_QUERY );
- if( !xTemplateFactory.is() )
- return;
OUString aRangeString;
bool bDummy;
uno::Sequence< sal_Int32 > aDummy;
- readArguments( xDataProvider->detectArguments( pressUsedDataIntoRectangularFormat( xChartDocument )),
+ readArguments( xDataProvider->detectArguments( pressUsedDataIntoRectangularFormat( xChartModel )),
aRangeString, aDummy, bDummy, bDummy, bDummy );
uno::Sequence< beans::PropertyValue > aArguments(
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 1aa9ad5cc381..38aa97265396 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -19,54 +19,42 @@
#include <DiagramHelper.hxx>
#include <Diagram.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
-#include <ChartTypeHelper.hxx>
-#include <ChartTypeManager.hxx>
-#include <ChartTypeTemplate.hxx>
+#include <ChartType.hxx>
#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
#include <ExplicitCategoriesProvider.hxx>
-#include <servicenames_charttypes.hxx>
#include <RelativePositionHelper.hxx>
#include <ControllerLockGuard.hxx>
#include <NumberFormatterWrapper.hxx>
#include <unonames.hxx>
#include <BaseCoordinateSystem.hxx>
-#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <com/sun/star/chart/XDiagramPositioning.hpp>
#include <com/sun/star/chart2/XAnyDescriptionAccess.hpp>
-#include <com/sun/star/chart2/XTitled.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
-#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/chart2/RelativeSize.hpp>
#include <com/sun/star/chart2/StackingDirection.hpp>
-#include <com/sun/star/util/CloseVetoException.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
-#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <unotools/saveopt.hxx>
-#include <rtl/math.hxx>
#include <svl/numformat.hxx>
#include <svl/zforlist.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <comphelper/sequence.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
#include <limits>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
-using namespace ::std;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -76,283 +64,10 @@ using ::com::sun::star::chart2::XAnyDescriptionAccess;
namespace chart
{
-DiagramHelper::tTemplateWithServiceName
- DiagramHelper::getTemplateForDiagram(
- const Reference< XDiagram > & xDiagram,
- const rtl::Reference< ::chart::ChartTypeManager > & xChartTypeManager )
-{
- DiagramHelper::tTemplateWithServiceName aResult;
-
- if( ! (xChartTypeManager.is() && xDiagram.is()))
- return aResult;
-
- Sequence< OUString > aServiceNames( xChartTypeManager->getAvailableServiceNames());
- const sal_Int32 nLength = aServiceNames.getLength();
-
- bool bTemplateFound = false;
-
- for( sal_Int32 i = 0; ! bTemplateFound && i < nLength; ++i )
- {
- try
- {
- rtl::Reference< ::chart::ChartTypeTemplate > xTempl =
- xChartTypeManager->createTemplate( aServiceNames[ i ] );
-
- if (xTempl.is() && xTempl->matchesTemplate(xDiagram, true))
- {
- aResult.xChartTypeTemplate = xTempl;
- aResult.sServiceName = aServiceNames[ i ];
- bTemplateFound = true;
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
- }
-
- return aResult;
-}
-
-void DiagramHelper::setVertical(
- const Reference< XDiagram > & xDiagram,
- bool bVertical /* = true */ )
-{
- try
- {
- Reference< XCoordinateSystemContainer > xCnt( xDiagram, uno::UNO_QUERY );
- if (!xCnt.is())
- return;
-
- const Sequence< Reference<XCoordinateSystem> > aCooSys = xCnt->getCoordinateSystems();
- uno::Any aValue;
- aValue <<= bVertical;
- for( uno::Reference< XCoordinateSystem > const & xCooSys : aCooSys )
- {
- Reference< beans::XPropertySet > xProp( xCooSys, uno::UNO_QUERY );
- bool bChanged = false;
- if (xProp.is())
- {
- bool bOldSwap = false;
- if( !(xProp->getPropertyValue("SwapXAndYAxis") >>= bOldSwap)
- || bVertical != bOldSwap )
- bChanged = true;
-
- if( bChanged )
- xProp->setPropertyValue("SwapXAndYAxis", aValue);
- }
-
- if (!xCooSys.is())
- continue;
-
- const sal_Int32 nDimensionCount = xCooSys->getDimension();
- sal_Int32 nDimIndex = 0;
- for (nDimIndex=0; nDimIndex < nDimensionCount; ++nDimIndex)
- {
- const sal_Int32 nMaximumScaleIndex = xCooSys->getMaximumAxisIndexByDimension(nDimIndex);
- for (sal_Int32 nI = 0; nI <= nMaximumScaleIndex; ++nI)
- {
- Reference<chart2::XAxis> xAxis = xCooSys->getAxisByDimension(nDimIndex,nI);
- if (!xAxis.is())
- continue;
-
- //adapt title rotation only when axis swapping has changed
- if (!bChanged)
- continue;
-
- Reference< XTitled > xTitled( xAxis, uno::UNO_QUERY );
- if (!xTitled.is())
- continue;
-
- Reference< beans::XPropertySet > xTitleProps( xTitled->getTitleObject(), uno::UNO_QUERY );
- if (!xTitleProps.is())
- continue;
-
- double fAngleDegree = 0.0;
- xTitleProps->getPropertyValue("TextRotation") >>= fAngleDegree;
- if (fAngleDegree != 0.0 &&
- !rtl::math::approxEqual(fAngleDegree, 90.0))
- continue;
-
- double fNewAngleDegree = 0.0;
- if( !bVertical && nDimIndex == 1 )
- fNewAngleDegree = 90.0;
- else if( bVertical && nDimIndex == 0 )
- fNewAngleDegree = 90.0;
-
- xTitleProps->setPropertyValue("TextRotation", uno::Any(fNewAngleDegree));
- }
- }
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-}
-
-bool DiagramHelper::getVertical( const uno::Reference< chart2::XDiagram > & xDiagram,
- bool& rbFound, bool& rbAmbiguous )
-{
- bool bValue = false;
- rbFound = false;
- rbAmbiguous = false;
-
- Reference< XCoordinateSystemContainer > xCnt( xDiagram, uno::UNO_QUERY );
- if (!xCnt.is())
- return false;
-
- const Sequence< Reference<XCoordinateSystem> > aCooSys = xCnt->getCoordinateSystems();
-
- for (Reference<XCoordinateSystem> const & coords : aCooSys)
- {
- Reference<beans::XPropertySet> xProp(coords, uno::UNO_QUERY);
- if (!xProp.is())
- continue;
-
- bool bCurrent = false;
- if (xProp->getPropertyValue("SwapXAndYAxis") >>= bCurrent)
- {
- if (!rbFound)
- {
- bValue = bCurrent;
- rbFound = true;
- }
- else if (bCurrent != bValue)
- {
- // ambiguous -> choose always first found
- rbAmbiguous = true;
- }
- }
- }
- return bValue;
-}
-
-void DiagramHelper::setStackMode(
- const Reference< XDiagram > & xDiagram,
- StackMode eStackMode
-)
-{
- try
- {
- bool bValueFound = false;
- bool bIsAmbiguous = false;
- StackMode eOldStackMode = DiagramHelper::getStackMode( xDiagram, bValueFound, bIsAmbiguous );
-
- if( eStackMode == eOldStackMode && !bIsAmbiguous )
- return;
-
- StackingDirection eNewDirection = StackingDirection_NO_STACKING;
- if( eStackMode == StackMode::YStacked || eStackMode == StackMode::YStackedPercent )
- eNewDirection = StackingDirection_Y_STACKING;
- else if( eStackMode == StackMode::ZStacked )
- eNewDirection = StackingDirection_Z_STACKING;
-
- uno::Any aNewDirection( eNewDirection );
-
- bool bPercent = false;
- if( eStackMode == StackMode::YStackedPercent )
- bPercent = true;
-
- //iterate through all coordinate systems
- uno::Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY );
- if( !xCooSysContainer.is() )
- return;
- const uno::Sequence< uno::Reference< XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() );
- for( uno::Reference< XCoordinateSystem > const & xCooSys : aCooSysList )
- {
- //set correct percent stacking
- const sal_Int32 nMaximumScaleIndex = xCooSys->getMaximumAxisIndexByDimension(1);
- for(sal_Int32 nI=0; nI<=nMaximumScaleIndex; ++nI)
- {
- Reference< chart2::XAxis > xAxis( xCooSys->getAxisByDimension( 1,nI ));
- if( xAxis.is())
- {
- chart2::ScaleData aScaleData = xAxis->getScaleData();
- if( (aScaleData.AxisType==AxisType::PERCENT) != bPercent )
- {
- if( bPercent )
- aScaleData.AxisType = AxisType::PERCENT;
- else
- aScaleData.AxisType = AxisType::REALNUMBER;
- xAxis->setScaleData( aScaleData );
- }
- }
- }
- //iterate through all chart types in the current coordinate system
- uno::Reference< XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY );
- if( !xChartTypeContainer.is() )
- continue;
- uno::Sequence< uno::Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() );
- if (!aChartTypeList.hasElements())
- continue;
-
- uno::Reference< XChartType > xChartType( aChartTypeList[0] );
-
- //iterate through all series in this chart type
- uno::Reference< XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY );
- OSL_ASSERT( xDataSeriesContainer.is());
- if( !xDataSeriesContainer.is() )
- continue;
-
- const uno::Sequence< uno::Reference< XDataSeries > > aSeriesList( xDataSeriesContainer->getDataSeries() );
- for( uno::Reference< XDataSeries > const & dataSeries : aSeriesList )
- {
- Reference< beans::XPropertySet > xProp( dataSeries, uno::UNO_QUERY );
- if(xProp.is())
- xProp->setPropertyValue( "StackingDirection", aNewDirection );
- }
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-}
-
-StackMode DiagramHelper::getStackMode( const Reference< XDiagram > & xDiagram, bool& rbFound, bool& rbAmbiguous )
-{
- rbFound=false;
- rbAmbiguous=false;
-
- StackMode eGlobalStackMode = StackMode::NONE;
-
- //iterate through all coordinate systems
- uno::Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY );
- if( !xCooSysContainer.is() )
- return eGlobalStackMode;
- const uno::Sequence< uno::Reference< XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() );
- for( uno::Reference< XCoordinateSystem > const & xCooSys : aCooSysList )
- {
- //iterate through all chart types in the current coordinate system
- uno::Reference< XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY );
- if( !xChartTypeContainer.is() )
- continue;
- uno::Sequence< uno::Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() );
- for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT )
- {
- uno::Reference< XChartType > xChartType( aChartTypeList[nT] );
-
- StackMode eLocalStackMode = DiagramHelper::getStackModeFromChartType(
- xChartType, rbFound, rbAmbiguous, xCooSys );
-
- if( rbFound && eLocalStackMode != eGlobalStackMode && nT>0 )
- {
- rbAmbiguous = true;
- return eGlobalStackMode;
- }
-
- eGlobalStackMode = eLocalStackMode;
- }
- }
-
- return eGlobalStackMode;
-}
-
StackMode DiagramHelper::getStackModeFromChartType(
- const Reference< XChartType > & xChartType,
+ const rtl::Reference< ChartType > & xChartType,
bool& rbFound, bool& rbAmbiguous,
- const Reference< XCoordinateSystem > & xCorrespondingCoordinateSystem )
+ const rtl::Reference< BaseCoordinateSystem > & xCorrespondingCoordinateSystem )
{
StackMode eStackMode = StackMode::NONE;
rbFound = false;
@@ -360,23 +75,21 @@ StackMode DiagramHelper::getStackModeFromChartType(
try
{
- Reference< XDataSeriesContainer > xDSCnt( xChartType, uno::UNO_QUERY_THROW );
- Sequence< Reference< chart2::XDataSeries > > aSeries( xDSCnt->getDataSeries());
+ const std::vector< rtl::Reference< DataSeries > > & aSeries = xChartType->getDataSeries2();
chart2::StackingDirection eCommonDirection = chart2::StackingDirection_NO_STACKING;
bool bDirectionInitialized = false;
// first series is irrelevant for stacking, start with second, unless
// there is only one series
- const sal_Int32 nSeriesCount = aSeries.getLength();
+ const sal_Int32 nSeriesCount = aSeries.size();
sal_Int32 i = (nSeriesCount == 1) ? 0: 1;
for( ; i<nSeriesCount; ++i )
{
rbFound = true;
- Reference< beans::XPropertySet > xProp( aSeries[i], uno::UNO_QUERY_THROW );
chart2::StackingDirection eCurrentDirection = eCommonDirection;
// property is not MAYBEVOID
- bool bSuccess = ( xProp->getPropertyValue( "StackingDirection" ) >>= eCurrentDirection );
+ bool bSuccess = ( aSeries[i]->getPropertyValue( "StackingDirection" ) >>= eCurrentDirection );
OSL_ASSERT( bSuccess );
if( ! bDirectionInitialized )
{
@@ -410,8 +123,8 @@ StackMode DiagramHelper::getStackModeFromChartType(
if( nSeriesCount )
nAxisIndex = DataSeriesHelper::getAttachedAxisIndex(aSeries[0]);
- Reference< chart2::XAxis > xAxis(
- xCorrespondingCoordinateSystem->getAxisByDimension( 1,nAxisIndex ));
+ rtl::Reference< Axis > xAxis =
+ xCorrespondingCoordinateSystem->getAxisByDimension2( 1,nAxisIndex );
if( xAxis.is())
{
chart2::ScaleData aScaleData = xAxis->getScaleData();
@@ -431,502 +144,26 @@ StackMode DiagramHelper::getStackModeFromChartType(
return eStackMode;
}
-sal_Int32 DiagramHelper::getDimension( const Reference< XDiagram > & xDiagram )
-{
- // -1: not yet set
- sal_Int32 nResult = -1;
-
- try
- {
- Reference< XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY );
- if( xCooSysCnt.is() )
- {
- const Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
- xCooSysCnt->getCoordinateSystems());
-
- for( Reference< XCoordinateSystem > const & xCooSys : aCooSysSeq )
- {
- if(xCooSys.is())
- {
- nResult = xCooSys->getDimension();
- break;
- }
- }
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-
- return nResult;
-}
-
-void DiagramHelper::setDimension(
- const Reference< XDiagram > & xDiagram,
- sal_Int32 nNewDimensionCount )
-{
- if( ! xDiagram.is())
- return;
-
- if( DiagramHelper::getDimension( xDiagram ) == nNewDimensionCount )
- return;
-
- try
- {
- bool rbFound = false;
- bool rbAmbiguous = true;
- StackMode eStackMode = DiagramHelper::getStackMode( xDiagram, rbFound, rbAmbiguous );
- bool bIsSupportingOnlyDeepStackingFor3D=false;
-
- //change all coordinate systems:
- Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() );
- for( Reference<XCoordinateSystem> const & xOldCooSys : aCooSysList )
- {
- Reference< XCoordinateSystem > xNewCooSys;
-
- Reference< XChartTypeContainer > xChartTypeContainer( xOldCooSys, uno::UNO_QUERY );
- if( !xChartTypeContainer.is() )
- continue;
-
- const Sequence< Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() );
- for( Reference< XChartType > const & xChartType : aChartTypeList )
- {
- bIsSupportingOnlyDeepStackingFor3D = ChartTypeHelper::isSupportingOnlyDeepStackingFor3D( xChartType );
- if(!xNewCooSys.is())
- {
- xNewCooSys = xChartType->createCoordinateSystem( nNewDimensionCount );
- break;
- }
- //@todo make sure that all following charttypes are also capable of the new dimension
- //otherwise separate them in a different group
- //BM: might be done in replaceCoordinateSystem()
- }
-
- // replace the old coordinate system at all places where it was used
- DiagramHelper::replaceCoordinateSystem( xDiagram, xOldCooSys, xNewCooSys );
- }
-
- //correct stack mode if necessary
- if( nNewDimensionCount==3 && eStackMode != StackMode::ZStacked && bIsSupportingOnlyDeepStackingFor3D )
- DiagramHelper::setStackMode( xDiagram, StackMode::ZStacked );
- else if( nNewDimensionCount==2 && eStackMode == StackMode::ZStacked )
- DiagramHelper::setStackMode( xDiagram, StackMode::NONE );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-}
-
-void DiagramHelper::replaceCoordinateSystem(
- const Reference< XDiagram > & xDiagram,
- const Reference< XCoordinateSystem > & xCooSysToReplace,
- const Reference< XCoordinateSystem > & xReplacement )
-{
- OSL_ASSERT( xDiagram.is());
- if( ! xDiagram.is())
- return;
-
- // update the coordinate-system container
- Reference< XCoordinateSystemContainer > xCont( xDiagram, uno::UNO_QUERY );
- if( !xCont.is())
- return;
-
- try
- {
- Reference< chart2::data::XLabeledDataSequence > xCategories = DiagramHelper::getCategoriesFromDiagram( xDiagram );
-
- // move chart types of xCooSysToReplace to xReplacement
- Reference< XChartTypeContainer > xCTCntCooSys( xCooSysToReplace, uno::UNO_QUERY_THROW );
- Reference< XChartTypeContainer > xCTCntReplacement( xReplacement, uno::UNO_QUERY_THROW );
- xCTCntReplacement->setChartTypes( xCTCntCooSys->getChartTypes());
-
- xCont->removeCoordinateSystem( xCooSysToReplace );
- xCont->addCoordinateSystem( xReplacement );
-
- if( xCategories.is() )
- DiagramHelper::setCategoriesToDiagram( xCategories, xDiagram );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-}
-
bool DiagramHelper::isSeriesAttachedToMainAxis(
- const uno::Reference< chart2::XDataSeries >& xDataSeries )
+ const rtl::Reference< ::chart::DataSeries >& xDataSeries )
{
sal_Int32 nAxisIndex = DataSeriesHelper::getAttachedAxisIndex(xDataSeries);
return (nAxisIndex==0);
}
-bool DiagramHelper::attachSeriesToAxis( bool bAttachToMainAxis
- , const uno::Reference< chart2::XDataSeries >& xDataSeries
- , const uno::Reference< chart2::XDiagram >& xDiagram
- , const uno::Reference< uno::XComponentContext > & xContext
- , bool bAdaptAxes )
-{
- bool bChanged = false;
-
- //set property at axis
- Reference< beans::XPropertySet > xProp( xDataSeries, uno::UNO_QUERY_THROW );
-
- sal_Int32 nNewAxisIndex = bAttachToMainAxis ? 0 : 1;
- sal_Int32 nOldAxisIndex = DataSeriesHelper::getAttachedAxisIndex(xDataSeries);
- uno::Reference< chart2::XAxis > xOldAxis( DiagramHelper::getAttachedAxis( xDataSeries, xDiagram ) );
-
- if( nOldAxisIndex != nNewAxisIndex )
- {
- try
- {
- xProp->setPropertyValue( "AttachedAxisIndex", uno::Any( nNewAxisIndex ) );
- bChanged = true;
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
- }
-
- if( bChanged && xDiagram.is() )
- {
- uno::Reference< XAxis > xAxis( AxisHelper::getAxis( 1, bAttachToMainAxis, xDiagram ) );
- if(!xAxis.is()) //create an axis if necessary
- xAxis = AxisHelper::createAxis( 1, bAttachToMainAxis, xDiagram, xContext );
- if( bAdaptAxes )
- {
- AxisHelper::makeAxisVisible( xAxis );
- AxisHelper::hideAxisIfNoDataIsAttached( xOldAxis, xDiagram );
- }
- }
-
- return bChanged;
-}
-
-uno::Reference< XAxis > DiagramHelper::getAttachedAxis(
- const uno::Reference< XDataSeries >& xSeries,
- const uno::Reference< XDiagram >& xDiagram )
-{
- return AxisHelper::getAxis( 1, DiagramHelper::isSeriesAttachedToMainAxis( xSeries ), xDiagram );
-}
-
-uno::Reference< XChartType > DiagramHelper::getChartTypeOfSeries(
- const uno::Reference< chart2::XDiagram >& xDiagram
- , const uno::Reference< XDataSeries >& xGivenDataSeries )
-{
- if( !xGivenDataSeries.is() )
- return nullptr;
- if(!xDiagram.is())
- return nullptr;
-
- //iterate through the model to find the given xSeries
- //the found parent indicates the charttype
-
- //iterate through all coordinate systems
- uno::Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY );
- if( !xCooSysContainer.is())
- return nullptr;
-
- const uno::Sequence< uno::Reference< XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() );
- for( uno::Reference< XCoordinateSystem > const & xCooSys : aCooSysList )
- {
- //iterate through all chart types in the current coordinate system
- uno::Reference< XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY );
- OSL_ASSERT( xChartTypeContainer.is());
- if( !xChartTypeContainer.is() )
- continue;
- const uno::Sequence< uno::Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() );
- for( uno::Reference< XChartType > const & xChartType : aChartTypeList )
- {
- //iterate through all series in this chart type
- uno::Reference< XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY );
- OSL_ASSERT( xDataSeriesContainer.is());
- if( !xDataSeriesContainer.is() )
- continue;
-
- const uno::Sequence< uno::Reference< XDataSeries > > aSeriesList( xDataSeriesContainer->getDataSeries() );
- for( uno::Reference< XDataSeries > const & dataSeries : aSeriesList )
- {
- if( xGivenDataSeries==dataSeries )
- return xChartType;
- }
- }
- }
- return nullptr;
-}
-
-std::vector< Reference< XDataSeries > >
- DiagramHelper::getDataSeriesFromDiagram(
- const Reference< XDiagram > & xDiagram )
-{
- std::vector< Reference< XDataSeries > > aResult;
-
- try
- {
- Reference< XCoordinateSystemContainer > xCooSysCnt(
- xDiagram, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
- xCooSysCnt->getCoordinateSystems());
- for( Reference< XCoordinateSystem > const & coords : aCooSysSeq )
- {
- Reference< XChartTypeContainer > xCTCnt( coords, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes());
- for( Reference< XChartType> const & chartType : aChartTypeSeq )
- {
- Reference< XDataSeriesContainer > xDSCnt( chartType, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XDataSeries > > aSeriesSeq( xDSCnt->getDataSeries() );
- aResult.insert( aResult.end(), aSeriesSeq.begin(), aSeriesSeq.end() );
- }
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-
- return aResult;
-}
-
-Sequence< Sequence< Reference< XDataSeries > > >
- DiagramHelper::getDataSeriesGroups( const Reference< XDiagram > & xDiagram )
-{
- vector< Sequence< Reference< XDataSeries > > > aResult;
-
- //iterate through all coordinate systems
- Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY );
- if( xCooSysContainer.is() )
- {
- const Sequence< Reference< XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() );
- for( Reference< XCoordinateSystem > const & coords : aCooSysList )
- {
- //iterate through all chart types in the current coordinate system
- Reference< XChartTypeContainer > xChartTypeContainer( coords, uno::UNO_QUERY );
- if( !xChartTypeContainer.is() )
- continue;
- const Sequence< Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() );
- for( Reference< XChartType > const & chartType : aChartTypeList )
- {
- Reference< XDataSeriesContainer > xDataSeriesContainer( chartType, uno::UNO_QUERY );
- if( !xDataSeriesContainer.is() )
- continue;
- aResult.push_back( xDataSeriesContainer->getDataSeries() );
- }
- }
- }
- return comphelper::containerToSequence( aResult );
-}
-
-Reference< XChartType >
- DiagramHelper::getChartTypeByIndex( const Reference< XDiagram >& xDiagram, sal_Int32 nIndex )
-{
- Reference< XChartType > xChartType;
-
- //iterate through all coordinate systems
- Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY );
- if( ! xCooSysContainer.is())
- return xChartType;
-
- const Sequence< Reference< XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() );
- sal_Int32 nTypesSoFar = 0;
- for( Reference< XCoordinateSystem > const & coords : aCooSysList )
- {
- Reference< XChartTypeContainer > xChartTypeContainer( coords, uno::UNO_QUERY );
- if( !xChartTypeContainer.is() )
- continue;
- Sequence< Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() );
- if( nIndex >= 0 && nIndex < (nTypesSoFar + aChartTypeList.getLength()) )
- {
- xChartType.set( aChartTypeList[nIndex - nTypesSoFar] );
- break;
- }
- nTypesSoFar += aChartTypeList.getLength();
- }
-
- return xChartType;
-}
-
-namespace
-{
-
-std::vector< Reference< XAxis > > lcl_getAxisHoldingCategoriesFromDiagram(
- const Reference< XDiagram > & xDiagram )
-{
- std::vector< Reference< XAxis > > aRet;
-
- // return first x-axis as fall-back
- Reference< XAxis > xFallBack;
- try
- {
- Reference< XCoordinateSystemContainer > xCooSysCnt(
- xDiagram, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
- xCooSysCnt->getCoordinateSystems());
- for( Reference< XCoordinateSystem > const & xCooSys : aCooSysSeq )
- {
- OSL_ASSERT( xCooSys.is());
- for( sal_Int32 nN = xCooSys->getDimension(); nN--; )
- {
- const sal_Int32 nMaximumScaleIndex = xCooSys->getMaximumAxisIndexByDimension(nN);
- for(sal_Int32 nI=0; nI<=nMaximumScaleIndex; ++nI)
- {
- Reference< XAxis > xAxis = xCooSys->getAxisByDimension( nN,nI );
- OSL_ASSERT( xAxis.is());
- if( xAxis.is())
- {
- ScaleData aScaleData = xAxis->getScaleData();
- if( aScaleData.Categories.is() || (aScaleData.AxisType == AxisType::CATEGORY) )
- {
- aRet.push_back(xAxis);
- }
- if( (nN == 0) && !xFallBack.is())
- xFallBack.set( xAxis );
- }
- }
- }
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2" );
- }
-
- if( aRet.empty() )
- aRet.push_back(xFallBack);
-
- return aRet;
-}
-
-} // anonymous namespace
-
-bool DiagramHelper::isCategoryDiagram(
- const Reference< XDiagram >& xDiagram )
-{
- try
- {
- Reference< XCoordinateSystemContainer > xCooSysCnt(
- xDiagram, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
- xCooSysCnt->getCoordinateSystems());
- for( Reference< XCoordinateSystem > const & xCooSys : aCooSysSeq )
- {
- OSL_ASSERT( xCooSys.is());
- for( sal_Int32 nN = xCooSys->getDimension(); nN--; )
- {
- const sal_Int32 nMaximumScaleIndex = xCooSys->getMaximumAxisIndexByDimension(nN);
- for(sal_Int32 nI=0; nI<=nMaximumScaleIndex; ++nI)
- {
- Reference< XAxis > xAxis = xCooSys->getAxisByDimension( nN,nI );
- OSL_ASSERT( xAxis.is());
- if( xAxis.is())
- {
- ScaleData aScaleData = xAxis->getScaleData();
- if( aScaleData.AxisType == AxisType::CATEGORY || aScaleData.AxisType == AxisType::DATE )
- return true;
- }
- }
- }
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-
- return false;
-}
-
-void DiagramHelper::setCategoriesToDiagram(
- const Reference< chart2::data::XLabeledDataSequence >& xCategories,
- const Reference< XDiagram >& xDiagram,
- bool bSetAxisType /* = false */,
- bool bCategoryAxis /* = true */ )
-{
- std::vector< Reference< chart2::XAxis > > aCatAxes(
- lcl_getAxisHoldingCategoriesFromDiagram( xDiagram ));
-
- for (const Reference< chart2::XAxis >& xCatAxis : aCatAxes)
- {
- if( xCatAxis.is())
- {
- ScaleData aScaleData( xCatAxis->getScaleData());
- aScaleData.Categories = xCategories;
- if( bSetAxisType )
- {
- if( bCategoryAxis )
- aScaleData.AxisType = AxisType::CATEGORY;
- else if( aScaleData.AxisType == AxisType::CATEGORY || aScaleData.AxisType == AxisType::DATE )
- aScaleData.AxisType = AxisType::REALNUMBER;
- }
- xCatAxis->setScaleData( aScaleData );
- }
- }
-}
-
-Reference< data::XLabeledDataSequence >
- DiagramHelper::getCategoriesFromDiagram(
- const Reference< XDiagram > & xDiagram )
-{
- Reference< data::XLabeledDataSequence > xResult;
-
- try
- {
- std::vector< Reference< chart2::XAxis > > aCatAxes(
- lcl_getAxisHoldingCategoriesFromDiagram( xDiagram ));
- //search for first categories
- if (!aCatAxes.empty())
- {
- Reference< chart2::XAxis > xCatAxis(aCatAxes[0]);
- if( xCatAxis.is())
- {
- ScaleData aScaleData( xCatAxis->getScaleData());
- if( aScaleData.Categories.is() )
- {
- xResult.set( aScaleData.Categories );
- uno::Reference<beans::XPropertySet> xProp(aScaleData.Categories->getValues(), uno::UNO_QUERY );
- if( xProp.is() )
- {
- try
- {
- xProp->setPropertyValue( "Role", uno::Any( OUString("categories") ) );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
- }
- }
- }
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-
- return xResult;
-}
-
static void lcl_generateAutomaticCategoriesFromChartType(
Sequence< OUString >& rRet,
- const Reference< XChartType >& xChartType )
+ const rtl::Reference< ChartType >& xChartType )
{
if(!xChartType.is())
return;
OUString aMainSeq( xChartType->getRoleOfSequenceForSeriesLabel() );
- Reference< XDataSeriesContainer > xSeriesCnt( xChartType, uno::UNO_QUERY );
- if( !xSeriesCnt.is() )
- return;
- const Sequence< Reference< XDataSeries > > aSeriesSeq( xSeriesCnt->getDataSeries() );
- for( Reference< XDataSeries > const & dataSeries : aSeriesSeq )
+ const std::vector< rtl::Reference< DataSeries > > & aSeriesSeq = xChartType->getDataSeries2();
+ for( rtl::Reference< DataSeries > const & dataSeries : aSeriesSeq )
{
- Reference< data::XDataSource > xDataSource( dataSeries, uno::UNO_QUERY );
- if( !xDataSource.is() )
- continue;
- Reference< chart2::data::XLabeledDataSequence > xLabeledSeq(
- ::chart::DataSeriesHelper::getDataSequenceByRole( xDataSource, aMainSeq ));
+ uno::Reference< data::XLabeledDataSequence > xLabeledSeq =
+ ::chart::DataSeriesHelper::getDataSequenceByRole( dataSeries, aMainSeq );
if( !xLabeledSeq.is() )
continue;
Reference< chart2::data::XDataSequence > xValueSeq( xLabeledSeq->getValues() );
@@ -938,15 +175,14 @@ static void lcl_generateAutomaticCategoriesFromChartType(
}
}
-Sequence< OUString > DiagramHelper::generateAutomaticCategoriesFromCooSys( const Reference< XCoordinateSystem > & xCooSys )
+Sequence< OUString > DiagramHelper::generateAutomaticCategoriesFromCooSys( const rtl::Reference< BaseCoordinateSystem > & xCooSys )
{
Sequence< OUString > aRet;
- Reference< XChartTypeContainer > xTypeCntr( xCooSys, uno::UNO_QUERY );
- if( xTypeCntr.is() )
+ if( xCooSys.is() )
{
- const Sequence< Reference< XChartType > > aChartTypes( xTypeCntr->getChartTypes() );
- for( Reference< XChartType > const & chartType : aChartTypes )
+ const std::vector< rtl::Reference< ChartType > > & aChartTypes( xCooSys->getChartTypes2() );
+ for( rtl::Reference< ChartType > const & chartType : aChartTypes )
{
lcl_generateAutomaticCategoriesFromChartType( aRet, chartType );
if( aRet.hasElements() )
@@ -959,14 +195,14 @@ Sequence< OUString > DiagramHelper::generateAutomaticCategoriesFromCooSys( const
Sequence< OUString > DiagramHelper::getExplicitSimpleCategories(
ChartModel& rModel )
{
- rtl::Reference< BaseCoordinateSystem > xCooSys = ChartModelHelper::getFirstCoordinateSystem( rModel );
+ rtl::Reference< BaseCoordinateSystem > xCooSys( ChartModelHelper::getFirstCoordinateSystem( &rModel ) );
ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSys, rModel );
return aExplicitCategoriesProvider.getSimpleCategories();
}
namespace
{
-void lcl_switchToDateCategories( const Reference< XChartDocument >& xChartDoc, const Reference< XAxis >& xAxis )
+void lcl_switchToDateCategories( const rtl::Reference< ChartModel >& xChartDoc, const Reference< XAxis >& xAxis )
{
if( !xAxis.is() )
return;
@@ -1002,13 +238,12 @@ void lcl_switchToDateCategories( const Reference< XChartDocument >& xChartDoc, c
}
//check the numberformat at the axis
Reference< beans::XPropertySet > xAxisProps( xAxis, uno::UNO_QUERY );
- Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( xChartDoc, uno::UNO_QUERY );
- if( xAxisProps.is() && xNumberFormatsSupplier.is() )
+ if( xAxisProps.is() )
{
sal_Int32 nNumberFormat = -1;
xAxisProps->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat;
- Reference< util::XNumberFormats > xNumberFormats( xNumberFormatsSupplier->getNumberFormats() );
+ Reference< util::XNumberFormats > xNumberFormats( xChartDoc->getNumberFormats() );
if( xNumberFormats.is() )
{
Reference< beans::XPropertySet > xKeyProps;
@@ -1042,7 +277,7 @@ void lcl_switchToDateCategories( const Reference< XChartDocument >& xChartDoc, c
xAxis->setScaleData( aScale );
}
-void lcl_switchToTextCategories( const Reference< XChartDocument >& xChartDoc, const Reference< XAxis >& xAxis )
+void lcl_switchToTextCategories( const rtl::Reference< ChartModel >& xChartDoc, const Reference< XAxis >& xAxis )
{
if( !xAxis.is() )
return;
@@ -1059,42 +294,36 @@ void lcl_switchToTextCategories( const Reference< XChartDocument >& xChartDoc, c
}
-void DiagramHelper::switchToDateCategories( const Reference< XChartDocument >& xChartDoc )
+void DiagramHelper::switchToDateCategories( const rtl::Reference<::chart::ChartModel>& xChartDoc )
{
if(xChartDoc.is())
{
ControllerLockGuardUNO aCtrlLockGuard( xChartDoc );
- Reference< chart2::XCoordinateSystem > xCooSys( ChartModelHelper::getFirstCoordinateSystem( xChartDoc ) );
+ rtl::Reference< BaseCoordinateSystem > xCooSys = ChartModelHelper::getFirstCoordinateSystem( xChartDoc );
if( xCooSys.is() )
{
- Reference< XAxis > xAxis( xCooSys->getAxisByDimension(0,0) );
+ rtl::Reference< Axis > xAxis = xCooSys->getAxisByDimension2(0,0);
lcl_switchToDateCategories( xChartDoc, xAxis );
}
}
}
-void DiagramHelper::switchToTextCategories( const Reference< XChartDocument >& xChartDoc )
+void DiagramHelper::switchToTextCategories( const rtl::Reference<::chart::ChartModel>& xChartDoc )
{
if(xChartDoc.is())
{
ControllerLockGuardUNO aCtrlLockGuard( xChartDoc );
- Reference< chart2::XCoordinateSystem > xCooSys( ChartModelHelper::getFirstCoordinateSystem( xChartDoc ) );
+ rtl::Reference< BaseCoordinateSystem > xCooSys = ChartModelHelper::getFirstCoordinateSystem( xChartDoc );
if( xCooSys.is() )
{
- Reference< XAxis > xAxis( xCooSys->getAxisByDimension(0,0) );
+ rtl::Reference< Axis > xAxis = xCooSys->getAxisByDimension2(0,0);
lcl_switchToTextCategories( xChartDoc, xAxis );
}
}
}
-bool DiagramHelper::isSupportingDateAxis( const Reference< chart2::XDiagram >& xDiagram )
-{
- return ::chart::ChartTypeHelper::isSupportingDateAxis(
- DiagramHelper::getChartTypeByIndex( xDiagram, 0 ), 0 );
-}
-
bool DiagramHelper::isDateNumberFormat( sal_Int32 nNumberFormat, const Reference< util::XNumberFormats >& xNumberFormats )
{
bool bIsDate = false;
@@ -1154,7 +383,7 @@ sal_Int32 DiagramHelper::getDateTimeInputNumberFormat( const Reference< util::XN
// Obtain best matching date, time or datetime format.
nRet = pNumFormatter->GuessDateTimeFormat( nType, fNumber, LANGUAGE_SYSTEM);
// Obtain the corresponding edit format.
- nRet = pNumFormatter->GetEditFormat( fNumber, nRet, nType, LANGUAGE_SYSTEM, nullptr);
+ nRet = pNumFormatter->GetEditFormat( fNumber, nRet, nType, nullptr);
}
return nRet;
}
@@ -1189,38 +418,8 @@ sal_Int32 DiagramHelper::getPercentNumberFormat( const Reference< util::XNumberF
return nRet;
}
-Sequence< Reference< XChartType > >
- DiagramHelper::getChartTypesFromDiagram(
- const Reference< XDiagram > & xDiagram )
-{
- std::vector< Reference< XChartType > > aResult;
-
- if(xDiagram.is())
- {
- try
- {
- Reference< XCoordinateSystemContainer > xCooSysCnt(
- xDiagram, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
- xCooSysCnt->getCoordinateSystems());
- for( Reference< XCoordinateSystem > const & coords : aCooSysSeq )
- {
- Reference< XChartTypeContainer > xCTCnt( coords, uno::UNO_QUERY_THROW );
- const Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes());
- aResult.insert( aResult.end(), aChartTypeSeq.begin(), aChartTypeSeq.end() );
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
- }
-
- return comphelper::containerToSequence( aResult );
-}
-
-bool DiagramHelper::areChartTypesCompatible( const Reference< ::chart2::XChartType >& xFirstType,
- const Reference< ::chart2::XChartType >& xSecondType )
+bool DiagramHelper::areChartTypesCompatible( const rtl::Reference< ChartType >& xFirstType,
+ const rtl::Reference< ChartType >& xSecondType )
{
if( !xFirstType.is() || !xSecondType.is() )
return false;
@@ -1232,354 +431,6 @@ bool DiagramHelper::areChartTypesCompatible( const Reference< ::chart2::XChartTy
return ( aFirstRoles == aSecondRoles );
}
-namespace
-{
- /**
- * This method implements the logic of checking if a series can be moved
- * forward/backward. Depending on the "bDoMove" parameter the series will
- * be moved (bDoMove = true) or the function just will test if the
- * series can be moved without doing the move (bDoMove = false).
- *
- * @param xDiagram
- * Reference to the diagram that contains the series.
- *
- * @param xGivenDataSeries
- * Reference to the series that should moved or tested for moving.
- *
- * @param bForward
- * Direction in which the series should be moved or tested for moving.
- *
- * @param bDoMove
- * Should this function really move the series (true) or just test if it is
- * possible (false).
- *
- *
- * @returns
- * in case of bDoMove == true
- * - True : if the move was done
- * - False : the move failed
- * in case of bDoMove == false
- * - True : the series can be moved
- * - False : the series can not be moved
- *
- */
-
-bool lcl_moveSeriesOrCheckIfMoveIsAllowed(
- const Reference< XDiagram >& xDiagram,
- const Reference< XDataSeries >& xGivenDataSeries,
- bool bForward,
- bool bDoMove )
-{
- bool bMovedOrMoveAllowed = false;
-
- try
- {
- uno::Reference< XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY );
-
- if( xGivenDataSeries.is() && xCooSysContainer.is() )
- {
- //find position of series.
- bool bFound = false;
- uno::Sequence< uno::Reference< XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() );
-
- for( sal_Int32 nCS = 0; !bFound && nCS < aCooSysList.getLength(); ++nCS )
- {
- uno::Reference< XCoordinateSystem > xCooSys( aCooSysList[nCS] );
-
- //iterate through all chart types in the current coordinate system
- uno::Reference< XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY );
- OSL_ASSERT( xChartTypeContainer.is());
- if( !xChartTypeContainer.is() )
- continue;
- uno::Sequence< uno::Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() );
- uno::Reference< XChartType > xFormerChartType;
-
- for( sal_Int32 nT = 0; !bFound && nT < aChartTypeList.getLength(); ++nT )
- {
- uno::Reference< XChartType > xCurrentChartType( aChartTypeList[nT] );
-
- //iterate through all series in this chart type
- uno::Reference< XDataSeriesContainer > xDataSeriesContainer( xCurrentChartType, uno::UNO_QUERY );
- OSL_ASSERT( xDataSeriesContainer.is());
- if( !xDataSeriesContainer.is() )
- continue;
-
- uno::Sequence< uno::Reference< XDataSeries > > aSeriesList( xDataSeriesContainer->getDataSeries() );
- auto aSeriesListRange = asNonConstRange(aSeriesList);
-
- for( sal_Int32 nS = 0; !bFound && nS < aSeriesList.getLength(); ++nS )
- {
-
- // We found the series we are interested in!
- if( xGivenDataSeries==aSeriesList[nS] )
- {
- sal_Int32 nOldSeriesIndex = nS;
- bFound = true;
-
- try
- {
- sal_Int32 nNewSeriesIndex = nS;
-
- // tdf#34517 Bringing forward means increasing, backwards means decreasing series position
- if( !bForward )
- nNewSeriesIndex--;
- else
- nNewSeriesIndex++;
-
- if( nNewSeriesIndex >= 0 && nNewSeriesIndex < aSeriesList.getLength() )
- {
- //move series in the same charttype
- bMovedOrMoveAllowed = true;
- if( bDoMove )
- {
- aSeriesListRange[ nOldSeriesIndex ] = aSeriesList[ nNewSeriesIndex ];
- aSeriesListRange[ nNewSeriesIndex ] = xGivenDataSeries;
- xDataSeriesContainer->setDataSeries( aSeriesList );
- }
- }
- else if( nNewSeriesIndex<0 )
- {
- //exchange series with former charttype
- if( xFormerChartType.is() && DiagramHelper::areChartTypesCompatible( xFormerChartType, xCurrentChartType ) )
- {
- bMovedOrMoveAllowed = true;
- if( bDoMove )
- {
- uno::Reference< XDataSeriesContainer > xOtherDataSeriesContainer( xFormerChartType, uno::UNO_QUERY );
- if( xOtherDataSeriesContainer.is() )
- {
- uno::Sequence< uno::Reference< XDataSeries > > aOtherSeriesList( xOtherDataSeriesContainer->getDataSeries() );
- sal_Int32 nOtherSeriesIndex = aOtherSeriesList.getLength()-1;
- if( nOtherSeriesIndex >= 0 && nOtherSeriesIndex < aOtherSeriesList.getLength() )
- {
- uno::Reference< XDataSeries > xExchangeSeries( aOtherSeriesList[nOtherSeriesIndex] );
- aOtherSeriesList.getArray()[nOtherSeriesIndex] = xGivenDataSeries;
- xOtherDataSeriesContainer->setDataSeries(aOtherSeriesList);
-
- aSeriesListRange[nOldSeriesIndex]=xExchangeSeries;
- xDataSeriesContainer->setDataSeries(aSeriesList);
- }
- }
- }
- }
- }
- else if( nT+1 < aChartTypeList.getLength() )
- {
- //exchange series with next charttype
- uno::Reference< XChartType > xOtherChartType( aChartTypeList[nT+1] );
- if( xOtherChartType.is() && DiagramHelper::areChartTypesCompatible( xOtherChartType, xCurrentChartType ) )
- {
- bMovedOrMoveAllowed = true;
- if( bDoMove )
- {
- uno::Reference< XDataSeriesContainer > xOtherDataSeriesContainer( xOtherChartType, uno::UNO_QUERY );
- if( xOtherDataSeriesContainer.is() )
- {
- uno::Sequence< uno::Reference< XDataSeries > > aOtherSeriesList( xOtherDataSeriesContainer->getDataSeries() );
- if( aOtherSeriesList.hasElements() )
- {
- uno::Reference< XDataSeries > xExchangeSeries( aOtherSeriesList[0] );
- aOtherSeriesList.getArray()[0] = xGivenDataSeries;
- xOtherDataSeriesContainer->setDataSeries(aOtherSeriesList);
-
- aSeriesListRange[nOldSeriesIndex]=xExchangeSeries;
- xDataSeriesContainer->setDataSeries(aSeriesList);
- }
- }
- }
- }
- }
- }
- catch( const util::CloseVetoException& )
- {
- }
- catch( const uno::RuntimeException& )
- {
- }
- }
- }
- xFormerChartType = xCurrentChartType;
- }
- }
- }
- }
- catch( const util::CloseVetoException& )
- {
- }
- catch( const uno::RuntimeException& )
- {
- }
- return bMovedOrMoveAllowed;
-}
-} // anonymous namespace
-
-bool DiagramHelper::isSeriesMoveable(
- const Reference< XDiagram >& xDiagram,
- const Reference< XDataSeries >& xGivenDataSeries,
- bool bForward )
-{
- const bool bDoMove = false;
-
- bool bIsMoveable = lcl_moveSeriesOrCheckIfMoveIsAllowed(
- xDiagram, xGivenDataSeries, bForward, bDoMove );
-
- return bIsMoveable;
-}
-
-bool DiagramHelper::moveSeries( const Reference< XDiagram >& xDiagram, const Reference< XDataSeries >& xGivenDataSeries, bool bForward )
-{
- const bool bDoMove = true;
-
- bool bMoved = lcl_moveSeriesOrCheckIfMoveIsAllowed(
- xDiagram, xGivenDataSeries, bForward, bDoMove );
-
- return bMoved;
-}
-
-bool DiagramHelper::isSupportingFloorAndWall( const Reference<
- chart2::XDiagram >& xDiagram )
-{
- //pies and donuts currently do not support this because of wrong files from older versions
- //todo: allow this in future again, if fileversion is available for OLE objects (metastream)
- //thus the wrong bottom can be removed on import
-
- const Sequence< Reference< chart2::XChartType > > aTypes(
- ::chart::DiagramHelper::getChartTypesFromDiagram( xDiagram ) );
- for( Reference< chart2::XChartType > const & xType : aTypes )
- {
- if( xType.is() && xType->getChartType().match(CHART2_SERVICE_NAME_CHARTTYPE_PIE) )
- return false;
- if( xType.is() && xType->getChartType().match(CHART2_SERVICE_NAME_CHARTTYPE_NET) )
- return false;
- if( xType.is() && xType->getChartType().match(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) )
- return false;
- }
- return true;
-}
-
-bool DiagramHelper::isPieOrDonutChart( const css::uno::Reference< css::chart2::XDiagram >& xDiagram )
-{
- uno::Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeByIndex(
- xDiagram, 0 ) );
-
- if( xChartType .is() )
- {
- OUString aChartType = xChartType->getChartType();
- if( aChartType == CHART2_SERVICE_NAME_CHARTTYPE_PIE )
- return true;
- }
- return false;
-}
-
-sal_Int32 DiagramHelper::getGeometry3D(
- const uno::Reference< chart2::XDiagram > & xDiagram,
- bool& rbFound, bool& rbAmbiguous )
-{
- sal_Int32 nCommonGeom( DataPointGeometry3D::CUBOID );
- rbFound = false;
- rbAmbiguous = false;
-
- std::vector< Reference< chart2::XDataSeries > > aSeriesVec(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
-
- if( aSeriesVec.empty())
- rbAmbiguous = true;
-
- for (auto const& series : aSeriesVec)
- {
- try
- {
- sal_Int32 nGeom = 0;
- Reference< beans::XPropertySet > xProp(series, uno::UNO_QUERY_THROW);
- if( xProp->getPropertyValue( "Geometry3D") >>= nGeom )
- {
- if( ! rbFound )
- {
- // first series
- nCommonGeom = nGeom;
- rbFound = true;
- }
- // further series: compare for uniqueness
- else if( nCommonGeom != nGeom )
- {
- rbAmbiguous = true;
- break;
- }
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
- }
-
- return nCommonGeom;
-}
-
-void DiagramHelper::setGeometry3D(
- const Reference< chart2::XDiagram > & xDiagram,
- sal_Int32 nNewGeometry )
-{
- std::vector< Reference< chart2::XDataSeries > > aSeriesVec(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
-
- for (auto const& series : aSeriesVec)
- {
- DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(
- series, "Geometry3D", uno::Any( nNewGeometry ));
- }
-}
-
-sal_Int32 DiagramHelper::getCorrectedMissingValueTreatment(
- const Reference< chart2::XDiagram > & xDiagram,
- const Reference< chart2::XChartType >& xChartType )
-{
- sal_Int32 nResult = css::chart::MissingValueTreatment::LEAVE_GAP;
- const uno::Sequence < sal_Int32 > aAvailableMissingValueTreatments(
- ChartTypeHelper::getSupportedMissingValueTreatments( xChartType ) );
-
- uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY );
- if( xDiaProp.is() && (xDiaProp->getPropertyValue( "MissingValueTreatment" ) >>= nResult) )
- {
- //ensure that the set value is supported by this charttype
- for( sal_Int32 n : aAvailableMissingValueTreatments )
- if( n == nResult )
- return nResult; //ok
- }
-
- //otherwise use the first supported one
- if( aAvailableMissingValueTreatments.hasElements() )
- {
- nResult = aAvailableMissingValueTreatments[0];
- return nResult;
- }
-
- return nResult;
-}
-
-DiagramPositioningMode DiagramHelper::getDiagramPositioningMode( const uno::Reference<
- chart2::XDiagram > & xDiagram )
-{
- DiagramPositioningMode eMode = DiagramPositioningMode_AUTO;
- uno::Reference< beans::XPropertySet > xDiaProps( xDiagram, uno::UNO_QUERY );
- if( xDiaProps.is() )
- {
- RelativePosition aRelPos;
- RelativeSize aRelSize;
- if( (xDiaProps->getPropertyValue("RelativePosition") >>= aRelPos ) &&
- (xDiaProps->getPropertyValue("RelativeSize") >>= aRelSize ) )
- {
- bool bPosSizeExcludeAxes=false;
- xDiaProps->getPropertyValue("PosSizeExcludeAxes") >>= bPosSizeExcludeAxes;
- if( bPosSizeExcludeAxes )
- eMode = DiagramPositioningMode_EXCLUDING;
- else
- eMode = DiagramPositioningMode_INCLUDING;
- }
- }
- return eMode;
-}
-
static void lcl_ensureRange0to1( double& rValue )
{
if(rValue<0.0)
@@ -1588,14 +439,14 @@ static void lcl_ensureRange0to1( double& rValue )
rValue=1.0;
}
-bool DiagramHelper::setDiagramPositioning( const uno::Reference< frame::XModel >& xChartModel,
+bool DiagramHelper::setDiagramPositioning( const rtl::Reference<::chart::ChartModel>& xChartModel,
const awt::Rectangle& rPosRect /*100th mm*/ )
{
ControllerLockGuardUNO aCtrlLockGuard( xChartModel );
bool bChanged = false;
awt::Size aPageSize( ChartModelHelper::getPageSize(xChartModel) );
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartModel );
+ rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
if( !xDiagram.is() )
return bChanged;
@@ -1633,11 +484,11 @@ bool DiagramHelper::setDiagramPositioning( const uno::Reference< frame::XModel >
return bChanged;
}
-awt::Rectangle DiagramHelper::getDiagramRectangleFromModel( const uno::Reference< frame::XModel >& xChartModel )
+awt::Rectangle DiagramHelper::getDiagramRectangleFromModel( const rtl::Reference<::chart::ChartModel>& xChartModel )
{
awt::Rectangle aRet(-1,-1,-1,-1);
- rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram( xChartModel );
+ rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
if( !xDiagram.is() )
return aRet;
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index f55b0637dc8a..3d049a44527f 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -33,7 +33,7 @@
#include <com/sun/star/util/Color.hpp>
#include <com/sun/star/drawing/LineJoint.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
using namespace ::com::sun::star;
@@ -41,7 +41,7 @@ using namespace ::com::sun::star;
namespace
{
-constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar";
+constexpr OUString lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar"_ustr;
bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq )
{
@@ -53,22 +53,21 @@ const SfxItemPropertySet* GetErrorBarPropertySet()
{
static const SfxItemPropertyMapEntry aErrorBarPropertyMap_Impl[] =
{
- {u"ShowPositiveError",0,cppu::UnoType<bool>::get(), 0, 0},
- {u"ShowNegativeError",1,cppu::UnoType<bool>::get(), 0, 0},
- {u"PositiveError",2,cppu::UnoType<double>::get(),0,0},
- {u"NegativeError",3,cppu::UnoType<double>::get(), 0, 0},
- {u"PercentageError",4,cppu::UnoType<double>::get(), 0, 0},
- {u"ErrorBarStyle",5,cppu::UnoType<sal_Int32>::get(),0,0},
- {u"ErrorBarRangePositive",6,cppu::UnoType<OUString>::get(),0,0}, // read-only for export
- {u"ErrorBarRangeNegative",7,cppu::UnoType<OUString>::get(),0,0}, // read-only for export
- {u"Weight",8,cppu::UnoType<double>::get(),0,0},
- {u"LineStyle",9,cppu::UnoType<css::drawing::LineStyle>::get(),0,0},
- {u"LineDash",10,cppu::UnoType<drawing::LineDash>::get(),0,0},
- {u"LineWidth",11,cppu::UnoType<sal_Int32>::get(),0,0},
- {u"LineColor",12,cppu::UnoType<css::util::Color>::get(),0,0},
- {u"LineTransparence",13,cppu::UnoType<sal_Int16>::get(),0,0},
- {u"LineJoint",14,cppu::UnoType<css::drawing::LineJoint>::get(),0,0},
- { u"", 0, css::uno::Type(), 0, 0 }
+ {u"ShowPositiveError"_ustr,0,cppu::UnoType<bool>::get(), 0, 0},
+ {u"ShowNegativeError"_ustr,1,cppu::UnoType<bool>::get(), 0, 0},
+ {u"PositiveError"_ustr,2,cppu::UnoType<double>::get(),0,0},
+ {u"NegativeError"_ustr,3,cppu::UnoType<double>::get(), 0, 0},
+ {u"PercentageError"_ustr,4,cppu::UnoType<double>::get(), 0, 0},
+ {u"ErrorBarStyle"_ustr,5,cppu::UnoType<sal_Int32>::get(),0,0},
+ {u"ErrorBarRangePositive"_ustr,6,cppu::UnoType<OUString>::get(),0,0}, // read-only for export
+ {u"ErrorBarRangeNegative"_ustr,7,cppu::UnoType<OUString>::get(),0,0}, // read-only for export
+ {u"Weight"_ustr,8,cppu::UnoType<double>::get(),0,0},
+ {u"LineStyle"_ustr,9,cppu::UnoType<css::drawing::LineStyle>::get(),0,0},
+ {u"LineDash"_ustr,10,cppu::UnoType<drawing::LineDash>::get(),0,0},
+ {u"LineWidth"_ustr,11,cppu::UnoType<sal_Int32>::get(),0,0},
+ {u"LineColor"_ustr,12,cppu::UnoType<css::util::Color>::get(),0,0},
+ {u"LineTransparence"_ustr,13,cppu::UnoType<sal_Int16>::get(),0,0},
+ {u"LineJoint"_ustr,14,cppu::UnoType<css::drawing::LineJoint>::get(),0,0},
};
static SfxItemPropertySet aPropSet( aErrorBarPropertyMap_Impl );
return &aPropSet;
diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index 0f418198a08d..7f6de91b6e82 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -19,7 +19,9 @@
#include <ExplicitCategoriesProvider.hxx>
#include <DiagramHelper.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <DataSourceHelper.hxx>
#include <ChartModel.hxx>
@@ -27,11 +29,13 @@
#include <NumberFormatterWrapper.hxx>
#include <unonames.hxx>
#include <BaseCoordinateSystem.hxx>
+#include <DataSeries.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
+#include <o3tl/compare.hxx>
#include <o3tl/safeint.hxx>
#include <rtl/ustrbuf.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <limits>
@@ -44,10 +48,10 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using std::vector;
-ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2::XCoordinateSystem >& xCooSysModel
+ExplicitCategoriesProvider::ExplicitCategoriesProvider( const rtl::Reference< BaseCoordinateSystem >& xCooSysModel
, ChartModel& rModel )
: m_bDirty(true)
- , m_xCooSysModel( xCooSysModel )
+ , m_xCooSysModel( xCooSysModel.get() )
, mrModel(rModel)
, m_bIsExplicitCategoriesInited(false)
, m_bIsDateAxis(false)
@@ -58,7 +62,7 @@ ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2:
if( xCooSysModel.is() )
{
// TODO: handle different category names on the primary and secondary category axis.
- uno::Reference< XAxis > xAxis( xCooSysModel->getAxisByDimension(0,0) );
+ rtl::Reference< Axis > xAxis = xCooSysModel->getAxisByDimension2(0,0);
if( xAxis.is() )
{
ScaleData aScale( xAxis->getScaleData() );
@@ -100,10 +104,10 @@ ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2:
//->split them in the direction of the first series
//detect whether the first series is a row or a column
bool bSeriesUsesColumns = true;
- std::vector< Reference< XDataSeries > > aSeries( ChartModelHelper::getDataSeries( mrModel ) );
+ std::vector< rtl::Reference< DataSeries > > aSeries = ChartModelHelper::getDataSeries( &mrModel );
if( !aSeries.empty() )
{
- uno::Reference< data::XDataSource > xSeriesSource( aSeries.front(), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xSeriesSource = aSeries.front();
OUString aStringDummy;
bool bDummy;
uno::Sequence< sal_Int32 > aSeqDummy;
@@ -111,13 +115,13 @@ ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2:
aStringDummy, aSeqDummy, bSeriesUsesColumns, bDummy, bDummy );
}
if( bSeriesUsesColumns )
- m_aSplitCategoriesList=aColumns;
+ m_aSplitCategoriesList = comphelper::sequenceToContainer<std::vector<Reference<data::XLabeledDataSequence>>>(aColumns);
else
- m_aSplitCategoriesList=aRows;
+ m_aSplitCategoriesList = comphelper::sequenceToContainer<std::vector<Reference<data::XLabeledDataSequence>>>(aRows);
}
}
}
- if( !m_aSplitCategoriesList.hasElements() )
+ if( m_aSplitCategoriesList.empty() )
{
m_aSplitCategoriesList = { m_xOriginalCategories };
}
@@ -142,12 +146,12 @@ Reference< chart2::data::XDataSequence > ExplicitCategoriesProvider::getOriginal
bool ExplicitCategoriesProvider::hasComplexCategories() const
{
- return m_aSplitCategoriesList.getLength() > 1;
+ return m_aSplitCategoriesList.size() > 1;
}
sal_Int32 ExplicitCategoriesProvider::getCategoryLevelCount() const
{
- sal_Int32 nCount = m_aSplitCategoriesList.getLength();
+ sal_Int32 nCount = m_aSplitCategoriesList.size();
if(!nCount)
nCount = 1;
return nCount;
@@ -174,12 +178,12 @@ void ExplicitCategoriesProvider::convertCategoryAnysToText( uno::Sequence< OUStr
auto pOutTexts = rOutTexts.getArray();
sal_Int32 nAxisNumberFormat = 0;
- rtl::Reference< BaseCoordinateSystem > xCooSysModel( ChartModelHelper::getFirstCoordinateSystem( rModel ) );
+ rtl::Reference< BaseCoordinateSystem > xCooSysModel( ChartModelHelper::getFirstCoordinateSystem( &rModel ) );
if( xCooSysModel.is() )
{
- Reference< chart2::XAxis > xAxis( xCooSysModel->getAxisByDimension(0,0) );
+ rtl::Reference< Axis > xAxis = xCooSysModel->getAxisByDimension2(0,0);
nAxisNumberFormat = AxisHelper::getExplicitNumberFormatKeyForAxis(
- xAxis, xCooSysModel, uno::Reference<chart2::XChartDocument>(&rModel), false );
+ xAxis, xCooSysModel, &rModel, false );
}
Color nLabelColor;
@@ -220,8 +224,7 @@ class SplitCategoriesProvider_ForLabeledDataSequences : public SplitCategoriesPr
public:
explicit SplitCategoriesProvider_ForLabeledDataSequences(
- const css::uno::Sequence<
- css::uno::Reference< css::chart2::data::XLabeledDataSequence> >& rSplitCategoriesList
+ const std::vector< Reference< data::XLabeledDataSequence> >& rSplitCategoriesList
, ChartModel& rModel )
: m_rSplitCategoriesList( rSplitCategoriesList )
, mrModel( rModel )
@@ -231,8 +234,7 @@ public:
virtual uno::Sequence< OUString > getStringsForLevel( sal_Int32 nIndex ) const override;
private:
- const css::uno::Sequence< css::uno::Reference<
- css::chart2::data::XLabeledDataSequence> >& m_rSplitCategoriesList;
+ const std::vector< Reference< data::XLabeledDataSequence> >& m_rSplitCategoriesList;
ChartModel& mrModel;
};
@@ -241,7 +243,7 @@ private:
sal_Int32 SplitCategoriesProvider_ForLabeledDataSequences::getLevelCount() const
{
- return m_rSplitCategoriesList.getLength();
+ return m_rSplitCategoriesList.size();
}
uno::Sequence< OUString > SplitCategoriesProvider_ForLabeledDataSequences::getStringsForLevel( sal_Int32 nLevel ) const
{
@@ -405,13 +407,13 @@ static bool lcl_fillDateCategories( const uno::Reference< data::XDataSequence >&
bool bOwnData = false;
bool bOwnDataAnddAxisHasAnyFormat = false;
bool bOwnDataAnddAxisHasDateFormat = false;
- Reference< XCoordinateSystem > xCooSysModel( ChartModelHelper::getFirstCoordinateSystem( rModel ) );
+ rtl::Reference< BaseCoordinateSystem > xCooSysModel( ChartModelHelper::getFirstCoordinateSystem( &rModel ) );
if( xCooSysModel.is() )
{
if( rModel.hasInternalDataProvider() )
{
bOwnData = true;
- Reference< beans::XPropertySet > xAxisProps( xCooSysModel->getAxisByDimension(0,0), uno::UNO_QUERY );
+ rtl::Reference< Axis > xAxisProps = xCooSysModel->getAxisByDimension2(0,0);
sal_Int32 nAxisNumberFormat = 0;
if (xAxisProps.is() && (xAxisProps->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nAxisNumberFormat))
{
@@ -459,7 +461,9 @@ static bool lcl_fillDateCategories( const uno::Reference< data::XDataSequence >&
rDateCategories.push_back( std::numeric_limits<double>::quiet_NaN() );
}
}
- std::sort( rDateCategories.begin(), rDateCategories.end() );
+ std::sort(
+ rDateCategories.begin(), rDateCategories.end(),
+ [](auto x, auto y) { return o3tl::strong_order(x, y) < 0; } );
}
return bAnyDataFound && bOnlyDatesFound;
@@ -479,7 +483,7 @@ void ExplicitCategoriesProvider::init()
{
if(m_bIsDateAxis)
{
- if( ChartTypeHelper::isSupportingDateAxis( AxisHelper::getChartTypeByIndex( m_xCooSysModel, 0 ), 0 ) )
+ if( ChartTypeHelper::isSupportingDateAxis( AxisHelper::getChartTypeByIndex( m_xCooSysModel.get(), 0 ), 0 ) )
m_bIsDateAxis = lcl_fillDateCategories( m_xOriginalCategories->getValues(), m_aDateCategories, m_bIsAutoDate, mrModel );
else
m_bIsDateAxis = false;
@@ -516,7 +520,7 @@ Sequence< OUString > const & ExplicitCategoriesProvider::getSimpleCategories()
}
}
if(!m_aExplicitCategories.hasElements())
- m_aExplicitCategories = DiagramHelper::generateAutomaticCategoriesFromCooSys( m_xCooSysModel );
+ m_aExplicitCategories = DiagramHelper::generateAutomaticCategoriesFromCooSys( m_xCooSysModel.get() );
m_bIsExplicitCategoriesInited = true;
}
return m_aExplicitCategories;
@@ -532,7 +536,7 @@ const std::vector<ComplexCategory>* ExplicitCategoriesProvider::getCategoriesByL
}
OUString ExplicitCategoriesProvider::getCategoryByIndex(
- const Reference< XCoordinateSystem >& xCooSysModel
+ const rtl::Reference< BaseCoordinateSystem >& xCooSysModel
, ChartModel& rModel
, sal_Int32 nIndex )
{
diff --git a/chart2/source/tools/FillProperties.cxx b/chart2/source/tools/FillProperties.cxx
index d0c888d748f2..ba3b63c83db1 100644
--- a/chart2/source/tools/FillProperties.cxx
+++ b/chart2/source/tools/FillProperties.cxx
@@ -23,6 +23,8 @@
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/drawing/RectanglePoint.hpp>
+#include <tools/color.hxx>
+
using namespace ::com::sun::star;
using ::com::sun::star::beans::Property;
@@ -158,23 +160,23 @@ void lcl_AddDefaultsToMap_without_BitmapProperties(
::chart::tPropertyValueMap & rOutMap )
{
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_STYLE, drawing::FillStyle_SOLID );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, FillProperties::PROP_FILL_COLOR, 0xd9d9d9 ); // gray85
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_TRANSPARENCE, 0 );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_COLOR, Color(0xd9, 0xd9, 0xd9) ); // gray85
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_TRANSPARENCE, sal_Int16(0) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BACKGROUND, false );
}
void lcl_AddDefaultsToMap_only_BitmapProperties(
::chart::tPropertyValueMap & rOutMap )
{
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_BITMAP_OFFSETX, 0 );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_BITMAP_OFFSETY, 0 );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETX, 0 );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETY, 0 );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_OFFSETX, sal_Int16(0) );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_OFFSETY, sal_Int16(0) );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETX, sal_Int16(0) );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETY, sal_Int16(0) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_RECTANGLEPOINT, drawing::RectanglePoint_MIDDLE_MIDDLE );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_LOGICALSIZE, true );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, FillProperties::PROP_FILL_BITMAP_SIZEX, 0 );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, FillProperties::PROP_FILL_BITMAP_SIZEY, 0 );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_SIZEX, sal_Int32(0) );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_SIZEY, sal_Int32(0) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_MODE, drawing::BitmapMode_REPEAT );
}
diff --git a/chart2/source/tools/FormattedStringHelper.cxx b/chart2/source/tools/FormattedStringHelper.cxx
index 755dd532b042..6b881160670f 100644
--- a/chart2/source/tools/FormattedStringHelper.cxx
+++ b/chart2/source/tools/FormattedStringHelper.cxx
@@ -18,8 +18,8 @@
*/
#include <FormattedStringHelper.hxx>
-#include <com/sun/star/chart2/FormattedString.hpp>
-#include <tools/diagnose_ex.h>
+#include <FormattedString.hxx>
+#include <comphelper/diagnose_ex.hxx>
#include <comphelper/property.hxx>
namespace chart
@@ -28,34 +28,29 @@ namespace chart
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
-Sequence< Reference< chart2::XFormattedString2 > >
- FormattedStringHelper::createFormattedStringSequence(
- const Reference< uno::XComponentContext > & xContext
- , const OUString & rString
+rtl::Reference< ::chart::FormattedString >
+ FormattedStringHelper::createFormattedString(
+ const OUString & rString
, const Reference< beans::XPropertySet > & xTextProperties ) noexcept
{
- Reference< XFormattedString2 > xFormStr;
+ rtl::Reference< FormattedString > xFormStr;
try
{
- if( xContext.is() )
- {
- xFormStr = chart2::FormattedString::create(xContext);
+ xFormStr = new FormattedString();
- xFormStr->setString( rString );
+ xFormStr->setString( rString );
- // set character properties
- comphelper::copyProperties(
- xTextProperties, Reference< beans::XPropertySet >( xFormStr, uno::UNO_QUERY_THROW ) );
- }
+ // set character properties
+ comphelper::copyProperties(
+ xTextProperties, Reference< beans::XPropertySet >( static_cast<cppu::OWeakObject*>(xFormStr.get()), uno::UNO_QUERY_THROW ) );
}
catch( const uno::Exception & )
{
DBG_UNHANDLED_EXCEPTION("chart2");
}
- return Sequence< Reference< XFormattedString2 > >( & xFormStr, 1 );
+ return xFormStr;
}
} //namespace chart
diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx
index dd48289e831c..e6e926078eb3 100644
--- a/chart2/source/tools/InternalData.cxx
+++ b/chart2/source/tools/InternalData.cxx
@@ -22,6 +22,7 @@
#include <strings.hrc>
#include <comphelper/sequence.hxx>
+#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#ifdef DEBUG_CHART2_TOOLS
@@ -39,7 +40,6 @@
using ::com::sun::star::uno::Sequence;
using namespace ::com::sun::star;
-using namespace ::std;
namespace chart
{
@@ -48,14 +48,14 @@ namespace
{
struct lcl_NumberedStringGenerator
{
- lcl_NumberedStringGenerator( const OUString & rStub, const OUString & rWildcard ) :
+ lcl_NumberedStringGenerator( const OUString & rStub, std::u16string_view rWildcard ) :
m_aStub( rStub ),
m_nCounter( 0 ),
m_nStubStartIndex( rStub.indexOf( rWildcard )),
- m_nWildcardLength( rWildcard.getLength())
+ m_nWildcardLength( rWildcard.size())
{
}
- vector< uno::Any > operator()()
+ std::vector< uno::Any > operator()()
{
return { uno::Any(m_aStub.replaceAt( m_nStubStartIndex, m_nWildcardLength, OUString::number( ++m_nCounter ))) };
}
@@ -113,12 +113,12 @@ void InternalData::createDefaultData()
m_aRowLabels.clear();
m_aRowLabels.reserve( m_nRowCount );
generate_n( back_inserter( m_aRowLabels ), m_nRowCount,
- lcl_NumberedStringGenerator( aRowName, "%ROWNUMBER" ));
+ lcl_NumberedStringGenerator( aRowName, u"%ROWNUMBER" ));
m_aColumnLabels.clear();
m_aColumnLabels.reserve( m_nColumnCount );
generate_n( back_inserter( m_aColumnLabels ), m_nColumnCount,
- lcl_NumberedStringGenerator( aColName, "%COLUMNNUMBER" ));
+ lcl_NumberedStringGenerator( aColName, u"%COLUMNNUMBER" ));
}
void InternalData::setData( const Sequence< Sequence< double > >& rDataInRows )
@@ -174,35 +174,35 @@ Sequence< double > InternalData::getRowValues( sal_Int32 nRowIndex ) const
return Sequence< double >();
}
-void InternalData::setColumnValues( sal_Int32 nColumnIndex, const vector< double > & rNewData )
+void InternalData::setColumnValues( sal_Int32 nColumnIndex, const std::vector< double > & rNewData )
{
if( nColumnIndex < 0 )
return;
enlargeData( nColumnIndex + 1, rNewData.size() );
tDataType aSlice = m_aData[ std::slice( nColumnIndex, m_nRowCount, m_nColumnCount ) ];
- for( vector< double >::size_type i = 0; i < rNewData.size(); ++i )
+ for( std::vector< double >::size_type i = 0; i < rNewData.size(); ++i )
aSlice[i] = rNewData[i];
m_aData[ std::slice( nColumnIndex, m_nRowCount, m_nColumnCount ) ] = aSlice;
}
-void InternalData::setRowValues( sal_Int32 nRowIndex, const vector< double > & rNewData )
+void InternalData::setRowValues( sal_Int32 nRowIndex, const std::vector< double > & rNewData )
{
if( nRowIndex < 0 )
return;
enlargeData( rNewData.size(), nRowIndex+1 );
tDataType aSlice = m_aData[ std::slice( nRowIndex*m_nColumnCount, m_nColumnCount, 1 ) ];
- for( vector< double >::size_type i = 0; i < rNewData.size(); ++i )
+ for( std::vector< double >::size_type i = 0; i < rNewData.size(); ++i )
aSlice[i] = rNewData[i];
m_aData[ std::slice( nRowIndex*m_nColumnCount, m_nColumnCount, 1 ) ]= aSlice;
}
-void InternalData::setComplexColumnLabel( sal_Int32 nColumnIndex, vector< uno::Any >&& rComplexLabel )
+void InternalData::setComplexColumnLabel( sal_Int32 nColumnIndex, std::vector< uno::Any >&& rComplexLabel )
{
if( nColumnIndex < 0 )
return;
- if( nColumnIndex >= static_cast< sal_Int32 >( m_aColumnLabels.size() ) )
+ if( o3tl::make_unsigned(nColumnIndex) >= m_aColumnLabels.size() )
{
m_aColumnLabels.resize(nColumnIndex+1);
enlargeData( nColumnIndex+1, 0 );
@@ -212,11 +212,11 @@ void InternalData::setComplexColumnLabel( sal_Int32 nColumnIndex, vector< uno::A
dump();
}
-void InternalData::setComplexRowLabel( sal_Int32 nRowIndex, vector< uno::Any >&& rComplexLabel )
+void InternalData::setComplexRowLabel( sal_Int32 nRowIndex, std::vector< uno::Any >&& rComplexLabel )
{
if( nRowIndex < 0 )
return;
- if( nRowIndex >= static_cast< sal_Int32 >( m_aRowLabels.size() ) )
+ if( o3tl::make_unsigned(nRowIndex) >= m_aRowLabels.size() )
{
m_aRowLabels.resize(nRowIndex+1);
enlargeData( 0, nRowIndex+1 );
@@ -233,19 +233,19 @@ void InternalData::setComplexRowLabel( sal_Int32 nRowIndex, vector< uno::Any >&&
}
}
-vector< uno::Any > InternalData::getComplexColumnLabel( sal_Int32 nColumnIndex ) const
+std::vector< uno::Any > InternalData::getComplexColumnLabel( sal_Int32 nColumnIndex ) const
{
if( nColumnIndex < static_cast< sal_Int32 >( m_aColumnLabels.size() ) )
return m_aColumnLabels[nColumnIndex];
else
- return vector< uno::Any >();
+ return std::vector< uno::Any >();
}
-vector< uno::Any > InternalData::getComplexRowLabel( sal_Int32 nRowIndex ) const
+std::vector< uno::Any > InternalData::getComplexRowLabel( sal_Int32 nRowIndex ) const
{
if( nRowIndex < static_cast< sal_Int32 >( m_aRowLabels.size() ) )
return m_aRowLabels[nRowIndex];
else
- return vector< uno::Any >();
+ return std::vector< uno::Any >();
}
void InternalData::swapRowWithNext( sal_Int32 nRowIndex )
@@ -258,14 +258,10 @@ void InternalData::swapRowWithNext( sal_Int32 nRowIndex )
{
size_t nIndex1 = nColIdx + nRowIndex*m_nColumnCount;
size_t nIndex2 = nIndex1 + m_nColumnCount;
- double fTemp = m_aData[nIndex1];
- m_aData[nIndex1] = m_aData[nIndex2];
- m_aData[nIndex2] = fTemp;
+ std::swap(m_aData[nIndex1], m_aData[nIndex2]);
}
- vector< uno::Any > aTemp( m_aRowLabels[nRowIndex] );
- m_aRowLabels[nRowIndex] = m_aRowLabels[nRowIndex + 1];
- m_aRowLabels[nRowIndex + 1] = aTemp;
+ std::swap(m_aRowLabels[nRowIndex], m_aRowLabels[nRowIndex + 1]);
}
void InternalData::swapColumnWithNext( sal_Int32 nColumnIndex )
@@ -278,14 +274,10 @@ void InternalData::swapColumnWithNext( sal_Int32 nColumnIndex )
{
size_t nIndex1 = nColumnIndex + nRowIdx*m_nColumnCount;
size_t nIndex2 = nIndex1 + 1;
- double fTemp = m_aData[nIndex1];
- m_aData[nIndex1] = m_aData[nIndex2];
- m_aData[nIndex2] = fTemp;
+ std::swap(m_aData[nIndex1], m_aData[nIndex2]);
}
- vector< uno::Any > aTemp( m_aColumnLabels[nColumnIndex] );
- m_aColumnLabels[nColumnIndex] = m_aColumnLabels[nColumnIndex + 1];
- m_aColumnLabels[nColumnIndex + 1] = aTemp;
+ std::swap(m_aColumnLabels[nColumnIndex], m_aColumnLabels[nColumnIndex + 1]);
}
bool InternalData::enlargeData( sal_Int32 nColumnCount, sal_Int32 nRowCount )
@@ -341,7 +333,7 @@ void InternalData::insertColumn( sal_Int32 nAfterIndex )
// labels
if( nAfterIndex < static_cast< sal_Int32 >( m_aColumnLabels.size()))
- m_aColumnLabels.insert( m_aColumnLabels.begin() + (nAfterIndex + 1), vector< uno::Any >(1) );
+ m_aColumnLabels.insert( m_aColumnLabels.begin() + (nAfterIndex + 1), std::vector< uno::Any >(1) );
dump();
}
@@ -399,7 +391,7 @@ void InternalData::insertRow( sal_Int32 nAfterIndex )
// labels
if( nAfterIndex < static_cast< sal_Int32 >( m_aRowLabels.size()))
- m_aRowLabels.insert( m_aRowLabels.begin() + nIndex, vector< uno::Any > (1));
+ m_aRowLabels.insert( m_aRowLabels.begin() + nIndex, std::vector< uno::Any > (1));
dump();
}
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index dd70b4617547..5b95b0a719be 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <cstddef>
#include <iterator>
#include <InternalDataProvider.hxx>
@@ -28,17 +29,18 @@
#include <DataSourceHelper.hxx>
#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
#include <ExplicitCategoriesProvider.hxx>
#include <BaseCoordinateSystem.hxx>
+#include <DataSeries.hxx>
#include <com/sun/star/chart2/data/XDataSequence.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/property.hxx>
-#include <tools/diagnose_ex.h>
+#include <o3tl/string_view.hxx>
+#include <comphelper/diagnose_ex.hxx>
#include <limits>
#include <vector>
@@ -47,7 +49,6 @@
namespace com::sun::star::chart2 { class XChartDocument; }
using namespace ::com::sun::star;
-using namespace ::std;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -58,33 +59,21 @@ namespace chart
namespace
{
-constexpr OUStringLiteral lcl_aCategoriesRangeName = u"categories";
+constexpr OUString lcl_aCategoriesRangeName = u"categories"_ustr;
const char lcl_aCategoriesLevelRangeNamePrefix[] = "categoriesL "; //L <-> level
const char lcl_aCategoriesPointRangeNamePrefix[] = "categoriesP "; //P <-> point
-constexpr OUStringLiteral lcl_aCategoriesRoleName = u"categories";
+constexpr OUString lcl_aCategoriesRoleName = u"categories"_ustr;
const char lcl_aLabelRangePrefix[] = "label ";
-constexpr OUStringLiteral lcl_aCompleteRange = u"all";
+constexpr OUString lcl_aCompleteRange = u"all"_ustr;
typedef std::multimap< OUString, uno::WeakReference< chart2::data::XDataSequence > >
lcl_tSequenceMap;
-std::vector< OUString > lcl_AnyToStringSequence( const std::vector< uno::Any >& aAnySeq )
-{
- std::vector< OUString > aResult;
- aResult.resize( aAnySeq.size() );
- int i = 0;
- for (const uno::Any& aAny : aAnySeq)
- aResult[i++] = CommonFunctors::AnyToString()(aAny);
- return aResult;
-}
-
std::vector< uno::Any > lcl_StringToAnyVector( const css::uno::Sequence< OUString >& aStringSeq )
{
std::vector< uno::Any > aResult;
- aResult.resize( aStringSeq.getLength() );
- int i = 0;
- for (const OUString& aStr : aStringSeq)
- aResult[i++] = CommonFunctors::makeAny<OUString>()(aStr);
+ aResult.reserve(aStringSeq.getLength());
+ std::transform(aStringSeq.begin(), aStringSeq.end(), std::back_inserter(aResult), CommonFunctors::makeAny());
return aResult;
}
@@ -113,17 +102,11 @@ struct lcl_internalizeSeries
m_bConnectToModel( bConnectToModel ),
m_bDataInColumns( bDataInColumns )
{}
- void operator() ( const Reference< chart2::XDataSeries > & xSeries )
+ void operator() ( const rtl::Reference< DataSeries > & xSeries )
{
- Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY );
- Reference< chart2::data::XDataSink > xSink( xSeries, uno::UNO_QUERY );
- if( !(xSource.is() && xSink.is()) )
- return;
-
- Sequence< Reference< chart2::data::XLabeledDataSequence > > aOldSeriesData = xSource->getDataSequences();
- Sequence< Reference< chart2::data::XLabeledDataSequence > > aNewSeriesData( aOldSeriesData.getLength() );
- auto aNewSeriesDataRange = asNonConstRange(aNewSeriesData);
- for( sal_Int32 i=0; i<aOldSeriesData.getLength(); ++i )
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aOldSeriesData = xSeries->getDataSequences2();
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aNewSeriesData( aOldSeriesData.size() );
+ for( std::size_t i=0; i<aOldSeriesData.size(); ++i )
{
sal_Int32 nNewIndex( m_bDataInColumns ? m_rInternalData.appendColumn() : m_rInternalData.appendRow() );
OUString aIdentifier( OUString::number( nNewIndex ));
@@ -161,17 +144,17 @@ struct lcl_internalizeSeries
comphelper::copyProperties(
Reference< beans::XPropertySet >( xLabel, uno::UNO_QUERY ),
Reference< beans::XPropertySet >( xNewLabel, uno::UNO_QUERY ));
- aNewSeriesDataRange[i].set( new LabeledDataSequence( xNewValues, xNewLabel ) );
+ aNewSeriesData[i].set( new LabeledDataSequence( xNewValues, xNewLabel ) );
}
}
else
{
if( m_bConnectToModel )
- aNewSeriesDataRange[i].set( new LabeledDataSequence( xNewValues ) );
+ aNewSeriesData[i].set( new LabeledDataSequence( xNewValues ) );
}
}
if( m_bConnectToModel )
- xSink->setData( aNewSeriesData );
+ xSeries->setData( aNewSeriesData );
}
private:
@@ -188,7 +171,7 @@ public:
explicit lcl_copyFromLevel( sal_Int32 nLevel ) : m_nLevel( nLevel )
{}
- uno::Any operator() ( const vector< uno::Any >& rVector )
+ uno::Any operator() ( const std::vector< uno::Any >& rVector )
{
uno::Any aRet;
if( m_nLevel < static_cast< sal_Int32 >(rVector.size()) )
@@ -207,11 +190,11 @@ public:
explicit lcl_getStringFromLevelVector( sal_Int32 nLevel ) : m_nLevel( nLevel )
{}
- OUString operator() ( const vector< uno::Any >& rVector )
+ OUString operator() ( const std::vector< uno::Any >& rVector )
{
OUString aString;
if( m_nLevel < static_cast< sal_Int32 >(rVector.size()) )
- aString = CommonFunctors::AnyToString()(rVector[m_nLevel]);
+ aString = CommonFunctors::ToString()(rVector[m_nLevel]);
return aString;
}
@@ -226,9 +209,9 @@ public:
explicit lcl_setAnyAtLevel( sal_Int32 nLevel ) : m_nLevel( nLevel )
{}
- vector< uno::Any > operator() ( const vector< uno::Any >& rVector, const uno::Any& rNewValue )
+ std::vector< uno::Any > operator() ( const std::vector< uno::Any >& rVector, const uno::Any& rNewValue )
{
- vector< uno::Any > aRet( rVector );
+ std::vector< uno::Any > aRet( rVector );
if( m_nLevel >= static_cast< sal_Int32 >(aRet.size()) )
aRet.resize( m_nLevel+1 );
aRet[ m_nLevel ]=rNewValue;
@@ -246,9 +229,9 @@ public:
explicit lcl_setAnyAtLevelFromStringSequence( sal_Int32 nLevel ) : m_nLevel( nLevel )
{}
- vector< uno::Any > operator() ( const vector< uno::Any >& rVector, const OUString& rNewValue )
+ std::vector< uno::Any > operator() ( const std::vector< uno::Any >& rVector, const OUString& rNewValue )
{
- vector< uno::Any > aRet( rVector );
+ std::vector< uno::Any > aRet( rVector );
if( m_nLevel >= static_cast< sal_Int32 >(aRet.size()) )
aRet.resize( m_nLevel+1 );
aRet[ m_nLevel ] <<= rNewValue;
@@ -266,7 +249,7 @@ public:
explicit lcl_insertAnyAtLevel( sal_Int32 nLevel ) : m_nLevel( nLevel )
{}
- void operator() ( vector< uno::Any >& rVector )
+ void operator() ( std::vector< uno::Any >& rVector )
{
if( m_nLevel >= static_cast< sal_Int32 >(rVector.size()) )
{
@@ -289,7 +272,7 @@ public:
explicit lcl_removeAnyAtLevel( sal_Int32 nLevel ) : m_nLevel( nLevel )
{}
- void operator() ( vector< uno::Any >& rVector )
+ void operator() ( std::vector< uno::Any >& rVector )
{
if( m_nLevel < static_cast<sal_Int32>(rVector.size()) )
{
@@ -308,18 +291,18 @@ InternalDataProvider::InternalDataProvider()
{}
InternalDataProvider::InternalDataProvider(
- const Reference< chart2::XChartDocument > & xChartDoc,
+ const rtl::Reference< ChartModel > & xModel,
bool bConnectToModel,
bool bDefaultDataInColumns)
: m_bDataInColumns( bDefaultDataInColumns )
{
+ if (!xModel.is())
+ return;
try
{
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartDoc ) );
+ rtl::Reference< Diagram > xDiagram( xModel->getFirstChartDiagram() );
if( xDiagram.is())
{
- Reference< frame::XModel > xChartModel = xChartDoc;
-
//data in columns?
{
OUString aRangeString;
@@ -328,7 +311,7 @@ InternalDataProvider::InternalDataProvider(
uno::Sequence< sal_Int32 > aSequenceMapping;
const bool bSomethingDetected(
DataSourceHelper::detectRangeSegmentation(
- xChartModel, aRangeString, aSequenceMapping, m_bDataInColumns, bFirstCellAsLabel, bHasCategories ));
+ xModel, aRangeString, aSequenceMapping, m_bDataInColumns, bFirstCellAsLabel, bHasCategories ));
// #i120559# if no data was available, restore default
if(!bSomethingDetected && m_bDataInColumns != bDefaultDataInColumns)
@@ -339,13 +322,12 @@ InternalDataProvider::InternalDataProvider(
// categories
{
- vector< vector< uno::Any > > aNewCategories;//inner count is level
+ std::vector< std::vector< uno::Any > > aNewCategories;//inner count is level
{
- ChartModel& rModel = dynamic_cast<ChartModel&>(*xChartModel);
- ExplicitCategoriesProvider aExplicitCategoriesProvider(ChartModelHelper::getFirstCoordinateSystem(xChartModel), rModel);
+ ExplicitCategoriesProvider aExplicitCategoriesProvider(ChartModelHelper::getFirstCoordinateSystem(xModel), *xModel);
- const Sequence< Reference< chart2::data::XLabeledDataSequence> >& rSplitCategoriesList( aExplicitCategoriesProvider.getSplitCategoriesList() );
- sal_Int32 nLevelCount = rSplitCategoriesList.getLength();
+ const std::vector< Reference< chart2::data::XLabeledDataSequence> >& rSplitCategoriesList( aExplicitCategoriesProvider.getSplitCategoriesList() );
+ sal_Int32 nLevelCount = rSplitCategoriesList.size();
for( sal_Int32 nL = 0; nL<nLevelCount; nL++ )
{
Reference< chart2::data::XLabeledDataSequence > xLDS( rSplitCategoriesList[nL] );
@@ -361,7 +343,7 @@ InternalDataProvider::InternalDataProvider(
aNewCategories.resize( nLength );
else if( nLength < nCatLength )
aDataSeq.realloc( nCatLength );
- transform( aNewCategories.begin(), aNewCategories.end(), aDataSeq.getConstArray(),
+ transform( aNewCategories.begin(), aNewCategories.end(), aDataSeq.begin(),
aNewCategories.begin(), lcl_setAnyAtLevel(nL) );
}
if( !nLevelCount )
@@ -381,12 +363,14 @@ InternalDataProvider::InternalDataProvider(
else
m_aInternalData.setComplexColumnLabels( std::move(aNewCategories) );
if( bConnectToModel )
- DiagramHelper::setCategoriesToDiagram( new LabeledDataSequence(
- createDataSequenceByRangeRepresentation( lcl_aCategoriesRangeName )), xDiagram );
+ xDiagram->setCategories(
+ new LabeledDataSequence(
+ createDataSequenceByRangeRepresentation( lcl_aCategoriesRangeName ))
+ );
}
// data series
- std::vector< Reference< chart2::XDataSeries > > aSeriesVector( ChartModelHelper::getDataSeries( xChartDoc ));
+ std::vector< rtl::Reference< DataSeries > > aSeriesVector( ChartModelHelper::getDataSeries( xModel ));
lcl_internalizeSeries ftor( m_aInternalData, *this, bConnectToModel, m_bDataInColumns );
for( const auto& rxScreen : aSeriesVector )
ftor( rxScreen );
@@ -571,7 +555,8 @@ InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, st
}
if (rRole == u"values-y" || rRole == u"values-first" || rRole == u"values-last" ||
- rRole == u"values-min" || rRole == u"values-max" || rRole == u"values-size")
+ rRole == u"values-min" || rRole == u"values-max" || rRole == u"values-size" ||
+ rRole == u"error-bars-y-positive" || rRole == u"error-bars-y-negative")
{
// Column values. Append a new data column and populate it.
@@ -649,8 +634,12 @@ InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, st
sal_Int32 nColSize = m_aInternalData.getColumnCount();
if (!aRawElems.empty() && nColSize)
{
- std::vector<uno::Any> aLabels(1, uno::Any(aRawElems[0]));
- m_aInternalData.setComplexColumnLabel(nColSize-1, std::move(aLabels));
+ // Do not overwrite an existing label (attempted by series with no data values)
+ if (!m_aInternalData.getComplexColumnLabel(nColSize-1)[0].hasValue())
+ {
+ std::vector<uno::Any> aLabels(1, uno::Any(aRawElems[0]));
+ m_aInternalData.setComplexColumnLabel(nColSize-1, std::move(aLabels));
+ }
OUString aRangeRep = lcl_aLabelRangePrefix + OUString::number(nColSize-1);
xSeq.set(new UncachedDataSequence(this, aRangeRep));
@@ -680,7 +669,7 @@ sal_Bool SAL_CALL InternalDataProvider::createDataSourcePossible( const Sequence
namespace
{
-sal_Int32 lcl_getInnerLevelCount( const vector< vector< uno::Any > >& rLabels )
+sal_Int32 lcl_getInnerLevelCount( const std::vector< std::vector< uno::Any > >& rLabels )
{
sal_Int32 nCount = 1;//minimum is 1!
for (auto const& elemLabel : rLabels)
@@ -706,7 +695,7 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData
{
//return split complex categories if we have any:
std::vector< Reference< chart2::data::XLabeledDataSequence > > aComplexCategories;
- vector< vector< uno::Any > > aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels());
+ const std::vector< std::vector< uno::Any > > & aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels());
if( bUseColumns==m_bDataInColumns )
{
sal_Int32 nLevelCount = lcl_getInnerLevelCount( aCategories );
@@ -785,7 +774,7 @@ Sequence< beans::PropertyValue > SAL_CALL InternalDataProvider::detectArguments(
{
Sequence< beans::PropertyValue > aArguments{
beans::PropertyValue(
- "CellRangeRepresentation", -1, uno::Any( OUString(lcl_aCompleteRange) ),
+ "CellRangeRepresentation", -1, uno::Any( lcl_aCompleteRange ),
beans::PropertyState_DIRECT_VALUE ),
beans::PropertyValue(
"DataRowSource", -1, uno::Any(
@@ -823,7 +812,7 @@ Reference< chart2::data::XDataSequence > SAL_CALL InternalDataProvider::createDa
else if( aRangeRepresentation.match( lcl_aLabelRangePrefix ))
{
// label
- sal_Int32 nIndex = aRangeRepresentation.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
+ sal_Int32 nIndex = o3tl::toInt32(aRangeRepresentation.subView( strlen(lcl_aLabelRangePrefix)));
return createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::number( nIndex ));
}
else if ( aRangeRepresentation == "last" )
@@ -867,7 +856,7 @@ sal_Bool SAL_CALL InternalDataProvider::hasDataByRangeRepresentation( const OUSt
}
else if( aRange.match( lcl_aLabelRangePrefix ))
{
- sal_Int32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
+ sal_Int32 nIndex = o3tl::toInt32(aRange.subView( strlen(lcl_aLabelRangePrefix)));
bResult = (nIndex < (m_bDataInColumns ? m_aInternalData.getColumnCount(): m_aInternalData.getRowCount()));
}
else
@@ -885,8 +874,8 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
if( aRange.match( lcl_aLabelRangePrefix ) )
{
- auto nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toUInt32();
- vector< uno::Any > aComplexLabel = m_bDataInColumns
+ auto nIndex = o3tl::toUInt32(aRange.subView( strlen(lcl_aLabelRangePrefix)));
+ std::vector< uno::Any > aComplexLabel = m_bDataInColumns
? m_aInternalData.getComplexColumnLabel( nIndex )
: m_aInternalData.getComplexRowLabel( nIndex );
if( !aComplexLabel.empty() )
@@ -894,8 +883,8 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
}
else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) )
{
- auto nPointIndex = aRange.copy( strlen(lcl_aCategoriesPointRangeNamePrefix) ).toUInt32();
- vector< uno::Any > aComplexCategory = m_bDataInColumns
+ auto nPointIndex = o3tl::toUInt32(aRange.subView( strlen(lcl_aCategoriesPointRangeNamePrefix) ));
+ std::vector< uno::Any > aComplexCategory = m_bDataInColumns
? m_aInternalData.getComplexRowLabel( nPointIndex )
: m_aInternalData.getComplexColumnLabel( nPointIndex );
if( !aComplexCategory.empty() )
@@ -903,18 +892,14 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
}
else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) )
{
- sal_Int32 nLevel = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix) ).toInt32();
- vector< vector< uno::Any > > aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels());
+ sal_Int32 nLevel = o3tl::toInt32(aRange.subView( strlen(lcl_aCategoriesLevelRangeNamePrefix) ));
+ const std::vector< std::vector< uno::Any > > & aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels());
if( nLevel < lcl_getInnerLevelCount( aCategories ) )
- {
- aResult.realloc( aCategories.size() );
- transform( aCategories.begin(), aCategories.end(),
- aResult.getArray(), lcl_copyFromLevel(nLevel) );
- }
+ aResult = CommonFunctors::convertToSequence(aCategories, lcl_copyFromLevel(nLevel));
}
else if( aRange == lcl_aCategoriesRangeName )
{
- vector< vector< uno::Any > > aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels());
+ const std::vector< std::vector< uno::Any > > & aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels());
sal_Int32 nLevelCount = lcl_getInnerLevelCount( aCategories );
if( nLevelCount == 1 )
{
@@ -924,9 +909,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
{
// Maybe this 'else' part and the functions is not necessary anymore.
const Sequence< OUString > aLabels = m_bDataInColumns ? getRowDescriptions() : getColumnDescriptions();
- aResult.realloc( aLabels.getLength() );
- transform( aLabels.begin(), aLabels.end(),
- aResult.getArray(), CommonFunctors::makeAny< OUString >() );
+ aResult = CommonFunctors::convertToSequence(aLabels, CommonFunctors::makeAny());
}
}
else
@@ -938,11 +921,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
? m_aInternalData.getColumnValues(nIndex)
: m_aInternalData.getRowValues(nIndex);
if( aData.hasElements() )
- {
- aResult.realloc( aData.getLength());
- transform( aData.begin(), aData.end(),
- aResult.getArray(), CommonFunctors::makeAny< double >());
- }
+ aResult = CommonFunctors::convertToSequence(aData, CommonFunctors::makeAny());
}
}
@@ -952,10 +931,10 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
const OUString& aRange, const Sequence< uno::Any >& aNewData )
{
- auto aNewVector( comphelper::sequenceToContainer<vector< uno::Any >>(aNewData) );
+ auto aNewVector( comphelper::sequenceToContainer<std::vector< uno::Any >>(aNewData) );
if( aRange.match( lcl_aLabelRangePrefix ) )
{
- sal_uInt32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
+ sal_uInt32 nIndex = o3tl::toInt32(aRange.subView( strlen(lcl_aLabelRangePrefix)));
if( m_bDataInColumns )
m_aInternalData.setComplexColumnLabel( nIndex, std::move(aNewVector) );
else
@@ -963,7 +942,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
}
else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) )
{
- sal_Int32 nPointIndex = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix)).toInt32();
+ sal_Int32 nPointIndex = o3tl::toInt32(aRange.subView( strlen(lcl_aCategoriesLevelRangeNamePrefix)));
if( m_bDataInColumns )
m_aInternalData.setComplexRowLabel( nPointIndex, std::move(aNewVector) );
else
@@ -971,8 +950,8 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
}
else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) )
{
- sal_Int32 nLevel = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix)).toInt32();
- vector< vector< uno::Any > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
+ sal_Int32 nLevel = o3tl::toInt32(aRange.subView( strlen(lcl_aCategoriesLevelRangeNamePrefix)));
+ std::vector< std::vector< uno::Any > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
//ensure equal length
if( aNewVector.size() > aComplexCategories.size() )
@@ -990,7 +969,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
}
else if( aRange == lcl_aCategoriesRangeName )
{
- vector< vector< uno::Any > > aComplexCategories;
+ std::vector< std::vector< uno::Any > > aComplexCategories;
aComplexCategories.resize( aNewVector.size() );
transform( aComplexCategories.begin(), aComplexCategories.end(), aNewVector.begin(),
aComplexCategories.begin(), lcl_setAnyAtLevel(0) );
@@ -1004,9 +983,10 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
sal_Int32 nIndex = aRange.toInt32();
if( nIndex>=0 )
{
- vector< double > aNewDataVec;
+ std::vector< double > aNewDataVec;
+ aNewDataVec.reserve(aNewData.getLength());
transform( aNewData.begin(), aNewData.end(),
- back_inserter( aNewDataVec ), CommonFunctors::AnyToDouble());
+ back_inserter( aNewDataVec ), CommonFunctors::ToDouble());
if( m_bDataInColumns )
m_aInternalData.setColumnValues( nIndex, aNewDataVec );
else
@@ -1058,7 +1038,7 @@ void SAL_CALL InternalDataProvider::insertComplexCategoryLevel( sal_Int32 nLevel
OSL_ENSURE( nLevel> 0, "you can only insert category levels > 0" );//the first categories level cannot be deleted, check the calling code for error
if( nLevel>0 )
{
- vector< vector< uno::Any > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
+ std::vector< std::vector< uno::Any > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
std::for_each( aComplexCategories.begin(), aComplexCategories.end(), lcl_insertAnyAtLevel(nLevel) );
if( m_bDataInColumns )
m_aInternalData.setComplexRowLabels( std::move(aComplexCategories) );
@@ -1074,7 +1054,7 @@ void SAL_CALL InternalDataProvider::deleteComplexCategoryLevel( sal_Int32 nLevel
OSL_ENSURE( nLevel>0, "you can only delete category levels > 0" );//the first categories level cannot be deleted, check the calling code for error
if( nLevel>0 )
{
- vector< vector< uno::Any > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
+ std::vector< std::vector< uno::Any > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
std::for_each( aComplexCategories.begin(), aComplexCategories.end(), lcl_removeAnyAtLevel(nLevel) );
if( m_bDataInColumns )
m_aInternalData.setComplexRowLabels( std::move(aComplexCategories) );
@@ -1188,7 +1168,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRang
}
else if( aRangeRepresentation.match( lcl_aLabelRangePrefix ))
{
- sal_Int32 nIndex = aRangeRepresentation.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
+ sal_Int32 nIndex = o3tl::toInt32(aRangeRepresentation.subView( strlen(lcl_aLabelRangePrefix)));
aRange.aUpperLeft.bIsEmpty = false;
aRange.aLowerRight.bIsEmpty = true;
if( m_bDataInColumns )
@@ -1243,7 +1223,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM
return "";
}
- static const OUStringLiteral aPivotTableID(u"PT@");
+ static constexpr OUString aPivotTableID(u"PT@"_ustr);
if (aXMLRange.startsWith(aPivotTableID))
return aXMLRange.copy(aPivotTableID.getLength());
@@ -1289,54 +1269,35 @@ namespace
{
template< class Type >
-Sequence< Sequence< Type > > lcl_convertVectorVectorToSequenceSequence( const vector< vector< Type > >& rIn )
+Sequence< Sequence< Type > > lcl_convertVectorVectorToSequenceSequence( const std::vector< std::vector< Type > >& rIn )
{
- Sequence< Sequence< Type > > aRet;
- sal_Int32 nOuterCount = rIn.size();
- if( nOuterCount )
- {
- aRet.realloc(nOuterCount);
- auto pRet = aRet.getArray();
- for( sal_Int32 nN=0; nN<nOuterCount; nN++)
- pRet[nN]= comphelper::containerToSequence( rIn[nN] );
- }
- return aRet;
+ return CommonFunctors::convertToSequence(rIn, [](auto& v)
+ { return comphelper::containerToSequence(v); });
}
template< class Type >
-vector< vector< Type > > lcl_convertSequenceSequenceToVectorVector( const Sequence< Sequence< Type > >& rIn )
+std::vector< std::vector< Type > > lcl_convertSequenceSequenceToVectorVector( const Sequence< Sequence< Type > >& rIn )
{
- vector< vector< Type > > aRet;
- sal_Int32 nOuterCount = rIn.getLength();
- if( nOuterCount )
- {
- aRet.resize(nOuterCount);
- for( sal_Int32 nN=0; nN<nOuterCount; nN++)
- aRet[nN]= comphelper::sequenceToContainer<vector< Type >>( rIn[nN] );
- }
+ std::vector< std::vector< Type > > aRet;
+ aRet.reserve(rIn.getLength());
+ std::transform(rIn.begin(), rIn.end(), std::back_inserter(aRet),
+ [](auto& s) { return comphelper::sequenceToContainer<std::vector<Type>>(s); });
return aRet;
}
-std::vector< Sequence< OUString > > lcl_convertComplexAnyVectorToStringSequence( const vector< vector< uno::Any > >& rIn )
+Sequence< Sequence< OUString > > lcl_convertComplexAnyVectorToStringSequence( const std::vector< std::vector< uno::Any > >& rIn )
{
- std::vector< Sequence< OUString > > aRet;
- sal_Int32 nOuterCount = rIn.size();
- if( nOuterCount )
- {
- aRet.resize(nOuterCount);
- for( sal_Int32 nN=0; nN<nOuterCount; nN++)
- aRet[nN] = comphelper::containerToSequence(lcl_AnyToStringSequence( rIn[nN] ));
- }
- return aRet;
+ return CommonFunctors::convertToSequence(
+ rIn,
+ [](auto& v) { return CommonFunctors::convertToSequence(v, CommonFunctors::ToString()); });
}
-vector< vector< uno::Any > > lcl_convertComplexStringSequenceToAnyVector( const Sequence< Sequence< OUString > >& rIn )
+std::vector< std::vector< uno::Any > > lcl_convertComplexStringSequenceToAnyVector( const Sequence< Sequence< OUString > >& rIn )
{
- vector< vector< uno::Any > > aRet;
- sal_Int32 nOuterCount = rIn.getLength();
- aRet.reserve(nOuterCount);
- for (sal_Int32 nN = 0; nN < nOuterCount; nN++)
- aRet.push_back( lcl_StringToAnyVector( rIn[nN] ) );
+ std::vector< std::vector< uno::Any > > aRet;
+ aRet.reserve(rIn.getLength());
+ std::transform(rIn.begin(), rIn.end(), std::back_inserter(aRet),
+ [](auto& s) { return lcl_StringToAnyVector(s); });
return aRet;
}
@@ -1361,14 +1322,9 @@ sal_Int32 SplitCategoriesProvider_ForComplexDescriptions::getLevelCount() const
}
uno::Sequence< OUString > SplitCategoriesProvider_ForComplexDescriptions::getStringsForLevel( sal_Int32 nLevel ) const
{
- uno::Sequence< OUString > aResult;
if( nLevel < lcl_getInnerLevelCount( m_rComplexDescriptions ) )
- {
- aResult.realloc( m_rComplexDescriptions.size() );
- transform( m_rComplexDescriptions.begin(), m_rComplexDescriptions.end(),
- aResult.getArray(), lcl_getStringFromLevelVector(nLevel) );
- }
- return aResult;
+ return CommonFunctors::convertToSequence(m_rComplexDescriptions, lcl_getStringFromLevelVector(nLevel));
+ return {};
}
}//anonymous namespace
@@ -1376,7 +1332,7 @@ uno::Sequence< OUString > SplitCategoriesProvider_ForComplexDescriptions::getStr
// ____ XDateCategories ____
Sequence< double > SAL_CALL InternalDataProvider::getDateCategories()
{
- vector< vector< uno::Any > > aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels());
+ const std::vector< std::vector< uno::Any > > & aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels());
sal_Int32 nCount = aCategories.size();
Sequence< double > aDoubles( nCount );
auto aDoublesRange = asNonConstRange(aDoubles);
@@ -1394,9 +1350,9 @@ Sequence< double > SAL_CALL InternalDataProvider::getDateCategories()
void SAL_CALL InternalDataProvider::setDateCategories( const Sequence< double >& rDates )
{
sal_Int32 nCount = rDates.getLength();
- vector< vector< uno::Any > > aNewCategories;
+ std::vector< std::vector< uno::Any > > aNewCategories;
aNewCategories.reserve(nCount);
- vector< uno::Any > aSingleLabel(1);
+ std::vector< uno::Any > aSingleLabel(1);
for(sal_Int32 nN=0; nN<nCount; ++nN )
{
@@ -1431,7 +1387,7 @@ void SAL_CALL InternalDataProvider::setAnyColumnDescriptions( const Sequence< Se
// ____ XComplexDescriptionAccess ____
Sequence< Sequence< OUString > > SAL_CALL InternalDataProvider::getComplexRowDescriptions()
{
- return comphelper::containerToSequence(lcl_convertComplexAnyVectorToStringSequence( m_aInternalData.getComplexRowLabels() ));
+ return lcl_convertComplexAnyVectorToStringSequence( m_aInternalData.getComplexRowLabels() );
}
void SAL_CALL InternalDataProvider::setComplexRowDescriptions( const Sequence< Sequence< OUString > >& aRowDescriptions )
{
@@ -1439,7 +1395,7 @@ void SAL_CALL InternalDataProvider::setComplexRowDescriptions( const Sequence< S
}
Sequence< Sequence< OUString > > SAL_CALL InternalDataProvider::getComplexColumnDescriptions()
{
- return comphelper::containerToSequence(lcl_convertComplexAnyVectorToStringSequence( m_aInternalData.getComplexColumnLabels() ));
+ return lcl_convertComplexAnyVectorToStringSequence( m_aInternalData.getComplexColumnLabels() );
}
void SAL_CALL InternalDataProvider::setComplexColumnDescriptions( const Sequence< Sequence< OUString > >& aColumnDescriptions )
{
@@ -1459,30 +1415,30 @@ void SAL_CALL InternalDataProvider::setData( const Sequence< Sequence< double >
void SAL_CALL InternalDataProvider::setRowDescriptions( const Sequence< OUString >& aRowDescriptions )
{
- vector< vector< uno::Any > > aComplexDescriptions( aRowDescriptions.getLength() );
- transform( aComplexDescriptions.begin(), aComplexDescriptions.end(), aRowDescriptions.getConstArray(),
+ std::vector< std::vector< uno::Any > > aComplexDescriptions( aRowDescriptions.getLength() );
+ transform( aComplexDescriptions.begin(), aComplexDescriptions.end(), aRowDescriptions.begin(),
aComplexDescriptions.begin(), lcl_setAnyAtLevelFromStringSequence(0) );
m_aInternalData.setComplexRowLabels( std::move(aComplexDescriptions) );
}
void SAL_CALL InternalDataProvider::setColumnDescriptions( const Sequence< OUString >& aColumnDescriptions )
{
- vector< vector< uno::Any > > aComplexDescriptions( aColumnDescriptions.getLength() );
- transform( aComplexDescriptions.begin(), aComplexDescriptions.end(), aColumnDescriptions.getConstArray(),
+ std::vector< std::vector< uno::Any > > aComplexDescriptions( aColumnDescriptions.getLength() );
+ transform( aComplexDescriptions.begin(), aComplexDescriptions.end(), aColumnDescriptions.begin(),
aComplexDescriptions.begin(), lcl_setAnyAtLevelFromStringSequence(0) );
m_aInternalData.setComplexColumnLabels( std::move(aComplexDescriptions) );
}
Sequence< OUString > SAL_CALL InternalDataProvider::getRowDescriptions()
{
- vector< vector< uno::Any > > aComplexLabels( m_aInternalData.getComplexRowLabels() );
+ const std::vector< std::vector< uno::Any > > & aComplexLabels( m_aInternalData.getComplexRowLabels() );
SplitCategoriesProvider_ForComplexDescriptions aProvider( aComplexLabels );
return ExplicitCategoriesProvider::getExplicitSimpleCategories( aProvider );
}
Sequence< OUString > SAL_CALL InternalDataProvider::getColumnDescriptions()
{
- vector< vector< uno::Any > > aComplexLabels( m_aInternalData.getComplexColumnLabels() );
+ const std::vector< std::vector< uno::Any > > & aComplexLabels( m_aInternalData.getComplexColumnLabels() );
SplitCategoriesProvider_ForComplexDescriptions aProvider( aComplexLabels );
return ExplicitCategoriesProvider::getExplicitSimpleCategories( aProvider );
}
diff --git a/chart2/source/tools/LabeledDataSequence.cxx b/chart2/source/tools/LabeledDataSequence.cxx
index 93680f4bbace..bf7b13443d1d 100644
--- a/chart2/source/tools/LabeledDataSequence.cxx
+++ b/chart2/source/tools/LabeledDataSequence.cxx
@@ -20,7 +20,7 @@
#include <LabeledDataSequence.hxx>
#include <ModifyListenerHelper.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
+#include <utility>
namespace com::sun::star::uno { class XComponentContext; }
@@ -37,24 +37,46 @@ LabeledDataSequence::LabeledDataSequence() :
{}
LabeledDataSequence::LabeledDataSequence(
- const uno::Reference< chart2::data::XDataSequence > & rValues ) :
- m_xData( rValues ),
+ uno::Reference< chart2::data::XDataSequence > xValues ) :
+ m_xData(std::move( xValues )),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
ModifyListenerHelper::addListener( m_xData, m_xModifyEventForwarder );
}
LabeledDataSequence::LabeledDataSequence(
- const uno::Reference< chart2::data::XDataSequence > & rValues,
- const uno::Reference< chart2::data::XDataSequence > & rLabel ) :
- m_xData( rValues ),
- m_xLabel( rLabel ),
+ uno::Reference< chart2::data::XDataSequence > xValues,
+ uno::Reference< chart2::data::XDataSequence > xLabel ) :
+ m_xData(std::move( xValues )),
+ m_xLabel(std::move( xLabel )),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
ModifyListenerHelper::addListener( m_xData, m_xModifyEventForwarder );
ModifyListenerHelper::addListener( m_xLabel, m_xModifyEventForwarder );
}
+LabeledDataSequence::LabeledDataSequence( const LabeledDataSequence& rSource ) :
+ impl::LabeledDataSequence_Base(),
+ m_xModifyEventForwarder( new ModifyEventForwarder() )
+{
+ uno::Reference< chart2::data::XDataSequence > xNewValues( rSource.m_xData );
+ uno::Reference< chart2::data::XDataSequence > xNewLabel( rSource.m_xLabel );
+
+ uno::Reference< util::XCloneable > xLabelCloneable( rSource.m_xLabel, uno::UNO_QUERY );
+ if( xLabelCloneable.is())
+ xNewLabel.set( xLabelCloneable->createClone(), uno::UNO_QUERY );
+
+ uno::Reference< util::XCloneable > xValuesCloneable( rSource.m_xData, uno::UNO_QUERY );
+ if( xValuesCloneable.is())
+ xNewValues.set( xValuesCloneable->createClone(), uno::UNO_QUERY );
+
+ m_xData = xNewValues;
+ m_xLabel = xNewLabel;
+
+ ModifyListenerHelper::addListener( m_xData, m_xModifyEventForwarder );
+ ModifyListenerHelper::addListener( m_xLabel, m_xModifyEventForwarder );
+}
+
LabeledDataSequence::~LabeledDataSequence()
{
if( m_xModifyEventForwarder.is())
diff --git a/chart2/source/tools/LegendHelper.cxx b/chart2/source/tools/LegendHelper.cxx
index 6fbd6bf63143..2c52f136398d 100644
--- a/chart2/source/tools/LegendHelper.cxx
+++ b/chart2/source/tools/LegendHelper.cxx
@@ -18,12 +18,14 @@
*/
#include <LegendHelper.hxx>
+#include <Legend.hxx>
#include <ChartModel.hxx>
+#include <Diagram.hxx>
#include <com/sun/star/chart/ChartLegendExpansion.hpp>
#include <com/sun/star/chart2/LegendPosition.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
@@ -31,31 +33,30 @@ using ::com::sun::star::uno::Reference;
namespace chart
{
-Reference< chart2::XLegend > LegendHelper::showLegend( ChartModel& rModel
+rtl::Reference< Legend > LegendHelper::showLegend( ChartModel& rModel
, const uno::Reference< uno::XComponentContext >& xContext )
{
- uno::Reference< chart2::XLegend > xLegend = LegendHelper::getLegend( rModel, xContext, true );
- uno::Reference< beans::XPropertySet > xProp( xLegend, uno::UNO_QUERY );
- if( xProp.is())
+ rtl::Reference< Legend > xLegend = LegendHelper::getLegend( rModel, xContext, true );
+ if( xLegend.is())
{
- xProp->setPropertyValue( "Show", uno::Any(true) );
+ xLegend->setPropertyValue( "Show", uno::Any(true) );
chart2::RelativePosition aRelativePosition;
- if( !(xProp->getPropertyValue( "RelativePosition") >>= aRelativePosition) )
+ if( !(xLegend->getPropertyValue( "RelativePosition") >>= aRelativePosition) )
{
chart2::LegendPosition ePos = chart2::LegendPosition_LINE_END;
- if( !(xProp->getPropertyValue( "AnchorPosition") >>= ePos ) )
- xProp->setPropertyValue( "AnchorPosition", uno::Any( ePos ));
+ if( !(xLegend->getPropertyValue( "AnchorPosition") >>= ePos ) )
+ xLegend->setPropertyValue( "AnchorPosition", uno::Any( ePos ));
css::chart::ChartLegendExpansion eExpansion =
( ePos == chart2::LegendPosition_LINE_END ||
ePos == chart2::LegendPosition_LINE_START )
? css::chart::ChartLegendExpansion_HIGH
: css::chart::ChartLegendExpansion_WIDE;
- if( !(xProp->getPropertyValue( "Expansion") >>= eExpansion ) )
- xProp->setPropertyValue( "Expansion", uno::Any( eExpansion ));
+ if( !(xLegend->getPropertyValue( "Expansion") >>= eExpansion ) )
+ xLegend->setPropertyValue( "Expansion", uno::Any( eExpansion ));
- xProp->setPropertyValue( "RelativePosition", uno::Any());
+ xLegend->setPropertyValue( "RelativePosition", uno::Any());
}
}
@@ -64,31 +65,29 @@ Reference< chart2::XLegend > LegendHelper::showLegend( ChartModel& rModel
void LegendHelper::hideLegend( ChartModel& rModel )
{
- uno::Reference< chart2::XLegend > xLegend = LegendHelper::getLegend( rModel, nullptr );
- uno::Reference< beans::XPropertySet > xProp( xLegend, uno::UNO_QUERY );
- if( xProp.is())
+ rtl::Reference< Legend > xLegend = LegendHelper::getLegend( rModel, nullptr );
+ if( xLegend.is())
{
- xProp->setPropertyValue( "Show", uno::Any(false) );
+ xLegend->setPropertyValue( "Show", uno::Any(false) );
}
}
-uno::Reference< chart2::XLegend > LegendHelper::getLegend(
+rtl::Reference< Legend > LegendHelper::getLegend(
ChartModel& rModel
, const uno::Reference< uno::XComponentContext >& xContext
, bool bCreate )
{
- uno::Reference< chart2::XLegend > xResult;
+ rtl::Reference< Legend > xResult;
try
{
- uno::Reference< chart2::XDiagram > xDia( rModel.getFirstDiagram());
+ rtl::Reference< Diagram > xDia( rModel.getFirstChartDiagram());
if( xDia.is() )
{
- xResult.set( xDia->getLegend() );
+ xResult = xDia->getLegend2();
if( bCreate && !xResult.is() && xContext.is() )
{
- xResult.set( xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.chart2.Legend", xContext ), uno::UNO_QUERY );
+ xResult = new Legend();
xDia->setLegend( xResult );
}
}
@@ -105,7 +104,7 @@ uno::Reference< chart2::XLegend > LegendHelper::getLegend(
return xResult;
}
-bool LegendHelper::hasLegend( const uno::Reference< chart2::XDiagram > & xDiagram )
+bool LegendHelper::hasLegend( const rtl::Reference< Diagram > & xDiagram )
{
bool bReturn = false;
if( xDiagram.is())
diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx
index 7a84f4f648c6..45550b93efdd 100644
--- a/chart2/source/tools/LifeTime.cxx
+++ b/chart2/source/tools/LifeTime.cxx
@@ -20,11 +20,14 @@
#include <LifeTime.hxx>
#include <osl/diagnose.h>
+#include <com/sun/star/document/XStorageChangeListener.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
#include <com/sun/star/util/XCloseListener.hpp>
#include <com/sun/star/util/XCloseable.hpp>
-#include <tools/diagnose_ex.h>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
using namespace ::com::sun::star;
@@ -33,8 +36,7 @@ namespace apphelper
{
LifeTimeManager::LifeTimeManager( lang::XComponent* pComponent )
- : m_aListenerContainer( m_aAccessMutex )
- , m_pComponent(pComponent)
+ : m_pComponent(pComponent)
{
m_bDisposed = false;
m_bInDispose = false;
@@ -85,7 +87,7 @@ void LifeTimeManager::impl_registerApiCall(bool bLongLastingCall)
m_aNoLongLastingCallCountCondition.reset();
}
-void LifeTimeManager::impl_unregisterApiCall(bool bLongLastingCall)
+void LifeTimeManager::impl_unregisterApiCall(std::unique_lock<std::mutex>& rGuard, bool bLongLastingCall)
{
//Mutex needs to be acquired exactly once
//mutex may be released inbetween in special case of impl_apiCallCountReachedNull()
@@ -101,7 +103,7 @@ void LifeTimeManager::impl_unregisterApiCall(bool bLongLastingCall)
if( m_nAccessCount== 0)
{
m_aNoAccessCountCondition.set();
- impl_apiCallCountReachedNull();
+ impl_apiCallCountReachedNull(rGuard);
}
}
@@ -110,7 +112,7 @@ bool LifeTimeManager::dispose()
{
//hold no mutex
{
- osl::MutexGuard aGuard( m_aAccessMutex );
+ std::unique_lock aGuard( m_aAccessMutex );
if( m_bDisposed || m_bInDispose )
{
@@ -122,23 +124,19 @@ bool LifeTimeManager::dispose()
//adding any listener is not allowed anymore
//new calls will not be accepted
//still running calls have the freedom to finish their work without crash
- }
- //no mutex is acquired
- //--do the disposing of listeners after calling this method
- {
uno::Reference< lang::XComponent > xComponent(m_pComponent);
if(xComponent.is())
{
// notify XCLoseListeners
lang::EventObject aEvent( xComponent );
- m_aListenerContainer.disposeAndClear( aEvent );
+ m_aCloseListeners.disposeAndClear( aGuard, aEvent );
+ m_aModifyListeners.disposeAndClear( aGuard, aEvent );
+ m_aStorageChangeListeners.disposeAndClear( aGuard, aEvent );
+ m_aEventListeners.disposeAndClear( aGuard, aEvent );
+ m_aSelectionChangeListeners.disposeAndClear( aGuard, aEvent );
}
- }
- //no mutex is acquired
- {
- osl::MutexGuard aGuard( m_aAccessMutex );
OSL_ENSURE( !m_bDisposed, "dispose was called already" );
m_bDisposed = true;
}
@@ -189,7 +187,7 @@ bool CloseableLifeTimeManager::g_close_startTryClose(bool bDeliverOwnership)
{
//no mutex is allowed to be acquired
{
- osl::MutexGuard aGuard( m_aAccessMutex );
+ std::unique_lock aGuard( m_aAccessMutex );
if( impl_isDisposedOrClosed(false) )
return false;
@@ -217,18 +215,16 @@ bool CloseableLifeTimeManager::g_close_startTryClose(bool bDeliverOwnership)
uno::Reference< util::XCloseable > xCloseable(m_pCloseable);
if(xCloseable.is())
{
+ std::unique_lock aGuard( m_aAccessMutex );
//--call queryClosing on all registered close listeners
- ::comphelper::OInterfaceContainerHelper2* pIC = m_aListenerContainer.getContainer(
- cppu::UnoType<util::XCloseListener>::get());
- if( pIC )
+ if( m_aCloseListeners.getLength(aGuard) )
{
lang::EventObject aEvent( xCloseable );
- ::comphelper::OInterfaceIteratorHelper2 aIt( *pIC );
- while( aIt.hasMoreElements() )
- {
- static_cast< util::XCloseListener* >( aIt.next() )
- ->queryClosing( aEvent, bDeliverOwnership );
- }
+ m_aCloseListeners.forEach(aGuard,
+ [&aEvent, bDeliverOwnership](const uno::Reference<util::XCloseListener>& l)
+ {
+ l->queryClosing(aEvent, bDeliverOwnership);
+ });
}
}
}
@@ -244,7 +240,7 @@ bool CloseableLifeTimeManager::g_close_startTryClose(bool bDeliverOwnership)
void CloseableLifeTimeManager::g_close_endTryClose(bool bDeliverOwnership )
{
//this method is called, if the try to close was not successful
- osl::MutexGuard aGuard( m_aAccessMutex );
+ std::unique_lock aGuard( m_aAccessMutex );
impl_setOwnership( bDeliverOwnership, false );
m_bInTryClose = false;
@@ -252,7 +248,7 @@ void CloseableLifeTimeManager::g_close_endTryClose(bool bDeliverOwnership )
//Mutex needs to be acquired exactly once
//mutex may be released inbetween in special case of impl_apiCallCountReachedNull()
- impl_unregisterApiCall(false);
+ impl_unregisterApiCall(aGuard, false);
}
void CloseableLifeTimeManager::g_close_isNeedToCancelLongLastingCalls( bool bDeliverOwnership, util::CloseVetoException const & ex )
@@ -262,7 +258,7 @@ void CloseableLifeTimeManager::g_close_isNeedToCancelLongLastingCalls( bool bDel
//it returns true, if some longlasting calls are running, which might be cancelled
//it throws the given exception, if long calls are running but not cancelable
- osl::MutexGuard aGuard( m_aAccessMutex );
+ std::unique_lock aGuard( m_aAccessMutex );
//this count cannot grow after try of close has started, because we wait in all those methods for end of try closing
if( !m_nLongLastingCallCount )
return;
@@ -274,7 +270,7 @@ void CloseableLifeTimeManager::g_close_isNeedToCancelLongLastingCalls( bool bDel
//Mutex needs to be acquired exactly once
//mutex may be released inbetween in special case of impl_apiCallCountReachedNull()
- impl_unregisterApiCall(false);
+ impl_unregisterApiCall(aGuard, false);
throw ex;
}
@@ -282,15 +278,15 @@ void CloseableLifeTimeManager::g_close_isNeedToCancelLongLastingCalls( bool bDel
void CloseableLifeTimeManager::g_close_endTryClose_doClose()
{
//this method is called, if the try to close was successful
- osl::MutexGuard aGuard( m_aAccessMutex );
+ std::unique_lock aGuard( m_aAccessMutex );
m_bInTryClose = false;
m_aEndTryClosingCondition.set();
//Mutex needs to be acquired exactly once
//mutex may be released inbetween in special case of impl_apiCallCountReachedNull()
- impl_unregisterApiCall(false);
- impl_doClose();
+ impl_unregisterApiCall(aGuard, false);
+ impl_doClose(aGuard);
}
void CloseableLifeTimeManager::impl_setOwnership( bool bDeliverOwnership, bool bMyVeto )
@@ -298,15 +294,15 @@ void CloseableLifeTimeManager::impl_setOwnership( bool bDeliverOwnership, bool b
m_bOwnership = bDeliverOwnership && bMyVeto;
}
-void CloseableLifeTimeManager::impl_apiCallCountReachedNull()
+void CloseableLifeTimeManager::impl_apiCallCountReachedNull(std::unique_lock<std::mutex>& rGuard)
{
//Mutex needs to be acquired exactly once
//mutex will be released inbetween in impl_doClose()
if( m_pCloseable && m_bOwnership )
- impl_doClose();
+ impl_doClose(rGuard);
}
-void CloseableLifeTimeManager::impl_doClose()
+void CloseableLifeTimeManager::impl_doClose(std::unique_lock<std::mutex>& rGuard)
{
//Mutex needs to be acquired exactly once before calling impl_doClose()
@@ -317,26 +313,17 @@ void CloseableLifeTimeManager::impl_doClose()
m_bClosed = true;
- NegativeGuard< osl::Mutex > aNegativeGuard( m_aAccessMutex );
- //mutex is not acquired, mutex will be reacquired at the end of this method automatically
-
uno::Reference< util::XCloseable > xCloseable;
+ xCloseable.set(m_pCloseable);
try
{
- xCloseable.set(m_pCloseable);
if(xCloseable.is())
{
//--call notifyClosing on all registered close listeners
- ::comphelper::OInterfaceContainerHelper2* pIC = m_aListenerContainer.getContainer(
- cppu::UnoType<util::XCloseListener>::get());
- if( pIC )
+ if( m_aCloseListeners.getLength(rGuard) )
{
lang::EventObject aEvent( xCloseable );
- ::comphelper::OInterfaceIteratorHelper2 aIt( *pIC );
- while( aIt.hasMoreElements() )
- {
- static_cast< util::XCloseListener* >( aIt.next() )->notifyClosing( aEvent );
- }
+ m_aCloseListeners.notifyEach(rGuard, &util::XCloseListener::notifyClosing, aEvent);
}
}
}
@@ -345,6 +332,7 @@ void CloseableLifeTimeManager::impl_doClose()
DBG_UNHANDLED_EXCEPTION("chart2");
}
+ rGuard.unlock();
if(xCloseable.is())
{
uno::Reference< lang::XComponent > xComponent( xCloseable, uno::UNO_QUERY );
@@ -354,18 +342,18 @@ void CloseableLifeTimeManager::impl_doClose()
xComponent->dispose();
}
}
- //mutex will be reacquired in destructor of aNegativeGuard
+ rGuard.lock();
}
void CloseableLifeTimeManager::g_addCloseListener( const uno::Reference< util::XCloseListener > & xListener )
{
- osl::MutexGuard aGuard( m_aAccessMutex );
+ std::unique_lock aGuard( m_aAccessMutex );
//Mutex needs to be acquired exactly once; will be released inbetween
if( !impl_canStartApiCall() )
return;
//mutex is acquired
- m_aListenerContainer.addInterface( cppu::UnoType<util::XCloseListener>::get(),xListener );
+ m_aCloseListeners.addInterface( aGuard, xListener );
m_bOwnership = false;
}
@@ -386,9 +374,9 @@ bool CloseableLifeTimeManager::impl_canStartApiCall()
//we need to wait for his end because the result of the preceding call
//is relevant for our behaviour here
- m_aAccessMutex.release();
+ m_aAccessMutex.unlock();
m_aEndTryClosingCondition.wait(); //@todo??? this may block??? try closing
- m_aAccessMutex.acquire();
+ m_aAccessMutex.lock();
if( m_bDisposed || m_bInDispose || m_bClosed )
return false; //return if closed already
}
@@ -421,12 +409,13 @@ LifeTimeGuard::~LifeTimeGuard()
try
{
//do acquire the mutex if it was cleared before
- osl::MutexGuard g(m_rManager.m_aAccessMutex);
+ if (!m_guard.owns_lock())
+ m_guard.lock();
if(m_bCallRegistered)
{
//Mutex needs to be acquired exactly once
//mutex may be released inbetween in special case of impl_apiCallCountReachedNull()
- m_rManager.impl_unregisterApiCall(m_bLongLastingCallRegistered);
+ m_rManager.impl_unregisterApiCall(m_guard, m_bLongLastingCallRegistered);
}
}
catch( uno::Exception& ex )
diff --git a/chart2/source/tools/LinePropertiesHelper.cxx b/chart2/source/tools/LinePropertiesHelper.cxx
index 7e6d28860903..b3c5fc6ccf53 100644
--- a/chart2/source/tools/LinePropertiesHelper.cxx
+++ b/chart2/source/tools/LinePropertiesHelper.cxx
@@ -24,7 +24,8 @@
#include <com/sun/star/drawing/LineDash.hpp>
#include <com/sun/star/drawing/LineCap.hpp>
#include <com/sun/star/drawing/LineJoint.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <tools/color.hxx>
using namespace ::com::sun::star;
@@ -92,9 +93,9 @@ void LinePropertiesHelper::AddDefaultsToMap(
::chart::tPropertyValueMap & rOutMap )
{
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_LINE_STYLE, drawing::LineStyle_SOLID );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_LINE_WIDTH, 0 );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_LINE_COLOR, 0x000000 ); // black
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_LINE_TRANSPARENCE, 0 );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_LINE_WIDTH, sal_Int32(0) );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_LINE_COLOR, COL_BLACK );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_LINE_TRANSPARENCE, sal_Int16(0) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_LINE_JOINT, drawing::LineJoint_ROUND );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_LINE_CAP, drawing::LineCap_BUTT );
}
diff --git a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
index ffd1808dfd22..5e68235d14cd 100644
--- a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
@@ -175,7 +175,7 @@ OUString LogarithmicRegressionCurveCalculator::ImplGetRepresentation(
addStringToEquation( aBuf, nLineLength, aTmpBuf, pFormulaMaxWidth );
}
- if ( std::u16string_view(aBuf) == OUStringConcatenation(mYName + " = ") )
+ if ( std::u16string_view(aBuf) == Concat2View(mYName + " = ") )
aBuf.append( "0" );
return aBuf.makeStringAndClear();
diff --git a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
index aefd3f8f05aa..ac67a12e5e9b 100644
--- a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
@@ -42,18 +42,15 @@ void SAL_CALL MeanValueRegressionCurveCalculator::recalculateRegression(
const uno::Sequence< double >& /*aXValues*/,
const uno::Sequence< double >& aYValues )
{
- const sal_Int32 nDataLength = aYValues.getLength();
- sal_Int32 nMax = nDataLength;
+ sal_Int32 nMax = aYValues.getLength();
double fSumY = 0.0;
- const double * pY = aYValues.getConstArray();
- for( sal_Int32 i = 0; i < nDataLength; ++i )
+ for (double y : aYValues)
{
- if( std::isnan( pY[i] ) ||
- std::isinf( pY[i] ))
+ if (std::isnan(y) || std::isinf(y))
--nMax;
else
- fSumY += pY[i];
+ fSumY += y;
}
m_fCorrelationCoefficient = 0.0;
@@ -70,12 +67,11 @@ void SAL_CALL MeanValueRegressionCurveCalculator::recalculateRegression(
if( nMax > 1 )
{
double fErrorSum = 0.0;
- for( sal_Int32 i = 0; i < nDataLength; ++i )
+ for (double y : aYValues)
{
- if( !std::isnan( pY[i] ) &&
- !std::isinf( pY[i] ))
+ if (!std::isnan(y) && !std::isinf(y))
{
- double v = m_fMeanValue - pY[i];
+ double v = m_fMeanValue - y;
fErrorSum += (v*v);
}
}
diff --git a/chart2/source/tools/ModifyListenerHelper.cxx b/chart2/source/tools/ModifyListenerHelper.cxx
index 0213e97d9720..507e79fa32e2 100644
--- a/chart2/source/tools/ModifyListenerHelper.cxx
+++ b/chart2/source/tools/ModifyListenerHelper.cxx
@@ -18,9 +18,6 @@
*/
#include <ModifyListenerHelper.hxx>
-#include <WeakListenerAdapter.hxx>
-
-#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
diff --git a/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx b/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
index 227a509ad3f0..f71262f738b9 100644
--- a/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
@@ -62,19 +62,19 @@ void SAL_CALL MovingAverageRegressionCurveCalculator::recalculateRegression(
case MovingAverageType::Central:
{
- calculateValuesCentral(aValues);
+ calculateValuesCentral(std::move(aValues));
break;
}
case MovingAverageType::AveragedAbscissa:
{
- calculateValues(aValues, true);
+ calculateValues(std::move(aValues), true);
break;
}
case MovingAverageType::Prior:
default:
{
- calculateValues(aValues, false);
+ calculateValues(std::move(aValues), false);
break;
}
}
@@ -84,6 +84,8 @@ void MovingAverageRegressionCurveCalculator::calculateValuesCentral(
RegressionCalculationHelper::tDoubleVectorPair aValues)
{
const size_t aSize = aValues.first.size();
+ if (aSize == 0)
+ return;
for (size_t i = mPeriod - 1; i < aSize; ++i)
{
double yAvg = 0.0;
@@ -155,7 +157,15 @@ OUString MovingAverageRegressionCurveCalculator::ImplGetRepresentation(
const uno::Reference< util::XNumberFormatter >& /*xNumFormatter*/,
sal_Int32 /*nNumberFormatKey*/, sal_Int32* /*pFormulaLength = nullptr */ ) const
{
- return SchResId( STR_OBJECT_MOVING_AVERAGE_WITH_PARAMETERS );
+ OUString aRet = SchResId( STR_OBJECT_MOVING_AVERAGE_WITH_PARAMETERS );
+ // change text for Moving Average
+ OUString aWildcard( "%PERIOD" );
+ sal_Int32 nIndex = aRet.indexOf( aWildcard );
+ if( nIndex != -1 )
+ { // replace period
+ aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), OUString::number(mPeriod) );
+ }
+ return aRet;
}
} // namespace chart
diff --git a/chart2/source/tools/NameContainer.cxx b/chart2/source/tools/NameContainer.cxx
index 23e0a2821d1c..1cc79a8eaec0 100644
--- a/chart2/source/tools/NameContainer.cxx
+++ b/chart2/source/tools/NameContainer.cxx
@@ -65,7 +65,7 @@ Sequence< OUString > SAL_CALL NameContainer::getSupportedServiceNames()
// XNameContainer
void SAL_CALL NameContainer::insertByName( const OUString& rName, const Any& rElement )
{
- if( m_aMap.find( rName ) != m_aMap.end() )
+ if( m_aMap.contains( rName ))
throw container::ElementExistException();
m_aMap.emplace( rName, rElement );
}
diff --git a/chart2/source/tools/NumberFormatterWrapper.cxx b/chart2/source/tools/NumberFormatterWrapper.cxx
index d6e704d145d6..e00df1fae04e 100644
--- a/chart2/source/tools/NumberFormatterWrapper.cxx
+++ b/chart2/source/tools/NumberFormatterWrapper.cxx
@@ -66,12 +66,31 @@ NumberFormatterWrapper::~NumberFormatterWrapper()
{
}
+namespace
+{
+ bool getDate(const css::uno::Any& rAny, util::Date& rDate)
+ {
+ if (rAny >>= rDate)
+ return true;
+ util::DateTime aUtilDateTime;
+ if (rAny >>= aUtilDateTime)
+ {
+ rDate.Day = aUtilDateTime.Day;
+ rDate.Month = aUtilDateTime.Month;
+ rDate.Year = aUtilDateTime.Year;
+ return true;
+ }
+ SAL_WARN("chart2.tools", "neither a util::Date nor a util::DateTime");
+ return false;
+ }
+}
+
Date NumberFormatterWrapper::getNullDate() const
{
Date aRet(30,12,1899);
util::Date aUtilDate;
- if( m_aNullDate.hasValue() && (m_aNullDate >>= aUtilDate) )
+ if (m_aNullDate.hasValue() && getDate(m_aNullDate, aUtilDate))
{
aRet = Date(aUtilDate.Day,aUtilDate.Month,aUtilDate.Year);
}
@@ -102,8 +121,8 @@ OUString NumberFormatterWrapper::getFormattedString( sal_Int32 nNumberFormatKey,
nMonth = rDate.GetMonth();
nDay = rDate.GetDay();
util::Date aNewNullDate;
- m_aNullDate >>= aNewNullDate;
- m_pNumberFormatter->ChangeNullDate(aNewNullDate.Day,aNewNullDate.Month,aNewNullDate.Year);
+ if (getDate(m_aNullDate, aNewNullDate))
+ m_pNumberFormatter->ChangeNullDate(aNewNullDate.Day,aNewNullDate.Month,aNewNullDate.Year);
}
// tdf#130969: use UNLIMITED_PRECISION in case of GENERAL Number Format
if( m_pNumberFormatter->GetStandardPrec() != SvNumberFormatter::UNLIMITED_PRECISION )
diff --git a/chart2/source/tools/OPropertySet.cxx b/chart2/source/tools/OPropertySet.cxx
index bcf92741f4b5..29e7298974da 100644
--- a/chart2/source/tools/OPropertySet.cxx
+++ b/chart2/source/tools/OPropertySet.cxx
@@ -40,23 +40,25 @@ using ::cppu::OPropertySetHelper;
namespace property
{
-OPropertySet::OPropertySet( ::osl::Mutex & par_rMutex ) :
- OBroadcastHelper( par_rMutex ),
+OPropertySet::OPropertySet( ) :
+ OBroadcastHelper( m_aMutex ),
// the following causes a warning; there seems to be no way to avoid it
OPropertySetHelper( static_cast< OBroadcastHelper & >( *this )),
- m_rMutex( par_rMutex ),
m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault(false)
{
}
-OPropertySet::OPropertySet( const OPropertySet & rOther, ::osl::Mutex & par_rMutex ) :
- OBroadcastHelper( par_rMutex ),
+OPropertySet::OPropertySet( const OPropertySet & rOther ) :
+ OBroadcastHelper( m_aMutex ),
// the following causes a warning; there seems to be no way to avoid it
OPropertySetHelper( static_cast< OBroadcastHelper & >( *this )),
- m_rMutex( par_rMutex ),
+ css::lang::XTypeProvider(),
+ css::beans::XPropertyState(),
+ css::beans::XMultiPropertyStates(),
+ css::style::XStyleSupplier(),
m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault(false)
{
- MutexGuard aGuard( m_rMutex );
+ MutexGuard aGuard( m_aMutex );
m_aProperties = rOther.m_aProperties;
@@ -264,7 +266,6 @@ void SAL_CALL OPropertySet::setFastPropertyValue_NoBroadcast
{
aDefault.clear();
}
- SetPropertyValueByHandle( nHandle, rValue );
if( !m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault && aDefault.hasValue() && aDefault == rValue ) //#i98893# don't export defaults to file
SetPropertyToDefault( nHandle );
else
@@ -406,7 +407,7 @@ Sequence< beans::PropertyState > OPropertySet::GetPropertyStatesByHandle(
void OPropertySet::SetPropertyToDefault( sal_Int32 nHandle )
{
- tPropertyMap::iterator aFoundIter( m_aProperties.find( nHandle ) );
+ auto aFoundIter( m_aProperties.find( nHandle ) );
if( m_aProperties.end() != aFoundIter )
{
@@ -432,7 +433,7 @@ bool OPropertySet::GetPropertyValueByHandle(
{
bool bResult = false;
- tPropertyMap::const_iterator aFoundIter( m_aProperties.find( nHandle ) );
+ auto aFoundIter( m_aProperties.find( nHandle ) );
if( m_aProperties.end() != aFoundIter )
{
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index f95022510203..d5b2f068c8a0 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -19,30 +19,31 @@
#include <sal/config.h>
+#include <cstddef>
#include <map>
#include <ObjectIdentifier.hxx>
#include <TitleHelper.hxx>
#include <ChartModel.hxx>
-#include <ChartModelHelper.hxx>
+#include <ChartType.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <servicenames_charttypes.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
#include <unonames.hxx>
#include <BaseCoordinateSystem.hxx>
+#include <DataSeries.hxx>
+#include <RegressionCurveModel.hxx>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/XAxis.hpp>
-#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <rtl/ustrbuf.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <o3tl/safeint.hxx>
+#include <o3tl/string_view.hxx>
+#include <utility>
namespace com::sun::star::drawing { class XShape; }
@@ -54,11 +55,11 @@ using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
-const char m_aMultiClick[] = "MultiClick";
-const char m_aDragMethodEquals[] = "DragMethod=";
-const char m_aDragParameterEquals[] = "DragParameter=";
-const char m_aProtocol[] = "CID/";
-const OUString m_aPieSegmentDragMethodServiceName("PieSegmentDragging");
+constexpr OUString m_aMultiClick = u"MultiClick"_ustr;
+constexpr OUString m_aDragMethodEquals = u"DragMethod="_ustr;
+constexpr OUString m_aDragParameterEquals = u"DragParameter="_ustr;
+constexpr OUString m_aProtocol = u"CID/"_ustr;
+constexpr OUString m_aPieSegmentDragMethodServiceName(u"PieSegmentDragging"_ustr);
namespace
{
@@ -87,15 +88,13 @@ OUString lcl_createClassificationStringForType( ObjectType eObjectType
{
if( !aRet.isEmpty() )
aRet.append(":");
- aRet.append( m_aDragMethodEquals );
- aRet.append( rDragMethodServiceName );
+ aRet.append( OUString::Concat(m_aDragMethodEquals) + rDragMethodServiceName );
if( !rDragParameterString.empty() )
{
if( !aRet.isEmpty() )
aRet.append(":");
- aRet.append( m_aDragParameterEquals );
- aRet.append( rDragParameterString );
+ aRet.append( OUString::Concat(m_aDragParameterEquals) + rDragParameterString );
}
}
return aRet.makeStringAndClear();
@@ -128,9 +127,9 @@ OUString lcl_getTitleParentParticle( TitleHelper::eTitleType aTitleType )
return aRet;
}
-Reference<XChartType> lcl_getFirstStockChartType( const Reference< frame::XModel >& xChartModel )
+rtl::Reference<ChartType> lcl_getFirstStockChartType( const rtl::Reference<::chart::ChartModel>& xChartModel )
{
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
if(!xDiagram.is())
return nullptr;
@@ -140,11 +139,8 @@ Reference<XChartType> lcl_getFirstStockChartType( const Reference< frame::XModel
for( rtl::Reference< BaseCoordinateSystem > const & coords : aCooSysList )
{
//iterate through all chart types in the current coordinate system
- const uno::Sequence< Reference< XChartType > > aChartTypeList( coords->getChartTypes() );
- for( Reference< XChartType > const & xChartType : aChartTypeList )
+ for( rtl::Reference< ChartType > const & xChartType : coords->getChartTypes2() )
{
- if(!xChartType.is())
- continue;
OUString aChartType = xChartType->getChartType();
if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) )
return xChartType;
@@ -153,79 +149,74 @@ Reference<XChartType> lcl_getFirstStockChartType( const Reference< frame::XModel
return nullptr;
}
-OUString lcl_getIndexStringAfterString( const OUString& rString, const OUString& rSearchString )
+std::u16string_view lcl_getIndexStringAfterString( std::u16string_view rString, std::u16string_view rSearchString )
{
- OUStringBuffer aRet;
-
- sal_Int32 nIndexStart = rString.lastIndexOf( rSearchString );
- if( nIndexStart != -1 )
- {
- nIndexStart += rSearchString.getLength();
- sal_Int32 nIndexEnd = rString.getLength();
- sal_Int32 nNextColon = rString.indexOf( ':', nIndexStart );
- if( nNextColon != -1 )
- nIndexEnd = nNextColon;
- aRet = rString.subView(nIndexStart,nIndexEnd-nIndexStart);
- }
-
- return aRet.makeStringAndClear();
+ size_t nIndexStart = rString.rfind( rSearchString );
+ if( nIndexStart == std::u16string_view::npos )
+ return std::u16string_view();
+ nIndexStart += rSearchString.size();
+ size_t nIndexEnd = rString.size();
+ size_t nNextColon = rString.find( ':', nIndexStart );
+ if( nNextColon != std::u16string_view::npos )
+ nIndexEnd = nNextColon;
+ return rString.substr(nIndexStart,nIndexEnd-nIndexStart);
}
-sal_Int32 lcl_StringToIndex( const OUString& rIndexString )
+sal_Int32 lcl_StringToIndex( std::u16string_view rIndexString )
{
sal_Int32 nRet = -1;
- if( !rIndexString.isEmpty() )
+ if( !rIndexString.empty() )
{
- nRet = rIndexString.toInt32();
+ nRet = o3tl::toInt32(rIndexString);
if( nRet < -1 )
nRet = -1;
}
return nRet;
}
-void lcl_parseCooSysIndices( sal_Int32& rnDiagram, sal_Int32& rnCooSys, const OUString& rString )
+void lcl_parseCooSysIndices( sal_Int32& rnDiagram, sal_Int32& rnCooSys, std::u16string_view rString )
{
- rnDiagram = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, "D=" ) );
- rnCooSys = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, "CS=" ) );
+ rnDiagram = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, u"D=" ) );
+ rnCooSys = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, u"CS=" ) );
}
-void lcl_parseAxisIndices( sal_Int32& rnDimensionIndex, sal_Int32& rnAxisIndex, const OUString& rString )
+void lcl_parseAxisIndices( sal_Int32& rnDimensionIndex, sal_Int32& rnAxisIndex, std::u16string_view rString )
{
- OUString aAxisIndexString = lcl_getIndexStringAfterString( rString, ":Axis=" );
+ std::u16string_view aAxisIndexString = lcl_getIndexStringAfterString( rString, u":Axis=" );
sal_Int32 nCharacterIndex=0;
- rnDimensionIndex = lcl_StringToIndex( aAxisIndexString.getToken( 0, ',', nCharacterIndex ) );
- rnAxisIndex = lcl_StringToIndex( aAxisIndexString.getToken( 0, ',', nCharacterIndex ) );
+ rnDimensionIndex = lcl_StringToIndex( o3tl::getToken(aAxisIndexString, 0, ',', nCharacterIndex ) );
+ rnAxisIndex = lcl_StringToIndex( o3tl::getToken(aAxisIndexString, 0, ',', nCharacterIndex ) );
}
-void lcl_parseGridIndices( sal_Int32& rnSubGridIndex, const OUString& rString )
+void lcl_parseGridIndices( sal_Int32& rnSubGridIndex, std::u16string_view rString )
{
rnSubGridIndex = -1;
- rnSubGridIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, ":SubGrid=" ) );
+ rnSubGridIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, u":SubGrid=" ) );
}
-void lcl_parseSeriesIndices( sal_Int32& rnChartTypeIndex, sal_Int32& rnSeriesIndex, sal_Int32& rnPointIndex, const OUString& rString )
+void lcl_parseSeriesIndices( sal_Int32& rnChartTypeIndex, sal_Int32& rnSeriesIndex, sal_Int32& rnPointIndex, std::u16string_view rString )
{
- rnChartTypeIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, "CT=" ) );
- rnSeriesIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, "Series=" ) );
- rnPointIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, "Point=" ) );
+ rnChartTypeIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, u"CT=" ) );
+ rnSeriesIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, u"Series=" ) );
+ rnPointIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, u"Point=" ) );
}
-void lcl_getDiagramAndCooSys( const OUString& rObjectCID
- , const Reference< frame::XModel >& xChartModel
+void lcl_getDiagramAndCooSys( std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel
, rtl::Reference< Diagram >& xDiagram
- , Reference< XCoordinateSystem >& xCooSys )
+ , rtl::Reference< BaseCoordinateSystem >& xCooSys )
{
sal_Int32 nDiagramIndex = -1;
sal_Int32 nCooSysIndex = -1;
lcl_parseCooSysIndices( nDiagramIndex, nCooSysIndex, rObjectCID );
- xDiagram = ChartModelHelper::findDiagram( xChartModel );//todo use nDiagramIndex when more than one diagram is possible in future
+ xDiagram = xChartModel->getFirstChartDiagram();//todo use nDiagramIndex when more than one diagram is possible in future
if( !xDiagram.is() )
return;
if( nCooSysIndex > -1 )
{
- uno::Sequence< Reference< XCoordinateSystem > > aCooSysList( xDiagram->getCoordinateSystems() );
- if( nCooSysIndex < aCooSysList.getLength() )
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > aCooSysList( xDiagram->getBaseCoordinateSystems() );
+ if( o3tl::make_unsigned(nCooSysIndex) < aCooSysList.size() )
xCooSys = aCooSysList[nCooSysIndex];
}
}
@@ -236,8 +227,8 @@ ObjectIdentifier::ObjectIdentifier()
{
}
-ObjectIdentifier::ObjectIdentifier( const OUString& rObjectCID )
- :m_aObjectCID( rObjectCID )
+ObjectIdentifier::ObjectIdentifier( OUString aObjectCID )
+ :m_aObjectCID(std::move( aObjectCID ))
{
}
@@ -265,11 +256,6 @@ bool ObjectIdentifier::operator==( const ObjectIdentifier& rOID ) const
( m_xAdditionalShape == rOID.m_xAdditionalShape );
}
-bool ObjectIdentifier::operator!=( const ObjectIdentifier& rOID ) const
-{
- return !operator==( rOID );
-}
-
bool ObjectIdentifier::operator<( const ObjectIdentifier& rOID ) const
{
bool bReturn = false;
@@ -293,41 +279,55 @@ bool ObjectIdentifier::operator<( const ObjectIdentifier& rOID ) const
}
OUString ObjectIdentifier::createClassifiedIdentifierForObject(
+ const rtl::Reference< ::chart::Title >& xTitle
+ , const rtl::Reference<::chart::ChartModel>& xChartModel )
+{
+ TitleHelper::eTitleType aTitleType;
+ OUString aRet;
+ const std::u16string_view aObjectID;
+ const std::u16string_view aDragMethodServiceName;
+ const std::u16string_view aDragParameterString;
+ if( TitleHelper::getTitleType( aTitleType, xTitle, xChartModel ) )
+ {
+ enum ObjectType eObjectType = OBJECTTYPE_TITLE;
+ OUString aParentParticle = lcl_getTitleParentParticle( aTitleType );
+ aRet = ObjectIdentifier::createClassifiedIdentifierWithParent(
+ eObjectType, aObjectID, aParentParticle, aDragMethodServiceName, aDragParameterString );
+ }
+ return aRet;
+}
+
+OUString ObjectIdentifier::createClassifiedIdentifierForObject(
const Reference< uno::XInterface >& xObject
- , ChartModel& rModel)
+ , const rtl::Reference<::chart::ChartModel>& xChartModel )
{
OUString aRet;
enum ObjectType eObjectType = OBJECTTYPE_UNKNOWN;
- const OUString aObjectID;
+ const std::u16string_view aObjectID;
OUString aParentParticle;
- const OUString aDragMethodServiceName;
- const OUString aDragParameterString;
+ const std::u16string_view aDragMethodServiceName;
+ const std::u16string_view aDragParameterString;
try
{
//title
- Reference< XTitle > xTitle( xObject, uno::UNO_QUERY );
- if( xTitle.is() )
- {
- TitleHelper::eTitleType aTitleType;
- if( TitleHelper::getTitleType( aTitleType, xTitle, rModel ) )
- {
- eObjectType = OBJECTTYPE_TITLE;
- aParentParticle = lcl_getTitleParentParticle( aTitleType );
- aRet = ObjectIdentifier::createClassifiedIdentifierWithParent(
- eObjectType, aObjectID, aParentParticle, aDragMethodServiceName, aDragParameterString );
- }
- return aRet;
+ if( ::chart::Title* pTitle = dynamic_cast<::chart::Title*>(xObject.get()) )
+ return createClassifiedIdentifierForObject(rtl::Reference<Title>(pTitle), xChartModel);
+ uno::Reference<chart2::XDataTable> xDataTable(xObject, uno::UNO_QUERY);
+ if (xDataTable.is())
+ {
+ return createClassifiedIdentifierForParticle(createParticleForDataTable(xChartModel));
}
//axis
- Reference< XAxis > xAxis( xObject, uno::UNO_QUERY );
+ rtl::Reference< Axis > xAxis = dynamic_cast<Axis*>( xObject.get() );
if( xAxis.is() )
{
- rtl::Reference< BaseCoordinateSystem > xCooSys( AxisHelper::getCoordinateSystemOfAxis( xAxis, rModel.getFirstDiagram() ) );
- OUString aCooSysParticle( createParticleForCoordinateSystem( xCooSys, rModel ) );
+ rtl::Reference<Diagram> xDiagram = xChartModel->getFirstChartDiagram();
+ rtl::Reference< BaseCoordinateSystem > xCooSys( AxisHelper::getCoordinateSystemOfAxis( xAxis, xDiagram ) );
+ OUString aCooSysParticle( createParticleForCoordinateSystem( xCooSys, xChartModel ) );
sal_Int32 nDimensionIndex=-1;
sal_Int32 nAxisIndex=-1;
AxisHelper::getIndicesForAxis( xAxis, xCooSys, nDimensionIndex, nAxisIndex );
@@ -339,7 +339,7 @@ OUString ObjectIdentifier::createClassifiedIdentifierForObject(
Reference< XLegend > xLegend( xObject, uno::UNO_QUERY );
if( xLegend.is() )
{
- return createClassifiedIdentifierForParticle( createParticleForLegend( rModel ) );
+ return createClassifiedIdentifierForParticle( createParticleForLegend( xChartModel ) );
}
//diagram
@@ -375,40 +375,37 @@ OUString ObjectIdentifier::createClassifiedIdentifierForObject(
}
OUString ObjectIdentifier::createClassifiedIdentifierForObject(
- const Reference< uno::XInterface >& xObject
- , const Reference< frame::XModel >& xChartModel )
+ const rtl::Reference< Legend >& xLegend
+ , const rtl::Reference<::chart::ChartModel>& xChartModel )
{
- OUString aRet;
-
- enum ObjectType eObjectType = OBJECTTYPE_UNKNOWN;
- const OUString aObjectID;
- OUString aParentParticle;
- const OUString aDragMethodServiceName;
- const OUString aDragParameterString;
-
try
{
- //title
- Reference< XTitle > xTitle( xObject, uno::UNO_QUERY );
- if( xTitle.is() )
+ if( xLegend.is() )
{
- TitleHelper::eTitleType aTitleType;
- if( TitleHelper::getTitleType( aTitleType, xTitle, xChartModel ) )
- {
- eObjectType = OBJECTTYPE_TITLE;
- aParentParticle = lcl_getTitleParentParticle( aTitleType );
- aRet = ObjectIdentifier::createClassifiedIdentifierWithParent(
- eObjectType, aObjectID, aParentParticle, aDragMethodServiceName, aDragParameterString );
- }
- return aRet;
-
+ return createClassifiedIdentifierForParticle( createParticleForLegend( xChartModel ) );
}
+ }
+ catch(const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+ OSL_FAIL("give object could not be identified in createClassifiedIdentifierForObject");
+
+ return OUString();
+}
+OUString ObjectIdentifier::createClassifiedIdentifierForObject(
+ const rtl::Reference<::chart::Axis>& xAxis
+ , const rtl::Reference<::chart::ChartModel>& xChartModel )
+{
+ try
+ {
//axis
- Reference< XAxis > xAxis( xObject, uno::UNO_QUERY );
if( xAxis.is() )
{
- Reference< XCoordinateSystem > xCooSys( AxisHelper::getCoordinateSystemOfAxis( xAxis, ChartModelHelper::findDiagram( xChartModel ) ) );
+ rtl::Reference<Diagram> xDiagram = xChartModel->getFirstChartDiagram();
+ rtl::Reference< BaseCoordinateSystem > xCooSys( AxisHelper::getCoordinateSystemOfAxis( xAxis, xDiagram ) );
OUString aCooSysParticle( createParticleForCoordinateSystem( xCooSys, xChartModel ) );
sal_Int32 nDimensionIndex=-1;
sal_Int32 nAxisIndex=-1;
@@ -416,55 +413,26 @@ OUString ObjectIdentifier::createClassifiedIdentifierForObject(
OUString aAxisParticle( createParticleForAxis( nDimensionIndex, nAxisIndex ) );
return createClassifiedIdentifierForParticles( aCooSysParticle, aAxisParticle );
}
-
- //legend
- Reference< XLegend > xLegend( xObject, uno::UNO_QUERY );
- if( xLegend.is() )
- {
- return createClassifiedIdentifierForParticle( createParticleForLegend( xChartModel ) );
- }
-
- //diagram
- Reference< XDiagram > xDiagram( xObject, uno::UNO_QUERY );
- if( xDiagram.is() )
- {
- return createClassifiedIdentifierForParticle( createParticleForDiagram() );
- }
-
- //todo
- //XDataSeries
- //CooSys
- //charttype
- //datapoint?
- //Gridproperties
}
catch(const uno::Exception&)
{
DBG_UNHANDLED_EXCEPTION("chart2");
}
- if( eObjectType != OBJECTTYPE_UNKNOWN )
- {
- aRet = ObjectIdentifier::createClassifiedIdentifierWithParent(
- eObjectType, aObjectID, aParentParticle, aDragMethodServiceName, aDragParameterString );
- }
- else
- {
- OSL_FAIL("give object could not be identified in createClassifiedIdentifierForObject");
- }
+ OSL_FAIL("give object could not be identified in createClassifiedIdentifierForObject");
- return aRet;
+ return OUString();
}
OUString ObjectIdentifier::createClassifiedIdentifierForParticle(
- const OUString& rParticle )
+ std::u16string_view rParticle )
{
- return ObjectIdentifier::createClassifiedIdentifierForParticles( rParticle, OUString() );
+ return ObjectIdentifier::createClassifiedIdentifierForParticles( rParticle, u"" );
}
OUString ObjectIdentifier::createClassifiedIdentifierForParticles(
- const OUString& rParentParticle
- , const OUString& rChildParticle
+ std::u16string_view rParentParticle
+ , std::u16string_view rChildParticle
, std::u16string_view rDragMethodServiceName
, std::u16string_view rDragParameterString )
{
@@ -472,15 +440,15 @@ OUString ObjectIdentifier::createClassifiedIdentifierForParticles(
if( eObjectType == OBJECTTYPE_UNKNOWN )
eObjectType = ObjectIdentifier::getObjectType( rParentParticle );
- OUStringBuffer aRet( m_aProtocol );
- aRet.append( lcl_createClassificationStringForType( eObjectType, rDragMethodServiceName, rDragParameterString ));
- if(aRet.getLength() > static_cast<sal_Int32>(strlen(m_aProtocol)))
+ OUStringBuffer aRet( m_aProtocol +
+ lcl_createClassificationStringForType( eObjectType, rDragMethodServiceName, rDragParameterString ));
+ if(aRet.getLength() > m_aProtocol.getLength())
aRet.append("/");
- if(!rParentParticle.isEmpty())
+ if(!rParentParticle.empty())
{
aRet.append(rParentParticle);
- if( !rChildParticle.isEmpty() )
+ if( !rChildParticle.empty() )
aRet.append(":");
}
aRet.append(rChildParticle);
@@ -495,45 +463,19 @@ OUString ObjectIdentifier::createParticleForDiagram()
}
OUString ObjectIdentifier::createParticleForCoordinateSystem(
- const Reference< XCoordinateSystem >& xCooSys
- , ChartModel& rModel )
-{
- OUString aRet;
-
- rtl::Reference< Diagram > xDiagram( rModel.getFirstChartDiagram() );
- if( xDiagram.is() )
- {
- sal_Int32 nCooSysIndex = 0;
- uno::Sequence< Reference< XCoordinateSystem > > aCooSysList( xDiagram->getCoordinateSystems() );
- for( ; nCooSysIndex < aCooSysList.getLength(); ++nCooSysIndex )
- {
- Reference< XCoordinateSystem > xCurrentCooSys( aCooSysList[nCooSysIndex] );
- if( xCooSys == xCurrentCooSys )
- {
- aRet = ObjectIdentifier::createParticleForDiagram() + ":CS=" + OUString::number( nCooSysIndex );
- break;
- }
- }
- }
-
- return aRet;
-}
-
-OUString ObjectIdentifier::createParticleForCoordinateSystem(
- const Reference< XCoordinateSystem >& xCooSys
- , const Reference< frame::XModel >& xChartModel )
+ const rtl::Reference< BaseCoordinateSystem >& xCooSys
+ , const rtl::Reference<::chart::ChartModel>& xChartModel )
{
OUString aRet;
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
if( xDiagram.is() )
{
- sal_Int32 nCooSysIndex = 0;
- uno::Sequence< Reference< XCoordinateSystem > > aCooSysList( xDiagram->getCoordinateSystems() );
- for( ; nCooSysIndex < aCooSysList.getLength(); ++nCooSysIndex )
+ std::size_t nCooSysIndex = 0;
+ const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysList( xDiagram->getBaseCoordinateSystems() );
+ for( ; nCooSysIndex < aCooSysList.size(); ++nCooSysIndex )
{
- Reference< XCoordinateSystem > xCurrentCooSys( aCooSysList[nCooSysIndex] );
- if( xCooSys == xCurrentCooSys )
+ if( xCooSys == aCooSysList[nCooSysIndex] )
{
aRet = ObjectIdentifier::createParticleForDiagram() + ":CS=" + OUString::number( nCooSysIndex );
break;
@@ -566,7 +508,7 @@ OUString ObjectIdentifier::createParticleForGrid(
OUString ObjectIdentifier::createClassifiedIdentifierForGrid(
const Reference< XAxis >& xAxis
- , const Reference< frame::XModel >& xChartModel
+ , const rtl::Reference<::chart::ChartModel>& xChartModel
, sal_Int32 nSubGridIndex )
{
//-1: main grid, 0: first subgrid etc
@@ -594,19 +536,18 @@ OUString ObjectIdentifier::createParticleForSeries(
OUString::number( nSeriesIndex );
}
-OUString ObjectIdentifier::createParticleForLegend( ChartModel& )
+
+OUString ObjectIdentifier::createParticleForLegend(
+ const rtl::Reference<::chart::ChartModel>& )
{
//todo: if more than one diagram is implemented, find the correct diagram which is owner of the given legend
return ObjectIdentifier::createParticleForDiagram() + ":" + getStringForType( OBJECTTYPE_LEGEND ) + "=";
}
-OUString ObjectIdentifier::createParticleForLegend(
- const Reference< frame::XModel >& )
+OUString ObjectIdentifier::createParticleForDataTable(const rtl::Reference<::chart::ChartModel>& /* xChartModel */)
{
- //todo: if more than one diagram is implemented, find the correct diagram which is owner of the given legend
-
- return ObjectIdentifier::createParticleForDiagram() + ":" + getStringForType( OBJECTTYPE_LEGEND ) + "=";
+ return ObjectIdentifier::createParticleForDiagram() + ":" + getStringForType(OBJECTTYPE_DATA_TABLE) + "=";
}
OUString ObjectIdentifier::createClassifiedIdentifier(
@@ -628,17 +569,15 @@ OUString ObjectIdentifier::createClassifiedIdentifierWithParent(
{
//e.g. "MultiClick/Series=2:Point=34"
- OUStringBuffer aRet( m_aProtocol );
- aRet.append( lcl_createClassificationStringForType( eObjectType, rDragMethodServiceName, rDragParameterString ));
- if(aRet.getLength() > static_cast<sal_Int32>(strlen(m_aProtocol)))
+ OUStringBuffer aRet( m_aProtocol +
+ lcl_createClassificationStringForType( eObjectType, rDragMethodServiceName, rDragParameterString ));
+ if(aRet.getLength() > m_aProtocol.getLength())
aRet.append("/");
aRet.append(rParentPartical);
if(!rParentPartical.empty())
aRet.append(":");
- aRet.append(getStringForType( eObjectType ));
- aRet.append("=");
- aRet.append(rParticleID);
+ aRet.append(getStringForType( eObjectType ) + "=" + rParticleID);
return aRet.makeStringAndClear();
}
@@ -662,89 +601,89 @@ OUString ObjectIdentifier::createPieSegmentDragParameterString(
}
bool ObjectIdentifier::parsePieSegmentDragParameterString(
- const OUString& rDragParameterString
+ std::u16string_view rDragParameterString
, sal_Int32& rOffsetPercent
, awt::Point& rMinimumPosition
, awt::Point& rMaximumPosition )
{
sal_Int32 nCharacterIndex = 0;
- OUString aValueString( rDragParameterString.getToken( 0, ',', nCharacterIndex ) );
- rOffsetPercent = aValueString.toInt32();
+ std::u16string_view aValueString( o3tl::getToken(rDragParameterString, 0, ',', nCharacterIndex ) );
+ rOffsetPercent = o3tl::toInt32(aValueString);
if( nCharacterIndex < 0 )
return false;
- aValueString = rDragParameterString.getToken( 0, ',', nCharacterIndex );
- rMinimumPosition.X = aValueString.toInt32();
+ aValueString = o3tl::getToken(rDragParameterString, 0, ',', nCharacterIndex );
+ rMinimumPosition.X = o3tl::toInt32(aValueString);
if( nCharacterIndex < 0 )
return false;
- aValueString = rDragParameterString.getToken( 0, ',', nCharacterIndex );
- rMinimumPosition.Y = aValueString.toInt32();
+ aValueString = o3tl::getToken(rDragParameterString, 0, ',', nCharacterIndex );
+ rMinimumPosition.Y = o3tl::toInt32(aValueString);
if( nCharacterIndex < 0 )
return false;
- aValueString = rDragParameterString.getToken( 0, ',', nCharacterIndex );
- rMaximumPosition.X = aValueString.toInt32();
+ aValueString = o3tl::getToken(rDragParameterString, 0, ',', nCharacterIndex );
+ rMaximumPosition.X = o3tl::toInt32(aValueString);
if( nCharacterIndex < 0 )
return false;
- aValueString = rDragParameterString.getToken( 0, ',', nCharacterIndex );
- rMaximumPosition.Y = aValueString.toInt32();
+ aValueString = o3tl::getToken(rDragParameterString, 0, ',', nCharacterIndex );
+ rMaximumPosition.Y = o3tl::toInt32(aValueString);
return nCharacterIndex >= 0;
}
-OUString ObjectIdentifier::getDragMethodServiceName( const OUString& rCID )
+std::u16string_view ObjectIdentifier::getDragMethodServiceName( std::u16string_view rCID )
{
- OUString aRet;
+ std::u16string_view aRet;
- sal_Int32 nIndexStart = rCID.indexOf( m_aDragMethodEquals );
- if( nIndexStart != -1 )
+ size_t nIndexStart = rCID.find( m_aDragMethodEquals );
+ if( nIndexStart != std::u16string_view::npos )
{
- nIndexStart = rCID.indexOf( '=', nIndexStart );
- if( nIndexStart != -1 )
+ nIndexStart = rCID.find( '=', nIndexStart );
+ if( nIndexStart != std::u16string_view::npos )
{
nIndexStart++;
- sal_Int32 nNextSlash = rCID.indexOf( '/', nIndexStart );
- if( nNextSlash != -1 )
+ size_t nNextSlash = rCID.find( '/', nIndexStart );
+ if( nNextSlash != std::u16string_view::npos )
{
sal_Int32 nIndexEnd = nNextSlash;
- sal_Int32 nNextColon = rCID.indexOf( ':', nIndexStart );
- if( nNextColon < nNextSlash )
+ size_t nNextColon = rCID.find( ':', nIndexStart );
+ if( nNextColon == std::u16string_view::npos || nNextColon < nNextSlash )
nIndexEnd = nNextColon;
- aRet = rCID.copy(nIndexStart,nIndexEnd-nIndexStart);
+ aRet = rCID.substr(nIndexStart,nIndexEnd-nIndexStart);
}
}
}
return aRet;
}
-OUString ObjectIdentifier::getDragParameterString( const OUString& rCID )
+std::u16string_view ObjectIdentifier::getDragParameterString( std::u16string_view rCID )
{
- OUString aRet;
+ std::u16string_view aRet;
- sal_Int32 nIndexStart = rCID.indexOf( m_aDragParameterEquals );
- if( nIndexStart != -1 )
+ size_t nIndexStart = rCID.find( m_aDragParameterEquals );
+ if( nIndexStart != std::u16string_view::npos )
{
- nIndexStart = rCID.indexOf( '=', nIndexStart );
- if( nIndexStart != -1 )
+ nIndexStart = rCID.find( '=', nIndexStart );
+ if( nIndexStart != std::u16string_view::npos )
{
nIndexStart++;
- sal_Int32 nNextSlash = rCID.indexOf( '/', nIndexStart );
- if( nNextSlash != -1 )
+ size_t nNextSlash = rCID.find( '/', nIndexStart );
+ if( nNextSlash != std::u16string_view::npos )
{
sal_Int32 nIndexEnd = nNextSlash;
- sal_Int32 nNextColon = rCID.indexOf( ':', nIndexStart );
- if( nNextColon < nNextSlash )
+ size_t nNextColon = rCID.find( ':', nIndexStart );
+ if( nNextColon == std::u16string_view::npos || nNextColon < nNextSlash )
nIndexEnd = nNextColon;
- aRet = rCID.copy(nIndexStart,nIndexEnd-nIndexStart);
+ aRet = rCID.substr(nIndexStart,nIndexEnd-nIndexStart);
}
}
}
return aRet;
}
-bool ObjectIdentifier::isDragableObject( const OUString& rClassifiedIdentifier )
+bool ObjectIdentifier::isDragableObject( std::u16string_view rClassifiedIdentifier )
{
bool bReturn = false;
ObjectType eObjectType = ObjectIdentifier::getObjectType( rClassifiedIdentifier );
@@ -759,8 +698,8 @@ bool ObjectIdentifier::isDragableObject( const OUString& rClassifiedIdentifier )
bReturn = true;
break;
default:
- OUString aDragMethodServiceName( ObjectIdentifier::getDragMethodServiceName( rClassifiedIdentifier ) );
- bReturn = !aDragMethodServiceName.isEmpty();
+ std::u16string_view aDragMethodServiceName( ObjectIdentifier::getDragMethodServiceName( rClassifiedIdentifier ) );
+ bReturn = !aDragMethodServiceName.empty();
break;
}
return bReturn;
@@ -780,7 +719,7 @@ bool ObjectIdentifier::isDragableObject() const
return bReturn;
}
-bool ObjectIdentifier::isRotateableObject( const OUString& rClassifiedIdentifier )
+bool ObjectIdentifier::isRotateableObject( std::u16string_view rClassifiedIdentifier )
{
bool bReturn = false;
ObjectType eObjectType = ObjectIdentifier::getObjectType( rClassifiedIdentifier );
@@ -797,7 +736,7 @@ bool ObjectIdentifier::isRotateableObject( const OUString& rClassifiedIdentifier
return bReturn;
}
-bool ObjectIdentifier::isMultiClickObject( const OUString& rClassifiedIdentifier )
+bool ObjectIdentifier::isMultiClickObject( std::u16string_view rClassifiedIdentifier )
{
//the name of a shape is it's ClassifiedIdentifier
@@ -806,27 +745,27 @@ bool ObjectIdentifier::isMultiClickObject( const OUString& rClassifiedIdentifier
//was selected before;
//!!!!! by definition the name of a MultiClickObject starts with "CID/MultiClick:"
- bool bRet = rClassifiedIdentifier.match( m_aMultiClick, strlen(m_aProtocol) );
+ bool bRet = o3tl::starts_with(rClassifiedIdentifier.substr( m_aProtocol.getLength() ), m_aMultiClick);
return bRet;
}
-bool ObjectIdentifier::areSiblings( const OUString& rCID1, const OUString& rCID2 )
+bool ObjectIdentifier::areSiblings( std::u16string_view rCID1, std::u16string_view rCID2 )
{
bool bRet=false;
- sal_Int32 nLastSign1 = rCID1.lastIndexOf( '=' );
- sal_Int32 nLastSign2 = rCID2.lastIndexOf( '=' );
- if( nLastSign1 == rCID1.indexOf( '=' ) )//CID cannot be sibling if only one "=" occurs
+ size_t nLastSign1 = rCID1.rfind( '=' );
+ size_t nLastSign2 = rCID2.rfind( '=' );
+ if( nLastSign1 == rCID1.find( '=' ) )//CID cannot be sibling if only one "=" occurs
bRet=false;
- else if( nLastSign2 == rCID2.indexOf( '=' ) )//CID cannot be sibling if only one "=" occurs
+ else if( nLastSign2 == rCID2.find( '=' ) )//CID cannot be sibling if only one "=" occurs
bRet=false;
else if( ObjectIdentifier::areIdenticalObjects( rCID1, rCID2 ) )
bRet=false;
else
{
- OUString aParent1( ObjectIdentifier::getFullParentParticle( rCID1 ) );
- if( !aParent1.isEmpty() )
+ std::u16string_view aParent1( ObjectIdentifier::getFullParentParticle( rCID1 ) );
+ if( !aParent1.empty() )
{
- OUString aParent2( ObjectIdentifier::getFullParentParticle( rCID2 ) );
+ std::u16string_view aParent2( ObjectIdentifier::getFullParentParticle( rCID2 ) );
bRet=aParent1 == aParent2;
}
//legend entries are special:
@@ -840,14 +779,14 @@ bool ObjectIdentifier::areSiblings( const OUString& rCID1, const OUString& rCID2
return bRet;
}
-bool ObjectIdentifier::areIdenticalObjects( const OUString& rCID1, const OUString& rCID2 )
+bool ObjectIdentifier::areIdenticalObjects( std::u16string_view rCID1, std::u16string_view rCID2 )
{
if( rCID1 == rCID2 )
return true;
//draggable pie or donut segments need special treatment, as their CIDs do change with offset
{
- if( rCID1.indexOf( m_aPieSegmentDragMethodServiceName ) < 0
- || rCID2.indexOf( m_aPieSegmentDragMethodServiceName ) < 0 )
+ if( rCID1.find( m_aPieSegmentDragMethodServiceName ) == std::u16string_view::npos
+ || rCID2.find( m_aPieSegmentDragMethodServiceName ) == std::u16string_view::npos )
return false;
OUString aID1( ObjectIdentifier::getObjectID( rCID1 ) );
@@ -935,76 +874,82 @@ OUString ObjectIdentifier::getStringForType( ObjectType eObjectType )
case OBJECTTYPE_DATA_STOCK_GAIN:
aRet="StockGain";
break;
+ case OBJECTTYPE_DATA_TABLE:
+ aRet="DataTable";
+ break;
default: //OBJECTTYPE_UNKNOWN
;
}
return aRet;
}
-ObjectType ObjectIdentifier::getObjectType( const OUString& rCID )
+ObjectType ObjectIdentifier::getObjectType( std::u16string_view aCID )
{
ObjectType eRet;
- sal_Int32 nLastSign = rCID.lastIndexOf( ':' );//last sign before the type string
- if(nLastSign==-1)
- nLastSign = rCID.lastIndexOf( '/' );
- if(nLastSign==-1)
+ size_t nLastSign = aCID.rfind( ':' );//last sign before the type string
+ if(nLastSign == std::u16string_view::npos)
+ nLastSign = aCID.rfind( '/' );
+ if(nLastSign == std::u16string_view::npos)
{
- sal_Int32 nEndIndex = rCID.lastIndexOf( '=' );
- if(nEndIndex==-1)
+ size_t nEndIndex = aCID.rfind( '=' );
+ if(nEndIndex == std::u16string_view::npos)
return OBJECTTYPE_UNKNOWN;
nLastSign = 0;
}
if( nLastSign>0 )
nLastSign++;
- if( rCID.match("Page",nLastSign) )
+ aCID = aCID.substr(nLastSign);
+ if( o3tl::starts_with(aCID, u"Page") )
eRet = OBJECTTYPE_PAGE;
- else if( rCID.match("Title",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"Title") )
eRet = OBJECTTYPE_TITLE;
- else if( rCID.match("LegendEntry",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"LegendEntry") )
eRet = OBJECTTYPE_LEGEND_ENTRY;
- else if( rCID.match("Legend",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"Legend") )
eRet = OBJECTTYPE_LEGEND;
- else if( rCID.match("DiagramWall",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"DiagramWall") )
eRet = OBJECTTYPE_DIAGRAM_WALL;
- else if( rCID.match("DiagramFloor",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"DiagramFloor") )
eRet = OBJECTTYPE_DIAGRAM_FLOOR;
- else if( rCID.match("D=",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"D=") )
eRet = OBJECTTYPE_DIAGRAM;
- else if( rCID.match("AxisUnitLabel",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"AxisUnitLabel") )
eRet = OBJECTTYPE_AXIS_UNITLABEL;
- else if( rCID.match("Axis",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"Axis") )
eRet = OBJECTTYPE_AXIS;
- else if( rCID.match("Grid",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"Grid") )
eRet = OBJECTTYPE_GRID;
- else if( rCID.match("SubGrid",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"SubGrid") )
eRet = OBJECTTYPE_SUBGRID;
- else if( rCID.match("Series",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"Series") )
eRet = OBJECTTYPE_DATA_SERIES;
- else if( rCID.match("Point",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"Point") )
eRet = OBJECTTYPE_DATA_POINT;
- else if( rCID.match("DataLabels",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"DataLabels") )
eRet = OBJECTTYPE_DATA_LABELS;
- else if( rCID.match("DataLabel",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"DataLabel") )
eRet = OBJECTTYPE_DATA_LABEL;
- else if( rCID.match("ErrorsX",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"ErrorsX") )
eRet = OBJECTTYPE_DATA_ERRORS_X;
- else if( rCID.match("ErrorsY",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"ErrorsY") )
eRet = OBJECTTYPE_DATA_ERRORS_Y;
- else if( rCID.match("ErrorsZ",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"ErrorsZ") )
eRet = OBJECTTYPE_DATA_ERRORS_Z;
- else if( rCID.match("Curve",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"Curve") )
eRet = OBJECTTYPE_DATA_CURVE;
- else if( rCID.match("Equation",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"Equation") )
eRet = OBJECTTYPE_DATA_CURVE_EQUATION;
- else if( rCID.match("Average",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"Average") )
eRet = OBJECTTYPE_DATA_AVERAGE_LINE;
- else if( rCID.match("StockRange",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"StockRange") )
eRet = OBJECTTYPE_DATA_STOCK_RANGE;
- else if( rCID.match("StockLoss",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"StockLoss") )
eRet = OBJECTTYPE_DATA_STOCK_LOSS;
- else if( rCID.match("StockGain",nLastSign) )
+ else if( o3tl::starts_with(aCID, u"StockGain") )
eRet = OBJECTTYPE_DATA_STOCK_GAIN;
+ else if( o3tl::starts_with(aCID, u"DataTable") )
+ eRet = OBJECTTYPE_DATA_TABLE;
else
eRet = OBJECTTYPE_UNKNOWN;
@@ -1060,20 +1005,19 @@ OUString ObjectIdentifier::createChildParticleWithIndex( ObjectType eObjectType,
OUStringBuffer aRet( getStringForType( eObjectType ) );
if( !aRet.isEmpty() )
{
- aRet.append("=");
- aRet.append(nIndex);
+ aRet.append("=" + OUString::number(nIndex));
}
return aRet.makeStringAndClear();
}
-sal_Int32 ObjectIdentifier::getIndexFromParticleOrCID( const OUString& rParticleOrCID )
+sal_Int32 ObjectIdentifier::getIndexFromParticleOrCID( std::u16string_view rParticleOrCID )
{
- const OUString aIndexString = lcl_getIndexStringAfterString( rParticleOrCID, "=" );
- return lcl_StringToIndex( aIndexString.getToken( 0, ',' ) );
+ const std::u16string_view aIndexString = lcl_getIndexStringAfterString( rParticleOrCID, u"=" );
+ return lcl_StringToIndex( o3tl::getToken(aIndexString, 0, ',' ) );
}
OUString ObjectIdentifier::createSeriesSubObjectStub( ObjectType eSubObjectType
- , const OUString& rSeriesParticle
+ , std::u16string_view rSeriesParticle
, std::u16string_view rDragMethodServiceName
, std::u16string_view rDragParameterString )
{
@@ -1089,75 +1033,59 @@ OUString ObjectIdentifier::createPointCID( std::u16string_view rPointCID_Stub, s
return rPointCID_Stub + OUString::number( nIndex );
}
-OUString ObjectIdentifier::getParticleID( const OUString& rCID )
+std::u16string_view ObjectIdentifier::getParticleID( std::u16string_view rCID )
{
- OUString aRet;
- sal_Int32 nLast = rCID.lastIndexOf('=');
- if(nLast>=0)
- aRet = rCID.copy(++nLast);
+ std::u16string_view aRet;
+ size_t nLast = rCID.rfind('=');
+ if(nLast != std::u16string_view::npos)
+ aRet = rCID.substr(++nLast);
return aRet;
}
-OUString ObjectIdentifier::getFullParentParticle( const OUString& rCID )
+std::u16string_view ObjectIdentifier::getFullParentParticle( std::u16string_view rCID )
{
- OUString aRet;
+ std::u16string_view aRet;
- sal_Int32 nStartPos = rCID.lastIndexOf('/');
- if( nStartPos>=0 )
+ size_t nStartPos = rCID.rfind('/');
+ if( nStartPos != std::u16string_view::npos )
{
nStartPos++;
- sal_Int32 nEndPos = rCID.lastIndexOf(':');
- if( nEndPos>=0 && nStartPos < nEndPos )
+ size_t nEndPos = rCID.rfind(':');
+ if( nEndPos != std::u16string_view::npos && nStartPos < nEndPos )
{
- aRet = rCID.copy(nStartPos,nEndPos-nStartPos);
+ aRet = rCID.substr(nStartPos,nEndPos-nStartPos);
}
}
return aRet;
}
-OUString ObjectIdentifier::getObjectID( const OUString& rCID )
+OUString ObjectIdentifier::getObjectID( std::u16string_view rCID )
{
OUString aRet;
- sal_Int32 nStartPos = rCID.lastIndexOf('/');
- if( nStartPos>=0 )
+ size_t nStartPos = rCID.rfind('/');
+ if( nStartPos != std::u16string_view::npos )
{
nStartPos++;
- sal_Int32 nEndPos = rCID.getLength();
- aRet = rCID.copy(nStartPos,nEndPos-nStartPos);
+ size_t nEndPos = rCID.size();
+ aRet = rCID.substr(nStartPos,nEndPos-nStartPos);
}
return aRet;
}
-bool ObjectIdentifier::isCID( const OUString& rName )
-{
- return !rName.isEmpty() && rName.match( m_aProtocol );
-}
-
-Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
- const OUString& rObjectCID,
- const Reference< chart2::XChartDocument >& xChartDocument )
-{
- return ObjectIdentifier::getObjectPropertySet(
- rObjectCID, Reference< frame::XModel >( xChartDocument ));
-}
-
-Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
- const OUString& rObjectCID
- , const rtl::Reference< ::chart::ChartModel >& xChartModel )
+bool ObjectIdentifier::isCID( std::u16string_view rName )
{
- return ObjectIdentifier::getObjectPropertySet(
- rObjectCID, Reference< frame::XModel >( xChartModel ));
+ return !rName.empty() && o3tl::starts_with( rName, m_aProtocol );
}
Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
- const OUString& rObjectCID
- , const Reference< frame::XModel >& xChartModel )
+ std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel )
{
//return the model object that is indicated by rObjectCID
- if(rObjectCID.isEmpty())
+ if(rObjectCID.empty())
return nullptr;
if(!xChartModel.is())
return nullptr;
@@ -1166,26 +1094,24 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
try
{
ObjectType eObjectType = ObjectIdentifier::getObjectType( rObjectCID );
- OUString aParticleID = ObjectIdentifier::getParticleID( rObjectCID );
+ std::u16string_view aParticleID = ObjectIdentifier::getParticleID( rObjectCID );
rtl::Reference< Diagram > xDiagram;
- Reference< XCoordinateSystem > xCooSys;
+ rtl::Reference< BaseCoordinateSystem > xCooSys;
lcl_getDiagramAndCooSys( rObjectCID, xChartModel, xDiagram, xCooSys );
switch(eObjectType)
{
case OBJECTTYPE_PAGE:
{
- Reference< XChartDocument > xChartDocument( xChartModel, uno::UNO_QUERY );
- if( xChartDocument.is())
- xObjectProperties.set( xChartDocument->getPageBackground() );
+ xObjectProperties.set( xChartModel->getPageBackground() );
}
break;
case OBJECTTYPE_TITLE:
{
TitleHelper::eTitleType aTitleType = getTitleTypeForCID( rObjectCID );
- Reference< XTitle > xTitle( TitleHelper::getTitle( aTitleType, xChartModel ) );
- xObjectProperties.set( xTitle, uno::UNO_QUERY );
+ rtl::Reference< Title > xTitle( TitleHelper::getTitle( aTitleType, xChartModel ) );
+ xObjectProperties = xTitle;
}
break;
case OBJECTTYPE_LEGEND:
@@ -1219,10 +1145,10 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
sal_Int32 nAxisIndex = -1;
lcl_parseAxisIndices( nDimensionIndex, nAxisIndex, rObjectCID );
- Reference< chart2::XAxis > xAxis(
- AxisHelper::getAxis( nDimensionIndex, nAxisIndex, xCooSys ) );
+ rtl::Reference< Axis > xAxis =
+ AxisHelper::getAxis( nDimensionIndex, nAxisIndex, xCooSys );
if( xAxis.is() )
- xObjectProperties.set( xAxis, uno::UNO_QUERY );
+ xObjectProperties = xAxis;
}
break;
case OBJECTTYPE_AXIS_UNITLABEL:
@@ -1237,27 +1163,27 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
sal_Int32 nSubGridIndex = -1;
lcl_parseGridIndices( nSubGridIndex, rObjectCID );
- xObjectProperties.set( AxisHelper::getGridProperties( xCooSys , nDimensionIndex, nAxisIndex, nSubGridIndex ) );
+ xObjectProperties = AxisHelper::getGridProperties( xCooSys , nDimensionIndex, nAxisIndex, nSubGridIndex );
}
break;
case OBJECTTYPE_DATA_LABELS:
case OBJECTTYPE_DATA_SERIES:
{
- Reference< XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID(
+ rtl::Reference< DataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID(
rObjectCID, xChartModel ) );
if( xSeries.is() )
- xObjectProperties.set( xSeries, uno::UNO_QUERY );
+ xObjectProperties = xSeries;
break;
}
case OBJECTTYPE_DATA_LABEL:
case OBJECTTYPE_DATA_POINT:
{
- Reference< XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID(
- rObjectCID, xChartModel ) );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID(
+ rObjectCID, xChartModel );
if(xSeries.is())
{
- sal_Int32 nIndex = aParticleID.toInt32();
+ sal_Int32 nIndex = o3tl::toInt32(aParticleID);
xObjectProperties = xSeries->getDataPointByIndex( nIndex );
}
break;
@@ -1266,26 +1192,22 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
case OBJECTTYPE_DATA_ERRORS_Y:
case OBJECTTYPE_DATA_ERRORS_Z:
{
- Reference< XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID(
- rObjectCID, xChartModel ) );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID(
+ rObjectCID, xChartModel );
if(xSeries.is())
{
- Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY );
Reference< beans::XPropertySet > xErrorBarProp;
- if( xSeriesProp.is() )
- {
- OUString errorBar;
+ OUString errorBar;
- if ( eObjectType == OBJECTTYPE_DATA_ERRORS_X)
- errorBar = CHART_UNONAME_ERRORBAR_X;
- else if (eObjectType == OBJECTTYPE_DATA_ERRORS_Y)
- errorBar = CHART_UNONAME_ERRORBAR_Y;
- else
- errorBar = "ErrorBarZ";
+ if ( eObjectType == OBJECTTYPE_DATA_ERRORS_X)
+ errorBar = CHART_UNONAME_ERRORBAR_X;
+ else if (eObjectType == OBJECTTYPE_DATA_ERRORS_Y)
+ errorBar = CHART_UNONAME_ERRORBAR_Y;
+ else
+ errorBar = "ErrorBarZ";
- xSeriesProp->getPropertyValue( errorBar ) >>= xErrorBarProp;
- xObjectProperties = xErrorBarProp;
- }
+ xSeries->getPropertyValue( errorBar ) >>= xErrorBarProp;
+ xObjectProperties = xErrorBarProp;
}
break;
}
@@ -1293,19 +1215,19 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
case OBJECTTYPE_DATA_CURVE:
case OBJECTTYPE_DATA_CURVE_EQUATION:
{
- Reference< XRegressionCurveContainer > xRegressionContainer( ObjectIdentifier::getDataSeriesForCID(
- rObjectCID, xChartModel ), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xRegressionContainer = ObjectIdentifier::getDataSeriesForCID(
+ rObjectCID, xChartModel );
if(xRegressionContainer.is())
{
- sal_Int32 nIndex = aParticleID.toInt32();
- uno::Sequence< Reference< XRegressionCurve > > aCurveList =
- xRegressionContainer->getRegressionCurves();
- if( nIndex >= 0 && nIndex <aCurveList.getLength() )
+ sal_Int32 nIndex = o3tl::toInt32(aParticleID);
+ const std::vector< rtl::Reference< RegressionCurveModel > > & aCurveList =
+ xRegressionContainer->getRegressionCurves2();
+ if( nIndex >= 0 && o3tl::make_unsigned(nIndex) < aCurveList.size() )
{
if( eObjectType == OBJECTTYPE_DATA_CURVE_EQUATION )
- xObjectProperties.set( aCurveList[nIndex]->getEquationProperties());
+ xObjectProperties = aCurveList[nIndex]->getEquationProperties();
else
- xObjectProperties.set( aCurveList[nIndex], uno::UNO_QUERY );
+ xObjectProperties = aCurveList[nIndex];
}
}
break;
@@ -1314,20 +1236,25 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
break;
case OBJECTTYPE_DATA_STOCK_LOSS:
{
- Reference<XChartType> xChartType( lcl_getFirstStockChartType( xChartModel ) );
- Reference< beans::XPropertySet > xChartTypeProps( xChartType, uno::UNO_QUERY );
- if(xChartTypeProps.is())
- xChartTypeProps->getPropertyValue( "BlackDay" ) >>= xObjectProperties;
+ rtl::Reference<ChartType> xChartType( lcl_getFirstStockChartType( xChartModel ) );
+ if(xChartType.is())
+ xChartType->getPropertyValue( "BlackDay" ) >>= xObjectProperties;
}
break;
case OBJECTTYPE_DATA_STOCK_GAIN:
{
- Reference<XChartType> xChartType( lcl_getFirstStockChartType( xChartModel ) );
- Reference< beans::XPropertySet > xChartTypeProps( xChartType, uno::UNO_QUERY );
- if(xChartTypeProps.is())
- xChartTypeProps->getPropertyValue( "WhiteDay" ) >>= xObjectProperties;
+ rtl::Reference<ChartType> xChartType( lcl_getFirstStockChartType( xChartModel ) );
+ if(xChartType.is())
+ xChartType->getPropertyValue( "WhiteDay" ) >>= xObjectProperties;
}
break;
+ case OBJECTTYPE_DATA_TABLE:
+ {
+ if (xDiagram.is())
+ xObjectProperties.set(xDiagram->getDataTable(), uno::UNO_QUERY);
+ }
+ break;
+ break;
default: //OBJECTTYPE_UNKNOWN
break;
}
@@ -1339,12 +1266,12 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
return xObjectProperties;
}
-Reference< XAxis > ObjectIdentifier::getAxisForCID(
- const OUString& rObjectCID
- , const Reference< frame::XModel >& xChartModel )
+rtl::Reference< Axis > ObjectIdentifier::getAxisForCID(
+ std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel )
{
rtl::Reference< Diagram > xDiagram;
- Reference< XCoordinateSystem > xCooSys;
+ rtl::Reference< BaseCoordinateSystem > xCooSys;
lcl_getDiagramAndCooSys( rObjectCID, xChartModel, xDiagram, xCooSys );
sal_Int32 nDimensionIndex = -1;
@@ -1354,14 +1281,12 @@ Reference< XAxis > ObjectIdentifier::getAxisForCID(
return AxisHelper::getAxis( nDimensionIndex, nAxisIndex, xCooSys );
}
-Reference< XDataSeries > ObjectIdentifier::getDataSeriesForCID(
- const OUString& rObjectCID
- , const Reference< frame::XModel >& xChartModel )
+rtl::Reference< DataSeries > ObjectIdentifier::getDataSeriesForCID(
+ std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel )
{
- Reference< XDataSeries > xSeries;
-
rtl::Reference< Diagram > xDiagram;
- Reference< XCoordinateSystem > xCooSys;
+ rtl::Reference< BaseCoordinateSystem > xCooSys;
lcl_getDiagramAndCooSys( rObjectCID, xChartModel, xDiagram, xCooSys );
sal_Int32 nChartTypeIndex = -1;
@@ -1369,33 +1294,36 @@ Reference< XDataSeries > ObjectIdentifier::getDataSeriesForCID(
sal_Int32 nPointIndex = -1;
lcl_parseSeriesIndices( nChartTypeIndex, nSeriesIndex, nPointIndex, rObjectCID );
- Reference< XDataSeriesContainer > xDataSeriesContainer( DiagramHelper::getChartTypeByIndex( xDiagram, nChartTypeIndex ), uno::UNO_QUERY );
- if( xDataSeriesContainer.is() )
+ rtl::Reference< DataSeries > xSeries;
+ if (xDiagram)
{
- uno::Sequence< uno::Reference< XDataSeries > > aDataSeriesSeq( xDataSeriesContainer->getDataSeries() );
- if( nSeriesIndex >= 0 && nSeriesIndex < aDataSeriesSeq.getLength() )
- xSeries.set( aDataSeriesSeq[nSeriesIndex] );
+ rtl::Reference< ChartType > xDataSeriesContainer( xDiagram->getChartTypeByIndex( nChartTypeIndex ) );
+ if( xDataSeriesContainer.is() )
+ {
+ const std::vector< rtl::Reference< DataSeries > > & aDataSeriesSeq( xDataSeriesContainer->getDataSeries2() );
+ if( nSeriesIndex >= 0 && o3tl::make_unsigned(nSeriesIndex) < aDataSeriesSeq.size() )
+ xSeries = aDataSeriesSeq[nSeriesIndex];
+ }
}
-
return xSeries;
}
rtl::Reference< Diagram > ObjectIdentifier::getDiagramForCID(
- const OUString& rObjectCID
- , const uno::Reference< frame::XModel >& xChartModel )
+ std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel )
{
rtl::Reference< Diagram > xDiagram;
- Reference< XCoordinateSystem > xCooSys;
+ rtl::Reference< BaseCoordinateSystem > xCooSys;
lcl_getDiagramAndCooSys( rObjectCID, xChartModel, xDiagram, xCooSys );
return xDiagram;
}
-TitleHelper::eTitleType ObjectIdentifier::getTitleTypeForCID( const OUString& rCID )
+TitleHelper::eTitleType ObjectIdentifier::getTitleTypeForCID( std::u16string_view rCID )
{
TitleHelper::eTitleType eRet( TitleHelper::MAIN_TITLE );
- OUString aParentParticle = ObjectIdentifier::getFullParentParticle( rCID );
+ std::u16string_view aParentParticle = ObjectIdentifier::getFullParentParticle( rCID );
const tTitleMap& rMap = lcl_getTitleMap();
tTitleMap::const_iterator aIt = std::find_if(rMap.begin(), rMap.end(),
[&aParentParticle](tTitleMap::const_reference rEntry) { return aParentParticle == rEntry.second; });
@@ -1405,7 +1333,7 @@ TitleHelper::eTitleType ObjectIdentifier::getTitleTypeForCID( const OUString& rC
return eRet;
}
-OUString ObjectIdentifier::getSeriesParticleFromCID( const OUString& rCID )
+OUString ObjectIdentifier::getSeriesParticleFromCID( std::u16string_view rCID )
{
sal_Int32 nDiagramIndex = -1;
sal_Int32 nCooSysIndex = -1;
@@ -1419,12 +1347,12 @@ OUString ObjectIdentifier::getSeriesParticleFromCID( const OUString& rCID )
return ObjectIdentifier::createParticleForSeries( nDiagramIndex, nCooSysIndex, nChartTypeIndex, nSeriesIndex );
}
-OUString ObjectIdentifier::getMovedSeriesCID( const OUString& rObjectCID, bool bForward )
+OUString ObjectIdentifier::getMovedSeriesCID( std::u16string_view rObjectCID, bool bForward )
{
- sal_Int32 nDiagramIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, "CID/D=" ) );
- sal_Int32 nCooSysIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, "CS=" ) );
- sal_Int32 nChartTypeIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, "CT=" ) );
- sal_Int32 nSeriesIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, "Series=" ) );
+ sal_Int32 nDiagramIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, u"CID/D=" ) );
+ sal_Int32 nCooSysIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, u"CS=" ) );
+ sal_Int32 nChartTypeIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, u"CT=" ) );
+ sal_Int32 nSeriesIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, u"Series=" ) );
if( bForward )
nSeriesIndex--;
diff --git a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
index 3d7f1c07601b..f8921d73c266 100644
--- a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
@@ -381,7 +381,7 @@ OUString PolynomialRegressionCurveCalculator::ImplGetRepresentation(
}
addStringToEquation( aBuf, nLineLength, aTmpBuf, pFormulaMaxWidth );
}
- if ( std::u16string_view(aBuf) == OUStringConcatenation( mYName + " = ") )
+ if ( std::u16string_view(aBuf) == Concat2View( mYName + " = ") )
aBuf.append( "0" );
return aBuf.makeStringAndClear();
diff --git a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
index 01aa5b2548fb..504048641b59 100644
--- a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
@@ -174,8 +174,8 @@ OUString PotentialRegressionCurveCalculator::ImplGetRepresentation(
}
if( m_fSlope != 0.0 ) // add slope value
{
- aTmpBuf.append( mXName + "^" );
- aTmpBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fSlope, pValueLength ));
+ aTmpBuf.append( mXName + "^" +
+ getFormattedString( xNumFormatter, nNumberFormatKey, m_fSlope, pValueLength ));
}
addStringToEquation( aBuf, nLineLength, aTmpBuf, pFormulaMaxWidth );
}
diff --git a/chart2/source/tools/PropertyHelper.cxx b/chart2/source/tools/PropertyHelper.cxx
index cb3e860c0350..48e21eccaf25 100644
--- a/chart2/source/tools/PropertyHelper.cxx
+++ b/chart2/source/tools/PropertyHelper.cxx
@@ -20,10 +20,13 @@
#include <PropertyHelper.hxx>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <docmodel/uno/UnoGradientTools.hxx>
#include <comphelper/sequence.hxx>
#include <osl/diagnose.h>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <o3tl/string_view.hxx>
+#include <utility>
#include <vector>
#include <algorithm>
#include <iterator>
@@ -37,8 +40,8 @@ namespace
{
struct lcl_EqualsElement
{
- explicit lcl_EqualsElement( const Any & rValue, const Reference< container::XNameAccess > & xAccess )
- : m_aValue( rValue ), m_xAccess( xAccess )
+ explicit lcl_EqualsElement( Any rValue, const Reference< container::XNameAccess > & xAccess )
+ : m_aValue(std::move( rValue )), m_xAccess( xAccess )
{
OSL_ASSERT( m_xAccess.is());
}
@@ -63,13 +66,13 @@ private:
struct lcl_StringMatches
{
- explicit lcl_StringMatches( const OUString & rCmpStr ) :
- m_aCmpStr( rCmpStr )
+ explicit lcl_StringMatches( OUString aCmpStr ) :
+ m_aCmpStr(std::move( aCmpStr ))
{}
- bool operator() ( const OUString & rStr )
+ bool operator() ( std::u16string_view rStr )
{
- return rStr.match( m_aCmpStr );
+ return o3tl::starts_with( rStr, m_aCmpStr );
}
private:
@@ -81,11 +84,11 @@ struct lcl_OUStringRestToInt32
explicit lcl_OUStringRestToInt32( sal_Int32 nPrefixLength ) :
m_nPrefixLength( nPrefixLength )
{}
- sal_Int32 operator() ( const OUString & rStr )
+ sal_Int32 operator() ( std::u16string_view rStr )
{
- if( m_nPrefixLength > rStr.getLength() )
+ if( m_nPrefixLength > static_cast<sal_Int32>(rStr.size()) )
return 0;
- return rStr.copy( m_nPrefixLength ).toInt32();
+ return o3tl::toInt32(rStr.substr( m_nPrefixLength ));
}
private:
sal_Int32 m_nPrefixLength;
@@ -111,56 +114,68 @@ OUString lcl_addNamedPropertyUniqueNameToTable(
const OUString & rPreferredName )
{
if( ! xNameContainer.is() ||
- ! rValue.hasValue() ||
- ( rValue.getValueType() != xNameContainer->getElementType()))
+ ! rValue.hasValue() )
+ return rPreferredName;
+
+ Any aValue(rValue);
+
+ if ( rValue.has<css::awt::Gradient>())
+ {
+ // tdf#158421 the lists for Gradients needs awt::Gradient2
+ // as type, convert input data if needed (and warn about it,
+ // the caller should be changed to offer the needed type)
+ SAL_WARN("chart2","input value needs to be awt::Gradient2");
+ const basegfx::BGradient aTemp(model::gradient::getFromAny(rValue));
+ aValue <<= model::gradient::createUnoGradient2(aTemp);
+ }
+
+ if ( aValue.getValueType() != xNameContainer->getElementType())
return rPreferredName;
try
{
Reference< container::XNameAccess > xNameAccess( xNameContainer, uno::UNO_QUERY_THROW );
- auto aNames( comphelper::sequenceToContainer<std::vector< OUString >>( xNameAccess->getElementNames()));
- std::vector< OUString >::const_iterator aIt(
- std::find_if( aNames.begin(), aNames.end(), lcl_EqualsElement( rValue, xNameAccess )));
+ const uno::Sequence<OUString> aElementNames = xNameAccess->getElementNames();
+ auto it = std::find_if( aElementNames.begin(), aElementNames.end(), lcl_EqualsElement( aValue, xNameAccess ));
+
+ // element found => return name
+ if( it != aElementNames.end())
+ return *it;
// element not found in container
- if( aIt == aNames.end())
+ OUString aUniqueName;
+
+ // check if preferred name is already used
+ if( !rPreferredName.isEmpty())
+ {
+ auto aIt = std::find( aElementNames.begin(), aElementNames.end(), rPreferredName );
+ if( aIt == aElementNames.end())
+ aUniqueName = rPreferredName;
+ }
+
+ if( aUniqueName.isEmpty())
{
- OUString aUniqueName;
-
- // check if preferred name is already used
- if( !rPreferredName.isEmpty())
- {
- aIt = std::find( aNames.begin(), aNames.end(), rPreferredName );
- if( aIt == aNames.end())
- aUniqueName = rPreferredName;
- }
-
- if( aUniqueName.isEmpty())
- {
- // create a unique id using the prefix plus a number
- std::vector< sal_Int32 > aNumbers;
- std::vector< OUString >::iterator aNonConstIt(
- std::partition( aNames.begin(), aNames.end(), lcl_StringMatches( rPrefix )));
- std::transform( aNames.begin(), aNonConstIt,
- back_inserter( aNumbers ),
- lcl_OUStringRestToInt32( rPrefix.getLength() ));
- std::vector< sal_Int32 >::const_iterator aMaxIt(
- std::max_element( aNumbers.begin(), aNumbers.end()));
-
- sal_Int32 nIndex = 1;
- if( aMaxIt != aNumbers.end())
- nIndex = (*aMaxIt) + 1;
-
- aUniqueName = rPrefix + OUString::number( nIndex );
- }
-
- OSL_ASSERT( !aUniqueName.isEmpty());
- xNameContainer->insertByName( aUniqueName, rValue );
- return aUniqueName;
+ auto aNames( comphelper::sequenceToContainer<std::vector< OUString >>( aElementNames ));
+ // create a unique id using the prefix plus a number
+ std::vector< sal_Int32 > aNumbers;
+ std::vector< OUString >::iterator aNonConstIt(
+ std::partition( aNames.begin(), aNames.end(), lcl_StringMatches( rPrefix )));
+ std::transform( aNames.begin(), aNonConstIt,
+ back_inserter( aNumbers ),
+ lcl_OUStringRestToInt32( rPrefix.getLength() ));
+ std::vector< sal_Int32 >::const_iterator aMaxIt(
+ std::max_element( aNumbers.begin(), aNumbers.end()));
+
+ sal_Int32 nIndex = 1;
+ if( aMaxIt != aNumbers.end())
+ nIndex = (*aMaxIt) + 1;
+
+ aUniqueName = rPrefix + OUString::number( nIndex );
}
- else
- // element found => return name
- return *aIt;
+
+ OSL_ASSERT( !aUniqueName.isEmpty());
+ xNameContainer->insertByName( aUniqueName, aValue );
+ return aUniqueName;
}
catch( const uno::Exception & )
{
diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx
index 2ea659f7b708..1b2ae9153fcd 100644
--- a/chart2/source/tools/RangeHighlighter.cxx
+++ b/chart2/source/tools/RangeHighlighter.cxx
@@ -19,9 +19,11 @@
#include <RangeHighlighter.hxx>
#include <WeakListenerAdapter.hxx>
+#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
#include <DataSourceHelper.hxx>
#include <ObjectIdentifier.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <Diagram.hxx>
@@ -29,11 +31,10 @@
#include <com/sun/star/chart2/XAxis.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <comphelper/sequence.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/color.hxx>
using namespace ::com::sun::star;
@@ -69,8 +70,9 @@ namespace chart
{
RangeHighlighter::RangeHighlighter(
- const Reference< view::XSelectionSupplier > & xSelectionSupplier ) :
- m_xSelectionSupplier( xSelectionSupplier ),
+ const rtl::Reference< ChartModel > & xChartModel ) :
+ m_xSelectionSupplier(xChartModel->getCurrentController(), uno::UNO_QUERY),
+ m_xChartModel( xChartModel ),
m_nAddedListenerCount( 0 ),
m_bIncludeHiddenCells(true)
{
@@ -88,17 +90,14 @@ Sequence< chart2::data::HighlightedRange > SAL_CALL RangeHighlighter::getSelecte
void RangeHighlighter::determineRanges()
{
m_aSelectedRanges.realloc( 0 );
+ if( !m_xChartModel.is())
+ return;
if( !m_xSelectionSupplier.is())
return;
try
{
- Reference< frame::XController > xController( m_xSelectionSupplier, uno::UNO_QUERY );
- Reference< frame::XModel > xChartModel;
- if( xController.is())
- xChartModel.set( xController->getModel());
-
- m_bIncludeHiddenCells = ChartModelHelper::isIncludeHiddenCells( xChartModel );
+ m_bIncludeHiddenCells = ChartModelHelper::isIncludeHiddenCells( m_xChartModel );
uno::Any aSelection( m_xSelectionSupplier->getSelection());
const uno::Type& rType = aSelection.getValueType();
@@ -113,7 +112,7 @@ void RangeHighlighter::determineRanges()
{
ObjectType eObjectType = ObjectIdentifier::getObjectType( aCID );
sal_Int32 nIndex = ObjectIdentifier::getIndexFromParticleOrCID( aCID );
- Reference< chart2::XDataSeries > xDataSeries( ObjectIdentifier::getDataSeriesForCID( aCID, xChartModel ) );
+ rtl::Reference< DataSeries > xDataSeries( ObjectIdentifier::getDataSeriesForCID( aCID, m_xChartModel ) );
if( eObjectType == OBJECTTYPE_LEGEND_ENTRY )
{
OUString aParentParticel( ObjectIdentifier::getFullParentParticle( aCID ) );
@@ -135,7 +134,7 @@ void RangeHighlighter::determineRanges()
{
// select error bar ranges, or data series, if the style is
// not set to FROM_DATA
- fillRangesForErrorBars( ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ), xDataSeries );
+ fillRangesForErrorBars( ObjectIdentifier::getObjectPropertySet( aCID, m_xChartModel ), xDataSeries );
return;
}
else if( xDataSeries.is() )
@@ -147,7 +146,7 @@ void RangeHighlighter::determineRanges()
else if( eObjectType == OBJECTTYPE_AXIS )
{
// Axis (Categories)
- Reference< chart2::XAxis > xAxis( ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ), uno::UNO_QUERY );
+ Reference< chart2::XAxis > xAxis( ObjectIdentifier::getObjectPropertySet( aCID, m_xChartModel ), uno::UNO_QUERY );
if( xAxis.is())
{
fillRangesForCategories( xAxis );
@@ -161,7 +160,7 @@ void RangeHighlighter::determineRanges()
)
{
// Diagram
- rtl::Reference< ::chart::Diagram > xDia( ObjectIdentifier::getDiagramForCID( aCID, xChartModel ) );
+ rtl::Reference< ::chart::Diagram > xDia( ObjectIdentifier::getDiagramForCID( aCID, m_xChartModel ) );
if( xDia.is())
{
fillRangesForDiagram( xDia );
@@ -183,8 +182,7 @@ void RangeHighlighter::determineRanges()
else
{
//if nothing is selected select all ranges
- Reference< chart2::XChartDocument > xChartDoc( xChartModel, uno::UNO_QUERY_THROW );
- fillRangesForDiagram( xChartDoc->getFirstDiagram() );
+ fillRangesForDiagram( m_xChartModel->getFirstChartDiagram() );
return;
}
}
@@ -194,21 +192,6 @@ void RangeHighlighter::determineRanges()
}
}
-void RangeHighlighter::fillRangesForDiagram( const Reference< chart2::XDiagram > & xDiagram )
-{
- Sequence< OUString > aSelectedRanges( DataSourceHelper::getUsedDataRanges( xDiagram ));
- m_aSelectedRanges.realloc( aSelectedRanges.getLength());
- auto pSelectedRanges = m_aSelectedRanges.getArray();
- // @todo: merge ranges
- for( sal_Int32 i=0; i<aSelectedRanges.getLength(); ++i )
- {
- pSelectedRanges[i].RangeRepresentation = aSelectedRanges[i];
- pSelectedRanges[i].Index = -1;
- pSelectedRanges[i].PreferredColor = sal_Int32(defaultPreferredColor);
- pSelectedRanges[i].AllowMerginigWithOtherRanges = true;
- }
-}
-
void RangeHighlighter::fillRangesForDiagram( const rtl::Reference< Diagram > & xDiagram )
{
Sequence< OUString > aSelectedRanges( DataSourceHelper::getUsedDataRanges( xDiagram ));
@@ -280,19 +263,15 @@ void RangeHighlighter::fillRangesForCategories( const Reference< chart2::XAxis >
defaultPreferredColor );
}
-void RangeHighlighter::fillRangesForDataPoint( const Reference< uno::XInterface > & xDataSeries, sal_Int32 nIndex )
+void RangeHighlighter::fillRangesForDataPoint( const rtl::Reference< DataSeries > & xDataSeries, sal_Int32 nIndex )
{
if( !xDataSeries.is())
return;
- Reference< chart2::data::XDataSource > xSource( xDataSeries, uno::UNO_QUERY );
- if( !xSource.is() )
- return;
-
Color nPreferredColor = defaultPreferredColor;
std::vector< chart2::data::HighlightedRange > aHilightedRanges;
- const Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSeqSeq( xSource->getDataSequences());
- for( Reference< chart2::data::XLabeledDataSequence > const & labelDataSeq : aLSeqSeq )
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aLSeqSeq( xDataSeries->getDataSequences2());
+ for( uno::Reference< chart2::data::XLabeledDataSequence > const & labelDataSeq : aLSeqSeq )
{
Reference< chart2::data::XDataSequence > xLabel( labelDataSeq->getLabel());
Reference< chart2::data::XDataSequence > xValues( labelDataSeq->getValues());
diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx
index ba9b497dac20..714fa83b425c 100644
--- a/chart2/source/tools/ReferenceSizeProvider.cxx
+++ b/chart2/source/tools/ReferenceSizeProvider.cxx
@@ -19,20 +19,20 @@
#include <ReferenceSizeProvider.hxx>
#include <RelativeSizeHelper.hxx>
-#include <ChartModelHelper.hxx>
-#include <DiagramHelper.hxx>
+#include <ChartModel.hxx>
+#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <Diagram.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XTitled.hpp>
-#include <com/sun/star/chart2/XTitle.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
-#include <tools/diagnose_ex.h>
+#include <Legend.hxx>
+#include <comphelper/diagnose_ex.hxx>
#include <vector>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -42,7 +42,7 @@ namespace chart
ReferenceSizeProvider::ReferenceSizeProvider(
awt::Size aPageSize,
- const Reference< XChartDocument > & xChartDoc ) :
+ const rtl::Reference<::chart::ChartModel> & xChartDoc ) :
m_aPageSize( aPageSize ),
m_xChartDoc( xChartDoc ),
m_bUseAutoScale( getAutoResizeState( xChartDoc ) == AUTO_RESIZE_YES )
@@ -92,36 +92,35 @@ void ReferenceSizeProvider::setValuesAtTitle(
void ReferenceSizeProvider::setValuesAtAllDataSeries()
{
- Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( m_xChartDoc ));
+ rtl::Reference< Diagram > xDiagram( m_xChartDoc->getFirstChartDiagram());
+ if (!xDiagram)
+ return;
// DataSeries/Points
- std::vector< Reference< XDataSeries > > aSeries(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
+ std::vector< rtl::Reference< DataSeries > > aSeries =
+ xDiagram->getDataSeries();
for (auto const& elem : aSeries)
{
- Reference< beans::XPropertySet > xSeriesProp(elem, uno::UNO_QUERY );
- if( xSeriesProp.is())
+ // data points
+ Sequence< sal_Int32 > aPointIndexes;
+ try
{
- // data points
- Sequence< sal_Int32 > aPointIndexes;
- try
- {
- if( xSeriesProp->getPropertyValue( "AttributedDataPoints") >>= aPointIndexes )
- {
- for( sal_Int32 idx : std::as_const(aPointIndexes) )
- setValuesAtPropertySet(
- elem->getDataPointByIndex( idx ) );
- }
- }
- catch (const uno::Exception&)
+ // "AttributedDataPoints"
+ if( elem->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS) >>= aPointIndexes )
{
- DBG_UNHANDLED_EXCEPTION("chart2");
+ for (sal_Int32 idx : aPointIndexes)
+ setValuesAtPropertySet(
+ elem->getDataPointByIndex( idx ) );
}
-
- //it is important to correct the datapoint properties first as they do reference the series properties
- setValuesAtPropertySet( xSeriesProp );
}
+ catch (const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+ //it is important to correct the datapoint properties first as they do reference the series properties
+ setValuesAtPropertySet( elem );
}
}
@@ -132,7 +131,7 @@ void ReferenceSizeProvider::setValuesAtPropertySet(
if( ! xProp.is())
return;
- static constexpr OUStringLiteral aRefSizeName = u"ReferencePageSize";
+ static constexpr OUString aRefSizeName = u"ReferencePageSize"_ustr;
try
{
@@ -218,84 +217,73 @@ void ReferenceSizeProvider::impl_getAutoResizeFromTitled(
with state NO, AUTO_RESIZE_AMBIGUOUS is returned.
*/
ReferenceSizeProvider::AutoResizeState ReferenceSizeProvider::getAutoResizeState(
- const Reference< XChartDocument > & xChartDoc )
+ const rtl::Reference<::chart::ChartModel> & xChartDoc )
{
AutoResizeState eResult = AUTO_RESIZE_UNKNOWN;
// Main Title
- Reference< XTitled > xDocTitled( xChartDoc, uno::UNO_QUERY );
- if( xDocTitled.is())
- impl_getAutoResizeFromTitled( xDocTitled, eResult );
+ if( xChartDoc.is())
+ impl_getAutoResizeFromTitled( xChartDoc, eResult );
if( eResult == AUTO_RESIZE_AMBIGUOUS )
return eResult;
// diagram is needed by the rest of the objects
- Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram( xChartDoc );
+ rtl::Reference< Diagram > xDiagram = xChartDoc->getFirstChartDiagram();
if( ! xDiagram.is())
return eResult;
// Sub Title
- Reference< XTitled > xDiaTitled( xDiagram, uno::UNO_QUERY );
- if( xDiaTitled.is())
- impl_getAutoResizeFromTitled( xDiaTitled, eResult );
+ if( xDiagram.is())
+ impl_getAutoResizeFromTitled( xDiagram, eResult );
if( eResult == AUTO_RESIZE_AMBIGUOUS )
return eResult;
// Legend
- Reference< beans::XPropertySet > xLegendProp( xDiagram->getLegend(), uno::UNO_QUERY );
- if( xLegendProp.is())
- getAutoResizeFromPropSet( xLegendProp, eResult );
+ rtl::Reference< Legend > xLegend( xDiagram->getLegend2() );
+ if( xLegend.is())
+ getAutoResizeFromPropSet( xLegend, eResult );
if( eResult == AUTO_RESIZE_AMBIGUOUS )
return eResult;
// Axes (incl. Axis Titles)
- const Sequence< Reference< XAxis > > aAxes( AxisHelper::getAllAxesOfDiagram( xDiagram ) );
- for( Reference< XAxis > const & axis : aAxes )
+ const std::vector< rtl::Reference< Axis > > aAxes = AxisHelper::getAllAxesOfDiagram( xDiagram );
+ for( rtl::Reference< Axis > const & axis : aAxes )
{
- Reference< beans::XPropertySet > xProp( axis, uno::UNO_QUERY );
- if( xProp.is())
- getAutoResizeFromPropSet( xProp, eResult );
- Reference< XTitled > xTitled( axis, uno::UNO_QUERY );
- if( xTitled.is())
- {
- impl_getAutoResizeFromTitled( xTitled, eResult );
- if( eResult == AUTO_RESIZE_AMBIGUOUS )
- return eResult;
- }
+ getAutoResizeFromPropSet( axis, eResult );
+ impl_getAutoResizeFromTitled( axis, eResult );
+ if( eResult == AUTO_RESIZE_AMBIGUOUS )
+ return eResult;
}
// DataSeries/Points
- std::vector< Reference< XDataSeries > > aSeries(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
+ std::vector< rtl::Reference< DataSeries > > aSeries =
+ xDiagram->getDataSeries();
for (auto const& elem : aSeries)
{
- Reference< beans::XPropertySet > xSeriesProp(elem, uno::UNO_QUERY);
- if( xSeriesProp.is())
- {
- getAutoResizeFromPropSet( xSeriesProp, eResult );
- if( eResult == AUTO_RESIZE_AMBIGUOUS )
- return eResult;
+ getAutoResizeFromPropSet( elem, eResult );
+ if( eResult == AUTO_RESIZE_AMBIGUOUS )
+ return eResult;
- // data points
- Sequence< sal_Int32 > aPointIndexes;
- try
+ // data points
+ Sequence< sal_Int32 > aPointIndexes;
+ try
+ {
+ // "AttributedDataPoints"
+ if( elem->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS) >>= aPointIndexes )
{
- if( xSeriesProp->getPropertyValue( "AttributedDataPoints") >>= aPointIndexes )
+ for (sal_Int32 idx : aPointIndexes)
{
- for( sal_Int32 idx : std::as_const(aPointIndexes) )
- {
- getAutoResizeFromPropSet(
- elem->getDataPointByIndex( idx ), eResult );
- if( eResult == AUTO_RESIZE_AMBIGUOUS )
- return eResult;
- }
+ getAutoResizeFromPropSet(
+ elem->getDataPointByIndex( idx ), eResult );
+ if( eResult == AUTO_RESIZE_AMBIGUOUS )
+ return eResult;
}
}
- catch (const uno::Exception&)
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
+ }
+ catch (const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
}
}
@@ -315,29 +303,27 @@ void ReferenceSizeProvider::setAutoResizeState( ReferenceSizeProvider::AutoResiz
m_bUseAutoScale = (eNewState == AUTO_RESIZE_YES);
// Main Title
- impl_setValuesAtTitled( Reference< XTitled >( m_xChartDoc, uno::UNO_QUERY ));
+ impl_setValuesAtTitled( m_xChartDoc );
// diagram is needed by the rest of the objects
- Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram( m_xChartDoc );
+ rtl::Reference< Diagram > xDiagram = m_xChartDoc->getFirstChartDiagram();
if( ! xDiagram.is())
return;
// Sub Title
- impl_setValuesAtTitled( Reference< XTitled >( xDiagram, uno::UNO_QUERY ));
+ impl_setValuesAtTitled( xDiagram );
// Legend
- Reference< beans::XPropertySet > xLegendProp( xDiagram->getLegend(), uno::UNO_QUERY );
- if( xLegendProp.is())
- setValuesAtPropertySet( xLegendProp );
+ rtl::Reference< Legend > xLegend( xDiagram->getLegend2() );
+ if( xLegend.is())
+ setValuesAtPropertySet( xLegend );
// Axes (incl. Axis Titles)
- const Sequence< Reference< XAxis > > aAxes( AxisHelper::getAllAxesOfDiagram( xDiagram ) );
- for( Reference< XAxis > const & axis : aAxes )
+ const std::vector< rtl::Reference< Axis > > aAxes = AxisHelper::getAllAxesOfDiagram( xDiagram );
+ for( rtl::Reference< Axis > const & axis : aAxes )
{
- Reference< beans::XPropertySet > xProp( axis, uno::UNO_QUERY );
- if( xProp.is())
- setValuesAtPropertySet( xProp );
- impl_setValuesAtTitled( Reference< XTitled >( axis, uno::UNO_QUERY ));
+ setValuesAtPropertySet( axis );
+ impl_setValuesAtTitled( axis );
}
// DataSeries/Points
diff --git a/chart2/source/tools/RegressionCurveCalculator.cxx b/chart2/source/tools/RegressionCurveCalculator.cxx
index fbf5d243bdb9..8f22f9834bdc 100644
--- a/chart2/source/tools/RegressionCurveCalculator.cxx
+++ b/chart2/source/tools/RegressionCurveCalculator.cxx
@@ -75,6 +75,8 @@ void RegressionCurveCalculator::setRegressionProperties(
sal_Int32 aPeriod,
sal_Int32 nMovingType )
{
+ if( aPeriod < 0 )
+ throw lang::IllegalArgumentException("aPeriod may not be < 0", static_cast<cppu::OWeakObject*>(this), 3);
mDegree = aDegree;
mForceIntercept = aForceIntercept;
mInterceptValue = aInterceptValue;
@@ -98,9 +100,7 @@ OUString RegressionCurveCalculator::getFormattedString(
{ // round fNumber to *pStringLength characters
const sal_Int32 nMinDigit = 6; // minimum significant digits for General format
sal_Int32 nSignificantDigit = ( *pStringLength <= nMinDigit ? nMinDigit : *pStringLength );
- aResult = OStringToOUString(
- ::rtl::math::doubleToString( fNumber, rtl_math_StringFormat_G1, nSignificantDigit, '.', true ),
- RTL_TEXTENCODING_ASCII_US );
+ aResult = ::rtl::math::doubleToUString( fNumber, rtl_math_StringFormat_G1, nSignificantDigit, '.', true );
// count characters different from significant digits (decimal separator, scientific notation)
sal_Int32 nExtraChar = aResult.getLength() - *pStringLength;
if ( nExtraChar > 0 && *pStringLength > nMinDigit )
@@ -108,9 +108,7 @@ OUString RegressionCurveCalculator::getFormattedString(
nSignificantDigit = *pStringLength - nExtraChar;
if ( nSignificantDigit < nMinDigit )
nSignificantDigit = nMinDigit;
- aResult = OStringToOUString(
- ::rtl::math::doubleToString( fNumber, rtl_math_StringFormat_G1, nSignificantDigit, '.', true ),
- RTL_TEXTENCODING_ASCII_US );
+ aResult = ::rtl::math::doubleToUString( fNumber, rtl_math_StringFormat_G1, nSignificantDigit, '.', true );
}
fNumber = ::rtl::math::stringToDouble( aResult, '.', ',' );
}
@@ -121,9 +119,7 @@ OUString RegressionCurveCalculator::getFormattedString(
sal_Int32 nStringLength = 4; // default length
if ( pStringLength )
nStringLength = *pStringLength;
- aResult = OStringToOUString(
- ::rtl::math::doubleToString( fNumber, rtl_math_StringFormat_G1, nStringLength, '.', true ),
- RTL_TEXTENCODING_ASCII_US );
+ aResult = ::rtl::math::doubleToUString( fNumber, rtl_math_StringFormat_G1, nStringLength, '.', true );
}
return aResult;
}
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx
index 1df7ac904da8..efb6bea5c3aa 100644
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart2/source/tools/RegressionCurveHelper.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <cstddef>
+
#include <RegressionCurveHelper.hxx>
#include <MeanValueRegressionCurveCalculator.hxx>
#include <LinearRegressionCurveCalculator.hxx>
@@ -26,16 +30,20 @@
#include <ExponentialRegressionCurveCalculator.hxx>
#include <PotentialRegressionCurveCalculator.hxx>
#include <CommonConverters.hxx>
-#include "RegressionCurveModel.hxx"
+#include <RegressionCurveModel.hxx>
#include <ChartTypeHelper.hxx>
+#include <ChartType.hxx>
+#include <ChartModel.hxx>
#include <ChartModelHelper.hxx>
+#include <DataSeries.hxx>
#include <ResId.hxx>
#include <strings.hrc>
-#include <DiagramHelper.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/XRegressionCurveCalculator.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
-#include <tools/diagnose_ex.h>
+#include <com/sun/star/chart2/data/XDataSource.hpp>
+#include <o3tl/safeint.hxx>
+#include <comphelper/diagnose_ex.hxx>
#include <comphelper/property.hxx>
using namespace ::com::sun::star;
@@ -85,15 +93,15 @@ OUString lcl_getServiceNameForType(SvxChartRegress eType)
namespace chart
{
-Reference< XRegressionCurve > RegressionCurveHelper::createMeanValueLine()
+rtl::Reference< RegressionCurveModel > RegressionCurveHelper::createMeanValueLine()
{
- return Reference< XRegressionCurve >( new MeanValueRegressionCurve );
+ return new MeanValueRegressionCurve;
}
-Reference< XRegressionCurve > RegressionCurveHelper::createRegressionCurveByServiceName(
+rtl::Reference< RegressionCurveModel > RegressionCurveHelper::createRegressionCurveByServiceName(
std::u16string_view aServiceName )
{
- Reference< XRegressionCurve > xResult;
+ rtl::Reference< RegressionCurveModel > xResult;
// todo: use factory methods with service name
if( aServiceName == u"com.sun.star.chart2.LinearRegressionCurve" )
@@ -124,10 +132,10 @@ Reference< XRegressionCurve > RegressionCurveHelper::createRegressionCurveByServ
return xResult;
}
-Reference< XRegressionCurveCalculator > RegressionCurveHelper::createRegressionCurveCalculatorByServiceName(
+rtl::Reference< RegressionCurveCalculator > RegressionCurveHelper::createRegressionCurveCalculatorByServiceName(
std::u16string_view aServiceName )
{
- Reference< XRegressionCurveCalculator > xResult;
+ rtl::Reference< RegressionCurveCalculator > xResult;
// todo: use factory methods with service name
if( aServiceName == u"com.sun.star.chart2.MeanValueRegressionCurve" )
@@ -225,14 +233,14 @@ void RegressionCurveHelper::initializeCurveCalculator(
void RegressionCurveHelper::initializeCurveCalculator(
const Reference< XRegressionCurveCalculator > & xOutCurveCalculator,
- const Reference< XDataSeries > & xSeries,
- const Reference< frame::XModel > & xModel )
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
+ const rtl::Reference<::chart::ChartModel> & xModel )
{
sal_Int32 nAxisType = ChartTypeHelper::getAxisType(
ChartModelHelper::getChartTypeOfSeries( xModel, xSeries ), 0 ); // x-axis
initializeCurveCalculator( xOutCurveCalculator,
- uno::Reference< data::XDataSource >( xSeries, uno::UNO_QUERY ),
+ xSeries,
(nAxisType == AxisType::REALNUMBER) );
}
@@ -260,6 +268,28 @@ bool RegressionCurveHelper::hasMeanValueLine(
return false;
}
+bool RegressionCurveHelper::hasMeanValueLine(
+ const rtl::Reference< DataSeries > & xRegCnt )
+{
+ if( !xRegCnt.is())
+ return false;
+
+ try
+ {
+ for( rtl::Reference< RegressionCurveModel > const & curve : xRegCnt->getRegressionCurves2() )
+ {
+ if( isMeanValueLine( curve ))
+ return true;
+ }
+ }
+ catch( const Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+ return false;
+}
+
bool RegressionCurveHelper::isMeanValueLine(
const uno::Reference< chart2::XRegressionCurve > & xRegCurve )
{
@@ -269,7 +299,15 @@ bool RegressionCurveHelper::isMeanValueLine(
"com.sun.star.chart2.MeanValueRegressionCurve";
}
-uno::Reference< chart2::XRegressionCurve >
+bool RegressionCurveHelper::isMeanValueLine(
+ const rtl::Reference< RegressionCurveModel > & xRegCurve )
+{
+ return xRegCurve.is() &&
+ xRegCurve->getServiceName() ==
+ "com.sun.star.chart2.MeanValueRegressionCurve";
+}
+
+rtl::Reference< RegressionCurveModel >
RegressionCurveHelper::getMeanValueLine(
const uno::Reference< chart2::XRegressionCurveContainer > & xRegCnt )
{
@@ -282,6 +320,29 @@ uno::Reference< chart2::XRegressionCurve >
for( uno::Reference< XRegressionCurve > const & curve : aCurves )
{
if( isMeanValueLine( curve ))
+ return dynamic_cast<RegressionCurveModel*>(curve.get());
+ }
+ }
+ catch( const Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+ }
+
+ return nullptr;
+}
+
+rtl::Reference< RegressionCurveModel >
+ RegressionCurveHelper::getMeanValueLine(
+ const rtl::Reference< DataSeries > & xRegCnt )
+{
+ if( xRegCnt.is())
+ {
+ try
+ {
+ for( rtl::Reference< RegressionCurveModel > const & curve : xRegCnt->getRegressionCurves2() )
+ {
+ if( isMeanValueLine( curve ))
return curve;
}
}
@@ -291,7 +352,7 @@ uno::Reference< chart2::XRegressionCurve >
}
}
- return uno::Reference< chart2::XRegressionCurve >();
+ return nullptr;
}
void RegressionCurveHelper::addMeanValueLine(
@@ -317,6 +378,25 @@ void RegressionCurveHelper::addMeanValueLine(
}
}
+void RegressionCurveHelper::addMeanValueLine(
+ rtl::Reference< DataSeries > const & xRegCnt,
+ const uno::Reference< XPropertySet > & xSeriesProp )
+{
+ if( !xRegCnt.is() ||
+ ::chart::RegressionCurveHelper::hasMeanValueLine( xRegCnt ) )
+ return;
+
+ // todo: use a valid context
+ rtl::Reference< RegressionCurveModel > xCurve( createMeanValueLine() );
+ xRegCnt->addRegressionCurve( xCurve );
+
+ if( xSeriesProp.is())
+ {
+ xCurve->setPropertyValue( "LineColor",
+ xSeriesProp->getPropertyValue( "Color"));
+ }
+}
+
void RegressionCurveHelper::removeMeanValueLine(
Reference< XRegressionCurveContainer > const & xRegCnt )
{
@@ -346,13 +426,40 @@ void RegressionCurveHelper::removeMeanValueLine(
}
}
-uno::Reference< chart2::XRegressionCurve > RegressionCurveHelper::addRegressionCurve(
+void RegressionCurveHelper::removeMeanValueLine(
+ rtl::Reference< DataSeries > const & xRegCnt )
+{
+ if( !xRegCnt.is())
+ return;
+
+ try
+ {
+ for( rtl::Reference< RegressionCurveModel > const & curve : xRegCnt->getRegressionCurves2() )
+ {
+ if( isMeanValueLine( curve ))
+ {
+ xRegCnt->removeRegressionCurve( curve );
+ // attention: the iterator i has become invalid now
+
+ // note: assume that there is only one mean-value curve
+ // to remove multiple mean-value curves remove the break
+ break;
+ }
+ }
+ }
+ catch( const Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+}
+
+rtl::Reference< RegressionCurveModel > RegressionCurveHelper::addRegressionCurve(
SvxChartRegress eType,
uno::Reference< XRegressionCurveContainer > const & xRegressionCurveContainer,
const uno::Reference< beans::XPropertySet >& xPropertySource,
const uno::Reference< beans::XPropertySet >& xEquationProperties )
{
- uno::Reference< chart2::XRegressionCurve > xCurve;
+ rtl::Reference< RegressionCurveModel > xCurve;
if( !xRegressionCurveContainer.is() )
return xCurve;
@@ -367,24 +474,20 @@ uno::Reference< chart2::XRegressionCurve > RegressionCurveHelper::addRegressionC
if( !aServiceName.isEmpty())
{
// todo: use a valid context
- xCurve.set( createRegressionCurveByServiceName( aServiceName ) );
+ xCurve = createRegressionCurveByServiceName( aServiceName );
if( xEquationProperties.is())
xCurve->setEquationProperties( xEquationProperties );
- uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY );
- if( xProperties.is())
+ if( xPropertySource.is())
+ comphelper::copyProperties( xPropertySource, xCurve );
+ else
{
- if( xPropertySource.is())
- comphelper::copyProperties( xPropertySource, xProperties );
- else
+ uno::Reference< XPropertySet > xSeriesProp( xRegressionCurveContainer, uno::UNO_QUERY );
+ if( xSeriesProp.is())
{
- uno::Reference< XPropertySet > xSeriesProp( xRegressionCurveContainer, uno::UNO_QUERY );
- if( xSeriesProp.is())
- {
- xProperties->setPropertyValue( "LineColor",
- xSeriesProp->getPropertyValue( "Color"));
- }
+ xCurve->setPropertyValue( "LineColor",
+ xSeriesProp->getPropertyValue( "Color"));
}
}
}
@@ -393,67 +496,98 @@ uno::Reference< chart2::XRegressionCurve > RegressionCurveHelper::addRegressionC
return xCurve;
}
+rtl::Reference< RegressionCurveModel > RegressionCurveHelper::addRegressionCurve(
+ SvxChartRegress eType,
+ rtl::Reference< DataSeries > const & xRegressionCurveContainer,
+ const uno::Reference< beans::XPropertySet >& xPropertySource,
+ const uno::Reference< beans::XPropertySet >& xEquationProperties )
+{
+ rtl::Reference< RegressionCurveModel > xCurve;
+
+ if( !xRegressionCurveContainer.is() )
+ return xCurve;
+
+ if( eType == SvxChartRegress::NONE )
+ {
+ OSL_FAIL("don't create a regression curve of type none");
+ return xCurve;
+ }
+
+ OUString aServiceName( lcl_getServiceNameForType( eType ));
+ if( !aServiceName.isEmpty())
+ {
+ // todo: use a valid context
+ xCurve = createRegressionCurveByServiceName( aServiceName );
+
+ if( xEquationProperties.is())
+ xCurve->setEquationProperties( xEquationProperties );
+
+ if( xPropertySource.is())
+ comphelper::copyProperties( xPropertySource, xCurve );
+ else
+ {
+ xCurve->setPropertyValue( "LineColor",
+ xRegressionCurveContainer->getPropertyValue( "Color"));
+ }
+ }
+ xRegressionCurveContainer->addRegressionCurve( xCurve );
+
+ return xCurve;
+}
+
/** removes all regression curves that are not of type mean value
and returns true, if anything was removed
*/
bool RegressionCurveHelper::removeAllExceptMeanValueLine(
- uno::Reference< chart2::XRegressionCurveContainer > const & xRegCnt )
+ rtl::Reference< DataSeries > const & xRegCnt )
{
+ if( !xRegCnt.is())
+ return false;
+
bool bRemovedSomething = false;
- if( xRegCnt.is())
+ try
{
- try
+ std::vector< rtl::Reference< RegressionCurveModel > > aCurvesToDelete;
+ for( rtl::Reference< RegressionCurveModel > const & curve : xRegCnt->getRegressionCurves2() )
{
- const uno::Sequence< uno::Reference< chart2::XRegressionCurve > > aCurves(
- xRegCnt->getRegressionCurves());
- std::vector< uno::Reference< chart2::XRegressionCurve > > aCurvesToDelete;
- for( uno::Reference< chart2::XRegressionCurve > const & curve : aCurves )
- {
- if( ! isMeanValueLine( curve ))
- {
- aCurvesToDelete.push_back( curve );
- }
- }
-
- for (auto const& curveToDelete : aCurvesToDelete)
+ if( ! isMeanValueLine( curve ))
{
- xRegCnt->removeRegressionCurve(curveToDelete);
- bRemovedSomething = true;
+ aCurvesToDelete.push_back( curve );
}
}
- catch( const uno::Exception & )
+
+ for (auto const& curveToDelete : aCurvesToDelete)
{
- DBG_UNHANDLED_EXCEPTION("chart2");
+ xRegCnt->removeRegressionCurve(curveToDelete);
+ bRemovedSomething = true;
}
}
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
return bRemovedSomething;
}
void RegressionCurveHelper::removeEquations(
- uno::Reference< chart2::XRegressionCurveContainer > const & xRegCnt )
+ rtl::Reference< DataSeries > const & xRegCnt )
{
if( !xRegCnt.is())
return;
try
{
- const uno::Sequence< uno::Reference< chart2::XRegressionCurve > > aCurves(
- xRegCnt->getRegressionCurves());
- for( uno::Reference< chart2::XRegressionCurve > const & curve : aCurves )
+ for( rtl::Reference< RegressionCurveModel > const & curve : xRegCnt->getRegressionCurves2() )
{
if( !isMeanValueLine( curve ) )
{
- uno::Reference< chart2::XRegressionCurve > xRegCurve( curve );
- if( xRegCurve.is() )
+ uno::Reference< beans::XPropertySet > xEqProp( curve->getEquationProperties() ) ;
+ if( xEqProp.is())
{
- uno::Reference< beans::XPropertySet > xEqProp( xRegCurve->getEquationProperties() ) ;
- if( xEqProp.is())
- {
- xEqProp->setPropertyValue( "ShowEquation", uno::Any( false ));
- xEqProp->setPropertyValue( "XName", uno::Any( OUString("x") ));
- xEqProp->setPropertyValue( "YName", uno::Any( OUString("f(x) ") ));
- xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::Any( false ));
- }
+ xEqProp->setPropertyValue( "ShowEquation", uno::Any( false ));
+ xEqProp->setPropertyValue( "XName", uno::Any( OUString("x") ));
+ xEqProp->setPropertyValue( "YName", uno::Any( OUString("f(x) ") ));
+ xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::Any( false ));
}
}
}
@@ -464,7 +598,7 @@ void RegressionCurveHelper::removeEquations(
}
}
-uno::Reference< XRegressionCurve > RegressionCurveHelper::changeRegressionCurveType(
+rtl::Reference< RegressionCurveModel > RegressionCurveHelper::changeRegressionCurveType(
SvxChartRegress eType,
uno::Reference< XRegressionCurveContainer > const & xRegressionCurveContainer,
uno::Reference< XRegressionCurve > const & xRegressionCurve )
@@ -477,7 +611,7 @@ uno::Reference< XRegressionCurve > RegressionCurveHelper::changeRegressionCurveT
xRegressionCurve->getEquationProperties());
}
-uno::Reference< chart2::XRegressionCurve > RegressionCurveHelper::getFirstCurveNotMeanValueLine(
+rtl::Reference< RegressionCurveModel > RegressionCurveHelper::getFirstCurveNotMeanValueLine(
const Reference< XRegressionCurveContainer > & xRegCnt )
{
if( !xRegCnt.is())
@@ -491,6 +625,30 @@ uno::Reference< chart2::XRegressionCurve > RegressionCurveHelper::getFirstCurveN
{
if( ! isMeanValueLine( curve ))
{
+ return dynamic_cast<RegressionCurveModel*>(curve.get());
+ }
+ }
+ }
+ catch( const Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+ return nullptr;
+}
+
+rtl::Reference< RegressionCurveModel > RegressionCurveHelper::getFirstCurveNotMeanValueLine(
+ const rtl::Reference< DataSeries > & xRegCnt )
+{
+ if( !xRegCnt.is())
+ return nullptr;
+
+ try
+ {
+ for( rtl::Reference< RegressionCurveModel > const & curve : xRegCnt->getRegressionCurves2() )
+ {
+ if( ! isMeanValueLine( curve ))
+ {
return curve;
}
}
@@ -503,8 +661,8 @@ uno::Reference< chart2::XRegressionCurve > RegressionCurveHelper::getFirstCurveN
return nullptr;
}
-uno::Reference< chart2::XRegressionCurve > RegressionCurveHelper::getRegressionCurveAtIndex(
- const Reference< XRegressionCurveContainer >& xCurveContainer,
+rtl::Reference< RegressionCurveModel > RegressionCurveHelper::getRegressionCurveAtIndex(
+ const rtl::Reference< DataSeries >& xCurveContainer,
sal_Int32 aIndex )
{
if( !xCurveContainer.is())
@@ -512,8 +670,8 @@ uno::Reference< chart2::XRegressionCurve > RegressionCurveHelper::getRegressionC
try
{
- uno::Sequence< uno::Reference< chart2::XRegressionCurve > > aCurves(xCurveContainer->getRegressionCurves());
- if(0 <= aIndex && aIndex < aCurves.getLength())
+ const std::vector< rtl::Reference< RegressionCurveModel > > aCurves(xCurveContainer->getRegressionCurves2());
+ if(0 <= aIndex && o3tl::make_unsigned(aIndex) < aCurves.size())
{
if(!isMeanValueLine(aCurves[aIndex]))
return aCurves[aIndex];
@@ -682,29 +840,6 @@ OUString RegressionCurveHelper::getRegressionCurveName( const Reference< XRegres
return aResult;
}
-std::vector< Reference< chart2::XRegressionCurve > >
- RegressionCurveHelper::getAllRegressionCurvesNotMeanValueLine(
- const Reference< chart2::XDiagram > & xDiagram )
-{
- std::vector< Reference< chart2::XRegressionCurve > > aResult;
- std::vector< Reference< chart2::XDataSeries > > aSeries( DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
- for (auto const& elem : aSeries)
- {
- Reference< chart2::XRegressionCurveContainer > xContainer(elem, uno::UNO_QUERY);
- if(xContainer.is())
- {
- const uno::Sequence< uno::Reference< chart2::XRegressionCurve > > aCurves(xContainer->getRegressionCurves());
- for( Reference< XRegressionCurve > const & curve : aCurves )
- {
- if( ! isMeanValueLine( curve ))
- aResult.push_back( curve );
- }
- }
- }
-
- return aResult;
-}
-
void RegressionCurveHelper::resetEquationPosition(
const Reference< chart2::XRegressionCurve > & xCurve )
{
@@ -713,7 +848,7 @@ void RegressionCurveHelper::resetEquationPosition(
try
{
- static const OUStringLiteral aPosPropertyName( u"RelativePosition" );
+ static constexpr OUString aPosPropertyName( u"RelativePosition"_ustr );
Reference< beans::XPropertySet > xEqProp( xCurve->getEquationProperties()); // since m233: , uno::UNO_SET_THROW );
if( xEqProp->getPropertyValue( aPosPropertyName ).hasValue())
xEqProp->setPropertyValue( aPosPropertyName, uno::Any());
@@ -725,15 +860,15 @@ void RegressionCurveHelper::resetEquationPosition(
}
sal_Int32 RegressionCurveHelper::getRegressionCurveIndex(
- const Reference< chart2::XRegressionCurveContainer >& xContainer,
- const Reference< chart2::XRegressionCurve >& xCurve )
+ const rtl::Reference< DataSeries >& xContainer,
+ const rtl::Reference< RegressionCurveModel >& xCurve )
{
if( xContainer.is())
{
- uno::Sequence< uno::Reference< XRegressionCurve > > aCurves(
- xContainer->getRegressionCurves());
+ const std::vector< rtl::Reference< RegressionCurveModel > > & aCurves(
+ xContainer->getRegressionCurves2());
- for( sal_Int32 i = 0; i < aCurves.getLength(); ++i )
+ for( std::size_t i = 0; i < aCurves.size(); ++i )
{
if( xCurve == aCurves[i] )
return i;
@@ -760,6 +895,20 @@ bool RegressionCurveHelper::hasEquation( const Reference< chart2::XRegressionCur
return bHasEquation;
}
+bool RegressionCurveHelper::MayHaveCorrelationCoefficient( const Reference< chart2::XRegressionCurve > & xCurve )
+{
+ bool bMayHaveCorrelationCoefficient = true;
+ if( xCurve.is())
+ {
+ uno::Reference< beans::XPropertySet > xEquationProp( xCurve->getEquationProperties() );
+ if( xEquationProp.is() )
+ {
+ xEquationProp->getPropertyValue( "MayHaveCorrelationCoefficient") >>= bMayHaveCorrelationCoefficient;
+ }
+ }
+ return bMayHaveCorrelationCoefficient;
+}
+
} //namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/tools/RegressionCurveModel.cxx b/chart2/source/tools/RegressionCurveModel.cxx
index d6cef7c2c8d8..06be003ef106 100644
--- a/chart2/source/tools/RegressionCurveModel.cxx
+++ b/chart2/source/tools/RegressionCurveModel.cxx
@@ -17,8 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "RegressionCurveModel.hxx"
+#include <RegressionCurveModel.hxx>
#include <LinePropertiesHelper.hxx>
+#include <RegressionCurveCalculator.hxx>
#include <RegressionCurveHelper.hxx>
#include "RegressionEquation.hxx"
#include <CloneHelper.hxx>
@@ -26,7 +27,6 @@
#include <ModifyListenerHelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <tools/diagnose_ex.h>
namespace com::sun::star::uno { class XComponentContext; }
@@ -99,7 +99,7 @@ void lcl_AddPropertiesToVector(
beans::PropertyAttribute::BOUND );
}
-::chart::tPropertyValueMap GetStaticXXXDefaults()
+const ::chart::tPropertyValueMap & GetStaticXXXDefaults()
{
static ::chart::tPropertyValueMap aStaticDefaults =
[](){
@@ -139,7 +139,6 @@ namespace chart
{
RegressionCurveModel::RegressionCurveModel( tCurveType eCurveType ) :
- ::property::OPropertySet( m_aMutex ),
m_eRegressionCurveType( eCurveType ),
m_xModifyEventForwarder( new ModifyEventForwarder() ),
m_xEquationProperties( new RegressionEquation )
@@ -153,7 +152,7 @@ RegressionCurveModel::RegressionCurveModel( tCurveType eCurveType ) :
RegressionCurveModel::RegressionCurveModel( const RegressionCurveModel & rOther ) :
impl::RegressionCurveModel_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_eRegressionCurveType( rOther.m_eRegressionCurveType ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
@@ -184,11 +183,20 @@ void SAL_CALL RegressionCurveModel::setEquationProperties( const uno::Reference<
ModifyListenerHelper::removeListener( m_xEquationProperties, m_xModifyEventForwarder );
m_xEquationProperties.set( xEquationProperties );
+ setPropertyMayHaveR2();
ModifyListenerHelper::addListener( m_xEquationProperties, m_xModifyEventForwarder );
fireModifyEvent();
}
}
+void RegressionCurveModel::setPropertyMayHaveR2()
+{
+ if( m_xEquationProperties.is()) {
+ bool bMayHaveR2 = m_eRegressionCurveType != CURVE_TYPE_MOVING_AVERAGE;
+ m_xEquationProperties->setPropertyValue( "MayHaveCorrelationCoefficient", uno::Any( bMayHaveR2 ) );
+ }
+}
+
// ____ XServiceName ____
OUString SAL_CALL RegressionCurveModel::getServiceName()
{
@@ -239,6 +247,7 @@ void SAL_CALL RegressionCurveModel::disposing( const lang::EventObject& /* Sourc
// ____ OPropertySet ____
void RegressionCurveModel::firePropertyChangeEvent()
{
+ setPropertyMayHaveR2();
fireModifyEvent();
}
diff --git a/chart2/source/tools/RegressionEquation.cxx b/chart2/source/tools/RegressionEquation.cxx
index 637a1d7c6774..34bbd6b491d9 100644
--- a/chart2/source/tools/RegressionEquation.cxx
+++ b/chart2/source/tools/RegressionEquation.cxx
@@ -33,7 +33,6 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/awt/Size.hpp>
-#include <tools/diagnose_ex.h>
#include <algorithm>
@@ -54,6 +53,7 @@ enum
PROP_EQUATION_XNAME,
PROP_EQUATION_YNAME,
PROP_EQUATION_SHOW_CORRELATION_COEFF,
+ PROP_EQUATION_MAY_HAVE_CORRELATION_COEFF,
PROP_EQUATION_REF_PAGE_SIZE,
PROP_EQUATION_REL_POS,
PROP_EQUATION_NUMBER_FORMAT
@@ -86,6 +86,12 @@ void lcl_AddPropertiesToVector(
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT );
+ rOutProperties.emplace_back( "MayHaveCorrelationCoefficient",
+ PROP_EQUATION_MAY_HAVE_CORRELATION_COEFF,
+ cppu::UnoType<bool>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT );
+
rOutProperties.emplace_back( "ReferencePageSize",
PROP_EQUATION_REF_PAGE_SIZE,
cppu::UnoType<awt::Size>::get(),
@@ -118,6 +124,7 @@ void lcl_AddPropertiesToVector(
::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_EQUATION_XNAME, OUString("x") );
::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_EQUATION_YNAME, OUString("f(x)") );
::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_EQUATION_SHOW_CORRELATION_COEFF, false );
+ ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_EQUATION_MAY_HAVE_CORRELATION_COEFF, true );
//::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_EQUATION_SEPARATOR, OUString( '\n' ));
// override other defaults
@@ -165,13 +172,12 @@ namespace chart
{
RegressionEquation::RegressionEquation() :
- ::property::OPropertySet( m_aMutex ),
m_xModifyEventForwarder( new ModifyEventForwarder())
{}
RegressionEquation::RegressionEquation( const RegressionEquation & rOther ) :
impl::RegressionEquation_Base(rOther),
- ::property::OPropertySet( rOther, m_aMutex ),
+ ::property::OPropertySet( rOther ),
m_xModifyEventForwarder( new ModifyEventForwarder())
{}
diff --git a/chart2/source/tools/RegressionEquation.hxx b/chart2/source/tools/RegressionEquation.hxx
index 9c26a6ad9d0f..8a500cd1d73c 100644
--- a/chart2/source/tools/RegressionEquation.hxx
+++ b/chart2/source/tools/RegressionEquation.hxx
@@ -24,7 +24,6 @@
#include <OPropertySet.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <ModifyListenerHelper.hxx>
@@ -44,7 +43,6 @@ typedef ::cppu::WeakImplHelper<
}
class RegressionEquation final :
- public cppu::BaseMutex,
public impl::RegressionEquation_Base,
public ::property::OPropertySet
{
diff --git a/chart2/source/tools/RelativeSizeHelper.cxx b/chart2/source/tools/RelativeSizeHelper.cxx
index c1bdc28fcb35..4a3cd84cfb88 100644
--- a/chart2/source/tools/RelativeSizeHelper.cxx
+++ b/chart2/source/tools/RelativeSizeHelper.cxx
@@ -20,14 +20,13 @@
#include <RelativeSizeHelper.hxx>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <svx/unoshape.hxx>
#include <vector>
#include <algorithm>
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
-using namespace ::std;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
@@ -45,7 +44,7 @@ double RelativeSizeHelper::calculate(
rOldReferenceSize.Height <= 0 )
return fValue;
- return min(
+ return std::min(
static_cast< double >( rNewReferenceSize.Width ) / static_cast< double >( rOldReferenceSize.Width ),
static_cast< double >( rNewReferenceSize.Height ) / static_cast< double >( rOldReferenceSize.Height ))
* fValue;
@@ -58,7 +57,7 @@ void RelativeSizeHelper::adaptFontSizes(
{
float fFontHeight = 0;
- vector< OUString > aProperties;
+ std::vector< OUString > aProperties;
aProperties.emplace_back("CharHeight" );
aProperties.emplace_back("CharHeightAsian" );
aProperties.emplace_back("CharHeightComplex" );
@@ -92,7 +91,7 @@ void RelativeSizeHelper::adaptFontSizes(
float fFontHeight = 0;
- vector< OUString > aProperties;
+ std::vector< OUString > aProperties;
aProperties.emplace_back("CharHeight" );
aProperties.emplace_back("CharHeightAsian" );
aProperties.emplace_back("CharHeightComplex" );
diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx
index b49dab6d6fb9..b7179537c43b 100644
--- a/chart2/source/tools/Scaling.cxx
+++ b/chart2/source/tools/Scaling.cxx
@@ -29,10 +29,10 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace
{
-constexpr OUStringLiteral lcl_aServiceName_Logarithmic = u"com.sun.star.chart2.LogarithmicScaling";
-constexpr OUStringLiteral lcl_aServiceName_Exponential = u"com.sun.star.chart2.ExponentialScaling";
-constexpr OUStringLiteral lcl_aServiceName_Linear = u"com.sun.star.chart2.LinearScaling";
-constexpr OUStringLiteral lcl_aServiceName_Power = u"com.sun.star.chart2.PowerScaling";
+constexpr OUString lcl_aServiceName_Logarithmic = u"com.sun.star.chart2.LogarithmicScaling"_ustr;
+constexpr OUString lcl_aServiceName_Exponential = u"com.sun.star.chart2.ExponentialScaling"_ustr;
+constexpr OUString lcl_aServiceName_Linear = u"com.sun.star.chart2.LinearScaling"_ustr;
+constexpr OUString lcl_aServiceName_Power = u"com.sun.star.chart2.PowerScaling"_ustr;
}
diff --git a/chart2/source/tools/SceneProperties.cxx b/chart2/source/tools/SceneProperties.cxx
index 9d5746ef649d..eb65d81c94db 100644
--- a/chart2/source/tools/SceneProperties.cxx
+++ b/chart2/source/tools/SceneProperties.cxx
@@ -18,6 +18,7 @@
*/
#include <SceneProperties.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/drawing/HomogenMatrix.hpp>
@@ -276,13 +277,13 @@ void SceneProperties::AddDefaultsToMap(
aMtx.Line4.Column1 = aMtx.Line4.Column2 = aMtx.Line4.Column3 = 0.0;
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_TRANSF_MATRIX, aMtx );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_SCENE_DISTANCE, 4200 );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_SCENE_FOCAL_LENGTH, 8000 );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_DISTANCE, sal_Int32(4200) );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_FOCAL_LENGTH, sal_Int32(8000) );
// PROP_SCENE_SHADOW_SLANT;
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_SHADE_MODE, drawing::ShadeMode_SMOOTH );
- ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >(
+ ::chart::PropertyHelper::setPropertyValueDefault(
rOutMap, PROP_SCENE_AMBIENT_COLOR, ChartTypeHelper::getDefaultAmbientLightColor(false,nullptr));
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_TWO_SIDED_LIGHTING, true );
diff --git a/chart2/source/tools/StatisticsHelper.cxx b/chart2/source/tools/StatisticsHelper.cxx
index c8fad963deab..5f3bbdf802d6 100644
--- a/chart2/source/tools/StatisticsHelper.cxx
+++ b/chart2/source/tools/StatisticsHelper.cxx
@@ -18,19 +18,19 @@
*/
#include <StatisticsHelper.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <ErrorBar.hxx>
#include <unonames.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/processfactory.hxx>
-#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/data/LabeledDataSequence.hpp>
#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <cmath>
#include <limits>
@@ -69,7 +69,7 @@ double lcl_getVariance( const Sequence< double > & rData, sal_Int32 & rOutValidC
return (fQuadSum - fSum*fSum/fN) / fN;
}
-Reference< chart2::data::XLabeledDataSequence > lcl_getErrorBarLabeledSequence(
+uno::Reference< chart2::data::XLabeledDataSequence > lcl_getErrorBarLabeledSequence(
const Reference< chart2::data::XDataSource > & xDataSource,
bool bPositiveValue, bool bYError,
OUString & rOutRoleNameUsed )
@@ -81,8 +81,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getErrorBarLabeledSequence(
aRole.append( 'x');
OUString aPlainRole = aRole.makeStringAndClear();
- aRole.append( aPlainRole );
- aRole.append( '-' );
+ aRole.append( aPlainRole + "-" );
if( bPositiveValue )
aRole.append( "positive" );
@@ -90,14 +89,14 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getErrorBarLabeledSequence(
aRole.append( "negative" );
OUString aLongRole = aRole.makeStringAndClear();
- Reference< chart2::data::XLabeledDataSequence > xLSeq(
- ::chart::DataSeriesHelper::getDataSequenceByRole( xDataSource, aLongRole ));
+ uno::Reference< chart2::data::XLabeledDataSequence > xLSeq =
+ ::chart::DataSeriesHelper::getDataSequenceByRole( xDataSource, aLongRole );
// try role without "-negative" or "-positive" postfix
if( xLSeq.is())
rOutRoleNameUsed = aLongRole;
else
{
- xLSeq.set( ::chart::DataSeriesHelper::getDataSequenceByRole( xDataSource, aPlainRole ));
+ xLSeq = ::chart::DataSeriesHelper::getDataSequenceByRole( xDataSource, aPlainRole );
if( xLSeq.is())
rOutRoleNameUsed = aPlainRole;
else
@@ -144,7 +143,7 @@ void lcl_setXMLRangePropertyAtDataSequence(
{
try
{
- static const OUStringLiteral aXMLRangePropName( u"CachedXMLRange");
+ static constexpr OUString aXMLRangePropName( u"CachedXMLRange"_ustr);
Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY_THROW );
Reference< beans::XPropertySetInfo > xInfo( xProp->getPropertySetInfo());
if( xInfo.is() && xInfo->hasPropertyByName( aXMLRangePropName ))
@@ -188,20 +187,20 @@ double StatisticsHelper::getStandardError( const Sequence< double > & rData )
return sqrt( fVar ) / sqrt( double(nValCount) );
}
-Reference< chart2::data::XLabeledDataSequence > StatisticsHelper::getErrorLabeledDataSequenceFromDataSource(
+uno::Reference< chart2::data::XLabeledDataSequence > StatisticsHelper::getErrorLabeledDataSequenceFromDataSource(
const Reference< chart2::data::XDataSource > & xDataSource,
bool bPositiveValue,
bool bYError /* = true */ )
{
- Reference< chart2::data::XLabeledDataSequence > xResult;
+ uno::Reference< chart2::data::XLabeledDataSequence > xResult;
if( !xDataSource.is())
return xResult;
OUString aRole;
- Reference< chart2::data::XLabeledDataSequence > xLSeq(
- lcl_getErrorBarLabeledSequence( xDataSource, bPositiveValue, bYError, aRole ));
+ uno::Reference< chart2::data::XLabeledDataSequence > xLSeq =
+ lcl_getErrorBarLabeledSequence( xDataSource, bPositiveValue, bYError, aRole );
if( xLSeq.is())
- xResult.set( xLSeq );
+ xResult = xLSeq;
return xResult;
}
@@ -211,10 +210,10 @@ Reference< chart2::data::XDataSequence > StatisticsHelper::getErrorDataSequenceF
bool bPositiveValue,
bool bYError /* = true */ )
{
- Reference< chart2::data::XLabeledDataSequence > xLSeq(
+ uno::Reference< chart2::data::XLabeledDataSequence > xLSeq =
StatisticsHelper::getErrorLabeledDataSequenceFromDataSource(
xDataSource, bPositiveValue,
- bYError ));
+ bYError );
if( !xLSeq.is())
return Reference< chart2::data::XDataSequence >();
@@ -281,18 +280,17 @@ void StatisticsHelper::setErrorDataSequence(
}
Reference< beans::XPropertySet > StatisticsHelper::addErrorBars(
- const Reference< chart2::XDataSeries > & xDataSeries,
+ const rtl::Reference< DataSeries > & xDataSeries,
sal_Int32 nStyle,
bool bYError /* = true */ )
{
Reference< beans::XPropertySet > xErrorBar;
- Reference< beans::XPropertySet > xSeriesProp( xDataSeries, uno::UNO_QUERY );
- if( !xSeriesProp.is())
+ if( !xDataSeries.is())
return xErrorBar;
const OUString aPropName(
- bYError ? OUString(CHART_UNONAME_ERRORBAR_Y) : OUString(CHART_UNONAME_ERRORBAR_X));
- if( !( xSeriesProp->getPropertyValue( aPropName ) >>= xErrorBar ) ||
+ bYError ? CHART_UNONAME_ERRORBAR_Y : CHART_UNONAME_ERRORBAR_X);
+ if( !( xDataSeries->getPropertyValue( aPropName ) >>= xErrorBar ) ||
!xErrorBar.is())
{
xErrorBar.set( new ErrorBar );
@@ -304,28 +302,27 @@ Reference< beans::XPropertySet > StatisticsHelper::addErrorBars(
xErrorBar->setPropertyValue( "ErrorBarStyle", uno::Any( nStyle ));
}
- xSeriesProp->setPropertyValue( aPropName, uno::Any( xErrorBar ));
+ xDataSeries->setPropertyValue( aPropName, uno::Any( xErrorBar ));
return xErrorBar;
}
Reference< beans::XPropertySet > StatisticsHelper::getErrorBars(
- const Reference< chart2::XDataSeries > & xDataSeries,
+ const rtl::Reference< DataSeries > & xDataSeries,
bool bYError /* = true */ )
{
- Reference< beans::XPropertySet > xSeriesProp( xDataSeries, uno::UNO_QUERY );
Reference< beans::XPropertySet > xErrorBar;
const OUString aPropName(
- bYError ? OUString(CHART_UNONAME_ERRORBAR_Y) : OUString(CHART_UNONAME_ERRORBAR_X));
+ bYError ? CHART_UNONAME_ERRORBAR_Y : CHART_UNONAME_ERRORBAR_X);
- if ( xSeriesProp.is())
- xSeriesProp->getPropertyValue( aPropName ) >>= xErrorBar;
+ if ( xDataSeries.is())
+ xDataSeries->getPropertyValue( aPropName ) >>= xErrorBar;
return xErrorBar;
}
bool StatisticsHelper::hasErrorBars(
- const Reference< chart2::XDataSeries > & xDataSeries,
+ const rtl::Reference< DataSeries > & xDataSeries,
bool bYError /* = true */ )
{
Reference< beans::XPropertySet > xErrorBar( getErrorBars( xDataSeries, bYError ));
@@ -337,7 +334,7 @@ bool StatisticsHelper::hasErrorBars(
}
void StatisticsHelper::removeErrorBars(
- const Reference< chart2::XDataSeries > & xDataSeries,
+ const rtl::Reference< DataSeries > & xDataSeries,
bool bYError /* = true */ )
{
Reference< beans::XPropertySet > xErrorBar( getErrorBars( xDataSeries, bYError ));
@@ -347,7 +344,7 @@ void StatisticsHelper::removeErrorBars(
}
bool StatisticsHelper::usesErrorBarRanges(
- const Reference< chart2::XDataSeries > & xDataSeries,
+ const rtl::Reference< DataSeries > & xDataSeries,
bool bYError /* = true */ )
{
Reference< beans::XPropertySet > xErrorBar( getErrorBars( xDataSeries, bYError ));
diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx
index 0903459606bb..47fa8bb49317 100644
--- a/chart2/source/tools/ThreeDHelper.cxx
+++ b/chart2/source/tools/ThreeDHelper.cxx
@@ -17,19 +17,16 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <basegfx/numeric/ftools.hxx>
#include <ThreeDHelper.hxx>
-#include <DiagramHelper.hxx>
+#include <Diagram.hxx>
#include <ChartTypeHelper.hxx>
-#include <BaseGFXHelper.hxx>
+#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
#include <defines.hxx>
-#include <editeng/unoprnms.hxx>
-#include <com/sun/star/beans/XPropertyState.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
-#include <com/sun/star/drawing/ShadeMode.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/helpers.hxx>
#include <rtl/math.hxx>
@@ -46,17 +43,16 @@ using ::rtl::math::tan;
namespace
{
-bool lcl_isRightAngledAxesSetAndSupported( const Reference< beans::XPropertySet >& xSceneProperties )
+bool lcl_isRightAngledAxesSetAndSupported( const rtl::Reference< Diagram >& xDiagram )
{
- if( xSceneProperties.is() )
+ if( xDiagram.is() )
{
bool bRightAngledAxes = false;
- xSceneProperties->getPropertyValue( "RightAngledAxes") >>= bRightAngledAxes;
+ xDiagram->getPropertyValue( "RightAngledAxes") >>= bRightAngledAxes;
if(bRightAngledAxes)
{
- uno::Reference< chart2::XDiagram > xDiagram( xSceneProperties, uno::UNO_QUERY );
if( ChartTypeHelper::isSupportingRightAngledAxes(
- DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) ) )
+ xDiagram->getChartTypeByIndex( 0 ) ) )
{
return true;
}
@@ -65,235 +61,6 @@ bool lcl_isRightAngledAxesSetAndSupported( const Reference< beans::XPropertySet
return false;
}
-void lcl_RotateLightSource( const Reference< beans::XPropertySet >& xSceneProperties
- , const OUString& rLightSourceDirection
- , const OUString& rLightSourceOn
- , const ::basegfx::B3DHomMatrix& rRotationMatrix )
-{
- if( !xSceneProperties.is() )
- return;
-
- bool bLightOn = false;
- if( !(xSceneProperties->getPropertyValue( rLightSourceOn ) >>= bLightOn) )
- return;
-
- if( bLightOn )
- {
- drawing::Direction3D aLight;
- if( xSceneProperties->getPropertyValue( rLightSourceDirection ) >>= aLight )
- {
- ::basegfx::B3DVector aLightVector( BaseGFXHelper::Direction3DToB3DVector( aLight ) );
- aLightVector = rRotationMatrix*aLightVector;
-
- xSceneProperties->setPropertyValue( rLightSourceDirection
- , uno::Any( BaseGFXHelper::B3DVectorToDirection3D( aLightVector ) ) );
- }
- }
-}
-
-void lcl_rotateLights( const ::basegfx::B3DHomMatrix& rLightRottion, const Reference< beans::XPropertySet >& xSceneProperties )
-{
- if(!xSceneProperties.is())
- return;
-
- ::basegfx::B3DHomMatrix aLightRottion( rLightRottion );
- BaseGFXHelper::ReduceToRotationMatrix( aLightRottion );
-
- lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection1", "D3DSceneLightOn1", aLightRottion );
- lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection2", "D3DSceneLightOn2", aLightRottion );
- lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection3", "D3DSceneLightOn3", aLightRottion );
- lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection4", "D3DSceneLightOn4", aLightRottion );
- lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection5", "D3DSceneLightOn5", aLightRottion );
- lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection6", "D3DSceneLightOn6", aLightRottion );
- lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection7", "D3DSceneLightOn7", aLightRottion );
- lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection8", "D3DSceneLightOn8", aLightRottion );
-}
-
-::basegfx::B3DHomMatrix lcl_getInverseRotationMatrix( const Reference< beans::XPropertySet >& xSceneProperties )
-{
- ::basegfx::B3DHomMatrix aInverseRotation;
- double fXAngleRad=0.0;
- double fYAngleRad=0.0;
- double fZAngleRad=0.0;
- ThreeDHelper::getRotationAngleFromDiagram(
- xSceneProperties, fXAngleRad, fYAngleRad, fZAngleRad );
- aInverseRotation.rotate( 0.0, 0.0, -fZAngleRad );
- aInverseRotation.rotate( 0.0, -fYAngleRad, 0.0 );
- aInverseRotation.rotate( -fXAngleRad, 0.0, 0.0 );
- return aInverseRotation;
-}
-
-::basegfx::B3DHomMatrix lcl_getCompleteRotationMatrix( const Reference< beans::XPropertySet >& xSceneProperties )
-{
- ::basegfx::B3DHomMatrix aCompleteRotation;
- double fXAngleRad=0.0;
- double fYAngleRad=0.0;
- double fZAngleRad=0.0;
- ThreeDHelper::getRotationAngleFromDiagram(
- xSceneProperties, fXAngleRad, fYAngleRad, fZAngleRad );
- aCompleteRotation.rotate( fXAngleRad, fYAngleRad, fZAngleRad );
- return aCompleteRotation;
-}
-
-bool lcl_isEqual( const drawing::Direction3D& rA, const drawing::Direction3D& rB )
-{
- return ::rtl::math::approxEqual(rA.DirectionX, rB.DirectionX)
- && ::rtl::math::approxEqual(rA.DirectionY, rB.DirectionY)
- && ::rtl::math::approxEqual(rA.DirectionZ, rB.DirectionZ);
-}
-
-bool lcl_isLightScheme( const uno::Reference< beans::XPropertySet >& xDiagramProps, bool bRealistic )
-{
- if(!xDiagramProps.is())
- return false;
-
- bool bIsOn = false;
- xDiagramProps->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_2 ) >>= bIsOn;
- if(!bIsOn)
- return false;
-
- uno::Reference< chart2::XDiagram > xDiagram( xDiagramProps, uno::UNO_QUERY );
- uno::Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) );
-
- sal_Int32 nColor = 0;
- xDiagramProps->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_2 ) >>= nColor;
- if( nColor != ::chart::ChartTypeHelper::getDefaultDirectLightColor( !bRealistic, xChartType ) )
- return false;
-
- sal_Int32 nAmbientColor = 0;
- xDiagramProps->getPropertyValue( UNO_NAME_3D_SCENE_AMBIENTCOLOR ) >>= nAmbientColor;
- if( nAmbientColor != ::chart::ChartTypeHelper::getDefaultAmbientLightColor( !bRealistic, xChartType ) )
- return false;
-
- drawing::Direction3D aDirection(0,0,0);
- xDiagramProps->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_2 ) >>= aDirection;
-
- drawing::Direction3D aDefaultDirection( bRealistic
- ? ChartTypeHelper::getDefaultRealisticLightDirection(xChartType)
- : ChartTypeHelper::getDefaultSimpleLightDirection(xChartType) );
-
- //rotate default light direction when right angled axes are off but supported
- {
- bool bRightAngledAxes = false;
- xDiagramProps->getPropertyValue( "RightAngledAxes") >>= bRightAngledAxes;
- if(!bRightAngledAxes)
- {
- if( ChartTypeHelper::isSupportingRightAngledAxes(
- DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) ) )
- {
- ::basegfx::B3DHomMatrix aRotation( lcl_getCompleteRotationMatrix( xDiagramProps ) );
- BaseGFXHelper::ReduceToRotationMatrix( aRotation );
- ::basegfx::B3DVector aLightVector( BaseGFXHelper::Direction3DToB3DVector( aDefaultDirection ) );
- aLightVector = aRotation*aLightVector;
- aDefaultDirection = BaseGFXHelper::B3DVectorToDirection3D( aLightVector );
- }
- }
- }
-
- return lcl_isEqual( aDirection, aDefaultDirection );
-}
-
-bool lcl_isRealisticLightScheme( const uno::Reference< beans::XPropertySet >& xDiagramProps )
-{
- return lcl_isLightScheme( xDiagramProps, true /*bRealistic*/ );
-}
-bool lcl_isSimpleLightScheme( const uno::Reference< beans::XPropertySet >& xDiagramProps )
-{
- return lcl_isLightScheme( xDiagramProps, false /*bRealistic*/ );
-}
-void lcl_setLightsForScheme( const uno::Reference< beans::XPropertySet >& xDiagramProps, const ThreeDLookScheme& rScheme )
-{
- if(!xDiagramProps.is())
- return;
- if( rScheme == ThreeDLookScheme::ThreeDLookScheme_Unknown)
- return;
-
- xDiagramProps->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_2, uno::Any( true ) );
-
- uno::Reference< chart2::XDiagram > xDiagram( xDiagramProps, uno::UNO_QUERY );
- uno::Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) );
- uno::Any aADirection( rScheme == ThreeDLookScheme::ThreeDLookScheme_Simple
- ? ChartTypeHelper::getDefaultSimpleLightDirection(xChartType)
- : ChartTypeHelper::getDefaultRealisticLightDirection(xChartType) );
-
- xDiagramProps->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_2, aADirection );
- //rotate light direction when right angled axes are off but supported
- {
- bool bRightAngledAxes = false;
- xDiagramProps->getPropertyValue( "RightAngledAxes") >>= bRightAngledAxes;
- if(!bRightAngledAxes)
- {
- if( ChartTypeHelper::isSupportingRightAngledAxes( xChartType ) )
- {
- ::basegfx::B3DHomMatrix aRotation( lcl_getCompleteRotationMatrix( xDiagramProps ) );
- BaseGFXHelper::ReduceToRotationMatrix( aRotation );
- lcl_RotateLightSource( xDiagramProps, "D3DSceneLightDirection2", "D3DSceneLightOn2", aRotation );
- }
- }
- }
-
- sal_Int32 nColor = ::chart::ChartTypeHelper::getDefaultDirectLightColor(
- rScheme == ThreeDLookScheme::ThreeDLookScheme_Simple, xChartType);
- xDiagramProps->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_2, uno::Any( nColor ) );
-
- sal_Int32 nAmbientColor = ::chart::ChartTypeHelper::getDefaultAmbientLightColor(
- rScheme == ThreeDLookScheme::ThreeDLookScheme_Simple, xChartType);
- xDiagramProps->setPropertyValue( UNO_NAME_3D_SCENE_AMBIENTCOLOR, uno::Any( nAmbientColor ) );
-}
-
-bool lcl_isRealisticScheme( drawing::ShadeMode aShadeMode
- , sal_Int32 nRoundedEdges
- , sal_Int32 nObjectLines )
-{
- if(aShadeMode!=drawing::ShadeMode_SMOOTH)
- return false;
- if(nRoundedEdges!=5)
- return false;
- if(nObjectLines!=0)
- return false;
- return true;
-}
-
-bool lcl_isSimpleScheme( drawing::ShadeMode aShadeMode
- , sal_Int32 nRoundedEdges
- , sal_Int32 nObjectLines
- , const uno::Reference< XDiagram >& xDiagram )
-{
- if(aShadeMode!=drawing::ShadeMode_FLAT)
- return false;
- if(nRoundedEdges!=0)
- return false;
- if(nObjectLines==0)
- {
- uno::Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) );
- return ChartTypeHelper::noBordersForSimpleScheme( xChartType );
- }
- if(nObjectLines!=1)
- return false;
- return true;
-}
-
-void lcl_setRealisticScheme( drawing::ShadeMode& rShadeMode
- , sal_Int32& rnRoundedEdges
- , sal_Int32& rnObjectLines )
-{
- rShadeMode = drawing::ShadeMode_SMOOTH;
- rnRoundedEdges = 5;
- rnObjectLines = 0;
-}
-
-void lcl_setSimpleScheme( drawing::ShadeMode& rShadeMode
- , sal_Int32& rnRoundedEdges
- , sal_Int32& rnObjectLines
- , const uno::Reference< XDiagram >& xDiagram )
-{
- rShadeMode = drawing::ShadeMode_FLAT;
- rnRoundedEdges = 0;
-
- uno::Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) );
- rnObjectLines = ChartTypeHelper::noBordersForSimpleScheme( xChartType ) ? 0 : 1;
-}
-
} //end anonymous namespace
drawing::CameraGeometry ThreeDHelper::getDefaultCameraGeometry( bool bPie )
@@ -318,60 +85,6 @@ drawing::CameraGeometry ThreeDHelper::getDefaultCameraGeometry( bool bPie )
namespace
{
-::basegfx::B3DHomMatrix lcl_getCameraMatrix( const uno::Reference< beans::XPropertySet >& xSceneProperties )
-{
- drawing::HomogenMatrix aCameraMatrix;
-
- drawing::CameraGeometry aCG( ThreeDHelper::getDefaultCameraGeometry() );
- if( xSceneProperties.is() )
- xSceneProperties->getPropertyValue( "D3DCameraGeometry" ) >>= aCG;
-
- ::basegfx::B3DVector aVPN( BaseGFXHelper::Direction3DToB3DVector( aCG.vpn ) );
- ::basegfx::B3DVector aVUP( BaseGFXHelper::Direction3DToB3DVector( aCG.vup ) );
-
- //normalize vectors:
- aVPN.normalize();
- aVUP.normalize();
-
- ::basegfx::B3DVector aCross = ::basegfx::cross( aVUP, aVPN );
-
- //first line is VUP x VPN
- aCameraMatrix.Line1.Column1 = aCross[0];
- aCameraMatrix.Line1.Column2 = aCross[1];
- aCameraMatrix.Line1.Column3 = aCross[2];
- aCameraMatrix.Line1.Column4 = 0.0;
-
- //second line is VUP
- aCameraMatrix.Line2.Column1 = aVUP[0];
- aCameraMatrix.Line2.Column2 = aVUP[1];
- aCameraMatrix.Line2.Column3 = aVUP[2];
- aCameraMatrix.Line2.Column4 = 0.0;
-
- //third line is VPN
- aCameraMatrix.Line3.Column1 = aVPN[0];
- aCameraMatrix.Line3.Column2 = aVPN[1];
- aCameraMatrix.Line3.Column3 = aVPN[2];
- aCameraMatrix.Line3.Column4 = 0.0;
-
- //fourth line is 0 0 0 1
- aCameraMatrix.Line4.Column1 = 0.0;
- aCameraMatrix.Line4.Column2 = 0.0;
- aCameraMatrix.Line4.Column3 = 0.0;
- aCameraMatrix.Line4.Column4 = 1.0;
-
- return BaseGFXHelper::HomogenMatrixToB3DHomMatrix( aCameraMatrix );
-}
-
-double lcl_shiftAngleToIntervalMinusPiToPi( double fAngleRad )
-{
- //valid range: ]-Pi,Pi]
- while( fAngleRad<=-M_PI )
- fAngleRad+=(2*M_PI);
- while( fAngleRad>M_PI )
- fAngleRad-=(2*M_PI);
- return fAngleRad;
-}
-
void lcl_ensureIntervalMinus1To1( double& rSinOrCos )
{
if (rSinOrCos < -1.0)
@@ -890,172 +603,6 @@ void ThreeDHelper::adaptRadAnglesForRightAngledAxes( double& rfXAngleRad, double
rfYAngleRad = ThreeDHelper::getValueClippedToRange(rfYAngleRad, basegfx::deg2rad(ThreeDHelper::getYDegreeAngleLimitForRightAngledAxes()) );
}
-void ThreeDHelper::getRotationAngleFromDiagram(
- const Reference< beans::XPropertySet >& xSceneProperties, double& rfXAngleRad, double& rfYAngleRad, double& rfZAngleRad )
-{
- //takes the camera and the transformation matrix into account
-
- rfXAngleRad = rfYAngleRad = rfZAngleRad = 0.0;
-
- if( !xSceneProperties.is() )
- return;
-
- //get camera rotation
- ::basegfx::B3DHomMatrix aFixCameraRotationMatrix( lcl_getCameraMatrix( xSceneProperties ) );
- BaseGFXHelper::ReduceToRotationMatrix( aFixCameraRotationMatrix );
-
- //get scene rotation
- ::basegfx::B3DHomMatrix aSceneRotation;
- {
- drawing::HomogenMatrix aHomMatrix;
- if( xSceneProperties->getPropertyValue( "D3DTransformMatrix") >>= aHomMatrix )
- {
- aSceneRotation = BaseGFXHelper::HomogenMatrixToB3DHomMatrix( aHomMatrix );
- BaseGFXHelper::ReduceToRotationMatrix( aSceneRotation );
- }
- }
-
- ::basegfx::B3DHomMatrix aResultRotation = aFixCameraRotationMatrix * aSceneRotation;
- ::basegfx::B3DTuple aRotation( BaseGFXHelper::GetRotationFromMatrix( aResultRotation ) );
-
- rfXAngleRad = lcl_shiftAngleToIntervalMinusPiToPi(aRotation.getX());
- rfYAngleRad = lcl_shiftAngleToIntervalMinusPiToPi(aRotation.getY());
- rfZAngleRad = lcl_shiftAngleToIntervalMinusPiToPi(aRotation.getZ());
-
- if(rfZAngleRad<-M_PI_2 || rfZAngleRad>M_PI_2)
- {
- rfZAngleRad-=M_PI;
- rfXAngleRad-=M_PI;
- rfYAngleRad=(M_PI-rfYAngleRad);
-
- rfXAngleRad = lcl_shiftAngleToIntervalMinusPiToPi(rfXAngleRad);
- rfYAngleRad = lcl_shiftAngleToIntervalMinusPiToPi(rfYAngleRad);
- rfZAngleRad = lcl_shiftAngleToIntervalMinusPiToPi(rfZAngleRad);
- }
-}
-
-void ThreeDHelper::switchRightAngledAxes( const Reference< beans::XPropertySet >& xSceneProperties, bool bRightAngledAxes )
-{
- try
- {
- if( xSceneProperties.is() )
- {
- bool bOldRightAngledAxes = false;
- xSceneProperties->getPropertyValue( "RightAngledAxes") >>= bOldRightAngledAxes;
- if( bOldRightAngledAxes!=bRightAngledAxes)
- {
- xSceneProperties->setPropertyValue( "RightAngledAxes", uno::Any( bRightAngledAxes ));
- if(bRightAngledAxes)
- {
- ::basegfx::B3DHomMatrix aInverseRotation( lcl_getInverseRotationMatrix( xSceneProperties ) );
- lcl_rotateLights( aInverseRotation, xSceneProperties );
- }
- else
- {
- ::basegfx::B3DHomMatrix aCompleteRotation( lcl_getCompleteRotationMatrix( xSceneProperties ) );
- lcl_rotateLights( aCompleteRotation, xSceneProperties );
- }
- }
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-}
-
-void ThreeDHelper::setRotationAngleToDiagram(
- const Reference< beans::XPropertySet >& xSceneProperties
- , double fXAngleRad, double fYAngleRad, double fZAngleRad )
-{
- //the rotation of the camera is not touched but taken into account
- //the rotation difference is applied to the transformation matrix
-
- //the light sources will be adapted also
-
- if( !xSceneProperties.is() )
- return;
-
- try
- {
- //remind old rotation for adaptation of light directions
- ::basegfx::B3DHomMatrix aInverseOldRotation( lcl_getInverseRotationMatrix( xSceneProperties ) );
-
- ::basegfx::B3DHomMatrix aInverseCameraRotation;
- {
- ::basegfx::B3DTuple aR( BaseGFXHelper::GetRotationFromMatrix(
- lcl_getCameraMatrix( xSceneProperties ) ) );
- aInverseCameraRotation.rotate( 0.0, 0.0, -aR.getZ() );
- aInverseCameraRotation.rotate( 0.0, -aR.getY(), 0.0 );
- aInverseCameraRotation.rotate( -aR.getX(), 0.0, 0.0 );
- }
-
- ::basegfx::B3DHomMatrix aCumulatedRotation;
- aCumulatedRotation.rotate( fXAngleRad, fYAngleRad, fZAngleRad );
-
- //calculate new scene matrix
- ::basegfx::B3DHomMatrix aSceneRotation = aInverseCameraRotation*aCumulatedRotation;
- BaseGFXHelper::ReduceToRotationMatrix( aSceneRotation );
-
- //set new rotation to transformation matrix
- xSceneProperties->setPropertyValue(
- "D3DTransformMatrix", uno::Any( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aSceneRotation )));
-
- //rotate lights if RightAngledAxes are not set or not supported
- bool bRightAngledAxes = false;
- xSceneProperties->getPropertyValue( "RightAngledAxes") >>= bRightAngledAxes;
- uno::Reference< chart2::XDiagram > xDiagram( xSceneProperties, uno::UNO_QUERY );
- if(!bRightAngledAxes || !ChartTypeHelper::isSupportingRightAngledAxes(
- DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) ) )
- {
- ::basegfx::B3DHomMatrix aNewRotation;
- aNewRotation.rotate( fXAngleRad, fYAngleRad, fZAngleRad );
- lcl_rotateLights( aNewRotation*aInverseOldRotation, xSceneProperties );
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-}
-
-void ThreeDHelper::getRotationFromDiagram( const uno::Reference< beans::XPropertySet >& xSceneProperties
- , sal_Int32& rnHorizontalAngleDegree, sal_Int32& rnVerticalAngleDegree )
-{
- double fXAngle, fYAngle, fZAngle;
- ThreeDHelper::getRotationAngleFromDiagram( xSceneProperties, fXAngle, fYAngle, fZAngle );
-
- if( !lcl_isRightAngledAxesSetAndSupported( xSceneProperties ) )
- {
- ThreeDHelper::convertXYZAngleRadToElevationRotationDeg(
- rnHorizontalAngleDegree, rnVerticalAngleDegree, fXAngle, fYAngle, fZAngle);
- rnVerticalAngleDegree*=-1;
- }
- else
- {
- rnHorizontalAngleDegree = basegfx::fround(basegfx::rad2deg(fXAngle));
- rnVerticalAngleDegree = basegfx::fround(-1.0 * basegfx::rad2deg(fYAngle));
- // nZRotation = basegfx::fround(-1.0 * basegfx::rad2deg(fZAngle));
- }
-
- rnHorizontalAngleDegree = NormAngle180(rnHorizontalAngleDegree);
- rnVerticalAngleDegree = NormAngle180(rnVerticalAngleDegree);
-}
-
-void ThreeDHelper::setRotationToDiagram( const uno::Reference< beans::XPropertySet >& xSceneProperties
- , sal_Int32 nHorizontalAngleDegree, sal_Int32 nVerticalYAngleDegree )
-{
- //todo: x and y is not equal to horz and vert in case of RightAngledAxes==false
- double fXAngle = basegfx::deg2rad(nHorizontalAngleDegree);
- double fYAngle = basegfx::deg2rad(-1 * nVerticalYAngleDegree);
- double fZAngle = 0.0;
-
- if( !lcl_isRightAngledAxesSetAndSupported( xSceneProperties ) )
- ThreeDHelper::convertElevationRotationDegToXYZAngleRad(
- nHorizontalAngleDegree, -1*nVerticalYAngleDegree, fXAngle, fYAngle, fZAngle );
-
- ThreeDHelper::setRotationAngleToDiagram( xSceneProperties, fXAngle, fYAngle, fZAngle );
-}
void ThreeDHelper::getCameraDistanceRange( double& rfMinimumDistance, double& rfMaximumDistance )
{
@@ -1073,57 +620,6 @@ void ThreeDHelper::ensureCameraDistanceRange( double& rfCameraDistance )
rfCameraDistance = fMax;
}
-double ThreeDHelper::getCameraDistance(
- const Reference< beans::XPropertySet >& xSceneProperties )
-{
- double fCameraDistance = FIXED_SIZE_FOR_3D_CHART_VOLUME;
-
- if( !xSceneProperties.is() )
- return fCameraDistance;
-
- try
- {
- drawing::CameraGeometry aCG( ThreeDHelper::getDefaultCameraGeometry() );
- xSceneProperties->getPropertyValue( "D3DCameraGeometry" ) >>= aCG;
- ::basegfx::B3DVector aVRP( BaseGFXHelper::Position3DToB3DVector( aCG.vrp ) );
- fCameraDistance = aVRP.getLength();
-
- ensureCameraDistanceRange( fCameraDistance );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
- return fCameraDistance;
-}
-
-void ThreeDHelper::setCameraDistance(
- const Reference< beans::XPropertySet >& xSceneProperties, double fCameraDistance )
-{
- if( !xSceneProperties.is() )
- return;
-
- try
- {
- if( fCameraDistance <= 0 )
- fCameraDistance = FIXED_SIZE_FOR_3D_CHART_VOLUME;
-
- drawing::CameraGeometry aCG( ThreeDHelper::getDefaultCameraGeometry() );
- xSceneProperties->getPropertyValue( "D3DCameraGeometry" ) >>= aCG;
- ::basegfx::B3DVector aVRP( BaseGFXHelper::Position3DToB3DVector( aCG.vrp ) );
- if( ::basegfx::fTools::equalZero( aVRP.getLength() ) )
- aVRP = ::basegfx::B3DVector(0,0,1);
- aVRP.setLength(fCameraDistance);
- aCG.vrp = BaseGFXHelper::B3DVectorToPosition3D( aVRP );
-
- xSceneProperties->setPropertyValue( "D3DCameraGeometry", uno::Any( aCG ));
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-}
-
double ThreeDHelper::CameraDistanceToPerspective( double fCameraDistance )
{
double fMin, fMax;
@@ -1152,142 +648,8 @@ double ThreeDHelper::PerspectiveToCameraDistance( double fPerspective )
return fRet;
}
-ThreeDLookScheme ThreeDHelper::detectScheme( const uno::Reference< XDiagram >& xDiagram )
-{
- ThreeDLookScheme aScheme = ThreeDLookScheme::ThreeDLookScheme_Unknown;
-
- sal_Int32 nRoundedEdges;
- sal_Int32 nObjectLines;
- ThreeDHelper::getRoundedEdgesAndObjectLines( xDiagram, nRoundedEdges, nObjectLines );
-
- //get shade mode and light settings:
- drawing::ShadeMode aShadeMode( drawing::ShadeMode_SMOOTH );
- uno::Reference< beans::XPropertySet > xDiagramProps( xDiagram, uno::UNO_QUERY );
- try
- {
- if( xDiagramProps.is() )
- xDiagramProps->getPropertyValue( "D3DSceneShadeMode" )>>= aShadeMode;
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-
- if( lcl_isSimpleScheme( aShadeMode, nRoundedEdges, nObjectLines, xDiagram ) )
- {
- if( lcl_isSimpleLightScheme(xDiagramProps) )
- aScheme = ThreeDLookScheme::ThreeDLookScheme_Simple;
- }
- else if( lcl_isRealisticScheme( aShadeMode, nRoundedEdges, nObjectLines ) )
- {
- if( lcl_isRealisticLightScheme(xDiagramProps) )
- aScheme = ThreeDLookScheme::ThreeDLookScheme_Realistic;
- }
-
- return aScheme;
-}
-
-void ThreeDHelper::setScheme( const uno::Reference< XDiagram >& xDiagram, ThreeDLookScheme aScheme )
-{
- if( aScheme == ThreeDLookScheme::ThreeDLookScheme_Unknown )
- return;
-
- drawing::ShadeMode aShadeMode;
- sal_Int32 nRoundedEdges;
- sal_Int32 nObjectLines;
-
- if( aScheme == ThreeDLookScheme::ThreeDLookScheme_Simple )
- lcl_setSimpleScheme(aShadeMode,nRoundedEdges,nObjectLines,xDiagram);
- else
- lcl_setRealisticScheme(aShadeMode,nRoundedEdges,nObjectLines);
-
- try
- {
- ThreeDHelper::setRoundedEdgesAndObjectLines( xDiagram, nRoundedEdges, nObjectLines );
-
- uno::Reference< beans::XPropertySet > xProp( xDiagram, uno::UNO_QUERY );
- if( xProp.is() )
- {
- drawing::ShadeMode aOldShadeMode;
- if( ! ( (xProp->getPropertyValue( "D3DSceneShadeMode" )>>=aOldShadeMode) &&
- aOldShadeMode == aShadeMode ))
- {
- xProp->setPropertyValue( "D3DSceneShadeMode", uno::Any( aShadeMode ));
- }
- }
-
- lcl_setLightsForScheme( xProp, aScheme );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-
-}
-
-void ThreeDHelper::set3DSettingsToDefault( const uno::Reference< beans::XPropertySet >& xSceneProperties )
-{
- Reference< beans::XPropertyState > xState( xSceneProperties, uno::UNO_QUERY );
- if(xState.is())
- {
- xState->setPropertyToDefault( "D3DSceneDistance");
- xState->setPropertyToDefault( "D3DSceneFocalLength");
- }
- ThreeDHelper::setDefaultRotation( xSceneProperties );
- ThreeDHelper::setDefaultIllumination( xSceneProperties );
-}
-
-void ThreeDHelper::setDefaultRotation( const uno::Reference< beans::XPropertySet >& xSceneProperties, bool bPieOrDonut )
-{
- if( !xSceneProperties.is() )
- return;
-
- drawing::CameraGeometry aCameraGeo( ThreeDHelper::getDefaultCameraGeometry( bPieOrDonut ) );
- xSceneProperties->setPropertyValue( "D3DCameraGeometry", uno::Any( aCameraGeo ));
-
- ::basegfx::B3DHomMatrix aSceneRotation;
- if( bPieOrDonut )
- aSceneRotation.rotate( -M_PI/3.0, 0, 0 );
- xSceneProperties->setPropertyValue( "D3DTransformMatrix",
- uno::Any( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aSceneRotation )));
-}
-
-void ThreeDHelper::setDefaultRotation( const uno::Reference< beans::XPropertySet >& xSceneProperties )
-{
- bool bPieOrDonut( DiagramHelper::isPieOrDonutChart( uno::Reference< XDiagram >(xSceneProperties, uno::UNO_QUERY) ) );
- ThreeDHelper::setDefaultRotation( xSceneProperties, bPieOrDonut );
-}
-
-void ThreeDHelper::setDefaultIllumination( const uno::Reference< beans::XPropertySet >& xSceneProperties )
-{
- if( !xSceneProperties.is() )
- return;
-
- drawing::ShadeMode aShadeMode( drawing::ShadeMode_SMOOTH );
- try
- {
- xSceneProperties->getPropertyValue( "D3DSceneShadeMode" )>>= aShadeMode;
- xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_1, uno::Any( false ) );
- xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_3, uno::Any( false ) );
- xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_4, uno::Any( false ) );
- xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_5, uno::Any( false ) );
- xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_6, uno::Any( false ) );
- xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_7, uno::Any( false ) );
- xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_8, uno::Any( false ) );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-
- ThreeDLookScheme aScheme = (aShadeMode == drawing::ShadeMode_FLAT)
- ? ThreeDLookScheme::ThreeDLookScheme_Simple
- : ThreeDLookScheme::ThreeDLookScheme_Realistic;
- lcl_setLightsForScheme( xSceneProperties, aScheme );
-}
-
void ThreeDHelper::getRoundedEdgesAndObjectLines(
- const uno::Reference< XDiagram > & xDiagram
+ const rtl::Reference< Diagram > & xDiagram
, sal_Int32& rnRoundedEdges, sal_Int32& rnObjectLines )
{
rnRoundedEdges = -1;
@@ -1299,8 +661,8 @@ void ThreeDHelper::getRoundedEdgesAndObjectLines(
drawing::LineStyle aLineStyle( drawing::LineStyle_SOLID );
- std::vector< uno::Reference< XDataSeries > > aSeriesList(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesList =
+ xDiagram->getDataSeries();
sal_Int32 nSeriesCount = static_cast<sal_Int32>( aSeriesList.size() );
OUString aPercentDiagonalPropertyName( "PercentDiagonal" );
@@ -1308,8 +670,7 @@ void ThreeDHelper::getRoundedEdgesAndObjectLines(
for( sal_Int32 nS = 0; nS < nSeriesCount; ++nS )
{
- uno::Reference< XDataSeries > xSeries( aSeriesList[nS] );
- uno::Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xSeries( aSeriesList[nS] );
if(!nS)
{
rnRoundedEdges = 0;
@@ -1317,7 +678,7 @@ void ThreeDHelper::getRoundedEdgesAndObjectLines(
{
sal_Int16 nPercentDiagonal = 0;
- xProp->getPropertyValue( aPercentDiagonalPropertyName ) >>= nPercentDiagonal;
+ xSeries->getPropertyValue( aPercentDiagonalPropertyName ) >>= nPercentDiagonal;
rnRoundedEdges = static_cast< sal_Int32 >( nPercentDiagonal );
if( DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries
@@ -1331,7 +692,7 @@ void ThreeDHelper::getRoundedEdgesAndObjectLines(
}
try
{
- xProp->getPropertyValue( aBorderStylePropertyName ) >>= aLineStyle;
+ xSeries->getPropertyValue( aBorderStylePropertyName ) >>= aLineStyle;
if( DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries
, aBorderStylePropertyName, uno::Any(aLineStyle) ) )
@@ -1348,7 +709,7 @@ void ThreeDHelper::getRoundedEdgesAndObjectLines(
if( !bDifferentRoundedEdges )
{
sal_Int16 nPercentDiagonal = 0;
- xProp->getPropertyValue( aPercentDiagonalPropertyName ) >>= nPercentDiagonal;
+ xSeries->getPropertyValue( aPercentDiagonalPropertyName ) >>= nPercentDiagonal;
sal_Int32 nCurrentRoundedEdges = static_cast< sal_Int32 >( nPercentDiagonal );
if(nCurrentRoundedEdges!=rnRoundedEdges
|| DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries
@@ -1361,7 +722,7 @@ void ThreeDHelper::getRoundedEdgesAndObjectLines(
if( !bDifferentObjectLines )
{
drawing::LineStyle aCurrentLineStyle;
- xProp->getPropertyValue( aBorderStylePropertyName ) >>= aCurrentLineStyle;
+ xSeries->getPropertyValue( aBorderStylePropertyName ) >>= aCurrentLineStyle;
if(aCurrentLineStyle!=aLineStyle
|| DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries
, aBorderStylePropertyName, uno::Any(aLineStyle) ) )
@@ -1386,7 +747,7 @@ void ThreeDHelper::getRoundedEdgesAndObjectLines(
}
void ThreeDHelper::setRoundedEdgesAndObjectLines(
- const uno::Reference< XDiagram > & xDiagram
+ const rtl::Reference< Diagram > & xDiagram
, sal_Int32 nRoundedEdges, sal_Int32 nObjectLines )
{
if( (nRoundedEdges<0||nRoundedEdges>100) && nObjectLines!=0 && nObjectLines!=1 )
@@ -1399,13 +760,10 @@ void ThreeDHelper::setRoundedEdgesAndObjectLines(
uno::Any aALineStyle( aLineStyle);
uno::Any aARoundedEdges( static_cast< sal_Int16 >( nRoundedEdges ));
- std::vector< uno::Reference< XDataSeries > > aSeriesList(
- DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
- sal_Int32 nSeriesCount = static_cast<sal_Int32>( aSeriesList.size() );
- for( sal_Int32 nS = 0; nS < nSeriesCount; ++nS )
+ std::vector< rtl::Reference< DataSeries > > aSeriesList =
+ xDiagram->getDataSeries();
+ for( auto const& xSeries : aSeriesList)
{
- uno::Reference< XDataSeries > xSeries( aSeriesList[nS] );
-
if( nRoundedEdges>=0 && nRoundedEdges<=100 )
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "PercentDiagonal", aARoundedEdges );
@@ -1414,13 +772,13 @@ void ThreeDHelper::setRoundedEdgesAndObjectLines(
}
}
-CuboidPlanePosition ThreeDHelper::getAutomaticCuboidPlanePositionForStandardLeftWall( const Reference< beans::XPropertySet >& xSceneProperties )
+CuboidPlanePosition ThreeDHelper::getAutomaticCuboidPlanePositionForStandardLeftWall( const rtl::Reference< ::chart::Diagram >& xDiagram )
{
CuboidPlanePosition eRet(CuboidPlanePosition_Left);
double fXAngleRad=0.0; double fYAngleRad=0.0; double fZAngleRad=0.0;
- ThreeDHelper::getRotationAngleFromDiagram( xSceneProperties, fXAngleRad, fYAngleRad, fZAngleRad );
- if( lcl_isRightAngledAxesSetAndSupported( xSceneProperties ) )
+ xDiagram->getRotationAngle( fXAngleRad, fYAngleRad, fZAngleRad );
+ if( lcl_isRightAngledAxesSetAndSupported( xDiagram ) )
{
ThreeDHelper::adaptRadAnglesForRightAngledAxes( fXAngleRad, fYAngleRad );
}
@@ -1429,13 +787,13 @@ CuboidPlanePosition ThreeDHelper::getAutomaticCuboidPlanePositionForStandardLeft
return eRet;
}
-CuboidPlanePosition ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBackWall( const Reference< beans::XPropertySet >& xSceneProperties )
+CuboidPlanePosition ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBackWall( const rtl::Reference< Diagram >& xDiagram )
{
CuboidPlanePosition eRet(CuboidPlanePosition_Back);
double fXAngleRad=0.0; double fYAngleRad=0.0; double fZAngleRad=0.0;
- ThreeDHelper::getRotationAngleFromDiagram( xSceneProperties, fXAngleRad, fYAngleRad, fZAngleRad );
- if( lcl_isRightAngledAxesSetAndSupported( xSceneProperties ) )
+ xDiagram->getRotationAngle( fXAngleRad, fYAngleRad, fZAngleRad );
+ if( lcl_isRightAngledAxesSetAndSupported( xDiagram ) )
{
ThreeDHelper::adaptRadAnglesForRightAngledAxes( fXAngleRad, fYAngleRad );
}
@@ -1444,13 +802,13 @@ CuboidPlanePosition ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBack
return eRet;
}
-CuboidPlanePosition ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBottom( const Reference< beans::XPropertySet >& xSceneProperties )
+CuboidPlanePosition ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBottom( const rtl::Reference< Diagram >& xDiagram )
{
CuboidPlanePosition eRet(CuboidPlanePosition_Bottom);
double fXAngleRad=0.0; double fYAngleRad=0.0; double fZAngleRad=0.0;
- ThreeDHelper::getRotationAngleFromDiagram( xSceneProperties, fXAngleRad, fYAngleRad, fZAngleRad );
- if( lcl_isRightAngledAxesSetAndSupported( xSceneProperties ) )
+ xDiagram->getRotationAngle( fXAngleRad, fYAngleRad, fZAngleRad );
+ if( lcl_isRightAngledAxesSetAndSupported( xDiagram ) )
{
ThreeDHelper::adaptRadAnglesForRightAngledAxes( fXAngleRad, fYAngleRad );
}
diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx
index 0078e0a29a6c..e9f76c619985 100644
--- a/chart2/source/tools/TitleHelper.cxx
+++ b/chart2/source/tools/TitleHelper.cxx
@@ -18,16 +18,15 @@
*/
#include <TitleHelper.hxx>
+#include <Title.hxx>
#include <ChartModel.hxx>
-#include <ChartModelHelper.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
#include <ReferenceSizeProvider.hxx>
#include <com/sun/star/chart2/FormattedString.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <rtl/ustrbuf.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
namespace chart
@@ -41,7 +40,7 @@ namespace {
uno::Reference< XTitled > lcl_getTitleParentFromDiagram(
TitleHelper::eTitleType nTitleIndex
- , const uno::Reference< XDiagram >& xDiagram )
+ , const rtl::Reference< Diagram >& xDiagram )
{
uno::Reference< XTitled > xResult;
@@ -49,7 +48,7 @@ uno::Reference< XTitled > lcl_getTitleParentFromDiagram(
nTitleIndex == TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION )
{
bool bDummy = false;
- bool bIsVertical = DiagramHelper::getVertical( xDiagram, bDummy, bDummy );
+ bool bIsVertical = xDiagram && xDiagram->getVertical( bDummy, bDummy );
if( nTitleIndex == TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION )
nTitleIndex = bIsVertical ? TitleHelper::X_AXIS_TITLE : TitleHelper::Y_AXIS_TITLE;
@@ -61,27 +60,27 @@ uno::Reference< XTitled > lcl_getTitleParentFromDiagram(
{
case TitleHelper::SUB_TITLE:
if( xDiagram.is())
- xResult.set( xDiagram, uno::UNO_QUERY );
+ xResult = xDiagram;
break;
case TitleHelper::X_AXIS_TITLE:
if( xDiagram.is())
- xResult.set( AxisHelper::getAxis( 0, true, xDiagram ), uno::UNO_QUERY );
+ xResult = AxisHelper::getAxis( 0, true, xDiagram );
break;
case TitleHelper::Y_AXIS_TITLE:
if( xDiagram.is())
- xResult.set( AxisHelper::getAxis( 1, true, xDiagram ), uno::UNO_QUERY );
+ xResult = AxisHelper::getAxis( 1, true, xDiagram );
break;
case TitleHelper::Z_AXIS_TITLE:
if( xDiagram.is())
- xResult.set( AxisHelper::getAxis( 2, true, xDiagram ), uno::UNO_QUERY );
+ xResult = AxisHelper::getAxis( 2, true, xDiagram );
break;
case TitleHelper::SECONDARY_X_AXIS_TITLE:
if( xDiagram.is())
- xResult.set( AxisHelper::getAxis( 0, false, xDiagram ), uno::UNO_QUERY );
+ xResult = AxisHelper::getAxis( 0, false, xDiagram );
break;
case TitleHelper::SECONDARY_Y_AXIS_TITLE:
if( xDiagram.is())
- xResult.set( AxisHelper::getAxis( 1, false, xDiagram ), uno::UNO_QUERY );
+ xResult = AxisHelper::getAxis( 1, false, xDiagram );
break;
case TitleHelper::MAIN_TITLE:
@@ -94,7 +93,7 @@ uno::Reference< XTitled > lcl_getTitleParentFromDiagram(
}
uno::Reference< XTitled > lcl_getTitleParent( TitleHelper::eTitleType nTitleIndex
- , const uno::Reference< XDiagram >& xDiagram )
+ , const rtl::Reference< Diagram >& xDiagram )
{
uno::Reference< XTitled > xResult;
switch( nTitleIndex )
@@ -121,70 +120,72 @@ uno::Reference< XTitled > lcl_getTitleParent( TitleHelper::eTitleType nTitleInde
}
uno::Reference< XTitled > lcl_getTitleParent( TitleHelper::eTitleType nTitleIndex
- , const uno::Reference< frame::XModel >& xModel )
+ , const rtl::Reference<::chart::ChartModel>& xModel )
{
if(nTitleIndex == TitleHelper::MAIN_TITLE)
{
- uno::Reference< XTitled > xTitled( xModel, uno::UNO_QUERY );
- return xTitled;
+ return xModel;
}
- uno::Reference< XChartDocument > xChartDoc( xModel, uno::UNO_QUERY );
- uno::Reference< XDiagram > xDiagram;
+ rtl::Reference< Diagram > xDiagram;
- if( xChartDoc.is())
- xDiagram.set( xChartDoc->getFirstDiagram());
+ if( xModel.is())
+ xDiagram = xModel->getFirstChartDiagram();
return lcl_getTitleParent( nTitleIndex, xDiagram );
}
}
-uno::Reference< XTitle > TitleHelper::getTitle( TitleHelper::eTitleType nTitleIndex
+rtl::Reference< Title > TitleHelper::getTitle( TitleHelper::eTitleType nTitleIndex
, ChartModel& rModel )
{
if(nTitleIndex == TitleHelper::MAIN_TITLE)
- return rModel.getTitleObject();
+ return rModel.getTitleObject2();
- uno::Reference< XDiagram > xDiagram = rModel.getFirstDiagram();
+ rtl::Reference< Diagram > xDiagram = rModel.getFirstChartDiagram();
uno::Reference< XTitled > xTitled( lcl_getTitleParent( nTitleIndex, xDiagram ) );
- if( xTitled.is())
- return xTitled->getTitleObject();
- return nullptr;
+ if( !xTitled )
+ return nullptr;
+ uno::Reference<XTitle> xTitle = xTitled->getTitleObject();
+ auto pTitle = dynamic_cast<Title*>(xTitle.get());
+ assert(!xTitle || pTitle);
+ return pTitle;
}
-uno::Reference< XTitle > TitleHelper::getTitle( TitleHelper::eTitleType nTitleIndex
- , const uno::Reference< frame::XModel >& xModel )
+rtl::Reference< Title > TitleHelper::getTitle( TitleHelper::eTitleType nTitleIndex
+ , const rtl::Reference<ChartModel>& xModel )
{
uno::Reference< XTitled > xTitled;
if(nTitleIndex == TitleHelper::MAIN_TITLE)
{
- xTitled.set( xModel, uno::UNO_QUERY );
+ xTitled = xModel;
}
else
{
- uno::Reference< XChartDocument > xChartDoc( xModel, uno::UNO_QUERY );
- uno::Reference< XDiagram > xDiagram;
- if( xChartDoc.is())
- xDiagram.set( xChartDoc->getFirstDiagram());
+ rtl::Reference< Diagram > xDiagram;
+ if( xModel.is())
+ xDiagram = xModel->getFirstChartDiagram();
xTitled = lcl_getTitleParent( nTitleIndex, xDiagram );
}
- if( xTitled.is())
- return xTitled->getTitleObject();
- return nullptr;
+ if( !xTitled )
+ return nullptr;
+ uno::Reference<XTitle> xTitle = xTitled->getTitleObject();
+ Title* pTitle = dynamic_cast<Title*>(xTitle.get());
+ assert(!xTitle || pTitle);
+ return pTitle;
}
-uno::Reference< XTitle > TitleHelper::createOrShowTitle(
+rtl::Reference< Title > TitleHelper::createOrShowTitle(
TitleHelper::eTitleType eTitleType
, const OUString& rTitleText
- , const uno::Reference< frame::XModel >& xModel
+ , const rtl::Reference<ChartModel>& xModel
, const uno::Reference< uno::XComponentContext > & xContext )
{
- uno::Reference< chart2::XTitle > xTitled( TitleHelper::getTitle( eTitleType, xModel ) );
+ rtl::Reference< Title > xTitled( TitleHelper::getTitle( eTitleType, xModel ) );
if( xTitled.is())
{
- css::uno::Reference<css::beans::XPropertySet> xProps(xTitled, css::uno::UNO_QUERY_THROW);
- xProps->setPropertyValue("Visible",css::uno::Any(true));
+ xTitled->setPropertyValue("Visible",css::uno::Any(true));
return xTitled;
}
else
@@ -193,20 +194,20 @@ uno::Reference< XTitle > TitleHelper::createOrShowTitle(
}
}
-uno::Reference< XTitle > TitleHelper::createTitle(
+rtl::Reference< Title > TitleHelper::createTitle(
TitleHelper::eTitleType eTitleType
, const OUString& rTitleText
- , const uno::Reference< frame::XModel >& xModel
+ , const rtl::Reference<ChartModel>& xModel
, const uno::Reference< uno::XComponentContext > & xContext
, ReferenceSizeProvider * pRefSizeProvider )
{
- uno::Reference< XTitle > xTitle;
+ rtl::Reference< ::chart::Title > xTitle;
uno::Reference< XTitled > xTitled( lcl_getTitleParent( eTitleType, xModel ) );
if( !xTitled.is() )
{
- uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xModel ) );
- uno::Reference< chart2::XAxis > xAxis;
+ rtl::Reference< Diagram > xDiagram( xModel->getFirstChartDiagram() );
+ rtl::Reference< Axis > xAxis;
switch( eTitleType )
{
case TitleHelper::SECONDARY_X_AXIS_TITLE:
@@ -218,90 +219,80 @@ uno::Reference< XTitle > TitleHelper::createTitle(
default:
break;
}
- uno::Reference< beans::XPropertySet > xProps( xAxis, uno::UNO_QUERY );
- if( xProps.is() )
+ if( xAxis.is() )
{
- xProps->setPropertyValue( "Show", uno::Any( false ) );
+ xAxis->setPropertyValue( "Show", uno::Any( false ) );
xTitled = lcl_getTitleParent( eTitleType, xModel );
}
}
if(xTitled.is())
{
- uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xModel ) );
+ rtl::Reference< Diagram > xDiagram( xModel->getFirstChartDiagram() );
- xTitle.set( xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.chart2.Title",
- xContext ), uno::UNO_QUERY );
+ xTitle = new ::chart::Title();
- if(xTitle.is())
+ // default char height (main: 13.0 == default)
+ float fDefaultCharHeightSub = 11.0;
+ float fDefaultCharHeightAxis = 9.0;
+ switch( eTitleType )
{
- // default char height (main: 13.0 == default)
- float fDefaultCharHeightSub = 11.0;
- float fDefaultCharHeightAxis = 9.0;
- switch( eTitleType )
- {
- case TitleHelper::SUB_TITLE:
- TitleHelper::setCompleteString(
- rTitleText, xTitle, xContext, & fDefaultCharHeightSub );
- break;
- case TitleHelper::X_AXIS_TITLE:
- case TitleHelper::Y_AXIS_TITLE:
- case TitleHelper::Z_AXIS_TITLE:
- case TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION:
- case TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION:
- case TitleHelper::SECONDARY_X_AXIS_TITLE:
- case TitleHelper::SECONDARY_Y_AXIS_TITLE:
- TitleHelper::setCompleteString(
- rTitleText, xTitle, xContext, & fDefaultCharHeightAxis );
- break;
- default:
- TitleHelper::setCompleteString( rTitleText, xTitle, xContext );
- break;
- }
+ case TitleHelper::SUB_TITLE:
+ TitleHelper::setCompleteString(
+ rTitleText, xTitle, xContext, & fDefaultCharHeightSub );
+ break;
+ case TitleHelper::X_AXIS_TITLE:
+ case TitleHelper::Y_AXIS_TITLE:
+ case TitleHelper::Z_AXIS_TITLE:
+ case TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION:
+ case TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION:
+ case TitleHelper::SECONDARY_X_AXIS_TITLE:
+ case TitleHelper::SECONDARY_Y_AXIS_TITLE:
+ TitleHelper::setCompleteString(
+ rTitleText, xTitle, xContext, & fDefaultCharHeightAxis );
+ break;
+ default:
+ TitleHelper::setCompleteString( rTitleText, xTitle, xContext );
+ break;
+ }
- // set/clear autoscale
- if( pRefSizeProvider )
- pRefSizeProvider->setValuesAtTitle( xTitle );
+ // set/clear autoscale
+ if( pRefSizeProvider )
+ pRefSizeProvider->setValuesAtTitle( xTitle );
- xTitled->setTitleObject( xTitle );
+ xTitled->setTitleObject( xTitle );
- //default rotation 90 degree for y axis title in normal coordinatesystems or for x axis title for swapped coordinatesystems
- if( eTitleType == TitleHelper::X_AXIS_TITLE ||
- eTitleType == TitleHelper::Y_AXIS_TITLE ||
- eTitleType == TitleHelper::SECONDARY_X_AXIS_TITLE ||
- eTitleType == TitleHelper::SECONDARY_Y_AXIS_TITLE )
+ //default rotation 90 degree for y axis title in normal coordinatesystems or for x axis title for swapped coordinatesystems
+ if( eTitleType == TitleHelper::X_AXIS_TITLE ||
+ eTitleType == TitleHelper::Y_AXIS_TITLE ||
+ eTitleType == TitleHelper::SECONDARY_X_AXIS_TITLE ||
+ eTitleType == TitleHelper::SECONDARY_Y_AXIS_TITLE )
+ {
+ try
{
- try
- {
- bool bDummy = false;
- bool bIsVertical = DiagramHelper::getVertical( xDiagram, bDummy, bDummy );
-
- Reference< beans::XPropertySet > xTitleProps( xTitle, uno::UNO_QUERY );
- if( xTitleProps.is() )
- {
- if( (!bIsVertical && eTitleType == TitleHelper::Y_AXIS_TITLE)
- || (bIsVertical && eTitleType == TitleHelper::X_AXIS_TITLE)
- || (!bIsVertical && eTitleType == TitleHelper::SECONDARY_Y_AXIS_TITLE)
- || (bIsVertical && eTitleType == TitleHelper::SECONDARY_X_AXIS_TITLE) )
- {
- xTitleProps->setPropertyValue( "TextRotation", uno::Any( 90.0 ));
- }
- }
- }
- catch( const uno::Exception & )
+ bool bDummy = false;
+ bool bIsVertical = xDiagram->getVertical( bDummy, bDummy );
+
+ if( (!bIsVertical && eTitleType == TitleHelper::Y_AXIS_TITLE)
+ || (bIsVertical && eTitleType == TitleHelper::X_AXIS_TITLE)
+ || (!bIsVertical && eTitleType == TitleHelper::SECONDARY_Y_AXIS_TITLE)
+ || (bIsVertical && eTitleType == TitleHelper::SECONDARY_X_AXIS_TITLE) )
{
- DBG_UNHANDLED_EXCEPTION("chart2");
+ xTitle->setPropertyValue( "TextRotation", uno::Any( 90.0 ));
}
}
+ catch( const uno::Exception & )
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
}
}
return xTitle;
}
-OUString TitleHelper::getCompleteString( const uno::Reference< XTitle >& xTitle )
+OUString TitleHelper::getCompleteString( const rtl::Reference< Title >& xTitle )
{
if(!xTitle.is())
return OUString();
@@ -312,53 +303,89 @@ OUString TitleHelper::getCompleteString( const uno::Reference< XTitle >& xTitle
return aRet.makeStringAndClear();
}
+OUString TitleHelper::getUnstackedStr(const OUString& rNewText)
+{
+ //#i99841# remove linebreaks that were added for vertical stacking
+ OUStringBuffer aUnstackedStr;
+ OUStringBuffer aSource(rNewText);
+
+ bool bBreakIgnored = false;
+ sal_Int32 nLen = rNewText.getLength();
+ for (sal_Int32 nPos = 0; nPos < nLen; ++nPos)
+ {
+ sal_Unicode aChar = aSource[nPos];
+ if (aChar != '\n')
+ {
+ aUnstackedStr.append(aChar);
+ bBreakIgnored = false;
+ }
+ else if (aChar == '\n' && bBreakIgnored)
+ aUnstackedStr.append(aChar);
+ else
+ bBreakIgnored = true;
+ }
+ return aUnstackedStr.makeStringAndClear();
+}
+
+void TitleHelper::setFormattedString( const rtl::Reference< Title >& xTitle,
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > >& aNewFormattedTitle )
+{
+ if (!xTitle.is() || !aNewFormattedTitle.hasElements())
+ return;
+
+ bool bStacked = false;
+ xTitle->getPropertyValue("StackCharacters") >>= bStacked;
+
+ if (bStacked)
+ {
+ for (uno::Reference< chart2::XFormattedString >const& formattedStr : aNewFormattedTitle)
+ {
+ formattedStr->setString(TitleHelper::getUnstackedStr(formattedStr->getString()));
+ }
+ }
+
+ xTitle->setText(aNewFormattedTitle);
+}
+
void TitleHelper::setCompleteString( const OUString& rNewText
- , const uno::Reference< XTitle >& xTitle
+ , const rtl::Reference< Title >& xTitle
, const uno::Reference< uno::XComponentContext > & xContext
- , const float * pDefaultCharHeight /* = 0 */ )
+ , const float * pDefaultCharHeight /* = 0 */
+ , bool bDialogTitle /*= false*/ )
{
- //the format of the first old text portion will be maintained if there is any
- if(!xTitle.is())
+ if (!xTitle.is())
return;
- OUString aNewText = rNewText;
-
bool bStacked = false;
- uno::Reference< beans::XPropertySet > xTitleProperties( xTitle, uno::UNO_QUERY );
- if( xTitleProperties.is() )
- xTitleProperties->getPropertyValue( "StackCharacters" ) >>= bStacked;
+ if( xTitle.is() )
+ xTitle->getPropertyValue( "StackCharacters" ) >>= bStacked;
+ OUString aNewText = rNewText;
if( bStacked )
{
- //#i99841# remove linebreaks that were added for vertical stacking
- OUStringBuffer aUnstackedStr;
- OUStringBuffer aSource(rNewText);
-
- bool bBreakIgnored = false;
- sal_Int32 nLen = rNewText.getLength();
- for( sal_Int32 nPos = 0; nPos < nLen; ++nPos )
- {
- sal_Unicode aChar = aSource[nPos];
- if( aChar != '\n' )
- {
- aUnstackedStr.append( aChar );
- bBreakIgnored = false;
- }
- else if( aChar == '\n' && bBreakIgnored )
- aUnstackedStr.append( aChar );
- else
- bBreakIgnored = true;
- }
- aNewText = aUnstackedStr.makeStringAndClear();
+ aNewText = getUnstackedStr(rNewText);
}
uno::Sequence< uno::Reference< XFormattedString > > aNewStringList;
-
- uno::Sequence< uno::Reference< XFormattedString > > aOldStringList = xTitle->getText();
- if( aOldStringList.hasElements() )
+ uno::Sequence< uno::Reference< XFormattedString > > aOldStringList = xTitle->getText();
+ if( aOldStringList.hasElements())
{
- aNewStringList = { aOldStringList[0] };
- aNewStringList[0]->setString( aNewText );
+ const OUString aFullString = getCompleteString(xTitle);
+ if (bDialogTitle && aNewText.equals(getUnstackedStr(aFullString)))
+ {
+ // If the new title setted from a dialog window to a new string
+ // the first old text portion will be maintained if it's a new string,
+ // otherwise we use the original one.
+ aNewStringList = aOldStringList;
+ }
+ else
+ {
+ // If the new title setted from a dialog to a new string the first
+ // old text portion will be maintained if there was any. Also in case of ODF
+ // import which still not support non-uniform formatted titles
+ aNewStringList = { aOldStringList[0] };
+ aNewStringList[0]->setString(aNewText);
+ }
}
else
{
@@ -386,7 +413,7 @@ void TitleHelper::setCompleteString( const OUString& rNewText
}
void TitleHelper::removeTitle( TitleHelper::eTitleType nTitleIndex
- , const css::uno::Reference< css::frame::XModel >& xModel )
+ , const rtl::Reference<ChartModel>& xModel )
{
uno::Reference< XTitled > xTitled( lcl_getTitleParent( nTitleIndex, xModel ) );
if( xTitled.is())
@@ -396,34 +423,13 @@ void TitleHelper::removeTitle( TitleHelper::eTitleType nTitleIndex
}
bool TitleHelper::getTitleType( eTitleType& rType
- , const css::uno::Reference< css::chart2::XTitle >& xTitle
- , ChartModel& rModel )
-{
- if( !xTitle.is() )
- return false;
-
- Reference< chart2::XTitle > xCurrentTitle;
- for( sal_Int32 nTitleType = TITLE_BEGIN; nTitleType < NORMAL_TITLE_END; nTitleType++ )
- {
- xCurrentTitle = TitleHelper::getTitle( static_cast<eTitleType>(nTitleType), rModel );
- if( xCurrentTitle == xTitle )
- {
- rType = static_cast<eTitleType>(nTitleType);
- return true;
- }
- }
-
- return false;
-}
-
-bool TitleHelper::getTitleType( eTitleType& rType
- , const css::uno::Reference< css::chart2::XTitle >& xTitle
- , const css::uno::Reference< css::frame::XModel >& xModel )
+ , const rtl::Reference< Title >& xTitle
+ , const rtl::Reference<ChartModel>& xModel )
{
if( !xTitle.is() || !xModel.is() )
return false;
- Reference< chart2::XTitle > xCurrentTitle;
+ rtl::Reference< Title > xCurrentTitle;
for( sal_Int32 nTitleType = TITLE_BEGIN; nTitleType < NORMAL_TITLE_END; nTitleType++ )
{
xCurrentTitle = TitleHelper::getTitle( static_cast<eTitleType>(nTitleType), xModel );
@@ -438,13 +444,13 @@ bool TitleHelper::getTitleType( eTitleType& rType
}
void TitleHelper::hideTitle( TitleHelper::eTitleType nTitleIndex
- , const css::uno::Reference< css::frame::XModel >& xModel)
+ , const rtl::Reference<ChartModel>& xModel)
{
uno::Reference< chart2::XTitle > xTitled( TitleHelper::getTitle( nTitleIndex, xModel ) );
if( xTitled.is())
{
css::uno::Reference<css::beans::XPropertySet> xProps(xTitled, css::uno::UNO_QUERY_THROW);
- xProps->setPropertyValue("Visible",css::uno::makeAny(false));
+ xProps->setPropertyValue("Visible",css::uno::Any(false));
}
}
diff --git a/chart2/source/tools/TrueGuard.cxx b/chart2/source/tools/TrueGuard.cxx
deleted file mode 100644
index 3fca959e78c2..000000000000
--- a/chart2/source/tools/TrueGuard.cxx
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- 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 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 .
- */
-
-#include <TrueGuard.hxx>
-
-namespace chart
-{
-TrueGuard::TrueGuard(bool& rbTrueDuringGuardedTime)
- : m_rbTrueDuringGuardedTime(rbTrueDuringGuardedTime)
-{
- m_rbTrueDuringGuardedTime = true;
-}
-
-TrueGuard::~TrueGuard() { m_rbTrueDuringGuardedTime = false; }
-
-} // namespace chart
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx
index fa069a631870..b7929719df02 100644
--- a/chart2/source/tools/UncachedDataSequence.cxx
+++ b/chart2/source/tools/UncachedDataSequence.cxx
@@ -26,8 +26,7 @@
#include <algorithm>
#include <strings.hrc>
#include <ResId.hxx>
-#include <com/sun/star/chart2/XInternalDataProvider.hpp>
-#include <tools/diagnose_ex.h>
+#include <utility>
using namespace ::com::sun::star;
@@ -37,12 +36,11 @@ using ::com::sun::star::uno::Any;
using ::osl::MutexGuard;
// necessary for MS compiler
-using ::comphelper::OPropertyContainer;
using ::chart::impl::UncachedDataSequence_Base;
namespace
{
-constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.UncachedDataSequence";
+constexpr OUString lcl_aServiceName = u"com.sun.star.comp.chart.UncachedDataSequence"_ustr;
enum
{
@@ -56,37 +54,32 @@ namespace chart
{
UncachedDataSequence::UncachedDataSequence(
- const rtl::Reference< InternalDataProvider > & xIntDataProv,
- const OUString & rRangeRepresentation )
- : OPropertyContainer( GetBroadcastHelper()),
- UncachedDataSequence_Base( GetMutex()),
- m_nNumberFormatKey(0),
- m_xDataProvider( xIntDataProv ),
- m_aSourceRepresentation( rRangeRepresentation ),
+ rtl::Reference< InternalDataProvider > xIntDataProv,
+ OUString aRangeRepresentation )
+ : m_nNumberFormatKey(0),
+ m_xDataProvider(std::move( xIntDataProv )),
+ m_aSourceRepresentation(std::move( aRangeRepresentation )),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
registerProperties();
}
UncachedDataSequence::UncachedDataSequence(
- const rtl::Reference< InternalDataProvider > & xIntDataProv,
- const OUString & rRangeRepresentation,
+ rtl::Reference< InternalDataProvider > xIntDataProv,
+ OUString aRangeRepresentation,
const OUString & rRole )
- : OPropertyContainer( GetBroadcastHelper()),
- UncachedDataSequence_Base( GetMutex()),
- m_nNumberFormatKey(0),
- m_xDataProvider( xIntDataProv ),
- m_aSourceRepresentation( rRangeRepresentation ),
+ : m_nNumberFormatKey(0),
+ m_xDataProvider(std::move( xIntDataProv )),
+ m_aSourceRepresentation(std::move( aRangeRepresentation )),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
registerProperties();
- setFastPropertyValue_NoBroadcast( PROP_PROPOSED_ROLE, uno::Any( rRole ));
+ std::unique_lock<std::mutex> aGuard;
+ setFastPropertyValue_NoBroadcast( aGuard, PROP_PROPOSED_ROLE, uno::Any( rRole ));
}
UncachedDataSequence::UncachedDataSequence( const UncachedDataSequence & rSource )
- : OPropertyContainer( GetBroadcastHelper()),
- UncachedDataSequence_Base( GetMutex()),
- m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
+ : m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
m_sRole( rSource.m_sRole ),
m_xDataProvider( rSource.m_xDataProvider ),
m_aSourceRepresentation( rSource.m_aSourceRepresentation ),
@@ -119,8 +112,8 @@ void UncachedDataSequence::registerProperties()
cppu::UnoType<decltype(m_aXMLRange)>::get() );
}
-IMPLEMENT_FORWARD_XINTERFACE2( UncachedDataSequence, UncachedDataSequence_Base, OPropertyContainer )
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( UncachedDataSequence, UncachedDataSequence_Base, OPropertyContainer )
+IMPLEMENT_FORWARD_XINTERFACE2( UncachedDataSequence, UncachedDataSequence_Base, comphelper::OPropertyContainer2 )
+IMPLEMENT_FORWARD_XTYPEPROVIDER2( UncachedDataSequence, UncachedDataSequence_Base, comphelper::OPropertyContainer2 )
// ____ XPropertySet ____
Reference< beans::XPropertySetInfo > SAL_CALL UncachedDataSequence::getPropertySetInfo()
@@ -167,37 +160,31 @@ css::uno::Sequence< OUString > SAL_CALL UncachedDataSequence::getSupportedServic
// ________ XNumericalDataSequence ________
Sequence< double > SAL_CALL UncachedDataSequence::getNumericalData()
{
- Sequence< double > aResult;
- MutexGuard aGuard( GetMutex() );
+ std::unique_lock<std::mutex> aGuard;
if( m_xDataProvider.is())
{
const Sequence< uno::Any > aValues( m_xDataProvider->getDataByRangeRepresentation( m_aSourceRepresentation ));
- aResult.realloc( aValues.getLength());
- std::transform( aValues.begin(), aValues.end(),
- aResult.getArray(), CommonFunctors::AnyToDouble());
+ return CommonFunctors::convertToSequence(aValues, CommonFunctors::ToDouble());
}
- return aResult;
+ return {};
}
// ________ XTextualDataSequence ________
Sequence< OUString > SAL_CALL UncachedDataSequence::getTextualData()
{
- Sequence< OUString > aResult;
- MutexGuard aGuard( GetMutex() );
+ std::unique_lock<std::mutex> aGuard;
if( m_xDataProvider.is())
{
const Sequence< uno::Any > aValues( m_xDataProvider->getDataByRangeRepresentation( m_aSourceRepresentation ));
- aResult.realloc( aValues.getLength());
- std::transform( aValues.begin(), aValues.end(),
- aResult.getArray(), CommonFunctors::AnyToString());
+ return CommonFunctors::convertToSequence(aValues, CommonFunctors::ToString());
}
- return aResult;
+ return {};
}
// ________ XDataSequence ________
Sequence< Any > SAL_CALL UncachedDataSequence::getData()
{
- MutexGuard aGuard( GetMutex() );
+ std::unique_lock<std::mutex> aGuard;
if( m_xDataProvider.is())
return m_xDataProvider->getDataByRangeRepresentation( m_aSourceRepresentation );
return Sequence< Any >();
@@ -213,7 +200,7 @@ Sequence< OUString > SAL_CALL UncachedDataSequence::generateLabel( chart2::data:
// auto-generated label
sal_Int32 nSeries = m_aSourceRepresentation.toInt32() + 1;
OUString aResString(::chart::SchResId(STR_DATA_UNNAMED_SERIES_WITH_INDEX));
- static const OUStringLiteral aReplacementStr(u"%NUMBER");
+ static constexpr OUString aReplacementStr(u"%NUMBER"_ustr);
sal_Int32 nIndex = aResString.indexOf(aReplacementStr);
OUString aName;
if( nIndex != -1 )
@@ -229,7 +216,7 @@ Sequence< OUString > SAL_CALL UncachedDataSequence::generateLabel( chart2::data:
// ____ XIndexReplace ____
void SAL_CALL UncachedDataSequence::replaceByIndex( ::sal_Int32 Index, const uno::Any& Element )
{
- MutexGuard aGuard( GetMutex() );
+ std::unique_lock<std::mutex> aGuard;
Sequence< Any > aData( getData());
if( Index < aData.getLength() &&
m_xDataProvider.is() )
@@ -298,28 +285,12 @@ void SAL_CALL UncachedDataSequence::setModified( sal_Bool bModified )
// ____ XModifyBroadcaster (base of XModifiable) ____
void SAL_CALL UncachedDataSequence::addModifyListener( const Reference< util::XModifyListener >& aListener )
{
- try
- {
- Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW );
- xBroadcaster->addModifyListener( aListener );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
+ m_xModifyEventForwarder->addModifyListener( aListener );
}
void SAL_CALL UncachedDataSequence::removeModifyListener( const Reference< util::XModifyListener >& aListener )
{
- try
- {
- Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW );
- xBroadcaster->removeModifyListener( aListener );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
+ m_xModifyEventForwarder->removeModifyListener( aListener );
}
void UncachedDataSequence::fireModifyEvent()
diff --git a/chart2/source/tools/WeakListenerAdapter.cxx b/chart2/source/tools/WeakListenerAdapter.cxx
index 85b2f3b39a36..16b3d815031c 100644
--- a/chart2/source/tools/WeakListenerAdapter.cxx
+++ b/chart2/source/tools/WeakListenerAdapter.cxx
@@ -26,21 +26,6 @@ using ::com::sun::star::uno::Reference;
namespace chart
{
-WeakModifyListenerAdapter::WeakModifyListenerAdapter(
- const uno::WeakReference< util::XModifyListener > & xListener ) :
- WeakListenerAdapter< css::util::XModifyListener >( xListener )
-{}
-
-WeakModifyListenerAdapter::~WeakModifyListenerAdapter()
-{}
-
-void SAL_CALL WeakModifyListenerAdapter::modified( const lang::EventObject& aEvent )
-{
- Reference< util::XModifyListener > xModListener( getListener() );
- if( xModListener.is())
- xModListener->modified( aEvent );
-}
-
WeakSelectionChangeListenerAdapter::WeakSelectionChangeListenerAdapter(
const Reference< view::XSelectionChangeListener > & xListener ) :
WeakListenerAdapter< css::view::XSelectionChangeListener >( xListener )
diff --git a/chart2/source/tools/WrappedDefaultProperty.cxx b/chart2/source/tools/WrappedDefaultProperty.cxx
index 74d2b4b0aae0..00a94493eafc 100644
--- a/chart2/source/tools/WrappedDefaultProperty.cxx
+++ b/chart2/source/tools/WrappedDefaultProperty.cxx
@@ -18,10 +18,11 @@
*/
#include <WrappedDefaultProperty.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
+#include <utility>
using namespace ::com::sun::star;
@@ -32,9 +33,9 @@ namespace chart
WrappedDefaultProperty::WrappedDefaultProperty(
const OUString& rOuterName, const OUString& rInnerName,
- const uno::Any& rNewOuterDefault ) :
+ uno::Any aNewOuterDefault ) :
WrappedProperty( rOuterName, rInnerName ),
- m_aOuterDefaultValue( rNewOuterDefault )
+ m_aOuterDefaultValue(std::move( aNewOuterDefault ))
{}
WrappedDefaultProperty::~WrappedDefaultProperty()
diff --git a/chart2/source/tools/WrappedProperty.cxx b/chart2/source/tools/WrappedProperty.cxx
index ee28aba86e68..8b0891c770f5 100644
--- a/chart2/source/tools/WrappedProperty.cxx
+++ b/chart2/source/tools/WrappedProperty.cxx
@@ -20,7 +20,8 @@
#include <WrappedProperty.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
@@ -29,9 +30,9 @@ using ::com::sun::star::uno::Reference;
namespace chart
{
-WrappedProperty::WrappedProperty( const OUString& rOuterName, const OUString& rInnerName)
- : m_aOuterName( rOuterName )
- , m_aInnerName( rInnerName )
+WrappedProperty::WrappedProperty( OUString aOuterName, OUString aInnerName)
+ : m_aOuterName(std::move( aOuterName ))
+ , m_aInnerName(std::move( aInnerName ))
{
}
WrappedProperty::~WrappedProperty()
diff --git a/chart2/source/tools/WrappedPropertySet.cxx b/chart2/source/tools/WrappedPropertySet.cxx
index ead7f6d05bee..9eee3f8632e8 100644
--- a/chart2/source/tools/WrappedPropertySet.cxx
+++ b/chart2/source/tools/WrappedPropertySet.cxx
@@ -20,7 +20,7 @@
#include <WrappedPropertySet.hxx>
#include <cppuhelper/propshlp.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
namespace chart
diff --git a/chart2/source/tools/XMLRangeHelper.cxx b/chart2/source/tools/XMLRangeHelper.cxx
index cc4749deee1f..196a0396542a 100644
--- a/chart2/source/tools/XMLRangeHelper.cxx
+++ b/chart2/source/tools/XMLRangeHelper.cxx
@@ -21,6 +21,7 @@
#include <rtl/character.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
+#include <o3tl/string_view.hxx>
#include <algorithm>
@@ -103,7 +104,7 @@ void lcl_getXMLStringForCell( const ::chart::XMLRangeHelper::Cell & rCell, OUStr
}
void lcl_getSingleCellAddressFromXMLString(
- const OUString& rXMLString,
+ std::u16string_view rXMLString,
sal_Int32 nStartPos, sal_Int32 nEndPos,
::chart::XMLRangeHelper::Cell & rOutCell )
{
@@ -111,7 +112,7 @@ void lcl_getSingleCellAddressFromXMLString(
static const sal_Unicode aDollar( '$' );
static const sal_Unicode aLetterA( 'A' );
- OUString aCellStr = rXMLString.copy( nStartPos, nEndPos - nStartPos + 1 ).toAsciiUpperCase();
+ OUString aCellStr = OUString(rXMLString.substr( nStartPos, nEndPos - nStartPos + 1 )).toAsciiUpperCase();
const sal_Unicode* pStrArray = aCellStr.getStr();
sal_Int32 nLength = aCellStr.getLength();
sal_Int32 i = nLength - 1, nColumn = 0;
@@ -119,7 +120,7 @@ void lcl_getSingleCellAddressFromXMLString(
// parse number for row
while( rtl::isAsciiDigit( pStrArray[ i ] ) && i >= 0 )
i--;
- rOutCell.nRow = (aCellStr.copy( i + 1 )).toInt32() - 1;
+ rOutCell.nRow = (o3tl::toInt32(aCellStr.subView( i + 1 ))) - 1;
// a dollar in XML means absolute (whereas in UI it means relative)
if( pStrArray[ i ] == aDollar )
{
diff --git a/chart2/source/view/axes/DateScaling.cxx b/chart2/source/view/axes/DateScaling.cxx
index 15cb59635d69..f24f46a8e457 100644
--- a/chart2/source/view/axes/DateScaling.cxx
+++ b/chart2/source/view/axes/DateScaling.cxx
@@ -27,9 +27,9 @@
namespace
{
-constexpr OUStringLiteral lcl_aServiceName_DateScaling = u"com.sun.star.chart2.DateScaling";
-constexpr OUStringLiteral lcl_aServiceName_InverseDateScaling
- = u"com.sun.star.chart2.InverseDateScaling";
+constexpr OUString lcl_aServiceName_DateScaling = u"com.sun.star.chart2.DateScaling"_ustr;
+constexpr OUString lcl_aServiceName_InverseDateScaling
+ = u"com.sun.star.chart2.InverseDateScaling"_ustr;
const double lcl_fNumberOfMonths = 12.0;//todo: this needs to be offered by basic tools Date class if it should be more generic
}
diff --git a/chart2/source/view/axes/Tickmarks.cxx b/chart2/source/view/axes/Tickmarks.cxx
index d10583c1b77d..c30f2f25d5e5 100644
--- a/chart2/source/view/axes/Tickmarks.cxx
+++ b/chart2/source/view/axes/Tickmarks.cxx
@@ -24,15 +24,16 @@
#include "VAxisProperties.hxx"
#include <osl/diagnose.h>
#include <com/sun/star/chart2/AxisType.hpp>
+#include <utility>
using namespace ::com::sun::star;
using ::basegfx::B2DVector;
namespace chart {
-TickInfo::TickInfo( const uno::Reference<chart2::XScaling>& xInverse )
+TickInfo::TickInfo( uno::Reference<chart2::XScaling> xInverse )
: fScaledTickValue( 0.0 )
-, xInverseScaling( xInverse )
+, xInverseScaling(std::move( xInverse ))
, aTickScreenPosition(0.0,0.0)
, nFactorForLimitedTextWidth(1)
, bPaintIt( true )
@@ -85,9 +86,9 @@ TickInfo* PureTickIter::nextInfo()
}
TickFactory::TickFactory(
- const ExplicitScaleData& rScale, const ExplicitIncrementData& rIncrement )
- : m_rScale( rScale )
- , m_rIncrement( rIncrement )
+ ExplicitScaleData aScale, ExplicitIncrementData aIncrement )
+ : m_rScale(std::move( aScale ))
+ , m_rIncrement(std::move( aIncrement ))
{
//@todo: make sure that the scale is valid for the scaling
@@ -203,11 +204,6 @@ sal_Int32 TickFactory2D::getTickScreenDistance( TickIter& rIter )
return pFirstTickInfo->getScreenDistanceBetweenTicks( *pSecondTickInfo );
}
-const B2DVector & TickFactory2D::getXaxisStartPos() const
-{
- return m_aAxisStartScreenPosition2D;
-}
-
B2DVector TickFactory2D::getTickScreenPosition2D( double fScaledLogicTickValue ) const
{
B2DVector aRet(m_aAxisStartScreenPosition2D);
diff --git a/chart2/source/view/axes/Tickmarks.hxx b/chart2/source/view/axes/Tickmarks.hxx
index c712f6542b39..2266c03c91d2 100644
--- a/chart2/source/view/axes/Tickmarks.hxx
+++ b/chart2/source/view/axes/Tickmarks.hxx
@@ -44,7 +44,7 @@ struct TickInfo
//methods:
TickInfo() = delete;
- explicit TickInfo( const css::uno::Reference<css::chart2::XScaling>& xInverse );
+ explicit TickInfo( css::uno::Reference<css::chart2::XScaling> xInverse );
/**
* Return a value associated with the tick mark. It's normally an original
@@ -83,8 +83,8 @@ class TickFactory
{
public:
TickFactory(
- const ExplicitScaleData& rScale
- , const ExplicitIncrementData& rIncrement );
+ ExplicitScaleData aScale
+ , ExplicitIncrementData aIncrement );
virtual ~TickFactory();
void getAllTicks( TickInfoArraysType& rAllTickInfos ) const;
@@ -132,7 +132,16 @@ public:
bool isHorizontalAxis() const;
bool isVerticalAxis() const;
- const ::basegfx::B2DVector & getXaxisStartPos() const;
+
+ const ::basegfx::B2DVector & getXaxisStartPos() const
+ {
+ return m_aAxisStartScreenPosition2D;
+ }
+
+ const ::basegfx::B2DVector & getXaxisEndPos() const
+ {
+ return m_aAxisEndScreenPosition2D;
+ }
private:
::basegfx::B2DVector getTickScreenPosition2D( double fScaledLogicTickValue ) const;
diff --git a/chart2/source/view/axes/Tickmarks_Dates.cxx b/chart2/source/view/axes/Tickmarks_Dates.cxx
index 854e661f67b4..869d46603fb7 100644
--- a/chart2/source/view/axes/Tickmarks_Dates.cxx
+++ b/chart2/source/view/axes/Tickmarks_Dates.cxx
@@ -23,6 +23,7 @@
#include <osl/diagnose.h>
#include <DateHelper.hxx>
#include <com/sun/star/chart/TimeUnit.hpp>
+#include <utility>
namespace chart
{
@@ -34,9 +35,9 @@ using ::com::sun::star::chart::TimeUnit::MONTH;
using ::com::sun::star::chart::TimeUnit::YEAR;
DateTickFactory::DateTickFactory(
- const ExplicitScaleData& rScale, const ExplicitIncrementData& rIncrement )
- : m_aScale( rScale )
- , m_aIncrement( rIncrement )
+ ExplicitScaleData aScale, ExplicitIncrementData aIncrement )
+ : m_aScale(std::move( aScale ))
+ , m_aIncrement(std::move( aIncrement ))
{
//@todo: make sure that the scale is valid for the scaling
diff --git a/chart2/source/view/axes/Tickmarks_Dates.hxx b/chart2/source/view/axes/Tickmarks_Dates.hxx
index 0a21401924cc..bc75bad4e04b 100644
--- a/chart2/source/view/axes/Tickmarks_Dates.hxx
+++ b/chart2/source/view/axes/Tickmarks_Dates.hxx
@@ -27,8 +27,8 @@ class DateTickFactory
{
public:
DateTickFactory(
- const ExplicitScaleData& rScale
- , const ExplicitIncrementData& rIncrement );
+ ExplicitScaleData aScale
+ , ExplicitIncrementData aIncrement );
~DateTickFactory();
void getAllTicks( TickInfoArraysType& rAllTickInfos ) const;
diff --git a/chart2/source/view/axes/Tickmarks_Equidistant.cxx b/chart2/source/view/axes/Tickmarks_Equidistant.cxx
index 11778d694416..c1991fb3ba6e 100644
--- a/chart2/source/view/axes/Tickmarks_Equidistant.cxx
+++ b/chart2/source/view/axes/Tickmarks_Equidistant.cxx
@@ -23,6 +23,7 @@
#include <float.h>
#include <limits>
+#include <utility>
namespace chart
{
@@ -70,9 +71,9 @@ double EquidistantTickFactory::getMaximumAtIncrement( double fMax, const Explici
}
EquidistantTickFactory::EquidistantTickFactory(
- const ExplicitScaleData& rScale, const ExplicitIncrementData& rIncrement )
- : m_rScale( rScale )
- , m_rIncrement( rIncrement )
+ ExplicitScaleData aScale, ExplicitIncrementData aIncrement )
+ : m_rScale(std::move( aScale ))
+ , m_rIncrement(std::move( aIncrement ))
{
//@todo: make sure that the scale is valid for the scaling
diff --git a/chart2/source/view/axes/Tickmarks_Equidistant.hxx b/chart2/source/view/axes/Tickmarks_Equidistant.hxx
index bb6553339fc0..6068903cb6e7 100644
--- a/chart2/source/view/axes/Tickmarks_Equidistant.hxx
+++ b/chart2/source/view/axes/Tickmarks_Equidistant.hxx
@@ -101,8 +101,8 @@ class EquidistantTickFactory
{
public:
EquidistantTickFactory(
- const ExplicitScaleData& rScale
- , const ExplicitIncrementData& rIncrement );
+ ExplicitScaleData aScale
+ , ExplicitIncrementData aIncrement );
~EquidistantTickFactory();
void getAllTicks( TickInfoArraysType& rAllTickInfos ) const;
diff --git a/chart2/source/view/axes/VAxisBase.cxx b/chart2/source/view/axes/VAxisBase.cxx
index 3844a1074df9..30aead187dcb 100644
--- a/chart2/source/view/axes/VAxisBase.cxx
+++ b/chart2/source/view/axes/VAxisBase.cxx
@@ -21,11 +21,10 @@
#include <ShapeFactory.hxx>
#include <ExplicitCategoriesProvider.hxx>
#include "Tickmarks.hxx"
-#include <com/sun/star/drawing/XShapes.hpp>
+#include <Axis.hxx>
+#include <VSeriesPlotter.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
-#include <com/sun/star/chart2/XAxis.hpp>
#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <osl/diagnose.h>
@@ -85,10 +84,10 @@ void VAxisBase::initAxisLabelProperties( const css::awt::Size& rFontReferenceSiz
m_bUseTextLabels = true;
}
- m_aAxisLabelProperties.nNumberFormatKey = m_aAxisProperties.m_nNumberFormatKey;
+ m_aAxisLabelProperties.m_nNumberFormatKey = m_aAxisProperties.m_nNumberFormatKey;
m_aAxisLabelProperties.init(m_aAxisProperties.m_xAxisModel);
if( m_aAxisProperties.m_bComplexCategories && m_aAxisProperties.m_nAxisType == AxisType::CATEGORY )
- m_aAxisLabelProperties.eStaggering = AxisLabelStaggering::SideBySide;
+ m_aAxisLabelProperties.m_eStaggering = AxisLabelStaggering::SideBySide;
}
bool VAxisBase::isDateAxis() const
@@ -136,11 +135,10 @@ bool VAxisBase::isAnythingToDraw()
if(!(m_xLogicTarget.is()&&m_xFinalTarget.is()))
return false;
- uno::Reference< beans::XPropertySet > xProps( m_aAxisProperties.m_xAxisModel, uno::UNO_QUERY );
- if( xProps.is() )
+ if( m_aAxisProperties.m_xAxisModel.is() )
{
bool bShow = false;
- xProps->getPropertyValue( "Show" ) >>= bShow;
+ m_aAxisProperties.m_xAxisModel->getPropertyValue( "Show" ) >>= bShow;
if( !bShow )
return false;
}
@@ -186,8 +184,10 @@ bool VAxisBase::prepareShapeCreation()
//create named group shape
m_xGroupShape_Shapes = createGroupShape( m_xLogicTarget, m_nDimension==2 ? m_aCID : "");
- if( m_aAxisProperties.m_bDisplayLabels )
+ if (m_aAxisProperties.m_bDisplayLabels)
m_xTextTarget = ShapeFactory::createGroup2D( m_xFinalTarget, m_aCID );
+ if (m_aAxisProperties.m_bDisplayDataTable)
+ m_xDataTableTarget = ShapeFactory::createGroup2D(m_xFinalTarget);
return true;
}
@@ -242,6 +242,13 @@ void VAxisBase::updateUnscaledValuesAtTicks( TickIter& rIter )
}
}
+void VAxisBase::createDataTableView(std::vector<std::unique_ptr<VSeriesPlotter>>& /*rSeriesPlotterList*/,
+ uno::Reference<util::XNumberFormatsSupplier> const& /*xNumberFormatsSupplier*/,
+ rtl::Reference<::chart::ChartModel> const& /*xChartDoc*/,
+ css::uno::Reference<css::uno::XComponentContext> const& /*rComponentContext*/)
+{
+}
+
} //namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/axes/VAxisBase.hxx b/chart2/source/view/axes/VAxisBase.hxx
index 31badb749c9d..4ee4f5e288ae 100644
--- a/chart2/source/view/axes/VAxisBase.hxx
+++ b/chart2/source/view/axes/VAxisBase.hxx
@@ -23,10 +23,16 @@
#include "Tickmarks.hxx"
namespace com::sun::star::util { class XNumberFormatsSupplier; }
+namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
+class VSeriesPlotter;
+class DataTableView;
+class ChartModel;
+class LegendEntryProvider;
+
class VAxisBase : public VAxisOrGridBase
{
public:
@@ -59,6 +65,13 @@ public:
void setExtraLinePositionAtOtherAxis( double fCrossingAt );
+ virtual void createDataTableView(std::vector<std::unique_ptr<VSeriesPlotter>>& rSeriesPlotterList,
+ css::uno::Reference<css::util::XNumberFormatsSupplier> const& xNumberFormatsSupplier,
+ rtl::Reference<::chart::ChartModel> const& xChartDoc,
+ css::uno::Reference<css::uno::XComponentContext> const& rComponentContext);
+
+ std::shared_ptr<DataTableView> getDataTableView() { return m_pDataTableView; }
+
protected: //methods
static size_t getIndexOfLongestLabel( const css::uno::Sequence<OUString>& rLabels );
void removeTextShapesFromTicks();
@@ -79,6 +92,9 @@ protected: //member
rtl::Reference< SvxShapeGroupAnyD > m_xGroupShape_Shapes;
rtl::Reference< SvxShapeGroupAnyD > m_xTextTarget;
+ rtl::Reference< SvxShapeGroupAnyD > m_xDataTableTarget;
+
+ std::shared_ptr<DataTableView> m_pDataTableView;
/**
* This typically consists of 2 TickInfo vectors (i.e. the outer vector
diff --git a/chart2/source/view/axes/VAxisProperties.cxx b/chart2/source/view/axes/VAxisProperties.cxx
index 295ad21a68e6..a69508cec77a 100644
--- a/chart2/source/view/axes/VAxisProperties.cxx
+++ b/chart2/source/view/axes/VAxisProperties.cxx
@@ -19,17 +19,17 @@
#include "VAxisProperties.hxx"
#include <ViewDefines.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <ChartModelHelper.hxx>
#include <ExplicitCategoriesProvider.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
-#include <com/sun/star/chart2/XAxis.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <rtl/math.hxx>
+#include <utility>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
@@ -152,9 +152,10 @@ TickmarkProperties AxisProperties::getBiggestTickmarkProperties()
return aTickmarkProperties;
}
-AxisProperties::AxisProperties( const uno::Reference< XAxis >& xAxisModel
- , ExplicitCategoriesProvider* pExplicitCategoriesProvider )
- : m_xAxisModel(xAxisModel)
+AxisProperties::AxisProperties(rtl::Reference<::chart::Axis> xAxisModel,
+ ExplicitCategoriesProvider* pExplicitCategoriesProvider,
+ rtl::Reference<::chart::DataTable> const& xDataTableModel)
+ : m_xAxisModel(std::move(xAxisModel))
, m_nDimensionIndex(0)
, m_bIsMainAxis(true)
, m_bSwapXAndY(false)
@@ -163,6 +164,8 @@ AxisProperties::AxisProperties( const uno::Reference< XAxis >& xAxisModel
, m_eTickmarkPos( css::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS )
, m_bCrossingAxisHasReverseDirection(false)
, m_bCrossingAxisIsCategoryAxes(false)
+ , m_bDisplayDataTable(false)
+ , m_bDataTableAlignAxisValuesWithColumns(false)
, m_bDisplayLabels( true )
, m_bTryStaggeringFirst( false )
, m_nNumberFormatKey(0)
@@ -172,6 +175,7 @@ AxisProperties::AxisProperties( const uno::Reference< XAxis >& xAxisModel
, m_bComplexCategories(false)
, m_pExplicitCategoriesProvider(pExplicitCategoriesProvider)
, m_bLimitSpaceForLabels(false)
+ , m_xDataTableModel(xDataTableModel)
{
}
@@ -240,13 +244,11 @@ void AxisProperties::initAxisPositioning( const uno::Reference< beans::XProperty
void AxisProperties::init( bool bCartesian )
{
- uno::Reference< beans::XPropertySet > xProp =
- uno::Reference<beans::XPropertySet>::query( m_xAxisModel );
- if( !xProp.is() )
+ if( !m_xAxisModel.is() )
return;
if( m_nDimensionIndex<2 )
- initAxisPositioning( xProp );
+ initAxisPositioning( m_xAxisModel );
ScaleData aScaleData = m_xAxisModel->getScaleData();
if( m_nDimensionIndex==0 )
@@ -255,6 +257,11 @@ void AxisProperties::init( bool bCartesian )
if( bCartesian )
{
+ if ((!m_bSwapXAndY && m_nDimensionIndex == 0) || (m_bSwapXAndY && m_nDimensionIndex == 1))
+ {
+ m_bDisplayDataTable = m_xDataTableModel.is();
+ }
+
if( m_nDimensionIndex == 0 && m_nAxisType == AxisType::CATEGORY
&& m_pExplicitCategoriesProvider && m_pExplicitCategoriesProvider->hasComplexCategories() )
m_bComplexCategories = true;
@@ -294,19 +301,19 @@ void AxisProperties::init( bool bCartesian )
try
{
//init LineProperties
- m_aLineProperties.initFromPropertySet( xProp );
+ m_aLineProperties.initFromPropertySet( m_xAxisModel );
//init display labels
- xProp->getPropertyValue( "DisplayLabels" ) >>= m_bDisplayLabels;
+ m_xAxisModel->getPropertyValue( "DisplayLabels" ) >>= m_bDisplayLabels;
// Init layout strategy hint for axis labels.
// Compatibility option: starting from LibreOffice 5.1 the rotated
// layout is preferred to staggering for axis labels.
- xProp->getPropertyValue( "TryStaggeringFirst" ) >>= m_bTryStaggeringFirst;
+ m_xAxisModel->getPropertyValue( "TryStaggeringFirst" ) >>= m_bTryStaggeringFirst;
//init TickmarkProperties
- xProp->getPropertyValue( "MajorTickmarks" ) >>= m_nMajorTickmarks;
- xProp->getPropertyValue( "MinorTickmarks" ) >>= m_nMinorTickmarks;
+ m_xAxisModel->getPropertyValue( "MajorTickmarks" ) >>= m_nMajorTickmarks;
+ m_xAxisModel->getPropertyValue( "MinorTickmarks" ) >>= m_nMinorTickmarks;
sal_Int32 nMaxDepth = 0;
if(m_nMinorTickmarks!=0)
@@ -325,51 +332,60 @@ void AxisProperties::init( bool bCartesian )
{
TOOLS_WARN_EXCEPTION("chart2", "" );
}
+
+ if (m_bDisplayDataTable)
+ {
+ m_bDataTableAlignAxisValuesWithColumns = (m_nDimensionIndex == 0);
+
+ if (m_nDimensionIndex == 0)
+ {
+ m_bDisplayLabels = false;
+ }
+
+ }
}
AxisLabelProperties::AxisLabelProperties()
: m_aFontReferenceSize( ChartModelHelper::getDefaultPageSize() )
, m_aMaximumSpaceForLabels( 0 , 0, m_aFontReferenceSize.Width, m_aFontReferenceSize.Height )
- , nNumberFormatKey(0)
- , eStaggering( AxisLabelStaggering::SideBySide )
- , bLineBreakAllowed( false )
- , bOverlapAllowed( false )
- , bStackCharacters( false )
- , fRotationAngleDegree( 0.0 )
- , nRhythm( 1 )
+ , m_nNumberFormatKey(0)
+ , m_eStaggering( AxisLabelStaggering::SideBySide )
+ , m_bLineBreakAllowed( false )
+ , m_bOverlapAllowed( false )
+ , m_bStackCharacters( false )
+ , m_fRotationAngleDegree( 0.0 )
+ , m_nRhythm( 1 )
{
}
-void AxisLabelProperties::init( const uno::Reference< XAxis >& xAxisModel )
+void AxisLabelProperties::init( const rtl::Reference< Axis >& xAxisModel )
{
- uno::Reference< beans::XPropertySet > xProp =
- uno::Reference<beans::XPropertySet>::query( xAxisModel );
- if(!xProp.is())
+ if(!xAxisModel.is())
return;
try
{
- xProp->getPropertyValue( "TextBreak" ) >>= bLineBreakAllowed;
- xProp->getPropertyValue( "TextOverlap" ) >>= bOverlapAllowed;
- xProp->getPropertyValue( "StackCharacters" ) >>= bStackCharacters;
- xProp->getPropertyValue( "TextRotation" ) >>= fRotationAngleDegree;
+ xAxisModel->getPropertyValue( "TextBreak" ) >>= m_bLineBreakAllowed;
+ xAxisModel->getPropertyValue( "TextOverlap" ) >>= m_bOverlapAllowed;
+ xAxisModel->getPropertyValue( "StackCharacters" ) >>= m_bStackCharacters;
+ xAxisModel->getPropertyValue( "TextRotation" ) >>= m_fRotationAngleDegree;
css::chart::ChartAxisArrangeOrderType eArrangeOrder;
- xProp->getPropertyValue( "ArrangeOrder" ) >>= eArrangeOrder;
+ xAxisModel->getPropertyValue( "ArrangeOrder" ) >>= eArrangeOrder;
switch(eArrangeOrder)
{
case css::chart::ChartAxisArrangeOrderType_SIDE_BY_SIDE:
- eStaggering = AxisLabelStaggering::SideBySide;
+ m_eStaggering = AxisLabelStaggering::SideBySide;
break;
case css::chart::ChartAxisArrangeOrderType_STAGGER_EVEN:
- eStaggering = AxisLabelStaggering::StaggerEven;
+ m_eStaggering = AxisLabelStaggering::StaggerEven;
break;
case css::chart::ChartAxisArrangeOrderType_STAGGER_ODD:
- eStaggering = AxisLabelStaggering::StaggerOdd;
+ m_eStaggering = AxisLabelStaggering::StaggerOdd;
break;
default:
- eStaggering = AxisLabelStaggering::StaggerAuto;
+ m_eStaggering = AxisLabelStaggering::StaggerAuto;
break;
}
}
@@ -381,14 +397,14 @@ void AxisLabelProperties::init( const uno::Reference< XAxis >& xAxisModel )
bool AxisLabelProperties::isStaggered() const
{
- return ( eStaggering == AxisLabelStaggering::StaggerOdd || eStaggering == AxisLabelStaggering::StaggerEven );
+ return ( m_eStaggering == AxisLabelStaggering::StaggerOdd || m_eStaggering == AxisLabelStaggering::StaggerEven );
}
void AxisLabelProperties::autoRotate45()
{
- fRotationAngleDegree = 45;
- bLineBreakAllowed = false;
- eStaggering = AxisLabelStaggering::SideBySide;
+ m_fRotationAngleDegree = 45;
+ m_bLineBreakAllowed = false;
+ m_eStaggering = AxisLabelStaggering::SideBySide;
}
} //namespace chart
diff --git a/chart2/source/view/axes/VAxisProperties.hxx b/chart2/source/view/axes/VAxisProperties.hxx
index 454ea1097c86..0cc23602b541 100644
--- a/chart2/source/view/axes/VAxisProperties.hxx
+++ b/chart2/source/view/axes/VAxisProperties.hxx
@@ -19,7 +19,9 @@
#pragma once
#include "TickmarkProperties.hxx"
+#include <Axis.hxx>
#include <LabelAlignment.hxx>
+#include <DataTable.hxx>
#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
#include <com/sun/star/chart/ChartAxisMarkPosition.hpp>
@@ -27,6 +29,7 @@
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/uno/Any.hxx>
+#include <rtl/ref.hxx>
#include <vector>
#include <optional>
@@ -58,20 +61,20 @@ struct AxisLabelProperties final
css::awt::Size m_aFontReferenceSize;//reference size to calculate the font height
css::awt::Rectangle m_aMaximumSpaceForLabels;//Labels need to be clipped in order to fit into this rectangle
- sal_Int32 nNumberFormatKey;
+ sal_Int32 m_nNumberFormatKey;
- AxisLabelStaggering eStaggering;
+ AxisLabelStaggering m_eStaggering;
- bool bLineBreakAllowed;
- bool bOverlapAllowed;
+ bool m_bLineBreakAllowed;
+ bool m_bOverlapAllowed;
- bool bStackCharacters;
- double fRotationAngleDegree;
+ bool m_bStackCharacters;
+ double m_fRotationAngleDegree;
- sal_Int32 nRhythm; //show only each nth label with n==nRhythm
+ sal_Int32 m_nRhythm; //show only each nth label with n==nRhythm
//methods:
- void init( const css::uno::Reference< css::chart2::XAxis >& xAxisModel );
+ void init( const rtl::Reference< ::chart::Axis >& xAxisModel );
bool isStaggered() const;
@@ -90,7 +93,7 @@ struct AxisLabelAlignment
struct AxisProperties final
{
- css::uno::Reference<css::chart2::XAxis> m_xAxisModel;
+ rtl::Reference<::chart::Axis> m_xAxisModel;
sal_Int32 m_nDimensionIndex;
bool m_bIsMainAxis;//not secondary axis
@@ -108,7 +111,11 @@ struct AxisProperties final
AxisLabelAlignment maLabelAlignment;
- bool m_bDisplayLabels;
+ // Data table
+ bool m_bDisplayDataTable;
+ bool m_bDataTableAlignAxisValuesWithColumns;
+
+ bool m_bDisplayLabels;
// Compatibility option: starting from LibreOffice 5.1 the rotated
// layout is preferred to staggering for axis labels.
@@ -136,10 +143,13 @@ struct AxisProperties final
bool m_bLimitSpaceForLabels;
+ rtl::Reference<::chart::DataTable> m_xDataTableModel;
+
//methods:
- AxisProperties( const css::uno::Reference< css::chart2::XAxis >& xAxisModel
- , ExplicitCategoriesProvider* pExplicitCategoriesProvider );
+ AxisProperties(rtl::Reference<::chart::Axis> xAxisModel,
+ ExplicitCategoriesProvider* pExplicitCategoriesProvider,
+ rtl::Reference<::chart::DataTable> const& xDataTableModel);
void init(bool bCartesian=false);//init from model data (m_xAxisModel)
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 120513ee9831..3b40602660f1 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -23,18 +23,23 @@
#include <PropertyMapper.hxx>
#include <NumberFormatterWrapper.hxx>
#include <LabelPositionHelper.hxx>
-#include <TrueGuard.hxx>
#include <BaseGFXHelper.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include "Tickmarks_Equidistant.hxx"
#include <ExplicitCategoriesProvider.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
-#include <com/sun/star/chart2/XAxis.hpp>
+#include <o3tl/safeint.hxx>
#include <rtl/math.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/color.hxx>
#include <svx/unoshape.hxx>
#include <svx/unoshtxt.hxx>
+#include <VSeriesPlotter.hxx>
+#include <DataTableView.hxx>
+#include <ChartModel.hxx>
+
+#include <comphelper/scopeguard.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
@@ -75,36 +80,41 @@ VCartesianAxis::~VCartesianAxis()
static void lcl_ResizeTextShapeToFitAvailableSpace( SvxShapeText& rShape2DText,
const AxisLabelProperties& rAxisLabelProperties,
- const OUString& rLabel,
+ std::u16string_view rLabel,
const tNameSequence& rPropNames,
const tAnySequence& rPropValues,
const bool bIsHorizontalAxis )
{
- const sal_Int32 nFullSize = bIsHorizontalAxis ? rAxisLabelProperties.m_aFontReferenceSize.Height : rAxisLabelProperties.m_aFontReferenceSize.Width;
+ bool bTextHorizontal = rAxisLabelProperties.m_fRotationAngleDegree != 0.0;
+ bool bIsDirectionVertical = bIsHorizontalAxis && bTextHorizontal;
+ const sal_Int32 nFullSize = bIsDirectionVertical ? rAxisLabelProperties.m_aFontReferenceSize.Height : rAxisLabelProperties.m_aFontReferenceSize.Width;
- if( !nFullSize || !rLabel.getLength() )
+ if( !nFullSize || rLabel.empty() )
return;
- sal_Int32 nMaxLabelsSize = bIsHorizontalAxis ? rAxisLabelProperties.m_aMaximumSpaceForLabels.Height : rAxisLabelProperties.m_aMaximumSpaceForLabels.Width;
- const sal_Int32 nAvgCharWidth = rShape2DText.getSize().Width / rLabel.getLength();
- const sal_Int32 nTextSize = bIsHorizontalAxis ? ShapeFactory::getSizeAfterRotation(rShape2DText, rAxisLabelProperties.fRotationAngleDegree).Height :
- ShapeFactory::getSizeAfterRotation(rShape2DText, rAxisLabelProperties.fRotationAngleDegree).Width;
+ const sal_Int32 nAvgCharWidth = rShape2DText.getSize().Width / rLabel.size();
+
+ sal_Int32 nMaxLabelsSize = bIsDirectionVertical ? rAxisLabelProperties.m_aMaximumSpaceForLabels.Height : rAxisLabelProperties.m_aMaximumSpaceForLabels.Width;
+
+ awt::Size aSizeAfterRotation = ShapeFactory::getSizeAfterRotation(rShape2DText, rAxisLabelProperties.m_fRotationAngleDegree);
+
+ const sal_Int32 nTextSize = bIsDirectionVertical ? aSizeAfterRotation.Height : aSizeAfterRotation.Width;
if( !nAvgCharWidth )
return;
- static const OUStringLiteral sDots = u"...";
+ static constexpr OUString sDots = u"..."_ustr;
const sal_Int32 nCharsToRemove = ( nTextSize - nMaxLabelsSize ) / nAvgCharWidth + 1;
- sal_Int32 nNewLen = rLabel.getLength() - nCharsToRemove - sDots.getLength();
+ sal_Int32 nNewLen = rLabel.size() - nCharsToRemove - sDots.getLength();
// Prevent from showing only dots
if (nNewLen < 0)
- nNewLen = ( rLabel.getLength() >= sDots.getLength() ) ? sDots.getLength() : rLabel.getLength();
+ nNewLen = ( sal_Int32(rLabel.size()) >= sDots.getLength() ) ? sDots.getLength() : rLabel.size();
bool bCrop = nCharsToRemove > 0;
if( !bCrop )
return;
- OUString aNewLabel = rLabel.copy( 0, nNewLen );
+ OUString aNewLabel( rLabel.substr( 0, nNewLen ) );
if( nNewLen > sDots.getLength() )
aNewLabel += sDots;
rShape2DText.setString( aNewLabel );
@@ -127,9 +137,9 @@ static rtl::Reference<SvxShapeText> createSingleLabel(
return nullptr;
// #i78696# use mathematically correct rotation now
- const double fRotationAnglePi(-basegfx::deg2rad(rAxisLabelProperties.fRotationAngleDegree));
+ const double fRotationAnglePi(-basegfx::deg2rad(rAxisLabelProperties.m_fRotationAngleDegree));
uno::Any aATransformation = ShapeFactory::makeTransformation( rAnchorScreenPosition2D, fRotationAnglePi );
- OUString aLabel = ShapeFactory::getStackedString( rLabel, rAxisLabelProperties.bStackCharacters );
+ OUString aLabel = ShapeFactory::getStackedString( rLabel, rAxisLabelProperties.m_bStackCharacters );
rtl::Reference<SvxShapeText> xShape2DText =
ShapeFactory::createText( xTarget, aLabel, rPropNames, rPropValues, aATransformation );
@@ -138,7 +148,7 @@ static rtl::Reference<SvxShapeText> createSingleLabel(
lcl_ResizeTextShapeToFitAvailableSpace(*xShape2DText, rAxisLabelProperties, aLabel, rPropNames, rPropValues, bIsHorizontalAxis);
LabelPositionHelper::correctPositionForRotation( xShape2DText
- , rAxisProperties.maLabelAlignment.meAlignment, rAxisLabelProperties.fRotationAngleDegree, rAxisProperties.m_bComplexCategories );
+ , rAxisProperties.maLabelAlignment.meAlignment, rAxisLabelProperties.m_fRotationAngleDegree, rAxisProperties.m_bComplexCategories );
return xShape2DText;
}
@@ -201,7 +211,7 @@ static bool doesOverlap( const rtl::Reference<SvxShapeText>& xShape1
static void removeShapesAtWrongRhythm( TickIter& rIter
, sal_Int32 nCorrectRhythm
, sal_Int32 nMaxTickToCheck
- , const Reference< drawing::XShapes >& xTarget )
+ , const rtl::Reference< SvxShapeGroupAnyD >& xTarget )
{
sal_Int32 nTick = 0;
for( TickInfo* pTickInfo = rIter.firstInfo()
@@ -424,7 +434,7 @@ static void getAxisLabelProperties(
const AxisLabelProperties& rAxisLabelProp,
sal_Int32 nLimitedSpaceForText, bool bLimitedHeight )
{
- Reference<beans::XPropertySet> xProps(rAxisProp.m_xAxisModel, uno::UNO_QUERY);
+ Reference<beans::XPropertySet> xProps(rAxisProp.m_xAxisModel);
PropertyMapper::getTextLabelMultiPropertyLists(
xProps, rPropNames, rPropValues, false, nLimitedSpaceForText, bLimitedHeight, false);
@@ -507,16 +517,16 @@ bool VCartesianAxis::isBreakOfLabelsAllowed(
{
if( m_aTextLabels.getLength() > 100 )
return false;
- if( !rAxisLabelProperties.bLineBreakAllowed )
+ if( !rAxisLabelProperties.m_bLineBreakAllowed )
return false;
- if( rAxisLabelProperties.bStackCharacters )
+ if( rAxisLabelProperties.m_bStackCharacters )
return false;
//no break for value axis
if( !m_bUseTextLabels )
return false;
- if( !( rAxisLabelProperties.fRotationAngleDegree == 0.0 ||
- rAxisLabelProperties.fRotationAngleDegree == 90.0 ||
- rAxisLabelProperties.fRotationAngleDegree == 270.0 ) )
+ if( !( rAxisLabelProperties.m_fRotationAngleDegree == 0.0 ||
+ rAxisLabelProperties.m_fRotationAngleDegree == 90.0 ||
+ rAxisLabelProperties.m_fRotationAngleDegree == 270.0 ) )
return false;
//no break for complex vertical category axis
if( !m_aAxisProperties.m_bSwapXAndY )
@@ -532,26 +542,26 @@ bool canAutoAdjustLabelPlacement(
const AxisLabelProperties& rAxisLabelProperties, bool bIsHorizontalAxis, bool bIsVerticalAxis)
{
// joined prerequisite checks for auto rotate and auto stagger
- if( rAxisLabelProperties.bOverlapAllowed )
+ if( rAxisLabelProperties.m_bOverlapAllowed )
return false;
- if( rAxisLabelProperties.bLineBreakAllowed ) // auto line break may conflict with...
+ if( rAxisLabelProperties.m_bLineBreakAllowed ) // auto line break may conflict with...
return false;
- if( rAxisLabelProperties.fRotationAngleDegree != 0.0 )
+ if( rAxisLabelProperties.m_fRotationAngleDegree != 0.0 )
return false;
// automatic adjusting labels only works for
// horizontal axis with horizontal text
// or vertical axis with vertical text
if( bIsHorizontalAxis )
- return !rAxisLabelProperties.bStackCharacters;
+ return !rAxisLabelProperties.m_bStackCharacters;
if( bIsVerticalAxis )
- return rAxisLabelProperties.bStackCharacters;
+ return rAxisLabelProperties.m_bStackCharacters;
return false;
}
bool isAutoStaggeringOfLabelsAllowed(
const AxisLabelProperties& rAxisLabelProperties, bool bIsHorizontalAxis, bool bIsVerticalAxis )
{
- if( rAxisLabelProperties.eStaggering != AxisLabelStaggering::StaggerAuto )
+ if( rAxisLabelProperties.m_eStaggering != AxisLabelStaggering::StaggerAuto )
return false;
return canAutoAdjustLabelPlacement(rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis);
}
@@ -656,7 +666,7 @@ void VCartesianAxis::createAllTickInfos( TickInfoArraysType& rAllTickInfos )
TickIter* VCartesianAxis::createLabelTickIterator( sal_Int32 nTextLevel )
{
- if( nTextLevel>=0 && nTextLevel < static_cast< sal_Int32 >(m_aAllTickInfos.size()) )
+ if( nTextLevel>=0 && o3tl::make_unsigned(nTextLevel) < m_aAllTickInfos.size() )
return new PureTickIter( m_aAllTickInfos[nTextLevel] );
return nullptr;
}
@@ -715,21 +725,31 @@ bool VCartesianAxis::createTextShapes(
}
}
- if (!isBreakOfLabelsAllowed(rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis) &&
+ bool bIsBreakOfLabelsAllowed = isBreakOfLabelsAllowed( rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis );
+ if (!bIsBreakOfLabelsAllowed &&
!isAutoStaggeringOfLabelsAllowed(rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis) &&
!rAxisLabelProperties.isStaggered())
+ {
return createTextShapesSimple(xTarget, rTickIter, rAxisLabelProperties, pTickFactory);
+ }
FixedNumberFormatter aFixedNumberFormatter(
- m_xNumberFormatsSupplier, rAxisLabelProperties.nNumberFormatKey );
+ m_xNumberFormatsSupplier, rAxisLabelProperties.m_nNumberFormatKey );
bool bIsStaggered = rAxisLabelProperties.isStaggered();
B2DVector aTextToTickDistance = pTickFactory->getDistanceAxisTickToText(m_aAxisProperties, true);
sal_Int32 nLimitedSpaceForText = -1;
- if( isBreakOfLabelsAllowed( rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis ) )
+ if (bIsBreakOfLabelsAllowed)
{
- nLimitedSpaceForText = nScreenDistanceBetweenTicks;
+ if (!m_aAxisProperties.m_bLimitSpaceForLabels)
+ {
+ basegfx::B2DVector nDeltaVector = pTickFactory->getXaxisEndPos() - pTickFactory->getXaxisStartPos();
+ nLimitedSpaceForText = nDeltaVector.getX();
+ }
+ if (nScreenDistanceBetweenTicks > 0)
+ nLimitedSpaceForText = nScreenDistanceBetweenTicks;
+
if( bIsStaggered )
nLimitedSpaceForText *= 2;
@@ -742,14 +762,14 @@ bool VCartesianAxis::createTextShapes(
}
// recalculate the nLimitedSpaceForText in case of 90 and 270 degree if the text break is true
- if ( rAxisLabelProperties.fRotationAngleDegree == 90.0 || rAxisLabelProperties.fRotationAngleDegree == 270.0 )
+ if ( rAxisLabelProperties.m_fRotationAngleDegree == 90.0 || rAxisLabelProperties.m_fRotationAngleDegree == 270.0 )
{
nLimitedSpaceForText = rAxisLabelProperties.m_aMaximumSpaceForLabels.Height;
m_aAxisProperties.m_bLimitSpaceForLabels = false;
}
// recalculate the nLimitedSpaceForText in case of vertical category axis if the text break is true
- if ( m_aAxisProperties.m_bSwapXAndY && bIsVerticalAxis && rAxisLabelProperties.fRotationAngleDegree == 0.0 )
+ if ( m_aAxisProperties.m_bSwapXAndY && bIsVerticalAxis && rAxisLabelProperties.m_fRotationAngleDegree == 0.0 )
{
nLimitedSpaceForText = pTickFactory->getXaxisStartPos().getX();
m_aAxisProperties.m_bLimitSpaceForLabels = false;
@@ -790,21 +810,21 @@ bool VCartesianAxis::createTextShapes(
pPREPreviousVisibleTickInfo : pPreviousVisibleTickInfo;
//don't create labels which does not fit into the rhythm
- if( nTick%rAxisLabelProperties.nRhythm != 0 )
+ if( nTick%rAxisLabelProperties.m_nRhythm != 0 )
continue;
//don't create labels for invisible ticks
if( !pTickInfo->bPaintIt )
continue;
- if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.bOverlapAllowed )
+ if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.m_bOverlapAllowed )
{
// Overlapping is not allowed. If the label overlaps with its
// neighboring label, try increasing the tick interval (or rhythm
// as it's called) and start over.
if( lcl_doesShapeOverlapWithTickmark( *pLastVisibleNeighbourTickInfo->xTextShape
- , rAxisLabelProperties.fRotationAngleDegree
+ , rAxisLabelProperties.m_fRotationAngleDegree
, pTickInfo->aTickScreenPosition ) )
{
// This tick overlaps with its neighbor. Try to stagger (if
@@ -814,11 +834,11 @@ bool VCartesianAxis::createTextShapes(
if( !bIsStaggered && isAutoStaggeringOfLabelsAllowed( rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis ) )
{
bIsStaggered = true;
- rAxisLabelProperties.eStaggering = AxisLabelStaggering::StaggerEven;
+ rAxisLabelProperties.m_eStaggering = AxisLabelStaggering::StaggerEven;
pLastVisibleNeighbourTickInfo = pPREPreviousVisibleTickInfo;
if( !pLastVisibleNeighbourTickInfo ||
!lcl_doesShapeOverlapWithTickmark( *pLastVisibleNeighbourTickInfo->xTextShape
- , rAxisLabelProperties.fRotationAngleDegree
+ , rAxisLabelProperties.m_fRotationAngleDegree
, pTickInfo->aTickScreenPosition ) )
bOverlapsAfterAutoStagger = false;
}
@@ -829,8 +849,8 @@ bool VCartesianAxis::createTextShapes(
// Increment the visible tick intervals (if that's
// allowed) and start over.
- rAxisLabelProperties.nRhythm++;
- removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.nRhythm, nTick, xTarget );
+ rAxisLabelProperties.m_nRhythm++;
+ removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.m_nRhythm, nTick, xTarget );
return false;
}
}
@@ -856,37 +876,41 @@ bool VCartesianAxis::createTextShapes(
//create single label
if(!pTickInfo->xTextShape.is())
+ {
pTickInfo->xTextShape = createSingleLabel( xTarget
, aAnchorScreenPosition2D, aLabel
, rAxisLabelProperties, m_aAxisProperties
, aPropNames, aPropValues, bIsHorizontalAxis );
+ }
if(!pTickInfo->xTextShape.is())
continue;
- recordMaximumTextSize( *pTickInfo->xTextShape, rAxisLabelProperties.fRotationAngleDegree );
+ recordMaximumTextSize( *pTickInfo->xTextShape, rAxisLabelProperties.m_fRotationAngleDegree );
// Label has multiple lines and the words are broken
- if( nLimitedSpaceForText>0 && !rAxisLabelProperties.bOverlapAllowed
- && rAxisLabelProperties.fRotationAngleDegree == 0.0
- && lcl_hasWordBreak( pTickInfo->xTextShape ) )
+ if (nLimitedSpaceForText > 0
+ && !rAxisLabelProperties.m_bOverlapAllowed
+ && rAxisLabelProperties.m_fRotationAngleDegree == 0.0
+ && nTick > 0
+ && lcl_hasWordBreak(pTickInfo->xTextShape))
{
// Label has multiple lines and belongs to a complex category
// axis. Rotate 90 degrees to try to avoid overlaps.
if ( m_aAxisProperties.m_bComplexCategories )
{
- rAxisLabelProperties.fRotationAngleDegree = 90;
+ rAxisLabelProperties.m_fRotationAngleDegree = 90;
}
- rAxisLabelProperties.bLineBreakAllowed = false;
- m_aAxisLabelProperties.fRotationAngleDegree = rAxisLabelProperties.fRotationAngleDegree;
+ rAxisLabelProperties.m_bLineBreakAllowed = false;
+ m_aAxisLabelProperties.m_fRotationAngleDegree = rAxisLabelProperties.m_fRotationAngleDegree;
removeTextShapesFromTicks();
return false;
}
//if NO OVERLAP -> remove overlapping shapes
- if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.bOverlapAllowed )
+ if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.m_bOverlapAllowed )
{
// Check if the label still overlaps with its neighbor.
- if( doesOverlap( pLastVisibleNeighbourTickInfo->xTextShape, pTickInfo->xTextShape, rAxisLabelProperties.fRotationAngleDegree ) )
+ if( doesOverlap( pLastVisibleNeighbourTickInfo->xTextShape, pTickInfo->xTextShape, rAxisLabelProperties.m_fRotationAngleDegree ) )
{
// It overlaps. Check if staggering helps.
bool bOverlapsAfterAutoStagger = true;
@@ -898,11 +922,11 @@ bool VCartesianAxis::createTextShapes(
|| m_aAxisProperties.m_bTryStaggeringFirst )
{
bIsStaggered = true;
- rAxisLabelProperties.eStaggering = AxisLabelStaggering::StaggerEven;
+ rAxisLabelProperties.m_eStaggering = AxisLabelStaggering::StaggerEven;
pLastVisibleNeighbourTickInfo = pPREPreviousVisibleTickInfo;
if( !pLastVisibleNeighbourTickInfo ||
!lcl_doesShapeOverlapWithTickmark( *pLastVisibleNeighbourTickInfo->xTextShape
- , rAxisLabelProperties.fRotationAngleDegree
+ , rAxisLabelProperties.m_fRotationAngleDegree
, pTickInfo->aTickScreenPosition ) )
bOverlapsAfterAutoStagger = false;
}
@@ -919,15 +943,15 @@ bool VCartesianAxis::createTextShapes(
// The nRhythm parameter is reset to 1 since the layout
// used for text labels is changed.
rAxisLabelProperties.autoRotate45();
- m_aAxisLabelProperties.fRotationAngleDegree = rAxisLabelProperties.fRotationAngleDegree; // Store it for future runs.
+ m_aAxisLabelProperties.m_fRotationAngleDegree = rAxisLabelProperties.m_fRotationAngleDegree; // Store it for future runs.
removeTextShapesFromTicks();
- rAxisLabelProperties.nRhythm = 1;
+ rAxisLabelProperties.m_nRhythm = 1;
return false;
}
// Try incrementing the tick interval and start over.
- rAxisLabelProperties.nRhythm++;
- removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.nRhythm, nTick, xTarget );
+ rAxisLabelProperties.m_nRhythm++;
+ removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.m_nRhythm, nTick, xTarget );
return false;
}
}
@@ -944,7 +968,7 @@ bool VCartesianAxis::createTextShapesSimple(
AxisLabelProperties& rAxisLabelProperties, TickFactory2D const * pTickFactory )
{
FixedNumberFormatter aFixedNumberFormatter(
- m_xNumberFormatsSupplier, rAxisLabelProperties.nNumberFormatKey );
+ m_xNumberFormatsSupplier, rAxisLabelProperties.m_nNumberFormatKey );
const bool bIsHorizontalAxis = pTickFactory->isHorizontalAxis();
const bool bIsVerticalAxis = pTickFactory->isVerticalAxis();
@@ -979,28 +1003,28 @@ bool VCartesianAxis::createTextShapesSimple(
const TickInfo* pLastVisibleNeighbourTickInfo = pPreviousVisibleTickInfo;
//don't create labels which does not fit into the rhythm
- if( nTick%rAxisLabelProperties.nRhythm != 0 )
+ if( nTick%rAxisLabelProperties.m_nRhythm != 0 )
continue;
//don't create labels for invisible ticks
if( !pTickInfo->bPaintIt )
continue;
- if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.bOverlapAllowed )
+ if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.m_bOverlapAllowed )
{
// Overlapping is not allowed. If the label overlaps with its
// neighboring label, try increasing the tick interval (or rhythm
// as it's called) and start over.
if( lcl_doesShapeOverlapWithTickmark( *pLastVisibleNeighbourTickInfo->xTextShape
- , rAxisLabelProperties.fRotationAngleDegree
+ , rAxisLabelProperties.m_fRotationAngleDegree
, pTickInfo->aTickScreenPosition ) )
{
// This tick overlaps with its neighbor. Increment the visible
// tick intervals (if that's allowed) and start over.
- rAxisLabelProperties.nRhythm++;
- removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.nRhythm, nTick, xTarget );
+ rAxisLabelProperties.m_nRhythm++;
+ removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.m_nRhythm, nTick, xTarget );
return false;
}
}
@@ -1032,13 +1056,13 @@ bool VCartesianAxis::createTextShapesSimple(
if(!pTickInfo->xTextShape.is())
continue;
- recordMaximumTextSize( *pTickInfo->xTextShape, rAxisLabelProperties.fRotationAngleDegree );
+ recordMaximumTextSize( *pTickInfo->xTextShape, rAxisLabelProperties.m_fRotationAngleDegree );
//if NO OVERLAP -> remove overlapping shapes
- if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.bOverlapAllowed )
+ if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.m_bOverlapAllowed )
{
// Check if the label still overlaps with its neighbor.
- if( doesOverlap( pLastVisibleNeighbourTickInfo->xTextShape, pTickInfo->xTextShape, rAxisLabelProperties.fRotationAngleDegree ) )
+ if( doesOverlap( pLastVisibleNeighbourTickInfo->xTextShape, pTickInfo->xTextShape, rAxisLabelProperties.m_fRotationAngleDegree ) )
{
// It overlaps.
if( isAutoRotatingOfLabelsAllowed(rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis) )
@@ -1049,15 +1073,15 @@ bool VCartesianAxis::createTextShapesSimple(
// The nRhythm parameter is reset to 1 since the layout
// used for text labels is changed.
rAxisLabelProperties.autoRotate45();
- m_aAxisLabelProperties.fRotationAngleDegree = rAxisLabelProperties.fRotationAngleDegree; // Store it for future runs.
+ m_aAxisLabelProperties.m_fRotationAngleDegree = rAxisLabelProperties.m_fRotationAngleDegree; // Store it for future runs.
removeTextShapesFromTicks();
- rAxisLabelProperties.nRhythm = 1;
+ rAxisLabelProperties.m_nRhythm = 1;
return false;
}
// Try incrementing the tick interval and start over.
- rAxisLabelProperties.nRhythm++;
- removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.nRhythm, nTick, xTarget );
+ rAxisLabelProperties.m_nRhythm++;
+ removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.m_nRhythm, nTick, xTarget );
return false;
}
}
@@ -1556,14 +1580,14 @@ sal_Int32 VCartesianAxis::estimateMaximumAutoMainIncrementCount()
// tdf#48041: do not duplicate the value labels because of rounding
if (m_aAxisProperties.m_nAxisType != css::chart2::AxisType::DATE)
{
- FixedNumberFormatter aFixedNumberFormatterTest(m_xNumberFormatsSupplier, m_aAxisLabelProperties.nNumberFormatKey);
+ FixedNumberFormatter aFixedNumberFormatterTest(m_xNumberFormatsSupplier, m_aAxisLabelProperties.m_nNumberFormatKey);
OUString sPreviousValueLabel;
sal_Int32 nSameLabel = 0;
- for (sal_Int32 nLabel = 0; nLabel < static_cast<sal_Int32>(m_aAllTickInfos[0].size()); ++nLabel)
+ for (auto const & nLabel: m_aAllTickInfos[0])
{
Color nColor = COL_AUTO;
bool bHasColor = false;
- OUString sValueLabel = aFixedNumberFormatterTest.getFormattedString(m_aAllTickInfos[0][nLabel].fScaledTickValue, nColor, bHasColor);
+ OUString sValueLabel = aFixedNumberFormatterTest.getFormattedString(nLabel.fScaledTickValue, nColor, bHasColor);
if (sValueLabel == sPreviousValueLabel)
{
nSameLabel++;
@@ -1610,7 +1634,7 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel
std::unique_ptr<TickIter> apTickIter(createLabelTickIterator(nTextLevel));
if (apTickIter)
{
- double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree;
+ double fRotationAngleDegree = m_aAxisLabelProperties.m_fRotationAngleDegree;
if( nTextLevel>0 )
{
lcl_shiftLabels(*apTickIter, aCumulatedLabelsDistance);
@@ -1630,8 +1654,8 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel
{
if( !m_aAllTickInfos.empty() )
{
- LabelIterator aInnerIter( m_aAllTickInfos[0], rAxisLabelProperties.eStaggering, true );
- LabelIterator aOuterIter( m_aAllTickInfos[0], rAxisLabelProperties.eStaggering, false );
+ LabelIterator aInnerIter( m_aAllTickInfos[0], rAxisLabelProperties.m_eStaggering, true );
+ LabelIterator aOuterIter( m_aAllTickInfos[0], rAxisLabelProperties.m_eStaggering, false );
lcl_shiftLabels( aOuterIter
, lcl_getLabelsDistance( aInnerIter
@@ -1640,16 +1664,55 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel
}
}
+void VCartesianAxis::createDataTableShape(std::unique_ptr<TickFactory2D> const& rpTickFactory2D)
+{
+ // Check if we can create the data table shape
+ // Data table view and m_bDisplayDataTable must be true
+ if (!m_pDataTableView || !m_aAxisProperties.m_bDisplayDataTable)
+ return;
+
+ m_pDataTableView->initializeShapes(m_xDataTableTarget);
+ basegfx::B2DVector aStart = rpTickFactory2D->getXaxisStartPos();
+ basegfx::B2DVector aEnd = rpTickFactory2D->getXaxisEndPos();
+
+ rpTickFactory2D->updateScreenValues(m_aAllTickInfos);
+
+ sal_Int32 nDistance = -1;
+
+ std::unique_ptr<TickIter> apTickIter(createLabelTickIterator(0));
+ if (apTickIter)
+ {
+ nDistance = TickFactory2D::getTickScreenDistance(*apTickIter);
+ if (getTextLevelCount() > 1)
+ nDistance *= 2;
+ }
+
+ if (nDistance <= 0)
+ {
+ // we only have one data series so we have no TickMarks, therefore calculate and use the table size
+ auto rDelta = aEnd - aStart;
+ nDistance = basegfx::fround(rDelta.getX());
+ }
+
+ if (nDistance > 0)
+ {
+ m_pDataTableView->createShapes(aStart, aEnd, nDistance);
+ }
+}
+
void VCartesianAxis::createLabels()
{
if( !prepareShapeCreation() )
return;
+ std::unique_ptr<TickFactory2D> apTickFactory2D(createTickFactory2D()); // throws on failure
+
+ createDataTableShape(apTickFactory2D);
+
//create labels
if (!m_aAxisProperties.m_bDisplayLabels)
return;
- std::unique_ptr<TickFactory2D> apTickFactory2D(createTickFactory2D()); // throws on failure
TickFactory2D* pTickFactory2D = apTickFactory2D.get();
//get the transformed screen values for all tickmarks in aAllTickInfos
@@ -1677,15 +1740,15 @@ void VCartesianAxis::createLabels()
AxisLabelProperties aComplexProps(m_aAxisLabelProperties);
if( m_aAxisProperties.m_bComplexCategories )
{
- aComplexProps.bLineBreakAllowed = true;
- aComplexProps.bOverlapAllowed = aComplexProps.fRotationAngleDegree != 0.0;
+ aComplexProps.m_bLineBreakAllowed = true;
+ aComplexProps.m_bOverlapAllowed = aComplexProps.m_fRotationAngleDegree != 0.0;
if( nTextLevel > 0 )
{
//multilevel labels: 0 or 90 by default
if( m_aAxisProperties.m_bSwapXAndY )
- aComplexProps.fRotationAngleDegree = 90.0;
+ aComplexProps.m_fRotationAngleDegree = 90.0;
else
- aComplexProps.fRotationAngleDegree = 0.0;
+ aComplexProps.m_fRotationAngleDegree = 0.0;
}
}
AxisLabelProperties& rAxisLabelProperties = m_aAxisProperties.m_bComplexCategories ? aComplexProps : m_aAxisLabelProperties;
@@ -1696,11 +1759,20 @@ void VCartesianAxis::createLabels()
}
}
doStaggeringOfLabels( m_aAxisLabelProperties, pTickFactory2D );
+
+ if (m_pDataTableView)
+ {
+ sal_Int32 x = m_xTextTarget->getPosition().X;
+ sal_Int32 y = m_xTextTarget->getPosition().Y;
+ sal_Int32 height = m_xTextTarget->getSize().Height;
+ m_pDataTableView->changePosition(x, y + height);
+ }
}
void VCartesianAxis::createMaximumLabels()
{
- TrueGuard aRecordMaximumTextSize(m_bRecordMaximumTextSize);
+ m_bRecordMaximumTextSize = true;
+ const comphelper::ScopeGuard aGuard([this]() { m_bRecordMaximumTextSize = false; });
if( !prepareShapeCreation() )
return;
@@ -1720,10 +1792,10 @@ void VCartesianAxis::createMaximumLabels()
AxisLabelProperties aAxisLabelProperties( m_aAxisLabelProperties );
if( isAutoStaggeringOfLabelsAllowed( aAxisLabelProperties, pTickFactory2D->isHorizontalAxis(), pTickFactory2D->isVerticalAxis() ) )
- aAxisLabelProperties.eStaggering = AxisLabelStaggering::StaggerEven;
+ aAxisLabelProperties.m_eStaggering = AxisLabelStaggering::StaggerEven;
- aAxisLabelProperties.bOverlapAllowed = true;
- aAxisLabelProperties.bLineBreakAllowed = false;
+ aAxisLabelProperties.m_bOverlapAllowed = true;
+ aAxisLabelProperties.m_bLineBreakAllowed = false;
sal_Int32 nTextLevelCount = getTextLevelCount();
for( sal_Int32 nTextLevel=0; nTextLevel<nTextLevelCount; nTextLevel++ )
{
@@ -1766,7 +1838,7 @@ void VCartesianAxis::updatePositions()
static_cast<sal_Int32>(aTickScreenPos2D.getX())
,static_cast<sal_Int32>(aTickScreenPos2D.getY()));
- double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree;
+ double fRotationAngleDegree = m_aAxisLabelProperties.m_fRotationAngleDegree;
if( nDepth > 0 )
{
//multilevel labels: 0 or 90 by default
@@ -1835,12 +1907,12 @@ void VCartesianAxis::createShapes()
if( !prepareShapeCreation() )
return;
- std::unique_ptr<TickFactory2D> apTickFactory2D(createTickFactory2D()); // throws on failure
- TickFactory2D* pTickFactory2D = apTickFactory2D.get();
-
//create line shapes
if(m_nDimension==2)
{
+ std::unique_ptr<TickFactory2D> apTickFactory2D(createTickFactory2D()); // throws on failure
+ TickFactory2D* pTickFactory2D = apTickFactory2D.get();
+
//create extra long ticks to separate complex categories (create them only there where the labels are)
if( isComplexCategoryAxis() )
{
@@ -1858,7 +1930,7 @@ void VCartesianAxis::createShapes()
std::unique_ptr< TickIter > apTickIter(createLabelTickIterator( nTextLevel ));
if( apTickIter )
{
- double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree;
+ double fRotationAngleDegree = m_aAxisLabelProperties.m_fRotationAngleDegree;
if( nTextLevel > 0 )
{
//Multi-level Labels: default to 0 or 90
@@ -1944,6 +2016,20 @@ void VCartesianAxis::createShapes()
createLabels();
}
+void VCartesianAxis::createDataTableView(std::vector<std::unique_ptr<VSeriesPlotter>>& rSeriesPlotterList,
+ Reference<util::XNumberFormatsSupplier> const& xNumberFormatsSupplier,
+ rtl::Reference<::chart::ChartModel> const& xChartDoc,
+ css::uno::Reference<css::uno::XComponentContext> const& rComponentContext)
+{
+ if (!m_aAxisProperties.m_bDisplayDataTable)
+ return;
+
+ m_pDataTableView.reset(new DataTableView(xChartDoc, m_aAxisProperties.m_xDataTableModel, rComponentContext, m_aAxisProperties.m_bDataTableAlignAxisValuesWithColumns));
+ m_pDataTableView->initializeValues(rSeriesPlotterList);
+ m_xNumberFormatsSupplier = xNumberFormatsSupplier;
+}
+
+
} //namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/axes/VCartesianAxis.hxx b/chart2/source/view/axes/VCartesianAxis.hxx
index 94e9b2ab967a..210f36dd4802 100644
--- a/chart2/source/view/axes/VCartesianAxis.hxx
+++ b/chart2/source/view/axes/VCartesianAxis.hxx
@@ -23,7 +23,6 @@
namespace chart
{
-
class VCartesianAxis : public VAxisBase
{
// public methods
@@ -99,6 +98,10 @@ public:
::basegfx::B2DVector aScreenPos;
};
+ void createDataTableView(std::vector<std::unique_ptr<VSeriesPlotter>>& rSeriesPlotterList,
+ css::uno::Reference<css::util::XNumberFormatsSupplier> const& xNumberFormatsSupplier,
+ rtl::Reference<::chart::ChartModel> const& xChartDoc,
+ css::uno::Reference<css::uno::XComponentContext> const& rComponentContext) override;
private: //methods
/**
* Go through all tick label positions and decide which labels to display
@@ -153,6 +156,8 @@ private: //methods
::basegfx::B2DVector getScreenPosition( double fLogicX, double fLogicY, double fLogicZ ) const;
ScreenPosAndLogicPos getScreenPosAndLogicPos( double fLogicX, double fLogicY, double fLogicZ ) const;
+
+ void createDataTableShape(std::unique_ptr<TickFactory2D> const& rTickFactory2D);
};
} //namespace chart
diff --git a/chart2/source/view/axes/VCartesianCoordinateSystem.cxx b/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
index 71c280f45007..81fa369c2f60 100644
--- a/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
@@ -22,10 +22,13 @@
#include "VCartesianAxis.hxx"
#include <BaseCoordinateSystem.hxx>
#include <AxisIndexDefines.hxx>
+#include <Axis.hxx>
+#include <DataTable.hxx>
+#include <Diagram.hxx>
#include <AxisHelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <ChartModel.hxx>
-#include <com/sun/star/chart2/XCoordinateSystem.hpp>
+#include <GridProperties.hxx>
#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
@@ -79,7 +82,7 @@ void VCartesianCoordinateSystem::createGridShapes()
for( sal_Int32 nDimensionIndex=0; nDimensionIndex<3; nDimensionIndex++)
{
sal_Int32 nAxisIndex = MAIN_AXIS_INDEX;
- Reference< XAxis > xAxis( AxisHelper::getAxis( nDimensionIndex, nAxisIndex, m_xCooSysModel ) );
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( nDimensionIndex, nAxisIndex, m_xCooSysModel );
if(!xAxis.is() || !AxisHelper::shouldAxisBeDisplayed( xAxis, m_xCooSysModel ))
continue;
@@ -98,16 +101,17 @@ void VCartesianCoordinateSystem::createGridShapes()
}
void VCartesianCoordinateSystem::createVAxisList(
- const uno::Reference<chart2::XChartDocument> & xChartDoc
- , const awt::Size& rFontReferenceSize
- , const awt::Rectangle& rMaximumSpaceForLabels
- , bool bLimitSpaceForLabels
- )
+ const rtl::Reference<::chart::ChartModel> & xChartDoc,
+ const awt::Size& rFontReferenceSize,
+ const awt::Rectangle& rMaximumSpaceForLabels,
+ bool bLimitSpaceForLabels,
+ std::vector<std::unique_ptr<VSeriesPlotter>>& rSeriesPlotterList,
+ uno::Reference<uno::XComponentContext> const& rComponentContext)
{
// note: using xChartDoc itself as XNumberFormatsSupplier would cause
// a leak from VCartesianAxis due to cyclic reference
uno::Reference<util::XNumberFormatsSupplier> const xNumberFormatsSupplier(
- dynamic_cast<ChartModel&>(*xChartDoc).getNumberFormatsSupplier());
+ xChartDoc->getNumberFormatsSupplier());
m_aAxisMap.clear();
@@ -126,16 +130,17 @@ void VCartesianCoordinateSystem::createVAxisList(
sal_Int32 nMaxAxisIndex = m_xCooSysModel->getMaximumAxisIndexByDimension(nDimensionIndex);
for( sal_Int32 nAxisIndex = 0; nAxisIndex <= nMaxAxisIndex; nAxisIndex++ )
{
- Reference< XAxis > xAxis = getAxisByDimension(nDimensionIndex,nAxisIndex);
+ rtl::Reference< Axis > xAxis = getAxisByDimension(nDimensionIndex,nAxisIndex);
if(!xAxis.is() || !AxisHelper::shouldAxisBeDisplayed( xAxis, m_xCooSysModel ))
continue;
- AxisProperties aAxisProperties(xAxis,getExplicitCategoriesProvider());
+ rtl::Reference<Diagram> xDiagram(xChartDoc->getFirstChartDiagram());
+ AxisProperties aAxisProperties(xAxis, getExplicitCategoriesProvider(), xDiagram->getDataTableRef());
aAxisProperties.m_nDimensionIndex = nDimensionIndex;
aAxisProperties.m_bSwapXAndY = bSwapXAndY;
aAxisProperties.m_bIsMainAxis = (nAxisIndex==0);
aAxisProperties.m_bLimitSpaceForLabels = bLimitSpaceForLabels;
- Reference< XAxis > xCrossingMainAxis( AxisHelper::getCrossingMainAxis( xAxis, m_xCooSysModel ) );
+ rtl::Reference< Axis > xCrossingMainAxis = AxisHelper::getCrossingMainAxis( xAxis, m_xCooSysModel );
if( xCrossingMainAxis.is() )
{
ScaleData aCrossingScale( xCrossingMainAxis->getScaleData() );
@@ -150,8 +155,8 @@ void VCartesianCoordinateSystem::createVAxisList(
aAxisProperties.m_xAxisTextProvider = new TextualDataProvider( m_aSeriesNamesForZAxis );
//for the z axis copy the positioning properties from the x axis (or from the y axis for swapped coordinate systems)
- Reference< XAxis > xSisterAxis( AxisHelper::getCrossingMainAxis( xCrossingMainAxis, m_xCooSysModel ) );
- aAxisProperties.initAxisPositioning( Reference< beans::XPropertySet >( xSisterAxis, uno::UNO_QUERY) );
+ rtl::Reference< Axis > xSisterAxis = AxisHelper::getCrossingMainAxis( xCrossingMainAxis, m_xCooSysModel );
+ aAxisProperties.initAxisPositioning( xSisterAxis );
}
aAxisProperties.init(true);
if(aAxisProperties.m_bDisplayLabels)
@@ -163,6 +168,7 @@ void VCartesianCoordinateSystem::createVAxisList(
apVAxis->set3DWallPositions( m_eLeftWallPos, m_eBackWallPos, m_eBottomPos );
apVAxis->initAxisLabelProperties(rFontReferenceSize,rMaximumSpaceForLabels);
+ apVAxis->createDataTableView(rSeriesPlotterList, xNumberFormatsSupplier, xChartDoc, rComponentContext);
}
}
}
@@ -175,16 +181,13 @@ void VCartesianCoordinateSystem::initVAxisInList()
sal_Int32 nDimensionCount = m_xCooSysModel->getDimension();
bool bSwapXAndY = getPropertySwapXAndYAxis();
- for (auto const& elem : m_aAxisMap)
+ for (auto const& [nIndexPair, pVAxis] : m_aAxisMap)
{
- VAxisBase* pVAxis = elem.second.get();
- if( pVAxis )
+ if (pVAxis)
{
- sal_Int32 nDimensionIndex = elem.first.first;
- sal_Int32 nAxisIndex = elem.first.second;
+ auto [nDimensionIndex, nAxisIndex] = nIndexPair;
pVAxis->setExplicitScaleAndIncrement( getExplicitScale( nDimensionIndex, nAxisIndex ), getExplicitIncrement( nDimensionIndex, nAxisIndex ) );
- pVAxis->initPlotter(m_xLogicTargetForAxes,m_xFinalTarget
- , createCIDForAxis( nDimensionIndex, nAxisIndex ) );
+ pVAxis->initPlotter(m_xLogicTargetForAxes, m_xFinalTarget, createCIDForAxis( nDimensionIndex, nAxisIndex ) );
if(nDimensionCount==2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
pVAxis->setScales( getExplicitScales(nDimensionIndex,nAxisIndex), bSwapXAndY );
@@ -200,13 +203,12 @@ void VCartesianCoordinateSystem::updateScalesAndIncrementsOnAxes()
sal_Int32 nDimensionCount = m_xCooSysModel->getDimension();
bool bSwapXAndY = getPropertySwapXAndYAxis();
- for (auto const& elem : m_aAxisMap)
+ for (auto const& [nIndexPair, pVAxis] : m_aAxisMap)
{
- VAxisBase* pVAxis = elem.second.get();
- if( pVAxis )
+ if (pVAxis)
{
- sal_Int32 nDimensionIndex = elem.first.first;
- sal_Int32 nAxisIndex = elem.first.second;
+ auto [nDimensionIndex, nAxisIndex] = nIndexPair;
+
pVAxis->setExplicitScaleAndIncrement( getExplicitScale( nDimensionIndex, nAxisIndex ), getExplicitIncrement( nDimensionIndex, nAxisIndex ) );
if(nDimensionCount==2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
diff --git a/chart2/source/view/axes/VCartesianCoordinateSystem.hxx b/chart2/source/view/axes/VCartesianCoordinateSystem.hxx
index e26239225261..968d97a21099 100644
--- a/chart2/source/view/axes/VCartesianCoordinateSystem.hxx
+++ b/chart2/source/view/axes/VCartesianCoordinateSystem.hxx
@@ -31,10 +31,12 @@ public:
virtual ~VCartesianCoordinateSystem() override;
virtual void createVAxisList(
- const css::uno::Reference< css::chart2::XChartDocument> &ChartDoc
- , const css::awt::Size& rFontReferenceSize
- , const css::awt::Rectangle& rMaximumSpaceForLabels
- , bool bLimitSpaceForLabels ) override;
+ const rtl::Reference<::chart::ChartModel> &ChartDoc,
+ const css::awt::Size& rFontReferenceSize,
+ const css::awt::Rectangle& rMaximumSpaceForLabels,
+ bool bLimitSpaceForLabels,
+ std::vector<std::unique_ptr<VSeriesPlotter>>& rSeriesPlotterList,
+ css::uno::Reference<css::uno::XComponentContext> const& rComponentContext) override;
virtual void initVAxisInList() override;
virtual void updateScalesAndIncrementsOnAxes() override;
diff --git a/chart2/source/view/axes/VCartesianGrid.cxx b/chart2/source/view/axes/VCartesianGrid.cxx
index 19e60b4ecabd..9916ebac0be4 100644
--- a/chart2/source/view/axes/VCartesianGrid.cxx
+++ b/chart2/source/view/axes/VCartesianGrid.cxx
@@ -25,6 +25,7 @@
#include <CommonConverters.hxx>
#include <AxisHelper.hxx>
#include <VLineProperties.hxx>
+#include <GridProperties.hxx>
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
@@ -74,23 +75,11 @@ GridLinePoints::GridLinePoints( const PlottingPositionHelper* pPosHelper, sal_In
pPosHelper->doLogicScaling( &MaxX,&MaxY,&MaxZ );
if(!pPosHelper->isMathematicalOrientationX())
- {
- double fHelp = MinX;
- MinX = MaxX;
- MaxX = fHelp;
- }
+ std::swap( MinX, MaxX );
if(!pPosHelper->isMathematicalOrientationY())
- {
- double fHelp = MinY;
- MinY = MaxY;
- MaxY = fHelp;
- }
+ std::swap( MinY, MaxY );
if(pPosHelper->isMathematicalOrientationZ())//z axis in draw is reverse to mathematical
- {
- double fHelp = MinZ;
- MinZ = MaxZ;
- MaxZ = fHelp;
- }
+ std::swap( MinZ, MaxZ );
bool bSwapXY = pPosHelper->isSwapXAndY();
//P0: point on 'back' wall, not on 'left' wall
@@ -161,9 +150,9 @@ static void addLine3D( std::vector<std::vector<css::drawing::Position3D>>& rPoin
}
VCartesianGrid::VCartesianGrid( sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount
- , const Sequence< Reference< beans::XPropertySet > > & rGridPropertiesList )
+ , std::vector< rtl::Reference< ::chart::GridProperties > > aGridPropertiesList )
: VAxisOrGridBase( nDimensionIndex, nDimensionCount )
- , m_aGridPropertiesList( rGridPropertiesList )
+ , m_aGridPropertiesList( std::move(aGridPropertiesList) )
{
m_pPosHelper = new PlottingPositionHelper();
}
@@ -175,10 +164,10 @@ VCartesianGrid::~VCartesianGrid()
}
void VCartesianGrid::fillLinePropertiesFromGridModel( std::vector<VLineProperties>& rLinePropertiesList
- , const Sequence< Reference< beans::XPropertySet > > & rGridPropertiesList )
+ , const std::vector< rtl::Reference< ::chart::GridProperties > > & rGridPropertiesList )
{
rLinePropertiesList.clear();
- if( !rGridPropertiesList.hasElements() )
+ if( rGridPropertiesList.empty() )
return;
VLineProperties aLineProperties;
@@ -194,7 +183,7 @@ void VCartesianGrid::fillLinePropertiesFromGridModel( std::vector<VLinePropertie
void VCartesianGrid::createShapes()
{
- if(!m_aGridPropertiesList.hasElements())
+ if(m_aGridPropertiesList.empty())
return;
//somehow equal to axis tickmarks
diff --git a/chart2/source/view/axes/VCartesianGrid.hxx b/chart2/source/view/axes/VCartesianGrid.hxx
index 2302a1d5a69f..d41bcc4d466f 100644
--- a/chart2/source/view/axes/VCartesianGrid.hxx
+++ b/chart2/source/view/axes/VCartesianGrid.hxx
@@ -21,30 +21,30 @@
#include "VAxisOrGridBase.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
-namespace chart { struct VLineProperties; }
-
namespace chart
{
+class GridProperties;
+struct VLineProperties;
class VCartesianGrid : public VAxisOrGridBase
{
// public methods
public:
VCartesianGrid( sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount
- , const css::uno::Sequence<
- css::uno::Reference< css::beans::XPropertySet > >& rGridPropertiesList //main grid, subgrid, subsubgrid etc
+ , std::vector<
+ rtl::Reference< ::chart::GridProperties > > aGridPropertiesList //main grid, subgrid, subsubgrid etc
);
virtual ~VCartesianGrid() override;
virtual void createShapes() override;
static void fillLinePropertiesFromGridModel( std::vector<VLineProperties>& rLinePropertiesList
- , const css::uno::Sequence<
- css::uno::Reference< css::beans::XPropertySet > >& rGridPropertiesList );
+ , const std::vector<
+ rtl::Reference< ::chart::GridProperties > >& rGridPropertiesList );
private:
- css::uno::Sequence<
- css::uno::Reference< css::beans::XPropertySet > > m_aGridPropertiesList; //main grid, subgrid, subsubgrid etc
+ std::vector<
+ rtl::Reference< ::chart::GridProperties > > m_aGridPropertiesList; //main grid, subgrid, subsubgrid etc
};
} //namespace chart
diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx
index 44f17c7d915f..41ec23d307f3 100644
--- a/chart2/source/view/axes/VCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCoordinateSystem.cxx
@@ -18,26 +18,30 @@
*/
#include <BaseGFXHelper.hxx>
+#include <DateHelper.hxx>
#include <VCoordinateSystem.hxx>
#include "VCartesianCoordinateSystem.hxx"
#include "VPolarCoordinateSystem.hxx"
#include <BaseCoordinateSystem.hxx>
+#include <GridProperties.hxx>
+#include <ChartModel.hxx>
#include <ScaleAutomatism.hxx>
#include <ShapeFactory.hxx>
#include <servicenames_coosystems.hxx>
#include <ObjectIdentifier.hxx>
#include <ExplicitCategoriesProvider.hxx>
+#include <Axis.hxx>
#include "VAxisBase.hxx"
#include <defines.hxx>
#include <chartview/ExplicitValueProvider.hxx>
#include <com/sun/star/chart/TimeUnit.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
-#include <com/sun/star/chart2/XCoordinateSystem.hpp>
-#include <comphelper/sequence.hxx>
-#include <tools/diagnose_ex.h>
+#include <rtl/math.hxx>
+#include <comphelper/diagnose_ex.hxx>
#include <algorithm>
#include <limits>
+#include <utility>
namespace chart
{
@@ -65,8 +69,8 @@ std::unique_ptr<VCoordinateSystem> VCoordinateSystem::createCoordinateSystem(
return pRet;
}
-VCoordinateSystem::VCoordinateSystem( const rtl::Reference< BaseCoordinateSystem >& xCooSys )
- : m_xCooSysModel(xCooSys)
+VCoordinateSystem::VCoordinateSystem( rtl::Reference< BaseCoordinateSystem > xCooSys )
+ : m_xCooSysModel(std::move(xCooSys))
, m_eLeftWallPos(CuboidPlanePosition_Left)
, m_eBackWallPos(CuboidPlanePosition_Back)
, m_eBottomPos(CuboidPlanePosition_Bottom)
@@ -182,33 +186,30 @@ uno::Sequence< sal_Int32 > VCoordinateSystem::getCoordinateSystemResolution(
return aResolution;
}
-Reference< XAxis > VCoordinateSystem::getAxisByDimension( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const
+rtl::Reference< Axis > VCoordinateSystem::getAxisByDimension( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const
{
if( m_xCooSysModel.is() )
- return m_xCooSysModel->getAxisByDimension( nDimensionIndex, nAxisIndex );
+ return m_xCooSysModel->getAxisByDimension2( nDimensionIndex, nAxisIndex );
return nullptr;
}
-Sequence< Reference< beans::XPropertySet > > VCoordinateSystem::getGridListFromAxis( const Reference< XAxis >& xAxis )
+std::vector< rtl::Reference< ::chart::GridProperties > > VCoordinateSystem::getGridListFromAxis( const rtl::Reference< Axis >& xAxis )
{
- std::vector< Reference< beans::XPropertySet > > aRet;
+ std::vector< rtl::Reference< ::chart::GridProperties > > aRet;
if( xAxis.is() )
{
- aRet.push_back( xAxis->getGridProperties() );
- auto aSubGrids( comphelper::sequenceToContainer<std::vector< Reference< beans::XPropertySet > > >( xAxis->getSubGridProperties() ) );
+ aRet.push_back( xAxis->getGridProperties2() );
+ std::vector<rtl::Reference<::chart::GridProperties>> aSubGrids = xAxis->getSubGridProperties2();
aRet.insert( aRet.end(), aSubGrids.begin(), aSubGrids.end() );
}
- return comphelper::containerToSequence( aRet );
+ return aRet;
}
void VCoordinateSystem::impl_adjustDimension( sal_Int32& rDimensionIndex )
{
- if( rDimensionIndex<0 )
- rDimensionIndex=0;
- if( rDimensionIndex>2 )
- rDimensionIndex=2;
+ rDimensionIndex = std::clamp<sal_Int32>(rDimensionIndex, 0, 2);
}
void VCoordinateSystem::impl_adjustDimensionAndIndex( sal_Int32& rDimensionIndex, sal_Int32& rAxisIndex ) const
@@ -322,11 +323,12 @@ sal_Int32 VCoordinateSystem::getMaximumAxisIndexByDimension( sal_Int32 nDimensio
}
void VCoordinateSystem::createVAxisList(
- const uno::Reference<chart2::XChartDocument> & /* xChartDoc */
- , const awt::Size& /* rFontReferenceSize */
- , const awt::Rectangle& /* rMaximumSpaceForLabels */
- , bool /* bLimitSpaceForLabels */
- )
+ const rtl::Reference<::chart::ChartModel> & /* xChartDoc */,
+ const awt::Size& /* rFontReferenceSize */,
+ const awt::Rectangle& /* rMaximumSpaceForLabels */,
+ bool /* bLimitSpaceForLabels */,
+ std::vector<std::unique_ptr<VSeriesPlotter>>& /*rSeriesPlotterList*/,
+ uno::Reference<uno::XComponentContext> const& /*rComponentContext*/)
{
}
@@ -364,8 +366,26 @@ void VCoordinateSystem::prepareAutomaticAxisScaling( ScaleAutomatism& rScaleAuto
{
// y dimension
ExplicitScaleData aScale = getExplicitScale( 0, 0 );
+ double fMaximum = aScale.Maximum;
+ if (!aScale.m_bShiftedCategoryPosition && aScale.AxisType == AxisType::DATE)
+ {
+ // tdf#146066 Increase maximum date value by one month/year,
+ // because the automatic scaling of the Y axis was incorrect when the last Y value was the highest value.
+ Date aMaxDate(aScale.NullDate);
+ aMaxDate.AddDays(::rtl::math::approxFloor(fMaximum));
+ switch (aScale.TimeResolution)
+ {
+ case css::chart::TimeUnit::MONTH:
+ aMaxDate = DateHelper::GetDateSomeMonthsAway(aMaxDate, 1);
+ break;
+ case css::chart::TimeUnit::YEAR:
+ aMaxDate = DateHelper::GetDateSomeYearsAway(aMaxDate, 1);
+ break;
+ }
+ fMaximum = aMaxDate - aScale.NullDate;
+ }
fMin = m_aMergedMinMaxSupplier.getMinimumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex);
- fMax = m_aMergedMinMaxSupplier.getMaximumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex);
+ fMax = m_aMergedMinMaxSupplier.getMaximumYInRange(aScale.Minimum, fMaximum, nAxisIndex);
}
else if( nDimIndex == 2 )
{
@@ -398,7 +418,7 @@ VAxisBase* VCoordinateSystem::getVAxis( sal_Int32 nDimensionIndex, sal_Int32 nAx
tFullAxisIndex aFullAxisIndex( nDimensionIndex, nAxisIndex );
tVAxisMap::const_iterator aIt = m_aAxisMap.find( aFullAxisIndex );
- if( aIt != m_aAxisMap.end() )
+ if (aIt != m_aAxisMap.cend())
pRet = aIt->second.get();
return pRet;
@@ -434,26 +454,26 @@ void VCoordinateSystem::set3DWallPositions( CuboidPlanePosition eLeftWallPos, Cu
void VCoordinateSystem::createMaximumAxesLabels()
{
- for (auto const& elem : m_aAxisMap)
+ for (auto const&[unused, pVAxis] : m_aAxisMap)
{
- VAxisBase* pVAxis = elem.second.get();
- if( pVAxis )
+ (void)unused;
+ if (pVAxis)
{
- if(pVAxis->getDimensionCount()==2)
- pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
+ if (pVAxis->getDimensionCount() == 2)
+ pVAxis->setTransformationSceneToScreen(m_aMatrixSceneToScreen);
pVAxis->createMaximumLabels();
}
}
}
void VCoordinateSystem::createAxesLabels()
{
- for (auto const& elem : m_aAxisMap)
+ for (auto const&[unused, pVAxis] : m_aAxisMap)
{
- VAxisBase* pVAxis = elem.second.get();
- if( pVAxis )
+ (void)unused;
+ if (pVAxis)
{
- if(pVAxis->getDimensionCount()==2)
- pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
+ if (pVAxis->getDimensionCount() == 2)
+ pVAxis->setTransformationSceneToScreen(m_aMatrixSceneToScreen);
pVAxis->createLabels();
}
}
@@ -461,12 +481,12 @@ void VCoordinateSystem::createAxesLabels()
void VCoordinateSystem::updatePositions()
{
- for (auto const& elem : m_aAxisMap)
+ for (auto const&[unused, pVAxis] : m_aAxisMap)
{
- VAxisBase* pVAxis = elem.second.get();
- if( pVAxis )
+ (void)unused;
+ if (pVAxis)
{
- if(pVAxis->getDimensionCount()==2)
+ if (pVAxis->getDimensionCount() == 2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
pVAxis->updatePositions();
}
@@ -475,24 +495,24 @@ void VCoordinateSystem::updatePositions()
void VCoordinateSystem::createAxesShapes()
{
- for (auto const& elem : m_aAxisMap)
+ for (auto const&[aFullAxisIndex, pVAxis] : m_aAxisMap)
{
- VAxisBase* pVAxis = elem.second.get();
- if( pVAxis )
+ if (pVAxis)
{
- if(pVAxis->getDimensionCount()==2)
+ auto const&[nDimensionIndex, nAxisIndex] = aFullAxisIndex;
+
+ if (pVAxis->getDimensionCount() == 2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
- tFullAxisIndex aFullAxisIndex = elem.first;
- if( aFullAxisIndex.second == 0 )
+ if (nAxisIndex == 0)
{
- if( aFullAxisIndex.first == 0 )
+ if (nDimensionIndex == 0)
{
if( m_aExplicitScales[1].AxisType!=AxisType::CATEGORY )
pVAxis->setExtraLinePositionAtOtherAxis(
m_aExplicitScales[1].Origin );
}
- else if( aFullAxisIndex.first == 1 )
+ else if (nDimensionIndex == 1)
{
if( m_aExplicitScales[0].AxisType!=AxisType::CATEGORY )
pVAxis->setExtraLinePositionAtOtherAxis(
@@ -546,8 +566,8 @@ void VCoordinateSystem::setSeriesNamesForAxis( const Sequence< OUString >& rSeri
}
sal_Int32 VCoordinateSystem::getNumberFormatKeyForAxis(
- const Reference< chart2::XAxis >& xAxis
- , const Reference<chart2::XChartDocument>& xChartDoc)
+ const rtl::Reference< Axis >& xAxis
+ , const rtl::Reference<::chart::ChartModel>& xChartDoc)
{
return ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
xAxis, m_xCooSysModel, xChartDoc);
diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx
index fad802e107a8..6c3f0790a573 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.cxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.cxx
@@ -22,10 +22,10 @@
#include "VPolarAngleAxis.hxx"
#include "VPolarGrid.hxx"
#include <ShapeFactory.hxx>
+#include <Axis.hxx>
#include <NumberFormatterWrapper.hxx>
#include <PolarLabelPositionHelper.hxx>
#include <PlottingPositionHelper.hxx>
-#include <com/sun/star/chart2/XAxis.hpp>
#include <tools/color.hxx>
#include <memory>
@@ -33,7 +33,6 @@
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
VPolarAngleAxis::VPolarAngleAxis( const AxisProperties& rAxisProperties
, const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
@@ -54,13 +53,13 @@ void VPolarAngleAxis::createTextShapes_ForAngleAxis(
, double fLogicZ )
{
FixedNumberFormatter aFixedNumberFormatter(
- m_xNumberFormatsSupplier, rAxisLabelProperties.nNumberFormatKey );
+ m_xNumberFormatsSupplier, rAxisLabelProperties.m_nNumberFormatKey );
//prepare text properties for multipropertyset-interface of shape
tNameSequence aPropNames;
tAnySequence aPropValues;
- uno::Reference< beans::XPropertySet > xProps( m_aAxisProperties.m_xAxisModel, uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xProps( m_aAxisProperties.m_xAxisModel );
PropertyMapper::getTextLabelMultiPropertyLists( xProps, aPropNames, aPropValues, false, -1, false, false );
LabelPositionHelper::doDynamicFontResize( aPropValues, aPropNames, xProps
, rAxisLabelProperties.m_aFontReferenceSize );
@@ -80,7 +79,7 @@ void VPolarAngleAxis::createTextShapes_ForAngleAxis(
; pTickInfo = rTickIter.nextInfo(), nTick++ )
{
//don't create labels which does not fit into the rhythm
- if( nTick%rAxisLabelProperties.nRhythm != 0)
+ if( nTick%rAxisLabelProperties.m_nRhythm != 0)
continue;
//don't create labels for invisible ticks
@@ -113,17 +112,17 @@ void VPolarAngleAxis::createTextShapes_ForAngleAxis(
double fLogicAngle = pTickInfo->getUnscaledTickValue();
LabelAlignment eLabelAlignment(LABEL_ALIGN_CENTER);
- PolarLabelPositionHelper aPolarLabelPositionHelper(m_pPosHelper.get(), 2/*nDimensionCount*/, xTarget);
+ PolarLabelPositionHelper aPolarLabelPositionHelper(&m_aPosHelper, 2/*nDimensionCount*/, xTarget);
sal_Int32 nScreenValueOffsetInRadiusDirection = m_aAxisLabelProperties.m_aMaximumSpaceForLabels.Height/15;
awt::Point aAnchorScreenPosition2D( aPolarLabelPositionHelper.getLabelScreenPositionAndAlignmentForLogicValues(
eLabelAlignment, fLogicAngle, fLogicRadius, fLogicZ, nScreenValueOffsetInRadiusDirection ));
LabelPositionHelper::changeTextAdjustment( aPropValues, aPropNames, eLabelAlignment );
// #i78696# use mathematically correct rotation now
- const double fRotationAnglePi(-basegfx::deg2rad(rAxisLabelProperties.fRotationAngleDegree));
+ const double fRotationAnglePi(-basegfx::deg2rad(rAxisLabelProperties.m_fRotationAngleDegree));
uno::Any aATransformation = ShapeFactory::makeTransformation( aAnchorScreenPosition2D, fRotationAnglePi );
- OUString aStackedLabel = ShapeFactory::getStackedString( aLabel, rAxisLabelProperties.bStackCharacters );
+ OUString aStackedLabel = ShapeFactory::getStackedString( aLabel, rAxisLabelProperties.m_bStackCharacters );
pTickInfo->xTextShape = ShapeFactory::createText( xTarget, aStackedLabel, aPropNames, aPropValues, aATransformation );
}
@@ -156,7 +155,7 @@ void VPolarAngleAxis::createLabels()
if( !prepareShapeCreation() )
return;
- double fLogicRadius = m_pPosHelper->getOuterLogicRadius();
+ double fLogicRadius = m_aPosHelper.getOuterLogicRadius();
if( !m_aAxisProperties.m_bDisplayLabels )
return;
@@ -170,7 +169,7 @@ void VPolarAngleAxis::createLabels()
removeTextShapesFromTicks();
AxisLabelProperties aAxisLabelProperties( m_aAxisLabelProperties );
- aAxisLabelProperties.bOverlapAllowed = true;
+ aAxisLabelProperties.m_bOverlapAllowed = true;
double const fLogicZ = 1.0;//as defined
createTextShapes_ForAngleAxis( m_xTextTarget, aTickIter
, aAxisLabelProperties
@@ -185,12 +184,12 @@ void VPolarAngleAxis::createShapes()
if( !prepareShapeCreation() )
return;
- double fLogicRadius = m_pPosHelper->getOuterLogicRadius();
+ double fLogicRadius = m_aPosHelper.getOuterLogicRadius();
double const fLogicZ = 1.0;//as defined
//create axis main lines
drawing::PointSequenceSequence aPoints(1);
- VPolarGrid::createLinePointSequence_ForAngleAxis( aPoints, m_aAllTickInfos, m_aIncrement, m_aScale, m_pPosHelper.get(), fLogicRadius, fLogicZ );
+ VPolarGrid::createLinePointSequence_ForAngleAxis( aPoints, m_aAllTickInfos, m_aIncrement, m_aScale, &m_aPosHelper, fLogicRadius, fLogicZ );
rtl::Reference<SvxShapePolyPolygon> xShape = ShapeFactory::createLine2D(
m_xGroupShape_Shapes, aPoints, &m_aAxisProperties.m_aLineProperties );
//because of this name this line will be used for marking the axis
diff --git a/chart2/source/view/axes/VPolarAxis.cxx b/chart2/source/view/axes/VPolarAxis.cxx
index d9dfe08ec6f5..89f65fee3745 100644
--- a/chart2/source/view/axes/VPolarAxis.cxx
+++ b/chart2/source/view/axes/VPolarAxis.cxx
@@ -25,7 +25,6 @@
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
std::shared_ptr<VPolarAxis> VPolarAxis::createAxis( const AxisProperties& rAxisProperties
, const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
@@ -40,9 +39,8 @@ VPolarAxis::VPolarAxis( const AxisProperties& rAxisProperties
, const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
, sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount )
: VAxisBase( nDimensionIndex, nDimensionCount, rAxisProperties, xNumberFormatsSupplier )
- , m_pPosHelper( new PolarPlottingPositionHelper() )
{
- PlotterBase::m_pPosHelper = m_pPosHelper.get();
+ PlotterBase::m_pPosHelper = &m_aPosHelper;
}
VPolarAxis::~VPolarAxis()
diff --git a/chart2/source/view/axes/VPolarAxis.hxx b/chart2/source/view/axes/VPolarAxis.hxx
index 42e22ae7dfe9..dc6233a71e02 100644
--- a/chart2/source/view/axes/VPolarAxis.hxx
+++ b/chart2/source/view/axes/VPolarAxis.hxx
@@ -19,13 +19,12 @@
#pragma once
#include "VAxisBase.hxx"
+#include <PlottingPositionHelper.hxx>
#include <memory>
namespace chart
{
-class PolarPlottingPositionHelper;
-
class VPolarAxis : public VAxisBase
{
public:
@@ -45,7 +44,7 @@ protected:
, sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount );
protected: //member
- std::unique_ptr<PolarPlottingPositionHelper> m_pPosHelper;
+ PolarPlottingPositionHelper m_aPosHelper;
std::vector< ExplicitIncrementData > m_aIncrements;
};
diff --git a/chart2/source/view/axes/VPolarCoordinateSystem.cxx b/chart2/source/view/axes/VPolarCoordinateSystem.cxx
index 5bc585097b77..ab7e603009ba 100644
--- a/chart2/source/view/axes/VPolarCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VPolarCoordinateSystem.cxx
@@ -22,14 +22,16 @@
#include "VPolarAxis.hxx"
#include <BaseCoordinateSystem.hxx>
#include <AxisIndexDefines.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
+#include <Diagram.hxx>
+#include <DataTable.hxx>
#include <ChartModel.hxx>
-#include <com/sun/star/chart2/XCoordinateSystem.hpp>
+#include <GridProperties.hxx>
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
VPolarCoordinateSystem::VPolarCoordinateSystem( const rtl::Reference< BaseCoordinateSystem >& xCooSys )
@@ -66,16 +68,17 @@ uno::Sequence< sal_Int32 > VPolarCoordinateSystem::getCoordinateSystemResolution
}
void VPolarCoordinateSystem::createVAxisList(
- const uno::Reference<chart2::XChartDocument> & xChartDoc
- , const awt::Size& rFontReferenceSize
- , const awt::Rectangle& rMaximumSpaceForLabels
- , bool //bLimitSpaceForLabels
- )
+ const rtl::Reference<::chart::ChartModel> & xChartDoc,
+ const awt::Size& rFontReferenceSize,
+ const awt::Rectangle& rMaximumSpaceForLabels,
+ bool /*bLimitSpaceForLabels*/,
+ std::vector<std::unique_ptr<VSeriesPlotter>>& /*rSeriesPlotterList*/,
+ css::uno::Reference<css::uno::XComponentContext> const& /*rComponentContext*/)
{
// note: using xChartDoc itself as XNumberFormatsSupplier would cause
// a leak from VPolarAxis due to cyclic reference
uno::Reference<util::XNumberFormatsSupplier> const xNumberFormatsSupplier(
- dynamic_cast<ChartModel&>(*xChartDoc).getNumberFormatsSupplier());
+ xChartDoc->getNumberFormatsSupplier());
m_aAxisMap.clear();
sal_Int32 nDimensionCount = m_xCooSysModel->getDimension();
@@ -87,10 +90,12 @@ void VPolarCoordinateSystem::createVAxisList(
sal_Int32 nMaxAxisIndex = m_xCooSysModel->getMaximumAxisIndexByDimension(nDimensionIndex);
for( sal_Int32 nAxisIndex = 0; nAxisIndex <= nMaxAxisIndex; nAxisIndex++ )
{
- Reference< XAxis > xAxis( getAxisByDimension(nDimensionIndex,nAxisIndex) );
+ rtl::Reference< Axis > xAxis = getAxisByDimension(nDimensionIndex,nAxisIndex);
if(!xAxis.is() || !AxisHelper::shouldAxisBeDisplayed( xAxis, m_xCooSysModel ))
continue;
- AxisProperties aAxisProperties(xAxis,getExplicitCategoriesProvider());
+
+ rtl::Reference<Diagram> xDiagram(xChartDoc->getFirstChartDiagram());
+ AxisProperties aAxisProperties(xAxis,getExplicitCategoriesProvider(), xDiagram->getDataTableRef());
aAxisProperties.init();
if(aAxisProperties.m_bDisplayLabels)
aAxisProperties.m_nNumberFormatKey = getNumberFormatKeyForAxis(xAxis, xChartDoc);
@@ -170,7 +175,7 @@ void VPolarCoordinateSystem::createGridShapes()
{
sal_Int32 nAxisIndex = MAIN_AXIS_INDEX;
- Reference< XAxis > xAxis( AxisHelper::getAxis( nDimensionIndex, nAxisIndex, m_xCooSysModel ) );
+ rtl::Reference< Axis > xAxis = AxisHelper::getAxis( nDimensionIndex, nAxisIndex, m_xCooSysModel );
if(!xAxis.is() || !AxisHelper::shouldAxisBeDisplayed( xAxis, m_xCooSysModel ))
continue;
diff --git a/chart2/source/view/axes/VPolarCoordinateSystem.hxx b/chart2/source/view/axes/VPolarCoordinateSystem.hxx
index 95c1094260c9..a2ea0220f8bc 100644
--- a/chart2/source/view/axes/VPolarCoordinateSystem.hxx
+++ b/chart2/source/view/axes/VPolarCoordinateSystem.hxx
@@ -35,10 +35,12 @@ public:
, const css::awt::Size& rPageResolution ) override;
virtual void createVAxisList(
- const css::uno::Reference< css::chart2::XChartDocument> & xChartDoc
- , const css::awt::Size& rFontReferenceSize
- , const css::awt::Rectangle& rMaximumSpaceForLabels
- , bool bLimitSpaceForLabels ) override;
+ const rtl::Reference<::chart::ChartModel> &ChartDoc,
+ const css::awt::Size& rFontReferenceSize,
+ const css::awt::Rectangle& rMaximumSpaceForLabels,
+ bool bLimitSpaceForLabels,
+ std::vector<std::unique_ptr<VSeriesPlotter>>& rSeriesPlotterList,
+ css::uno::Reference<css::uno::XComponentContext> const& rComponentContext) override;
virtual void initVAxisInList() override;
virtual void updateScalesAndIncrementsOnAxes() override;
diff --git a/chart2/source/view/axes/VPolarGrid.cxx b/chart2/source/view/axes/VPolarGrid.cxx
index f64349d97662..7c49842640a7 100644
--- a/chart2/source/view/axes/VPolarGrid.cxx
+++ b/chart2/source/view/axes/VPolarGrid.cxx
@@ -20,6 +20,7 @@
#include "VPolarGrid.hxx"
#include "VCartesianGrid.hxx"
#include "Tickmarks.hxx"
+#include <GridProperties.hxx>
#include <PlottingPositionHelper.hxx>
#include <ShapeFactory.hxx>
#include <ObjectIdentifier.hxx>
@@ -38,12 +39,11 @@ using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
VPolarGrid::VPolarGrid( sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount
- , const uno::Sequence< Reference< beans::XPropertySet > > & rGridPropertiesList )
+ , std::vector< rtl::Reference< ::chart::GridProperties > > aGridPropertiesList )
: VAxisOrGridBase( nDimensionIndex, nDimensionCount )
- , m_aGridPropertiesList( rGridPropertiesList )
- , m_pPosHelper( new PolarPlottingPositionHelper() )
+ , m_aGridPropertiesList( std::move(aGridPropertiesList) )
{
- PlotterBase::m_pPosHelper = m_pPosHelper.get();
+ PlotterBase::m_pPosHelper = &m_aPosHelper;
}
VPolarGrid::~VPolarGrid()
@@ -203,7 +203,7 @@ void VPolarGrid::create2DRadiusGrid( const rtl::Reference<SvxShapeGroupAnyD>& xL
drawing::PointSequenceSequence aPoints(1);
VPolarGrid::createLinePointSequence_ForAngleAxis( aPoints, rAngleTickInfos
- , rAngleIncrement, rAngleScale, m_pPosHelper.get(), fLogicRadius, fLogicZ );
+ , rAngleIncrement, rAngleScale, &m_aPosHelper, fLogicRadius, fLogicZ );
if(aPoints[0].getLength())
appendPointSequence( aAllPoints, aPoints );
}
@@ -220,7 +220,7 @@ void VPolarGrid::createShapes()
OSL_PRECOND(m_xLogicTarget.is()&&m_xFinalTarget.is(),"Axis is not proper initialized");
if(!(m_xLogicTarget.is()&&m_xFinalTarget.is()))
return;
- if(!m_aGridPropertiesList.hasElements())
+ if(m_aGridPropertiesList.empty())
return;
//create all scaled tickmark values
diff --git a/chart2/source/view/axes/VPolarGrid.hxx b/chart2/source/view/axes/VPolarGrid.hxx
index c5a9df7bb6e9..5c0a21bb4733 100644
--- a/chart2/source/view/axes/VPolarGrid.hxx
+++ b/chart2/source/view/axes/VPolarGrid.hxx
@@ -20,6 +20,7 @@
#include "VAxisOrGridBase.hxx"
#include "Tickmarks.hxx"
+#include <PlottingPositionHelper.hxx>
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <memory>
@@ -27,16 +28,15 @@ namespace chart { struct VLineProperties; }
namespace chart
{
-
-class PolarPlottingPositionHelper;
+class GridProperties;
class VPolarGrid : public VAxisOrGridBase
{
// public methods
public:
VPolarGrid( sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount
- , const css::uno::Sequence<
- css::uno::Reference< css::beans::XPropertySet > > & rGridPropertiesList //main grid, subgrid, subsubgrid etc
+ , std::vector<
+ rtl::Reference< ::chart::GridProperties > > aGridPropertiesList //main grid, subgrid, subsubgrid etc
);
virtual ~VPolarGrid() override;
@@ -53,9 +53,9 @@ public:
, double fLogicRadius, double fLogicZ );
private: //member
- css::uno::Sequence<
- css::uno::Reference< css::beans::XPropertySet > > m_aGridPropertiesList;//main grid, subgrid, subsubgrid etc
- std::unique_ptr<PolarPlottingPositionHelper> m_pPosHelper;
+ std::vector<
+ rtl::Reference< ::chart::GridProperties > > m_aGridPropertiesList;//main grid, subgrid, subsubgrid etc
+ PolarPlottingPositionHelper m_aPosHelper;
std::vector< ExplicitIncrementData > m_aIncrements;
void getAllTickInfos( sal_Int32 nDimensionIndex, TickInfoArraysType& rAllTickInfos ) const;
diff --git a/chart2/source/view/axes/VPolarRadiusAxis.cxx b/chart2/source/view/axes/VPolarRadiusAxis.cxx
index 73e153705db6..f93315410e96 100644
--- a/chart2/source/view/axes/VPolarRadiusAxis.cxx
+++ b/chart2/source/view/axes/VPolarRadiusAxis.cxx
@@ -20,6 +20,7 @@
#include "VPolarRadiusAxis.hxx"
#include "VCartesianAxis.hxx"
#include <PlottingPositionHelper.hxx>
+#include <Axis.hxx>
#include <CommonConverters.hxx>
#include "Tickmarks_Equidistant.hxx"
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index e5409ce5dff1..3bab48585148 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -24,25 +24,25 @@
#include <ExplicitCategoriesProvider.hxx>
#include <ObjectIdentifier.hxx>
#include "Splines.hxx"
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <LabelPositionHelper.hxx>
#include <Clipping.hxx>
#include <Stripe.hxx>
#include <DateHelper.hxx>
#include <unonames.hxx>
-#include <ConfigAccess.hxx>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <sal/log.hxx>
+#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
-#include <com/sun/star/drawing/DoubleSequence.hpp>
-#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <officecfg/Office/Compatibility.hxx>
+#include <officecfg/Office/Chart.hxx>
#include <limits>
@@ -51,13 +51,12 @@ namespace chart
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
-AreaChart::AreaChart( const uno::Reference<XChartType>& xChartTypeModel
+AreaChart::AreaChart( const rtl::Reference<ChartType>& xChartTypeModel
, sal_Int32 nDimensionCount
, bool bCategoryXAxis
, bool bNoArea
)
: VSeriesPlotter( xChartTypeModel, nDimensionCount, bCategoryXAxis )
- , m_pMainPosHelper(new PlottingPositionHelper())
, m_bArea(!bNoArea)
, m_bLine(bNoArea)
, m_bSymbol( ChartTypeHelper::isSupportingSymbolProperties(xChartTypeModel,nDimensionCount) )
@@ -65,19 +64,19 @@ AreaChart::AreaChart( const uno::Reference<XChartType>& xChartTypeModel
, m_nCurveResolution(20)
, m_nSplineOrder(3)
{
+ PlotterBase::m_pPosHelper = &m_aMainPosHelper;
+ VSeriesPlotter::m_pMainPosHelper = &m_aMainPosHelper;
+
m_pMainPosHelper->AllowShiftXAxisPos(true);
m_pMainPosHelper->AllowShiftZAxisPos(true);
- PlotterBase::m_pPosHelper = m_pMainPosHelper.get();
- VSeriesPlotter::m_pMainPosHelper = m_pMainPosHelper.get();
-
try
{
- if( m_xChartTypeModelProps.is() )
+ if( m_xChartTypeModel.is() )
{
- m_xChartTypeModelProps->getPropertyValue(CHART_UNONAME_CURVE_STYLE) >>= m_eCurveStyle;
- m_xChartTypeModelProps->getPropertyValue(CHART_UNONAME_CURVE_RESOLUTION) >>= m_nCurveResolution;
- m_xChartTypeModelProps->getPropertyValue(CHART_UNONAME_SPLINE_ORDER) >>= m_nSplineOrder;
+ m_xChartTypeModel->getPropertyValue(CHART_UNONAME_CURVE_STYLE) >>= m_eCurveStyle;
+ m_xChartTypeModel->getPropertyValue(CHART_UNONAME_CURVE_RESOLUTION) >>= m_nCurveResolution;
+ m_xChartTypeModel->getPropertyValue(CHART_UNONAME_SPLINE_ORDER) >>= m_nSplineOrder;
}
}
catch( uno::Exception& e )
@@ -456,26 +455,22 @@ bool AreaChart::impl_createArea( VDataSeries* pSeries
pPosHelper->transformScaledLogicToScene( aPoly );
//create area:
+ rtl::Reference< SvxShape > xShape;
if(m_nDimension==3)
{
- rtl::Reference< SvxShape > xShape = ShapeFactory::createArea3D( xSeriesGroupShape_Shapes
+ xShape = ShapeFactory::createArea3D( xSeriesGroupShape_Shapes
, aPoly, getTransformedDepth() );
- PropertyMapper::setMappedProperties( *xShape
- , pSeries->getPropertiesOfSeries()
- , PropertyMapper::getPropertyNameMapForFilledSeriesProperties() );
- //because of this name this line will be used for marking
- ShapeFactory::setShapeName(xShape, "MarkHandles");
}
else //m_nDimension!=3
{
- SdrPathObj* pShape = ShapeFactory::createArea2D( xSeriesGroupShape_Shapes
+ xShape = ShapeFactory::createArea2D( xSeriesGroupShape_Shapes
, aPoly );
- PropertyMapper::setPropertyNameMapForFilledSeriesProperties(
- pShape
- , pSeries->getPropertiesOfSeries());
- //because of this name this line will be used for marking
- ShapeFactory::setShapeName(pShape, "MarkHandles");
}
+ PropertyMapper::setMappedProperties( *xShape
+ , pSeries->getPropertiesOfSeries()
+ , PropertyMapper::getPropertyNameMapForFilledSeriesProperties() );
+ //because of this name this line will be used for marking
+ ::chart::ShapeFactory::setShapeName(xShape, "MarkHandles");
return true;
}
@@ -639,6 +634,8 @@ void AreaChart::createShapes()
}
}
+ const bool bUseErrorRectangle = officecfg::Office::Chart::ErrorProperties::ErrorRectangle::get();
+
sal_Int32 nZ=1;
for( auto const& rZSlot : m_aZSlots )
{
@@ -703,7 +700,7 @@ void AreaChart::createShapes()
{
std::vector<std::vector<css::drawing::Position3D>>& rPolygon = pSeries->m_aPolyPolygonShape3D;
sal_Int32& rIndex = pSeries->m_nPolygonIndex;
- if( 0<= rIndex && rIndex < static_cast<sal_Int32>(rPolygon.size()) )
+ if( 0<= rIndex && o3tl::make_unsigned(rIndex) < rPolygon.size() )
{
if( !rPolygon[ rIndex ].empty() )
rIndex++; //start a new polygon for the next point if the current poly is not empty
@@ -797,13 +794,6 @@ void AreaChart::createShapes()
!bCreateXErrorBar && !pSeries->getDataPointLabelIfLabel(nIndex) )
continue;
- //create a group shape for this point and add to the series shape:
- OUString aPointCID = ObjectIdentifier::createPointCID(
- pSeries->getPointCID_Stub(), nIndex );
- rtl::Reference<SvxShapeGroupAnyD> xPointGroupShape_Shapes(
- createGroupShape(xSeriesGroupShape_Shapes,aPointCID) );
- uno::Reference<drawing::XShape> xPointGroupShape_Shape( static_cast<cppu::OWeakObject*>(xPointGroupShape_Shapes.get()), uno::UNO_QUERY );
-
{
nCreatedPoints++;
@@ -813,6 +803,13 @@ void AreaChart::createShapes()
{
if(m_nDimension!=3)
{
+ //create a group shape for this point and add to the series shape:
+ OUString aPointCID = ObjectIdentifier::createPointCID(
+ pSeries->getPointCID_Stub(), nIndex );
+ rtl::Reference<SvxShapeGroupAnyD> xPointGroupShape_Shapes;
+ if (pSymbolProperties->Style == SymbolStyle_STANDARD || pSymbolProperties->Style == SymbolStyle_GRAPHIC)
+ xPointGroupShape_Shapes = createGroupShape(xSeriesGroupShape_Shapes,aPointCID);
+
if (pSymbolProperties->Style != SymbolStyle_NONE)
{
aSymbolSize.DirectionX = pSymbolProperties->Size.Width;
@@ -837,7 +834,7 @@ void AreaChart::createShapes()
}
}
//create error bars or rectangles, depending on configuration
- if ( ConfigAccess::getUseErrorRectangle() )
+ if ( bUseErrorRectangle )
{
if ( bCreateXErrorBar || bCreateYErrorBar )
{
@@ -921,10 +918,6 @@ void AreaChart::createShapes()
, rLogicYSumMap[nAttachedAxisIndex], aScreenPosition2D, eAlignment, nOffset );
}
}
-
- //remove PointGroupShape if empty
- if(!xPointGroupShape_Shapes->getCount())
- xSeriesGroupShape_Shapes->remove(xPointGroupShape_Shape);
}
}//next series in x slot (next y slot)
diff --git a/chart2/source/view/charttypes/AreaChart.hxx b/chart2/source/view/charttypes/AreaChart.hxx
index 23d8adb0b4f1..411b9d6642aa 100644
--- a/chart2/source/view/charttypes/AreaChart.hxx
+++ b/chart2/source/view/charttypes/AreaChart.hxx
@@ -21,6 +21,7 @@
#include <memory>
#include <VSeriesPlotter.hxx>
+#include <PlottingPositionHelper.hxx>
#include <com/sun/star/chart2/CurveStyle.hpp>
namespace chart
@@ -32,7 +33,7 @@ class AreaChart : public VSeriesPlotter
public:
AreaChart() = delete;
- AreaChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
+ AreaChart( const rtl::Reference< ::chart::ChartType >& xChartTypeModel
, sal_Int32 nDimensionCount
, bool bCategoryXAxis, bool bNoArea=false
);
@@ -64,8 +65,7 @@ private: //methods
, std::vector<std::vector<css::drawing::Position3D>> &aPoly );
private: //member
- std::unique_ptr<PlottingPositionHelper>
- m_pMainPosHelper;
+ PlottingPositionHelper m_aMainPosHelper;
bool m_bArea;//false -> line or symbol only
bool m_bLine;
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 938355192e35..fcc969b898ad 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -20,6 +20,7 @@
#include "BarChart.hxx"
#include "BarPositionHelper.hxx"
+#include <ChartType.hxx>
#include <ShapeFactory.hxx>
#include <CommonConverters.hxx>
#include <ObjectIdentifier.hxx>
@@ -34,9 +35,7 @@
#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
#include <rtl/math.hxx>
-#include <sal/log.hxx>
-#include <tools/diagnose_ex.h>
-#include <unordered_set>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
@@ -44,20 +43,19 @@ using namespace ::com::sun::star;
using namespace ::rtl::math;
using namespace ::com::sun::star::chart2;
-BarChart::BarChart( const uno::Reference<XChartType>& xChartTypeModel
+BarChart::BarChart( const rtl::Reference<ChartType>& xChartTypeModel
, sal_Int32 nDimensionCount )
: VSeriesPlotter( xChartTypeModel, nDimensionCount )
- , m_pMainPosHelper( new BarPositionHelper() )
{
- PlotterBase::m_pPosHelper = m_pMainPosHelper.get();
- VSeriesPlotter::m_pMainPosHelper = m_pMainPosHelper.get();
+ PlotterBase::m_pPosHelper = &m_aMainPosHelper;
+ VSeriesPlotter::m_pMainPosHelper = &m_aMainPosHelper;
try
{
- if( m_xChartTypeModelProps.is() )
+ if( m_xChartTypeModel.is() )
{
- m_xChartTypeModelProps->getPropertyValue( "OverlapSequence" ) >>= m_aOverlapSequence;
- m_xChartTypeModelProps->getPropertyValue( "GapwidthSequence" ) >>= m_aGapwidthSequence;
+ m_xChartTypeModel->getPropertyValue( "OverlapSequence" ) >>= m_aOverlapSequence;
+ m_xChartTypeModel->getPropertyValue( "GapwidthSequence" ) >>= m_aGapwidthSequence;
}
}
catch( const uno::Exception& )
@@ -124,9 +122,7 @@ drawing::Direction3D BarChart::getPreferredDiagramAspectRatio() const
}
if( m_pMainPosHelper && m_pMainPosHelper->isSwapXAndY() )
{
- double fTemp = aRet.DirectionX;
- aRet.DirectionX = aRet.DirectionY;
- aRet.DirectionY = fTemp;
+ std::swap(aRet.DirectionX, aRet.DirectionY);
}
}
else
@@ -450,8 +446,7 @@ void BarChart::createShapes()
for (rtl::Reference<SvxShape> const & rShape : aShapeSet)
{
- E3dScene* pScene = dynamic_cast<E3dScene*>(rShape->GetSdrObject());
- if(nullptr != pScene)
+ if(E3dScene* pScene = DynCastE3dScene(rShape->GetSdrObject()))
{
aSceneSet.insert(pScene->getRootE3dSceneFromE3dObject());
}
@@ -511,14 +506,14 @@ void BarChart::createShapes()
{
for( auto const& rZSlot : m_aZSlots )
{
- BarPositionHelper* pPosHelper = m_pMainPosHelper.get();
+ BarPositionHelper* pPosHelper = &m_aMainPosHelper;
if( !rZSlot.empty() )
{
sal_Int32 nAttachedAxisIndex = rZSlot.front().getAttachedAxisIndexForFirstSeries();
//2ND_AXIS_IN_BARS so far one can assume to have the same plotter for each z slot
pPosHelper = dynamic_cast<BarPositionHelper*>(&( getPlottingPositionHelper( nAttachedAxisIndex ) ) );
if(!pPosHelper)
- pPosHelper = m_pMainPosHelper.get();
+ pPosHelper = &m_aMainPosHelper;
}
PlotterBase::m_pPosHelper = pPosHelper;
@@ -547,8 +542,6 @@ void BarChart::createShapes()
getSeriesGroupShape(pSeries.get(), xSeriesTarget) );
rtl::Reference<SvxShapePolyPolygon> xShape( ShapeFactory::createLine2D(
xSeriesGroupShape_Shapes, aPoly ) );
- PropertyMapper::setMappedProperties( *xShape, pSeries->getPropertiesOfSeries()
- , PropertyMapper::getPropertyNameMapForFilledSeriesProperties() );
}
}
}
@@ -562,10 +555,10 @@ void BarChart::doZSlot(
bool& bDrawConnectionLines, bool& bDrawConnectionLinesInited,
const std::vector< VDataSeriesGroup >& rZSlot,
const sal_Int32 nZ, const sal_Int32 nPointIndex, const sal_Int32 nStartIndex,
- rtl::Reference<SvxShapeGroupAnyD>& xSeriesTarget,
- rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveTarget,
- rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveEquationTarget,
- rtl::Reference<SvxShapeGroupAnyD>& xTextTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xSeriesTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveEquationTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTextTarget,
std::unordered_set<rtl::Reference<SvxShape>>& aShapeSet,
std::map< VDataSeries*, FormerBarPoint >& aSeriesFormerPointMap,
std::map< sal_Int32, double >& aLogicYSumMap)
@@ -578,7 +571,7 @@ void BarChart::doZSlot(
//2ND_AXIS_IN_BARS so far one can assume to have the same plotter for each z slot
BarPositionHelper* pPosHelper = dynamic_cast<BarPositionHelper*>(&( getPlottingPositionHelper( nAttachedAxisIndex ) ) );
if(!pPosHelper)
- pPosHelper = m_pMainPosHelper.get();
+ pPosHelper = &m_aMainPosHelper;
PlotterBase::m_pPosHelper = pPosHelper;
@@ -637,10 +630,10 @@ void BarChart::doXSlot(
const VDataSeriesGroup& rXSlot,
bool& bDrawConnectionLines, bool& bDrawConnectionLinesInited,
const sal_Int32 nZ, const sal_Int32 nPointIndex, const sal_Int32 nStartIndex,
- rtl::Reference<SvxShapeGroupAnyD>& xSeriesTarget,
- rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveTarget,
- rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveEquationTarget,
- rtl::Reference<SvxShapeGroupAnyD>& xTextTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xSeriesTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveEquationTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTextTarget,
std::unordered_set<rtl::Reference<SvxShape>>& aShapeSet,
std::map< VDataSeries*, FormerBarPoint >& aSeriesFormerPointMap,
std::map< sal_Int32, double >& aLogicYSumMap,
@@ -691,10 +684,10 @@ void BarChart::doXSlot(
aShapeSet.insert(xSeriesGroupShape_Shapes);
aShapeSet.insert(xSeriesBackgroundShape_Shapes);
// Suspend setting rects dirty for the duration of this call
- E3dScene* pScene = dynamic_cast<E3dScene*>(xSeriesGroupShape_Shapes->GetSdrObject());
+ E3dScene* pScene = DynCastE3dScene(xSeriesGroupShape_Shapes->GetSdrObject());
if (pScene)
pScene->SuspendReportingDirtyRects();
- pScene = dynamic_cast<E3dScene*>(xSeriesBackgroundShape_Shapes->GetSdrObject());
+ pScene = DynCastE3dScene(xSeriesBackgroundShape_Shapes->GetSdrObject());
if (pScene)
pScene->SuspendReportingDirtyRects();
@@ -858,6 +851,7 @@ void BarChart::doXSlot(
//create partial point
if( !approxEqual(fLowerYValue,fUpperYValue) )
{
+ rtl::Reference< SvxShape > xShape;
if( m_nDimension==3 )
{
drawing::Position3D aLogicBottom (fLogicX,fLogicYStart,fLogicZ);
@@ -892,54 +886,41 @@ void BarChart::doXSlot(
if( fTopHeight < 0 )
fTopHeight *= -1.0;
- rtl::Reference< SvxShape > xShape = createDataPoint3D_Bar(
+ xShape = createDataPoint3D_Bar(
xSeriesGroupShape_Shapes, aTransformedBottom, aSize, fTopHeight, nRotateZAngleHundredthDegree
, xDataPointProperties, nGeometry3D );
-
- if(bHasFillColorMapping)
- {
- double nPropVal = pSeries->getValueByProperty(nPointIndex, "FillColor");
- if(!std::isnan(nPropVal))
- {
- xShape->setPropertyValue("FillColor", uno::Any(static_cast<sal_Int32>(nPropVal)));
- }
- }
- //set name/classified ObjectID (CID)
- ShapeFactory::setShapeName(xShape
- , ObjectIdentifier::createPointCID(
- pSeries->getPointCID_Stub(),nPointIndex) );
}
else //m_nDimension!=3
{
- // performance improvement: alloc the sequence before the rendering
- // otherwise we have 2 realloc calls
- std::vector<std::vector<css::drawing::Position3D>> aPoly;
- aPoly.resize(1);
drawing::Position3D aLeftUpperPoint( fLogicX-fLogicBarWidth/2.0,fUpperYValue,fLogicZ );
drawing::Position3D aRightUpperPoint( fLogicX+fLogicBarWidth/2.0,fUpperYValue,fLogicZ );
-
- AddPointToPoly( aPoly, drawing::Position3D( fLogicX-fLogicBarWidth/2.0,fLowerYValue,fLogicZ) );
- AddPointToPoly( aPoly, drawing::Position3D( fLogicX+fLogicBarWidth/2.0,fLowerYValue,fLogicZ) );
- AddPointToPoly( aPoly, aRightUpperPoint );
- AddPointToPoly( aPoly, aLeftUpperPoint );
- AddPointToPoly( aPoly, drawing::Position3D( fLogicX-fLogicBarWidth/2.0,fLowerYValue,fLogicZ) );
+ std::vector<std::vector<css::drawing::Position3D>> aPoly
+ {
+ { // inner vector
+ drawing::Position3D( fLogicX-fLogicBarWidth/2.0,fLowerYValue,fLogicZ),
+ drawing::Position3D( fLogicX+fLogicBarWidth/2.0,fLowerYValue,fLogicZ),
+ aRightUpperPoint,
+ aLeftUpperPoint,
+ drawing::Position3D( fLogicX-fLogicBarWidth/2.0,fLowerYValue,fLogicZ)
+ }
+ };
pPosHelper->transformScaledLogicToScene( aPoly );
- std::optional<sal_Int32> xFillColor;
- if(bHasFillColorMapping)
+ xShape = ShapeFactory::createArea2D( xSeriesGroupShape_Shapes, aPoly );
+ PropertyMapper::setMappedProperties( *xShape, xDataPointProperties, PropertyMapper::getPropertyNameMapForFilledSeriesProperties() );
+ }
+
+ if(bHasFillColorMapping)
+ {
+ double nPropVal = pSeries->getValueByProperty(nPointIndex, "FillColor");
+ if(!std::isnan(nPropVal))
{
- double nPropVal = pSeries->getValueByProperty(nPointIndex, "FillColor");
- if(!std::isnan(nPropVal))
- xFillColor = static_cast<sal_Int32>(nPropVal);
+ xShape->setPropertyValue("FillColor", uno::Any(static_cast<sal_Int32>(nPropVal)));
}
- SdrPathObj* pShape = ShapeFactory::createArea2D( xSeriesGroupShape_Shapes, aPoly, /*bSetZOrderToZero*/false );
- PropertyMapper::setPropertyNameMapForFilledSeriesProperties(pShape, xDataPointProperties, xFillColor);
-
- //set name/classified ObjectID (CID)
- ShapeFactory::setShapeName(pShape
- , ObjectIdentifier::createPointCID(
- pSeries->getPointCID_Stub(),nPointIndex) );
}
-
+ //set name/classified ObjectID (CID)
+ ShapeFactory::setShapeName(xShape
+ , ObjectIdentifier::createPointCID(
+ pSeries->getPointCID_Stub(),nPointIndex) );
}
//create error bar
diff --git a/chart2/source/view/charttypes/BarChart.hxx b/chart2/source/view/charttypes/BarChart.hxx
index 5e9ab5e49f48..ff46786afcbb 100644
--- a/chart2/source/view/charttypes/BarChart.hxx
+++ b/chart2/source/view/charttypes/BarChart.hxx
@@ -21,10 +21,10 @@
#include <memory>
#include <VSeriesPlotter.hxx>
+#include "BarPositionHelper.hxx"
namespace chart
{
-class BarPositionHelper;
class BarChart : public VSeriesPlotter
{
@@ -32,7 +32,7 @@ class BarChart : public VSeriesPlotter
public:
BarChart() = delete;
- BarChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
+ BarChart( const rtl::Reference< ::chart::ChartType >& xChartTypeModel
, sal_Int32 nDimensionCount );
virtual ~BarChart() override;
@@ -84,10 +84,10 @@ private: //methods
void doZSlot(
bool& bDrawConnectionLines, bool& bDrawConnectionLinesInited, const std::vector< VDataSeriesGroup >& rZSlot,
sal_Int32 nZ, sal_Int32 nPointIndex, sal_Int32 nStartIndex,
- rtl::Reference<SvxShapeGroupAnyD>& xSeriesTarget,
- rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveTarget,
- rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveEquationTarget,
- rtl::Reference<SvxShapeGroupAnyD>& xTextTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xSeriesTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveEquationTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTextTarget,
std::unordered_set<rtl::Reference<SvxShape>>& aShapeSet,
std::map< VDataSeries*, FormerBarPoint >& aSeriesFormerPointMap,
std::map< sal_Int32, double >& aLogicYSumMap);
@@ -96,10 +96,10 @@ private: //methods
const VDataSeriesGroup& rXSlot,
bool& bDrawConnectionLines, bool& bDrawConnectionLinesInited,
sal_Int32 nZ, sal_Int32 nPointIndex, sal_Int32 nStartIndex,
- rtl::Reference<SvxShapeGroupAnyD>& xSeriesTarget,
- rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveTarget,
- rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveEquationTarget,
- rtl::Reference<SvxShapeGroupAnyD>& xTextTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xSeriesTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xRegressionCurveEquationTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTextTarget,
std::unordered_set<rtl::Reference<SvxShape>>& aShapeSet,
std::map< VDataSeries*, FormerBarPoint >& aSeriesFormerPointMap,
std::map< sal_Int32, double >& aLogicYSumMap,
@@ -109,7 +109,7 @@ private: //methods
sal_Int32 nAttachedAxisIndex);
private: //member
- std::unique_ptr<BarPositionHelper> m_pMainPosHelper;
+ BarPositionHelper m_aMainPosHelper;
css::uno::Sequence< sal_Int32 > m_aOverlapSequence;
css::uno::Sequence< sal_Int32 > m_aGapwidthSequence;
};
diff --git a/chart2/source/view/charttypes/BarPositionHelper.cxx b/chart2/source/view/charttypes/BarPositionHelper.cxx
index f8ac3e7d62ef..279d998a02e4 100644
--- a/chart2/source/view/charttypes/BarPositionHelper.cxx
+++ b/chart2/source/view/charttypes/BarPositionHelper.cxx
@@ -23,7 +23,6 @@
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
BarPositionHelper::BarPositionHelper()
: CategoryPositionHelper( 1 )
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index fc7fcdd2597b..d5bd2c3a16fc 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -22,6 +22,7 @@
#include <ShapeFactory.hxx>
#include <ObjectIdentifier.hxx>
#include <LabelPositionHelper.hxx>
+#include <ChartType.hxx>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <sal/log.hxx>
@@ -32,9 +33,8 @@
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
-BubbleChart::BubbleChart( const uno::Reference<XChartType>& xChartTypeModel
+BubbleChart::BubbleChart( const rtl::Reference<ChartType>& xChartTypeModel
, sal_Int32 nDimensionCount )
: VSeriesPlotter( xChartTypeModel, nDimensionCount, false )
, m_fMaxLogicBubbleSize( 0.0 )
@@ -261,7 +261,6 @@ void BubbleChart::createShapes()
pSeries->getPointCID_Stub(), nIndex );
rtl::Reference<SvxShapeGroupAnyD> xPointGroupShape_Shapes(
createGroupShape(xSeriesGroupShape_Shapes,aPointCID) );
- uno::Reference<drawing::XShape> xPointGroupShape_Shape = xPointGroupShape_Shapes;
{
nCreatedPoints++;
@@ -345,7 +344,7 @@ void BubbleChart::createShapes()
//remove PointGroupShape if empty
if(!xPointGroupShape_Shapes->getCount())
- xSeriesGroupShape_Shapes->remove(xPointGroupShape_Shape);
+ xSeriesGroupShape_Shapes->remove(xPointGroupShape_Shapes);
}//next series in x slot (next y slot)
}//next x slot
diff --git a/chart2/source/view/charttypes/BubbleChart.hxx b/chart2/source/view/charttypes/BubbleChart.hxx
index 06d1d1200340..c25e5b6345bf 100644
--- a/chart2/source/view/charttypes/BubbleChart.hxx
+++ b/chart2/source/view/charttypes/BubbleChart.hxx
@@ -30,7 +30,7 @@ class BubbleChart : public VSeriesPlotter
public:
BubbleChart() = delete;
- BubbleChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
+ BubbleChart( const rtl::Reference< ::chart::ChartType >& xChartTypeModel
, sal_Int32 nDimensionCount );
virtual ~BubbleChart() override;
diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx
index 44fcd600bd49..5f3a19582e12 100644
--- a/chart2/source/view/charttypes/CandleStickChart.cxx
+++ b/chart2/source/view/charttypes/CandleStickChart.cxx
@@ -18,6 +18,7 @@
*/
#include "CandleStickChart.hxx"
+#include <ChartType.hxx>
#include <ShapeFactory.hxx>
#include <CommonConverters.hxx>
#include <ExplicitCategoriesProvider.hxx>
@@ -25,21 +26,19 @@
#include "BarPositionHelper.hxx"
#include <DateHelper.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <osl/diagnose.h>
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
-CandleStickChart::CandleStickChart( const uno::Reference<XChartType>& xChartTypeModel
+CandleStickChart::CandleStickChart( const rtl::Reference<ChartType>& xChartTypeModel
, sal_Int32 nDimensionCount )
: VSeriesPlotter( xChartTypeModel, nDimensionCount )
- , m_pMainPosHelper( new BarPositionHelper() )
{
- PlotterBase::m_pPosHelper = m_pMainPosHelper.get();
- VSeriesPlotter::m_pMainPosHelper = m_pMainPosHelper.get();
+ PlotterBase::m_pPosHelper = &m_aMainPosHelper;
+ VSeriesPlotter::m_pMainPosHelper = &m_aMainPosHelper;
}
CandleStickChart::~CandleStickChart()
@@ -104,15 +103,15 @@ void CandleStickChart::createShapes()
tAnySequence aWhiteBox_Values, aBlackBox_Values;
try
{
- if( m_xChartTypeModelProps.is() )
+ if( m_xChartTypeModel.is() )
{
- m_xChartTypeModelProps->getPropertyValue( "ShowFirst" ) >>= bShowFirst;
+ m_xChartTypeModel->getPropertyValue( "ShowFirst" ) >>= bShowFirst;
uno::Reference< beans::XPropertySet > xWhiteDayProps;
uno::Reference< beans::XPropertySet > xBlackDayProps;
- m_xChartTypeModelProps->getPropertyValue( "Japanese" ) >>= bJapaneseStyle;
- m_xChartTypeModelProps->getPropertyValue( "WhiteDay" ) >>= xWhiteDayProps;
- m_xChartTypeModelProps->getPropertyValue( "BlackDay" ) >>= xBlackDayProps;
+ m_xChartTypeModel->getPropertyValue( "Japanese" ) >>= bJapaneseStyle;
+ m_xChartTypeModel->getPropertyValue( "WhiteDay" ) >>= xWhiteDayProps;
+ m_xChartTypeModel->getPropertyValue( "BlackDay" ) >>= xBlackDayProps;
tPropertyNameValueMap aWhiteBox_Map;
PropertyMapper::getValueMap( aWhiteBox_Map, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), xWhiteDayProps );
@@ -136,14 +135,14 @@ void CandleStickChart::createShapes()
{
for( auto const& rZSlot : m_aZSlots )
{
- BarPositionHelper* pPosHelper = m_pMainPosHelper.get();
+ BarPositionHelper* pPosHelper = &m_aMainPosHelper;
if( !rZSlot.empty() )
{
sal_Int32 nAttachedAxisIndex = rZSlot.front().getAttachedAxisIndexForFirstSeries();
//2ND_AXIS_IN_BARS so far one can assume to have the same plotter for each z slot
pPosHelper = dynamic_cast<BarPositionHelper*>(&( getPlottingPositionHelper( nAttachedAxisIndex ) ) );
if(!pPosHelper)
- pPosHelper = m_pMainPosHelper.get();
+ pPosHelper = &m_aMainPosHelper;
}
PlotterBase::m_pPosHelper = pPosHelper;
@@ -200,9 +199,7 @@ void CandleStickChart::createShapes()
drawing::Position3D aPosMiddleMinimum( pPosHelper->transformScaledLogicToScene( fScaledX, fScaledY_Min ,0 ,true ) );
drawing::Position3D aPosMiddleMaximum( pPosHelper->transformScaledLogicToScene( fScaledX, fScaledY_Max ,0 ,true ) );
- rtl::Reference<SvxShapeGroupAnyD> xLossGainTarget( xGainTarget );
- if(bBlack)
- xLossGainTarget = xLossTarget;
+ rtl::Reference<SvxShapeGroupAnyD> xLossGainTarget(bBlack ? xLossTarget : xGainTarget);
uno::Reference< beans::XPropertySet > xPointProp( pSeries->getPropertiesOfPoint( nIndex ));
rtl::Reference<SvxShapeGroupAnyD> xPointGroupShape_Shapes;
@@ -215,10 +212,10 @@ void CandleStickChart::createShapes()
//create min-max line
if( isValidPosition(aPosMiddleMinimum) && isValidPosition(aPosMiddleMaximum) )
{
- std::vector<std::vector<css::drawing::Position3D>> aPoly;
- sal_Int32 nLineIndex =0;
- AddPointToPoly( aPoly, aPosMiddleMinimum, nLineIndex);
- AddPointToPoly( aPoly, aPosMiddleMaximum, nLineIndex);
+ std::vector<std::vector<css::drawing::Position3D>> aPoly
+ {
+ { aPosMiddleMinimum, aPosMiddleMaximum }
+ };
rtl::Reference<SvxShapePolyPolygon> xShape =
ShapeFactory::createLine2D( xPointGroupShape_Shapes, aPoly);
diff --git a/chart2/source/view/charttypes/CandleStickChart.hxx b/chart2/source/view/charttypes/CandleStickChart.hxx
index eddee6b72e12..3202cf0d7eaf 100644
--- a/chart2/source/view/charttypes/CandleStickChart.hxx
+++ b/chart2/source/view/charttypes/CandleStickChart.hxx
@@ -20,11 +20,11 @@
#pragma once
#include <memory>
+#include "BarPositionHelper.hxx"
#include <VSeriesPlotter.hxx>
namespace chart
{
-class BarPositionHelper;
class CandleStickChart : public VSeriesPlotter
{
@@ -32,7 +32,7 @@ class CandleStickChart : public VSeriesPlotter
public:
CandleStickChart() = delete;
- CandleStickChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
+ CandleStickChart( const rtl::Reference< ::chart::ChartType >& xChartTypeModel
, sal_Int32 nDimensionCount );
virtual ~CandleStickChart() override;
@@ -47,7 +47,7 @@ public:
virtual LegendSymbolStyle getLegendSymbolStyle() override;
private: //member
- std::unique_ptr<BarPositionHelper> m_pMainPosHelper;
+ BarPositionHelper m_aMainPosHelper;
};
} //namespace chart
diff --git a/chart2/source/view/charttypes/ConfigAccess.cxx b/chart2/source/view/charttypes/ConfigAccess.cxx
deleted file mode 100644
index ce02c4817e0a..000000000000
--- a/chart2/source/view/charttypes/ConfigAccess.cxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- 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 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 .
- */
-
-#include <ConfigAccess.hxx>
-
-#include <unotools/configitem.hxx>
-#include <o3tl/any.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-
-namespace chart
-{
-using namespace ::com::sun::star;
-
-namespace
-{
-class ChartConfigItem : public ::utl::ConfigItem
-{
-private:
- virtual void ImplCommit() override;
-
-public:
- ChartConfigItem();
-
- bool getUseErrorRectangle();
- virtual void Notify(const uno::Sequence<OUString>& aPropertyNames) override;
-};
-}
-
-ChartConfigItem::ChartConfigItem()
- : ConfigItem("Office.Chart/ErrorProperties")
-{
-}
-
-void ChartConfigItem::ImplCommit() {}
-void ChartConfigItem::Notify(const uno::Sequence<OUString>&) {}
-
-bool ChartConfigItem::getUseErrorRectangle()
-{
- uno::Sequence<OUString> aNames{ "ErrorRectangle" };
-
- auto b = o3tl::tryAccess<bool>(GetProperties(aNames)[0]);
- return b && *b;
-}
-
-namespace ConfigAccess
-{
-bool getUseErrorRectangle()
-{
- //a ChartConfigItem Singleton
- static ChartConfigItem SINGLETON;
- bool bResult(SINGLETON.getUseErrorRectangle());
- return bResult;
-}
-} //namespace ConfigAccess
-
-} //namespace chart
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index 5507e30e0579..5b8f1db34be5 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -27,14 +27,15 @@
#include <Clipping.hxx>
#include <PolarLabelPositionHelper.hxx>
#include <DateHelper.hxx>
+#include <ChartType.hxx>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <com/sun/star/chart/MissingValueTreatment.hpp>
+#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
-#include <com/sun/star/drawing/XShapes.hpp>
#include <officecfg/Office/Compatibility.hxx>
#include <limits>
@@ -44,7 +45,7 @@ namespace chart
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
-NetChart::NetChart( const uno::Reference<XChartType>& xChartTypeModel
+NetChart::NetChart( const rtl::Reference<ChartType>& xChartTypeModel
, sal_Int32 nDimensionCount
, bool bNoArea
, std::unique_ptr<PlottingPositionHelper> pPlottingPositionHelper
@@ -111,7 +112,7 @@ drawing::Direction3D NetChart::getPreferredDiagramAspectRatio() const
}
bool NetChart::impl_createLine( VDataSeries* pSeries
- , std::vector<std::vector<css::drawing::Position3D>>* pSeriesPoly
+ , const std::vector<std::vector<css::drawing::Position3D>>* pSeriesPoly
, PlottingPositionHelper const * pPosHelper )
{
//return true if a line was created successfully
@@ -163,7 +164,7 @@ bool NetChart::impl_createLine( VDataSeries* pSeries
}
bool NetChart::impl_createArea( VDataSeries* pSeries
- , std::vector<std::vector<css::drawing::Position3D>>* pSeriesPoly
+ , const std::vector<std::vector<css::drawing::Position3D>>* pSeriesPoly
, std::vector<std::vector<css::drawing::Position3D>> const * pPreviousSeriesPoly
, PlottingPositionHelper const * pPosHelper )
{
@@ -221,12 +222,14 @@ bool NetChart::impl_createArea( VDataSeries* pSeries
pPosHelper->transformScaledLogicToScene( aPoly );
//create area:
- SdrPathObj* pShape = ShapeFactory::createArea2D( xSeriesGroupShape_Shapes
- , aPoly );
- PropertyMapper::setPropertyNameMapForFilledSeriesProperties(pShape
- , pSeries->getPropertiesOfSeries() );
+ rtl::Reference<SvxShapePolyPolygon>
+ xShape = ShapeFactory::createArea2D( xSeriesGroupShape_Shapes
+ , aPoly );
+ PropertyMapper::setMappedProperties( *xShape
+ , pSeries->getPropertiesOfSeries()
+ , PropertyMapper::getPropertyNameMapForFilledSeriesProperties() );
//because of this name this line will be used for marking
- ::chart::ShapeFactory::setShapeName(pShape, "MarkHandles");
+ ::chart::ShapeFactory::setShapeName(xShape, "MarkHandles");
return true;
}
@@ -438,7 +441,7 @@ void NetChart::createShapes()
{
std::vector<std::vector<css::drawing::Position3D>>& rPolygon = pSeries->m_aPolyPolygonShape3D;
sal_Int32& rIndex = pSeries->m_nPolygonIndex;
- if( 0<= rIndex && rIndex < static_cast<sal_Int32>(rPolygon.size()) )
+ if( 0<= rIndex && o3tl::make_unsigned(rIndex) < rPolygon.size() )
{
if( !rPolygon[ rIndex ].empty() )
rIndex++; //start a new polygon for the next point if the current poly is not empty
@@ -526,7 +529,6 @@ void NetChart::createShapes()
pSeries->getPointCID_Stub(), nIndex );
rtl::Reference<SvxShapeGroupAnyD> xPointGroupShape_Shapes(
createGroupShape(xSeriesGroupShape_Shapes,aPointCID) );
- uno::Reference<drawing::XShape> xPointGroupShape_Shape( xPointGroupShape_Shapes );
{
//create data point
@@ -624,7 +626,7 @@ void NetChart::createShapes()
//remove PointGroupShape if empty
if(!xPointGroupShape_Shapes->getCount())
- xSeriesGroupShape_Shapes->remove(xPointGroupShape_Shape);
+ xSeriesGroupShape_Shapes->remove(xPointGroupShape_Shapes);
}//next series in x slot (next y slot)
}//next x slot
diff --git a/chart2/source/view/charttypes/NetChart.hxx b/chart2/source/view/charttypes/NetChart.hxx
index 9883ba118ac2..a536daf15fd2 100644
--- a/chart2/source/view/charttypes/NetChart.hxx
+++ b/chart2/source/view/charttypes/NetChart.hxx
@@ -31,7 +31,7 @@ class NetChart : public VSeriesPlotter
public:
NetChart() = delete;
- NetChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
+ NetChart( const rtl::Reference< ::chart::ChartType >& xChartTypeModel
, sal_Int32 nDimensionCount
, bool bNoArea
, std::unique_ptr<PlottingPositionHelper> pPlottingPositionHelper //takes ownership
@@ -53,11 +53,11 @@ public:
private: //methods
void impl_createSeriesShapes();
bool impl_createArea( VDataSeries* pSeries
- , std::vector<std::vector<css::drawing::Position3D>>* pSeriesPoly
+ , const std::vector<std::vector<css::drawing::Position3D>>* pSeriesPoly
, std::vector<std::vector<css::drawing::Position3D>> const * pPreviousSeriesPoly
, PlottingPositionHelper const * pPosHelper );
bool impl_createLine( VDataSeries* pSeries
- , std::vector<std::vector<css::drawing::Position3D>>* pSeriesPoly
+ , const std::vector<std::vector<css::drawing::Position3D>>* pSeriesPoly
, PlottingPositionHelper const * pPosHelper );
private: //member
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 2fd709500d29..ff8cf62f133a 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -20,23 +20,21 @@
#include <BaseGFXHelper.hxx>
#include <VLineProperties.hxx>
#include "PieChart.hxx"
-#include <PlottingPositionHelper.hxx>
#include <ShapeFactory.hxx>
#include <PolarLabelPositionHelper.hxx>
#include <CommonConverters.hxx>
#include <ObjectIdentifier.hxx>
+#include <ChartType.hxx>
+#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
-#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/chart2/XColorScheme.hpp>
-#include <com/sun/star/container/XChild.hpp>
-#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <sal/log.hxx>
#include <osl/diagnose.h>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/helpers.hxx>
#include <limits>
@@ -44,6 +42,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
namespace chart {
@@ -104,7 +103,7 @@ struct PieChart::ShapeParam
namespace
{
-::basegfx::B2IRectangle lcl_getRect(const uno::Reference<drawing::XShape>& xShape)
+::basegfx::B2IRectangle lcl_getRect(const rtl::Reference<SvxShape>& xShape)
{
::basegfx::B2IRectangle aRect;
if (xShape.is())
@@ -125,18 +124,6 @@ bool lcl_isInsidePage(const awt::Point& rPos, const awt::Size& rSize, const awt:
} //end anonymous namespace
-class PiePositionHelper : public PolarPlottingPositionHelper
-{
-public:
- PiePositionHelper( double fAngleDegreeOffset );
-
- bool getInnerAndOuterRadius( double fCategoryX, double& fLogicInnerRadius, double& fLogicOuterRadius, bool bUseRings, double fMaxOffset ) const;
-
-public:
- //Distance between different category rings, seen relative to width of a ring:
- double m_fRingDistance; //>=0 m_fRingDistance=1 --> distance == width
-};
-
PiePositionHelper::PiePositionHelper( double fAngleDegreeOffset )
: m_fRingDistance(0.0)
{
@@ -191,38 +178,54 @@ bool PiePositionHelper::getInnerAndOuterRadius( double fCategoryX
return true;
}
-PieChart::PieChart( const uno::Reference<XChartType>& xChartTypeModel
+
+bool PiePositionHelper::clockwiseWedges() const
+{
+ const ExplicitScaleData& rAngleScale = m_bSwapXAndY ? m_aScales[1] : m_aScales[0];
+ return rAngleScale.Orientation == AxisOrientation_REVERSE;
+}
+
+
+PieChart::PieChart( const rtl::Reference<ChartType>& xChartTypeModel
, sal_Int32 nDimensionCount
, bool bExcludingPositioning )
: VSeriesPlotter( xChartTypeModel, nDimensionCount )
- , m_pPosHelper( new PiePositionHelper( (m_nDimension==3) ? 0.0 : 90.0 ) )
+ , m_aPosHelper( (m_nDimension==3) ? 0.0 : 90.0 )
, m_bUseRings(false)
, m_bSizeExcludesLabelsAndExplodedSegments(bExcludingPositioning)
+ , m_eSubType(PieChartSubType_NONE)
, m_fMaxOffset(std::numeric_limits<double>::quiet_NaN())
{
- PlotterBase::m_pPosHelper = m_pPosHelper.get();
- VSeriesPlotter::m_pMainPosHelper = m_pPosHelper.get();
- m_pPosHelper->m_fRadiusOffset = 0.0;
- m_pPosHelper->m_fRingDistance = 0.0;
+ PlotterBase::m_pPosHelper = &m_aPosHelper;
+ VSeriesPlotter::m_pMainPosHelper = &m_aPosHelper;
+ m_aPosHelper.m_fRadiusOffset = 0.0;
+ m_aPosHelper.m_fRingDistance = 0.0;
- uno::Reference< beans::XPropertySet > xChartTypeProps( xChartTypeModel, uno::UNO_QUERY );
- if( !xChartTypeProps.is() )
+ if( !xChartTypeModel.is() )
return;
try
{
- xChartTypeProps->getPropertyValue( "UseRings") >>= m_bUseRings;
+ xChartTypeModel->getFastPropertyValue(PROP_PIECHARTTYPE_USE_RINGS) >>= m_bUseRings; // "UseRings"
if( m_bUseRings )
{
- m_pPosHelper->m_fRadiusOffset = 1.0;
+ m_aPosHelper.m_fRadiusOffset = 1.0;
if( nDimensionCount==3 )
- m_pPosHelper->m_fRingDistance = 0.1;
+ m_aPosHelper.m_fRingDistance = 0.1;
}
}
catch( const uno::Exception& )
{
TOOLS_WARN_EXCEPTION("chart2", "" );
}
+ try
+ {
+ xChartTypeModel->getFastPropertyValue(PROP_PIECHARTTYPE_SUBTYPE) >>= m_eSubType; // "SubType"
+ }
+ catch( const uno::Exception& )
+ {
+ TOOLS_WARN_EXCEPTION("chart2", "" );
+ }
}
PieChart::~PieChart()
@@ -232,7 +235,7 @@ PieChart::~PieChart()
void PieChart::setScales( std::vector< ExplicitScaleData >&& rScales, bool /* bSwapXAndYAxis */ )
{
OSL_ENSURE(m_nDimension<=static_cast<sal_Int32>(rScales.size()),"Dimension of Plotter does not fit two dimension of given scale sequence");
- m_pPosHelper->setScales( std::move(rScales), true );
+ m_aPosHelper.setScales( std::move(rScales), true );
}
drawing::Direction3D PieChart::getPreferredDiagramAspectRatio() const
@@ -248,42 +251,140 @@ bool PieChart::shouldSnapRectToUsedArea()
}
rtl::Reference<SvxShape> PieChart::createDataPoint(
+ const SubPieType e_subType,
const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const uno::Reference<beans::XPropertySet>& xObjectProperties,
- const ShapeParam& rParam )
+ const ShapeParam& rParam,
+ const sal_Int32 nPointCount,
+ const bool bConcentricExplosion)
{
//transform position:
drawing::Direction3D aOffset;
- if (rParam.mfExplodePercentage != 0.0)
- {
- double fAngle = rParam.mfUnitCircleStartAngleDegree + rParam.mfUnitCircleWidthAngleDegree/2.0;
- double fRadius = (rParam.mfUnitCircleOuterRadius-rParam.mfUnitCircleInnerRadius)*rParam.mfExplodePercentage;
- drawing::Position3D aOrigin = m_pPosHelper->transformUnitCircleToScene(0, 0, rParam.mfLogicZ);
- drawing::Position3D aNewOrigin = m_pPosHelper->transformUnitCircleToScene(fAngle, fRadius, rParam.mfLogicZ);
- aOffset = aNewOrigin - aOrigin;
+ double fExplodedInnerRadius = rParam.mfUnitCircleInnerRadius;
+ double fExplodedOuterRadius = rParam.mfUnitCircleOuterRadius;
+ double fStartAngle = rParam.mfUnitCircleStartAngleDegree;
+ double fWidthAngle = rParam.mfUnitCircleWidthAngleDegree;
+
+ if (rParam.mfExplodePercentage != 0.0) {
+ double fRadius = (fExplodedOuterRadius-fExplodedInnerRadius)*rParam.mfExplodePercentage;
+
+ if (bConcentricExplosion) {
+
+ // For concentric explosion, increase the radius but retain the original
+ // arc length of all ring segments together. This results in a gap
+ // that's evenly divided among all segments, assuming they all have
+ // the same explosion percentage
+ assert(fExplodedInnerRadius >= 0 && fExplodedOuterRadius > 0);
+ double fAngleRatio = (fExplodedInnerRadius + fExplodedOuterRadius) /
+ (fExplodedInnerRadius + fExplodedOuterRadius + 2 * fRadius);
+
+ assert(nPointCount > 0);
+ double fAngleGap = 360 * (1.0 - fAngleRatio) / nPointCount;
+ fStartAngle += fAngleGap / 2;
+ fWidthAngle -= fAngleGap;
+
+ fExplodedInnerRadius += fRadius;
+ fExplodedOuterRadius += fRadius;
+
+ } else {
+ // For the non-concentric explosion case, keep the original radius
+ // but shift the circle origin
+ double fAngle = fStartAngle + fWidthAngle/2.0;
+
+ drawing::Position3D aOrigin = m_aPosHelper.transformUnitCircleToScene(0, 0, rParam.mfLogicZ);
+ drawing::Position3D aNewOrigin = m_aPosHelper.transformUnitCircleToScene(fAngle, fRadius, rParam.mfLogicZ);
+ aOffset = aNewOrigin - aOrigin;
+ }
+ } else {
+ drawing::Position3D aOrigin, aNewOrigin;
+ switch (e_subType) {
+ case SubPieType::LEFT:
+ // Draw the main pie for bar-of-pie/pie-of-pie smaller and to the left
+ aOrigin = m_aPosHelper.transformUnitCircleToScene(0, 0, rParam.mfLogicZ);
+ aNewOrigin = m_aPosHelper.transformUnitCircleToScene(180, 0.75, rParam.mfLogicZ);
+ aOffset = aNewOrigin - aOrigin;
+ fExplodedOuterRadius *= 2.0/3;
+ break;
+ case SubPieType::RIGHT:
+ // Draw the sub-pie for pie-of-pie much smaller and to the right
+ aOrigin = m_aPosHelper.transformUnitCircleToScene(0, 0, rParam.mfLogicZ);
+ aNewOrigin = m_aPosHelper.transformUnitCircleToScene(0, 0.75, rParam.mfLogicZ);
+ aOffset = aNewOrigin - aOrigin;
+ fExplodedOuterRadius *= 1.0/3;
+ break;
+ case SubPieType::NONE:
+ default:
+ // no change
+ break;
+ }
}
+
//create point
rtl::Reference<SvxShape> xShape;
if(m_nDimension==3)
{
xShape = ShapeFactory::createPieSegment( xTarget
- , rParam.mfUnitCircleStartAngleDegree, rParam.mfUnitCircleWidthAngleDegree
- , rParam.mfUnitCircleInnerRadius, rParam.mfUnitCircleOuterRadius
- , aOffset, B3DHomMatrixToHomogenMatrix( m_pPosHelper->getUnitCartesianToScene() )
+ , fStartAngle, fWidthAngle
+ , fExplodedInnerRadius, fExplodedOuterRadius
+ , aOffset, B3DHomMatrixToHomogenMatrix( m_aPosHelper.getUnitCartesianToScene() )
, rParam.mfDepth );
}
else
{
xShape = ShapeFactory::createPieSegment2D( xTarget
- , rParam.mfUnitCircleStartAngleDegree, rParam.mfUnitCircleWidthAngleDegree
- , rParam.mfUnitCircleInnerRadius, rParam.mfUnitCircleOuterRadius
- , aOffset, B3DHomMatrixToHomogenMatrix( m_pPosHelper->getUnitCartesianToScene() ) );
+ , fStartAngle, fWidthAngle
+ , fExplodedInnerRadius, fExplodedOuterRadius
+ , aOffset, B3DHomMatrixToHomogenMatrix( m_aPosHelper.getUnitCartesianToScene() ) );
}
PropertyMapper::setMappedProperties( *xShape, xObjectProperties, PropertyMapper::getPropertyNameMapForFilledSeriesProperties() );
return xShape;
}
+rtl::Reference<SvxShape> PieChart::createBarDataPoint(
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
+ const uno::Reference<beans::XPropertySet>& xObjectProperties,
+ const ShapeParam& rParam,
+ double fBarSegBottom, double fBarSegTop)
+{
+ drawing::Position3D aP0, aP1;
+
+ // Draw the bar for bar-of-pie small and to the right. Width and
+ // position are hard-coded for now.
+
+#if 0
+ aP0 = cartesianPosHelper.transformLogicToScene(0.75, fBarSegBottom,
+ rParam.mfLogicZ, false);
+ aP1 = cartesianPosHelper.transformLogicToScene(1.25, fBarSegTop,
+ rParam.mfLogicZ, false);
+#else
+ double x0 = m_aPosHelper.transformUnitCircleToScene(0, 0.75, 0).PositionX;
+ double x1 = m_aPosHelper.transformUnitCircleToScene(0, 1.25, 0).PositionX;
+ double y0 = m_aPosHelper.transformUnitCircleToScene(
+ 90, fBarSegBottom, 0).PositionY;
+ double y1 = m_aPosHelper.transformUnitCircleToScene(
+ 90, fBarSegTop, 0).PositionY;
+
+ aP0 = drawing::Position3D(x0, y0, rParam.mfLogicZ);
+ aP1 = drawing::Position3D(x1, y1, rParam.mfLogicZ);
+#endif
+
+ const css::awt::Point aPos(aP0.PositionX, aP1.PositionY);
+ const css::awt::Size aSz(fabs(aP0.PositionX - aP1.PositionX),
+ fabs(aP0.PositionY - aP1.PositionY));
+
+ const tNameSequence emptyNameSeq;
+ const tAnySequence emptyValSeq;
+ //create point
+ rtl::Reference<SvxShape> xShape = ShapeFactory::createRectangle(
+ xTarget,
+ aSz, aPos,
+ emptyNameSeq, emptyValSeq);
+
+ PropertyMapper::setMappedProperties( *xShape, xObjectProperties, PropertyMapper::getPropertyNameMapForFilledSeriesProperties() );
+ return xShape;
+}
+
void PieChart::createTextLabelShape(
const rtl::Reference<SvxShapeGroupAnyD>& xTextTarget,
VDataSeries& rSeries, sal_Int32 nPointIndex, ShapeParam& rParam )
@@ -306,7 +407,12 @@ void PieChart::createTextLabelShape(
///get the required label placement type. Available placements are
///`AVOID_OVERLAP`, `CENTER`, `OUTSIDE` and `INSIDE`;
sal_Int32 nLabelPlacement = rSeries.getLabelPlacement(
- nPointIndex, m_xChartTypeModel, m_pPosHelper->isSwapXAndY());
+ nPointIndex, m_xChartTypeModel, m_aPosHelper.isSwapXAndY());
+
+ // has an X/Y offset (relative to the OUTSIDE label default position) been provided?
+ const bool bHasCustomLabelPlacement = nLabelPlacement == css::chart::DataLabelPlacement::CUSTOM;
+ if (bHasCustomLabelPlacement)
+ nLabelPlacement = css::chart::DataLabelPlacement::OUTSIDE;
///when the placement is of `AVOID_OVERLAP` type a later rearrangement of
///the label position is allowed; the `createTextLabelShape` treats the
@@ -314,8 +420,7 @@ void PieChart::createTextLabelShape(
double nVal = rSeries.getYValue(nPointIndex);
//AVOID_OVERLAP is in fact "Best fit" in the UI.
- bool bMovementAllowed = nLabelPlacement == css::chart::DataLabelPlacement::AVOID_OVERLAP
- || nLabelPlacement == css::chart::DataLabelPlacement::CUSTOM;
+ bool bMovementAllowed = nLabelPlacement == css::chart::DataLabelPlacement::AVOID_OVERLAP;
if( bMovementAllowed )
nLabelPlacement = css::chart::DataLabelPlacement::CENTER;
@@ -337,7 +442,7 @@ void PieChart::createTextLabelShape(
///the scene position of the label anchor point is calculated (see notes for
///`PolarLabelPositionHelper::getLabelScreenPositionAndAlignmentForUnitCircleValues`),
///and immediately transformed into the screen position.
- PolarLabelPositionHelper aPolarPosHelper(m_pPosHelper.get(),m_nDimension,m_xLogicTarget);
+ PolarLabelPositionHelper aPolarPosHelper(&m_aPosHelper,m_nDimension,m_xLogicTarget);
awt::Point aScreenPosition2D(
aPolarPosHelper.getLabelScreenPositionAndAlignmentForUnitCircleValues(eAlignment, nLabelPlacement
, rParam.mfUnitCircleStartAngleDegree, rParam.mfUnitCircleWidthAngleDegree
@@ -346,7 +451,7 @@ void PieChart::createTextLabelShape(
///the screen position of the pie/donut center is calculated.
PieLabelInfo aPieLabelInfo;
aPieLabelInfo.aFirstPosition = basegfx::B2IVector( aScreenPosition2D.X, aScreenPosition2D.Y );
- awt::Point aOrigin( aPolarPosHelper.transformSceneToScreenPosition( m_pPosHelper->transformUnitCircleToScene( 0.0, 0.0, rParam.mfLogicZ+1.0 ) ) );
+ awt::Point aOrigin( aPolarPosHelper.transformSceneToScreenPosition( m_aPosHelper.transformUnitCircleToScene( 0.0, 0.0, rParam.mfLogicZ+1.0 ) ) );
aPieLabelInfo.aOrigin = basegfx::B2IVector( aOrigin.X, aOrigin.Y );
///add a scaling independent Offset if requested
@@ -360,7 +465,7 @@ void PieChart::createTextLabelShape(
// compute outer pie radius
awt::Point aOuterCirclePoint = PlottingPositionHelper::transformSceneToScreenPosition(
- m_pPosHelper->transformUnitCircleToScene(
+ m_aPosHelper.transformUnitCircleToScene(
0,
rParam.mfUnitCircleOuterRadius,
0 ),
@@ -370,29 +475,71 @@ void PieChart::createTextLabelShape(
aOuterCirclePoint.Y - aPieLabelInfo.aOrigin.getY() );
double fSquaredPieRadius = aRadiusVector.scalar(aRadiusVector);
double fPieRadius = sqrt( fSquaredPieRadius );
- double fAngleDegree
- = rParam.mfUnitCircleStartAngleDegree + rParam.mfUnitCircleWidthAngleDegree / 2.0;
- while (fAngleDegree > 360.0)
- fAngleDegree -= 360.0;
- while (fAngleDegree < 0.0)
- fAngleDegree += 360.0;
+ const double fHalfWidthAngleDegree = rParam.mfUnitCircleWidthAngleDegree / 2.0;
+ // fAngleDegree: the angle through the center of the slice / the bisecting ray
+ const double fAngleDegree
+ = NormAngle360(rParam.mfUnitCircleStartAngleDegree + fHalfWidthAngleDegree);
+ // aOuterPosition: slice midpoint on the circumference,
+ // which is where an outside/custom label would be connected
awt::Point aOuterPosition = PlottingPositionHelper::transformSceneToScreenPosition(
- m_pPosHelper->transformUnitCircleToScene(fAngleDegree, rParam.mfUnitCircleOuterRadius, 0),
+ m_aPosHelper.transformUnitCircleToScene(fAngleDegree, rParam.mfUnitCircleOuterRadius, 0),
m_xLogicTarget, m_nDimension);
aPieLabelInfo.aOuterPosition = basegfx::B2IVector(aOuterPosition.X, aOuterPosition.Y);
- // set the maximum text width to be used when text wrapping is enabled
+ /* There are basically three places where a label could be placed in a pie chart
+ * 1.) outside the slice
+ * -typically used for long labels or charts with many, thin slices
+ * 2.) inside the slice (center or edge)
+ * -typically used for charts with 5 or less slices
+ * 3.) in a custom location
+ * -typically set (by auto-positioning I presume) when labels overlap
+ *
+ * Selecting a good width for the text is critical to achieving good-looking labels.
+ * Our bestFit algorithm completely depends on a good starting guess.
+ * Lots of room for improvement here...
+ * Warning: complication due to 3D ovals (so can't use normal circle functions),
+ * donuts(m_bUseRings), auto re-scaling of the pie chart, etc.
+ *
+ * Based on observation, Microsoft uses 1/5 of the chart space as its text limit,
+ * although it will reduce the width (as long as it is not a custom position)
+ * if doing so means that the now-taller-text will fit inside the slice,
+ * so best if we do the same for our charts.
+ */
+
+ // set the maximum text width to be used when text wrapping is enabled (default text wrap is on)
+ /* A reasonable start for bestFitting a 90deg slice oriented on an Axis is 80% of the radius */
double fTextMaximumFrameWidth = 0.8 * fPieRadius;
- if (nLabelPlacement == css::chart::DataLabelPlacement::OUTSIDE
- && m_aAvailableOuterRect.getWidth())
+ const double fCompatMaxTextLen = m_aAvailableOuterRect.getWidth() / 5.0;
+ if (m_aAvailableOuterRect.getWidth())
{
- if ((fAngleDegree >= 67.5 && fAngleDegree <= 112.5)
- || (fAngleDegree >= 247.5 && fAngleDegree <= 292.5))
- fTextMaximumFrameWidth = m_aAvailableOuterRect.getWidth() / 3.0;
- else
- fTextMaximumFrameWidth = 0.85 * (m_aAvailableOuterRect.getWidth() / 2.0 - fPieRadius);
+ if (bHasCustomLabelPlacement)
+ {
+ // if a custom width has been provided, then use that of course,
+ // otherwise use the interoperability-compliant 1/5 of the chart space as max width
+ const awt::Size aCustomSize = rSeries.getLabelCustomSize(nPointIndex);
+ if (aCustomSize.Width > 0)
+ fTextMaximumFrameWidth = aCustomSize.Width;
+ else
+ fTextMaximumFrameWidth = fCompatMaxTextLen;
+ }
+ else if (nLabelPlacement == css::chart::DataLabelPlacement::OUTSIDE)
+ {
+ // use up to 80% of the available space from the slice edge to the edge of the chart
+ const sal_Int32 nOuterX = aPieLabelInfo.aOuterPosition.getX();
+ if (fAngleDegree < 90 || fAngleDegree > 270) // label is placed on the right side
+ fTextMaximumFrameWidth = 0.8 * abs(m_aAvailableOuterRect.getWidth() - nOuterX);
+ else // label is placed on the left side
+ fTextMaximumFrameWidth = 0.8 * nOuterX;
+
+ // limited of course to the 1/5 maximum allowed for compatibility
+ fTextMaximumFrameWidth = std::min(fTextMaximumFrameWidth, fCompatMaxTextLen);
+ }
}
+ /* TODO: better guesses for INSIDE: does the slice better handle wide text or tall/wrapped text?
+ * * wide: center near X-axis, shorter text content, slice > 90degree wide
+ * * tall: center near Y-axis, longer text content, many categories shown
+ */
sal_Int32 nTextMaximumFrameWidth = ceil(fTextMaximumFrameWidth);
///the text shape for the label is created
@@ -402,13 +549,13 @@ void PieChart::createTextLabelShape(
///a new `PieLabelInfo` instance is initialized with all the info related to
///the current label in order to simplify later label position rearrangement;
- uno::Reference< container::XChild > xChild( aPieLabelInfo.xTextShape, uno::UNO_QUERY );
+ rtl::Reference< SvxShape > xChild = aPieLabelInfo.xTextShape;
///text shape could be empty; in that case there is no need to add label info
if( !xChild.is() )
return;
- aPieLabelInfo.xLabelGroupShape.set( xChild->getParent(), uno::UNO_QUERY );
+ aPieLabelInfo.xLabelGroupShape = dynamic_cast<SvxShapeGroupAnyD*>(xChild->getParent().get());
if (bMovementAllowed && !m_bUseRings)
{
@@ -416,21 +563,47 @@ void PieChart::createTextLabelShape(
* First off the routine try to place the label inside the related pie slice,
* if this is not possible the label is placed outside.
*/
- if (rSeries.getLabelPlacement(nPointIndex, m_xChartTypeModel, m_pPosHelper->isSwapXAndY())
- == css::chart::DataLabelPlacement::CUSTOM
- || !performLabelBestFitInnerPlacement(rParam, aPieLabelInfo))
+
+ /* Note: bestFit surprisingly does not adjust the width of the label,
+ * so having an optimal width already set when createDataLabel ran earlier
+ * is crucial (and currently lacking)!
+ * TODO: * change bestFit to treat the width as a max width, and reduce if beneficial
+ */
+ if (!performLabelBestFitInnerPlacement(rParam, aPieLabelInfo))
{
if (m_aAvailableOuterRect.getWidth())
{
- if ((fAngleDegree >= 67.5 && fAngleDegree <= 112.5)
- || (fAngleDegree >= 247.5 && fAngleDegree <= 292.5))
- fTextMaximumFrameWidth = m_aAvailableOuterRect.getWidth() / 3.0;
- else
- fTextMaximumFrameWidth
- = 0.85 * (m_aAvailableOuterRect.getWidth() / 2.0 - fPieRadius);
- nTextMaximumFrameWidth = ceil(fTextMaximumFrameWidth);
+ /* This tried to bestFit, but it didn't fit. So how best to handle this?
+ *
+ * Two possible cases relating to compatibility
+ * 1.) It did fit for Microsoft, but our bestFit wasn't able to do the same
+ * * In that case, the best response is to be as small as possible
+ * (the distance from the chart edge to where the label attaches to the slice)
+ * to avoid scaling the diagram with too long outside labels,
+ * and to encourage fixing the bestFit algorithm.
+ * 2.) It didn't fit for Microsoft either (possible, but less likely situation)
+ * * In that case, the compatible max length would be best
+ * * can expect the chart space has been properly sized to handle the max length
+ *
+ * In the native LO case, it is also best to be as small as possible,
+ * so that the user creating the diagram is annoyed and makes the chart area larger.
+ *
+ * Therefore, handle this by making the label as small as possible.
+ *
+ * Complication (tdf122765.pptx): it is possible for the aOuterPosition
+ * to be outside of the available outer rectangle (somehow),
+ * so in that bizarre case just try the positive value of the result...
+ */
+ const sal_Int32 nOuterX = aPieLabelInfo.aOuterPosition.getX();
+ if (fAngleDegree < 90 || fAngleDegree > 270) // label is placed on the right side
+ fTextMaximumFrameWidth = 0.8 * abs(m_aAvailableOuterRect.getWidth() - nOuterX);
+ else // label is placed on the left side
+ fTextMaximumFrameWidth = 0.8 * nOuterX;
+
+ nTextMaximumFrameWidth = ceil(std::min(fTextMaximumFrameWidth, fCompatMaxTextLen));
}
+ // find the position to connect an Outside label to
nScreenValueOffsetInRadiusDirection = (m_nDimension != 3) ? 150 : 0;
aScreenPosition2D
= aPolarPosHelper.getLabelScreenPositionAndAlignmentForUnitCircleValues(
@@ -452,21 +625,21 @@ void PieChart::createTextLabelShape(
}
uno::Reference<drawing::XShapes> xShapes(xChild->getParent(), uno::UNO_QUERY);
+ /* question: why remove and rebuild? Can't the existing one just be changed? */
xShapes->remove(aPieLabelInfo.xTextShape);
aPieLabelInfo.xTextShape
= createDataLabel(xTextTarget, rSeries, nPointIndex, nVal, rParam.mfLogicYSum,
aScreenPosition2D, eAlignment, 0, nTextMaximumFrameWidth);
- xChild.clear();
- xChild.set(uno::Reference<container::XChild>(aPieLabelInfo.xTextShape, uno::UNO_QUERY));
+ xChild = aPieLabelInfo.xTextShape;
if (!xChild.is())
return;
- aPieLabelInfo.xLabelGroupShape.set(xChild->getParent(), uno::UNO_QUERY);
+ aPieLabelInfo.xLabelGroupShape = dynamic_cast<SvxShapeGroupAnyD*>(xChild->getParent().get());
}
}
- bool bShowLeaderLine = rSeries.getPropertiesOfSeries()
- ->getPropertyValue("ShowCustomLeaderLines")
+ bool bShowLeaderLine = rSeries.getModel()
+ ->getFastPropertyValue(PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES) // "ShowCustomLeaderLines"
.get<sal_Bool>();
if (m_bPieLabelsAllowToMove)
{
@@ -493,39 +666,30 @@ void PieChart::createTextLabelShape(
{
sal_Int32 nX1 = aPieLabelInfo.aOuterPosition.getX();
sal_Int32 nY1 = aPieLabelInfo.aOuterPosition.getY();
- sal_Int32 nX2 = nX1;
- sal_Int32 nY2 = nY1;
- if (nX1 < aRect.getMinX())
- nX2 = aRect.getMinX();
- else if (nX1 > aRect.getMaxX())
- nX2 = aRect.getMaxX();
-
- if (nY1 < aRect.getMinY())
- nY2 = aRect.getMinY();
- else if (nY1 > aRect.getMaxY())
- nY2 = aRect.getMaxY();
-
- sal_Int32 nSquaredDistanceFromOrigin
+ const sal_Int32 nX2 = std::clamp(nX1, aRect.getMinX(), aRect.getMaxX());
+ const sal_Int32 nY2 = std::clamp(nY1, aRect.getMinY(), aRect.getMaxY());
+
+ const sal_Int32 nLabelSquaredDistanceFromOrigin
= (nX2 - aOrigin.X) * (nX2 - aOrigin.X) + (nY2 - aOrigin.Y) * (nY2 - aOrigin.Y);
+ // can't use fSquaredPieRadius for 3D charts, since no longer a true circle
+ const sal_Int32 nPieEdgeSquaredDistanceFromOrigin
+ = (nX1 - aOrigin.X) * (nX1 - aOrigin.X) + (nY1 - aOrigin.Y) * (nY1 - aOrigin.Y);
// tdf#138018 Don't show leader line when custom positioned data label is inside pie chart
- if (nSquaredDistanceFromOrigin > fSquaredPieRadius)
+ if (nLabelSquaredDistanceFromOrigin > nPieEdgeSquaredDistanceFromOrigin)
{
//when the line is very short compared to the page size don't create one
::basegfx::B2DVector aLength(nX1 - nX2, nY1 - nY2);
- double fPageDiagonaleLength = sqrt(double(nPageWidth) * double(nPageWidth)
- + double(nPageHeight) * double(nPageHeight));
+ double fPageDiagonaleLength = std::hypot(nPageWidth, nPageHeight);
if ((aLength.getLength() / fPageDiagonaleLength) >= 0.01)
{
drawing::PointSequenceSequence aPoints{ { {nX1, nY1}, {nX2, nY2} } };
- uno::Reference<beans::XPropertySet> xProp(aPieLabelInfo.xTextShape,
- uno::UNO_QUERY);
VLineProperties aVLineProperties;
- if (xProp.is())
+ if (aPieLabelInfo.xTextShape.is())
{
sal_Int32 nColor = 0;
- xProp->getPropertyValue("CharColor") >>= nColor;
+ aPieLabelInfo.xTextShape->SvxShape::getPropertyValue("CharColor") >>= nColor;
//automatic font color does not work for lines -> fallback to black
if (nColor != -1)
aVLineProperties.Color <<= nColor;
@@ -571,19 +735,20 @@ double PieChart::getMaxOffset()
return m_fMaxOffset;
VDataSeries* pSeries = rSeriesList.front().get();
- uno::Reference< beans::XPropertySet > xSeriesProp( pSeries->getPropertiesOfSeries() );
- if( !xSeriesProp.is() )
+ rtl::Reference< DataSeries > xSeries( pSeries->getModel() );
+ if( !xSeries.is() )
return m_fMaxOffset;
double fExplodePercentage=0.0;
- xSeriesProp->getPropertyValue( "Offset") >>= fExplodePercentage;
+ xSeries->getPropertyValue( "Offset") >>= fExplodePercentage;
if(fExplodePercentage>m_fMaxOffset)
m_fMaxOffset=fExplodePercentage;
if(!m_bSizeExcludesLabelsAndExplodedSegments)
{
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeriesProp->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
{
@@ -694,22 +859,14 @@ void PieChart::createShapes()
///the angle axis scale range is [0, 1]. The max_offset parameter is used
///for exploded pie chart and its value is 0.5.
- ///the `explodeable` ring is the first one except when the radius axis
- ///orientation is reversed (always!?) and we are dealing with a donut: in
- ///such a case the `explodeable` ring is the last one.
- std::vector< VDataSeriesGroup >::size_type nExplodeableSlot = 0;
- if( m_pPosHelper->isMathematicalOrientationRadius() && m_bUseRings )
- nExplodeableSlot = m_aZSlots.front().size()-1;
-
m_aLabelInfoList.clear();
m_fMaxOffset = std::numeric_limits<double>::quiet_NaN();
sal_Int32 n3DRelativeHeight = 100;
- uno::Reference< beans::XPropertySet > xPropertySet( m_xChartTypeModel, uno::UNO_QUERY );
- if ( (m_nDimension==3) && xPropertySet.is())
+ if ( (m_nDimension==3) && m_xChartTypeModel.is())
{
try
{
- uno::Any aAny = xPropertySet->getPropertyValue( "3DRelativeHeight" );
+ uno::Any aAny = m_xChartTypeModel->getFastPropertyValue( PROP_PIECHARTTYPE_3DRELATIVEHEIGHT ); // "3DRelativeHeight"
aAny >>= n3DRelativeHeight;
}
catch (const uno::Exception&) { }
@@ -720,8 +877,6 @@ void PieChart::createShapes()
///(m_bUseRings||fSlotX<0.5)
for( double fSlotX=0; aXSlotIter != aXSlotEnd && (m_bUseRings||fSlotX<0.5 ); ++aXSlotIter, fSlotX+=1.0 )
{
- ShapeParam aParam;
-
std::vector< std::unique_ptr<VDataSeries> >* pSeriesList = &(aXSlotIter->m_aSeriesVector);
if(pSeriesList->empty())//there should be only one series in each x slot
continue;
@@ -729,17 +884,17 @@ void PieChart::createShapes()
if(!pSeries)
continue;
- bool bHasFillColorMapping = pSeries->hasPropertyMapping("FillColor");
-
/// The angle degree offset is set by the same property of the
/// data series.
/// Counter-clockwise offset from the 3 o'clock position.
- m_pPosHelper->m_fAngleDegreeOffset = pSeries->getStartingAngle();
+ m_aPosHelper.m_fAngleDegreeOffset = pSeries->getStartingAngle();
///iterate through all points to get the sum of all entries of
///the current data series
sal_Int32 nPointIndex=0;
sal_Int32 nPointCount=pSeries->getTotalPointCount();
+ ShapeParam aParam;
+
for( nPointIndex = 0; nPointIndex < nPointCount; nPointIndex++ )
{
double fY = pSeries->getYValue( nPointIndex );
@@ -752,134 +907,457 @@ void PieChart::createShapes()
aParam.mfLogicYSum += fabs(fY);
}
- if (aParam.mfLogicYSum == 0.0)
+ if (aParam.mfLogicYSum == 0.0) {
// Total sum of all Y values in this series is zero. Skip the whole series.
continue;
+ }
- double fLogicYForNextPoint = 0.0;
- ///iterate through all points to create shapes
- for( nPointIndex = 0; nPointIndex < nPointCount; nPointIndex++ )
+ PieDataSrcBase *pDataSrc = nullptr;
+ PieDataSrc normalPieSrc;
+ OfPieDataSrc ofPieSrc;
+
+ // Default to regular pie if too few points for of-pie
+ ::css::chart2::PieChartSubType eSubType =
+ nPointCount >= OfPieDataSrc::minPoints ?
+ m_eSubType :
+ PieChartSubType_NONE;
+
+ switch (eSubType) {
+ case PieChartSubType_NONE:
+ pDataSrc = &normalPieSrc;
+ createOneRing(SubPieType::NONE, fSlotX, aParam, xSeriesTarget,
+ xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
+ break;
+ case PieChartSubType_BAR:
{
- double fLogicInnerRadius, fLogicOuterRadius;
-
- ///compute the maximum relative distance offset of the current slice
- ///from the pie center
- ///it is worth noting that after the first invocation the maximum
- ///offset value is cached, so it is evaluated only once per each
- ///call to `createShapes`
- double fOffset = getMaxOffset();
-
- ///compute the outer and the inner radius for the current ring slice
- bool bIsVisible = m_pPosHelper->getInnerAndOuterRadius( fSlotX+1.0, fLogicInnerRadius, fLogicOuterRadius, m_bUseRings, fOffset );
- if( !bIsVisible )
- continue;
+ pDataSrc = &ofPieSrc;
+ createOneRing(SubPieType::LEFT, 0, aParam, xSeriesTarget,
+ xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
+ createOneBar(SubPieType::RIGHT, aParam, xSeriesTarget,
+ xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
+
+ //
+ // Draw connecting lines
+ //
+ double xl0, xl1, yl0, yl1, x0, y0, x1, y1, y2, y3;
+
+ // Get coordinates of "corners" of left composite wedge
+ sal_Int32 nEnd = pDataSrc->getNPoints(pSeries, SubPieType::LEFT);
+ double compFrac = pDataSrc->getData(pSeries, nEnd - 1,
+ SubPieType::LEFT) / aParam.mfLogicYSum;
+ if (compFrac < 0.5) {
+ xl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
+ cos(compFrac * M_PI) + m_fLeftShift;
+ yl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
+ sin(compFrac * M_PI);
+ } else {
+ xl0 = m_fLeftShift;
+ yl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale;
+ }
- aParam.mfDepth = getTransformedDepth() * (n3DRelativeHeight / 100.0);
+ // Coordinates of bar top left corner
+ xl1 = m_fBarLeft;
+ yl1 = m_fFullBarHeight / 2;
- rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget);
- ///collect data point information (logic coordinates, style ):
- double fLogicYValue = fabs(pSeries->getYValue( nPointIndex ));
- if( std::isnan(fLogicYValue) )
- continue;
- if(fLogicYValue==0.0)//@todo: continue also if the resolution is too small
- continue;
- double fLogicYPos = fLogicYForNextPoint;
- fLogicYForNextPoint += fLogicYValue;
+ x0 = m_aPosHelper.transformUnitCircleToScene(0, xl0, 0).PositionX;
+ y0 = m_aPosHelper.transformUnitCircleToScene(90, yl0, 0).PositionY;
+ x1 = m_aPosHelper.transformUnitCircleToScene(0, xl1, 0).PositionX;
+ y1 = m_aPosHelper.transformUnitCircleToScene(90, yl1, 0).PositionY;
+ y2 = m_aPosHelper.transformUnitCircleToScene(90, -yl0, 0).PositionY;
+ y3 = m_aPosHelper.transformUnitCircleToScene(90, -yl1, 0).PositionY;
+
+ std::vector<std::vector<css::drawing::Position3D>> linePts;
+ linePts.resize(2);
+ linePts[0].push_back(css::drawing::Position3D(x0, y0, aParam.mfLogicZ));
+ linePts[0].push_back(css::drawing::Position3D(x1, y1, aParam.mfLogicZ));
+ linePts[1].push_back(css::drawing::Position3D(x0, y2, aParam.mfLogicZ));
+ linePts[1].push_back(css::drawing::Position3D(x1, y3, aParam.mfLogicZ));
+
+ VLineProperties aVLineProperties; // default black
+
+ //create line
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes =
+ getSeriesGroupShape(pSeries, xSeriesTarget);
+ rtl::Reference<SvxShape> xShape = ShapeFactory::createLine2D(
+ xSeriesGroupShape_Shapes, linePts, &aVLineProperties);
+
+ // need to set properties?
+ //PropertyMapper::setMappedProperties( *xShape, xObjectProperties,
+ // PropertyMapper::getPropertyNameMapForLineSeriesProperties() );
+
+ break;
+ }
+ case PieChartSubType_PIE:
+ {
+ pDataSrc = &ofPieSrc;
+ createOneRing(SubPieType::LEFT, 0, aParam, xSeriesTarget,
+ xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
+ createOneRing(SubPieType::RIGHT, 0, aParam, xSeriesTarget,
+ xTextTarget, pSeries, pDataSrc, n3DRelativeHeight);
+
+ //
+ // Draw connecting lines
+ //
+ double xl0, xl1, yl0, yl1, x0, y0, x1, y1, y2, y3;
+
+ // Get coordinates of "corners" of left composite wedge
+ sal_Int32 nEnd = pDataSrc->getNPoints(pSeries, SubPieType::LEFT);
+ double compFrac = pDataSrc->getData(pSeries, nEnd - 1,
+ SubPieType::LEFT) / aParam.mfLogicYSum;
+ // The following isn't quite right. The tangent points on the left
+ // pie are only at pi/2 and -pi/2 for composite wedges over 1/2 the
+ // total if left and right pies are the same diameter. And the
+ // threshold of 1/2 isn't quite right either. So there
+ // really should be a more sophisticated approach here. TODO
+ if (compFrac < 0.5) {
+ // Translated, per below
+ xl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
+ cos(compFrac * M_PI) + m_fLeftShift - m_fRightShift;
+ yl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale *
+ sin(compFrac * M_PI);
+ } else {
+ // Translated, per below
+ xl0 = m_fLeftShift - m_fRightShift;
+ yl0 = aParam.mfUnitCircleOuterRadius * m_fLeftScale;
+ }
+
+ // Compute tangent point on the right-hand circle of the line
+ // through (xl0, yl0). If we translate things so the right-hand
+ // circle is centered on the origin, then this point (x,y)
+ // satisfies these two equations, where r is the radius of the
+ // right-hand circle:
+ // (1) x^2 + y^2 = r^2
+ // (2) (y - yl0) / (x - xl0) = -x / y
+ const double r = aParam.mfUnitCircleOuterRadius * m_fRightScale;
+
+ xl1 = (r*r * xl0 + yl0 * r * sqrt(xl0*xl0 + yl0*yl0 - r*r)) /
+ (xl0*xl0 + yl0*yl0);
+ yl1 = sqrt(r*r - xl1*xl1);
+
+ // Now translate back to the coordinates we use
+ xl0 += m_fRightShift;
+ xl1 += m_fRightShift;
+
+ x0 = m_aPosHelper.transformUnitCircleToScene(0, xl0, 0).PositionX;
+ y0 = m_aPosHelper.transformUnitCircleToScene(90, yl0, 0).PositionY;
+ x1 = m_aPosHelper.transformUnitCircleToScene(0, xl1, 0).PositionX;
+ y1 = m_aPosHelper.transformUnitCircleToScene(90, yl1, 0).PositionY;
+ y2 = m_aPosHelper.transformUnitCircleToScene(90, -yl0, 0).PositionY;
+ y3 = m_aPosHelper.transformUnitCircleToScene(90, -yl1, 0).PositionY;
+
+ std::vector<std::vector<css::drawing::Position3D>> linePts;
+ linePts.resize(2);
+ linePts[0].push_back(css::drawing::Position3D(x0, y0, aParam.mfLogicZ));
+ linePts[0].push_back(css::drawing::Position3D(x1, y1, aParam.mfLogicZ));
+ linePts[1].push_back(css::drawing::Position3D(x0, y2, aParam.mfLogicZ));
+ linePts[1].push_back(css::drawing::Position3D(x1, y3, aParam.mfLogicZ));
+
+ VLineProperties aVLineProperties; // default black
+
+ //create line
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes =
+ getSeriesGroupShape(pSeries, xSeriesTarget);
+ rtl::Reference<SvxShape> xShape = ShapeFactory::createLine2D(
+ xSeriesGroupShape_Shapes, linePts, &aVLineProperties);
+
+ break;
+ }
+ default:
+ assert(false); // this shouldn't happen
+ }
+ }//next x slot
+}
+
+static sal_Int32 propIndex(
+ sal_Int32 nPointIndex,
+ enum SubPieType eType,
+ const PieDataSrcBase *pDataSrc,
+ VDataSeries* pSeries)
+{
+
+ switch (eType) {
+ case SubPieType::LEFT:
+ if (nPointIndex == pDataSrc->getNPoints(pSeries,
+ SubPieType::LEFT) - 1) {
+ return pSeries->getTotalPointCount();
+ } else {
+ return nPointIndex;
+ }
+ break;
+ case SubPieType::RIGHT:
+ return pDataSrc->getNPoints(pSeries, SubPieType::LEFT) +
+ nPointIndex - 1;
+ break;
+ case SubPieType::NONE:
+ return nPointIndex;
+ break;
+ default: // shouldn't happen
+ assert(false);
+ return 0; // suppress compile warning
+ }
+}
+
+
+void PieChart::createOneRing(
+ enum SubPieType eType,
+ double fSlotX,
+ ShapeParam& aParam,
+ const rtl::Reference<SvxShapeGroupAnyD>& xSeriesTarget,
+ const rtl::Reference<SvxShapeGroup>& xTextTarget,
+ VDataSeries* pSeries,
+ const PieDataSrcBase *pDataSrc,
+ sal_Int32 n3DRelativeHeight)
+{
+ bool bHasFillColorMapping = pSeries->hasPropertyMapping("FillColor");
+
+ sal_Int32 nRingPtCnt = pDataSrc->getNPoints(pSeries, eType);
+
+ // Find sum of entries for this ring or sub-pie
+ double ringSum = 0;
+ for (sal_Int32 nPointIndex = 0; nPointIndex < nRingPtCnt; nPointIndex++ ) {
+ double fY = pDataSrc->getData(pSeries, nPointIndex, eType);
+ if (!std::isnan(fY) ) ringSum += fY;
+ }
+
+ // determine the starting angle around the ring
+ auto sAngle = [&]()
+ {
+ if (eType == SubPieType::LEFT) {
+ // Left of-pie has the "composite" wedge (the one expanded in the right
+ // subgraph) facing to the right in the chart, to allow the expansion
+ // lines to meet it
+ const double compositeVal = pDataSrc->getData(pSeries, nRingPtCnt - 1, eType);
+ const double degAng = compositeVal * 360 / (ringSum * 2);
+ return m_aPosHelper.clockwiseWedges() ? 360 - degAng : degAng;
+ } else {
+ /// The angle degree offset is set by the same property of the
+ /// data series.
+ /// Counter-clockwise offset from the 3 o'clock position.
+ return static_cast<double>(pSeries->getStartingAngle());
+ }
+ };
+
+ m_aPosHelper.m_fAngleDegreeOffset = sAngle();
+
+ ///the `explodeable` ring is the first one except when the radius axis
+ ///orientation is reversed (always!?) and we are dealing with a donut: in
+ ///such a case the `explodeable` ring is the last one.
+ std::vector< VDataSeriesGroup >::size_type nExplodeableSlot = 0;
+ if( m_aPosHelper.isMathematicalOrientationRadius() && m_bUseRings )
+ nExplodeableSlot = m_aZSlots.front().size()-1;
+
+ double fLogicYForNextPoint = 0.0;
+ ///iterate through all points to create shapes
+ for(sal_Int32 nPointIndex = 0; nPointIndex < nRingPtCnt; nPointIndex++ )
+ {
+ double fLogicInnerRadius, fLogicOuterRadius;
+
+ ///compute the maximum relative distance offset of the current slice
+ ///from the pie center
+ ///it is worth noting that after the first invocation the maximum
+ ///offset value is cached, so it is evaluated only once per each
+ ///call to `createShapes`
+ double fOffset = getMaxOffset();
+
+ ///compute the outer and the inner radius for the current ring slice
+ bool bIsVisible = m_aPosHelper.getInnerAndOuterRadius( fSlotX+1.0, fLogicInnerRadius, fLogicOuterRadius, m_bUseRings, fOffset );
+ if( !bIsVisible )
+ continue;
+
+ aParam.mfDepth = getTransformedDepth() * (n3DRelativeHeight / 100.0);
+
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget);
+
+ ///collect data point information (logic coordinates, style ):
+ double fLogicYValue = pDataSrc->getData(pSeries, nPointIndex, eType);
+ if( std::isnan(fLogicYValue) )
+ continue;
+ if(fLogicYValue==0.0)//@todo: continue also if the resolution is too small
+ continue;
+ double fLogicYPos = fLogicYForNextPoint;
+ fLogicYForNextPoint += fLogicYValue;
- uno::Reference< beans::XPropertySet > xPointProperties = pSeries->getPropertiesOfPoint( nPointIndex );
+ uno::Reference< beans::XPropertySet > xPointProperties =
+ pDataSrc->getProps(pSeries, nPointIndex, eType);
- //iterate through all subsystems to create partial points
+ //iterate through all subsystems to create partial points
+ {
+ //logic values on angle axis:
+ double fLogicStartAngleValue = fLogicYPos / ringSum;
+ double fLogicEndAngleValue = (fLogicYPos+fLogicYValue) / ringSum;
+
+ ///note that the explode percentage is set to the `Offset`
+ ///property of the current data series entry only for slices
+ ///belonging to the outer ring
+ aParam.mfExplodePercentage = 0.0;
+ bool bDoExplode = ( nExplodeableSlot == static_cast< std::vector< VDataSeriesGroup >::size_type >(fSlotX) );
+ if(bDoExplode) try
{
- //logic values on angle axis:
- double fLogicStartAngleValue = fLogicYPos / aParam.mfLogicYSum;
- double fLogicEndAngleValue = (fLogicYPos+fLogicYValue) / aParam.mfLogicYSum;
-
- ///note that the explode percentage is set to the `Offset`
- ///property of the current data series entry only for slices
- ///belonging to the outer ring
- aParam.mfExplodePercentage = 0.0;
- bool bDoExplode = ( nExplodeableSlot == static_cast< std::vector< VDataSeriesGroup >::size_type >(fSlotX) );
- if(bDoExplode) try
- {
- xPointProperties->getPropertyValue( "Offset") >>= aParam.mfExplodePercentage;
- }
- catch( const uno::Exception& )
- {
- TOOLS_WARN_EXCEPTION("chart2", "" );
- }
+ xPointProperties->getPropertyValue( "Offset") >>= aParam.mfExplodePercentage;
+ }
+ catch( const uno::Exception& )
+ {
+ TOOLS_WARN_EXCEPTION("chart2", "" );
+ }
- ///see notes for `PolarPlottingPositionHelper` methods
- ///transform to unit circle:
- aParam.mfUnitCircleWidthAngleDegree = m_pPosHelper->getWidthAngleDegree( fLogicStartAngleValue, fLogicEndAngleValue );
- aParam.mfUnitCircleStartAngleDegree = m_pPosHelper->transformToAngleDegree( fLogicStartAngleValue );
- aParam.mfUnitCircleInnerRadius = m_pPosHelper->transformToRadius( fLogicInnerRadius );
- aParam.mfUnitCircleOuterRadius = m_pPosHelper->transformToRadius( fLogicOuterRadius );
-
- ///create data point
- aParam.mfLogicZ = -1.0; // For 3D pie chart label position
- rtl::Reference<SvxShape> xPointShape =
- createDataPoint(
- xSeriesGroupShape_Shapes, xPointProperties, aParam);
-
- ///point color:
- if (!pSeries->hasPointOwnColor(nPointIndex) && m_xColorScheme.is())
- {
- xPointShape->setPropertyValue("FillColor",
- uno::Any(m_xColorScheme->getColorByIndex( nPointIndex )));
- }
+ ///see notes for `PolarPlottingPositionHelper` methods
+ ///transform to unit circle:
+ aParam.mfUnitCircleWidthAngleDegree = m_aPosHelper.getWidthAngleDegree( fLogicStartAngleValue, fLogicEndAngleValue );
+ aParam.mfUnitCircleStartAngleDegree = m_aPosHelper.transformToAngleDegree( fLogicStartAngleValue );
+ aParam.mfUnitCircleInnerRadius = m_aPosHelper.transformToRadius( fLogicInnerRadius );
+ aParam.mfUnitCircleOuterRadius = m_aPosHelper.transformToRadius( fLogicOuterRadius );
+
+ ///create data point
+ aParam.mfLogicZ = -1.0; // For 3D pie chart label position
+
+ // Do concentric explosion if it's a donut chart with more than one series
+ const bool bConcentricExplosion = m_bUseRings && (m_aZSlots.front().size() > 1);
+ rtl::Reference<SvxShape> xPointShape =
+ createDataPoint(eType, xSeriesGroupShape_Shapes,
+ xPointProperties, aParam, nRingPtCnt,
+ bConcentricExplosion);
+
+ // Handle coloring of the composite wedge
+ sal_Int32 nPropIdx = propIndex(nPointIndex, eType, pDataSrc,
+ pSeries);
+
+ ///point color:
+ if (!pSeries->hasPointOwnColor(nPropIdx) && m_xColorScheme.is())
+ {
+ xPointShape->setPropertyValue("FillColor",
+ uno::Any(m_xColorScheme->getColorByIndex( nPropIdx )));
+ }
- if(bHasFillColorMapping)
+ if(bHasFillColorMapping)
+ {
+ double nPropVal = pSeries->getValueByProperty(nPropIdx, "FillColor");
+ if(!std::isnan(nPropVal))
{
- double nPropVal = pSeries->getValueByProperty(nPointIndex, "FillColor");
- if(!std::isnan(nPropVal))
- {
- xPointShape->setPropertyValue("FillColor", uno::Any(static_cast<sal_Int32>( nPropVal)));
- }
+ xPointShape->setPropertyValue("FillColor", uno::Any(static_cast<sal_Int32>( nPropVal)));
}
+ }
- ///create label
- createTextLabelShape(xTextTarget, *pSeries, nPointIndex, aParam);
+ ///create label
+ createTextLabelShape(xTextTarget, *pSeries, nPropIdx, aParam);
- if(!bDoExplode)
- {
- ShapeFactory::setShapeName( xPointShape
- , ObjectIdentifier::createPointCID( pSeries->getPointCID_Stub(), nPointIndex ) );
- }
- else try
- {
- ///enable dragging of outer segments
-
- double fAngle = aParam.mfUnitCircleStartAngleDegree + aParam.mfUnitCircleWidthAngleDegree/2.0;
- double fMaxDeltaRadius = aParam.mfUnitCircleOuterRadius-aParam.mfUnitCircleInnerRadius;
- drawing::Position3D aOrigin = m_pPosHelper->transformUnitCircleToScene( fAngle, aParam.mfUnitCircleOuterRadius, aParam.mfLogicZ );
- drawing::Position3D aNewOrigin = m_pPosHelper->transformUnitCircleToScene( fAngle, aParam.mfUnitCircleOuterRadius + fMaxDeltaRadius, aParam.mfLogicZ );
-
- sal_Int32 nOffsetPercent( static_cast<sal_Int32>(aParam.mfExplodePercentage * 100.0) );
-
- awt::Point aMinimumPosition( PlottingPositionHelper::transformSceneToScreenPosition(
- aOrigin, m_xLogicTarget, m_nDimension ) );
- awt::Point aMaximumPosition( PlottingPositionHelper::transformSceneToScreenPosition(
- aNewOrigin, m_xLogicTarget, m_nDimension ) );
-
- //enable dragging of piesegments
- OUString aPointCIDStub( ObjectIdentifier::createSeriesSubObjectStub( OBJECTTYPE_DATA_POINT
- , pSeries->getSeriesParticle()
- , ObjectIdentifier::getPieSegmentDragMethodServiceName()
- , ObjectIdentifier::createPieSegmentDragParameterString(
- nOffsetPercent, aMinimumPosition, aMaximumPosition )
- ) );
-
- ShapeFactory::setShapeName( xPointShape
- , ObjectIdentifier::createPointCID( aPointCIDStub, nPointIndex ) );
- }
- catch( const uno::Exception& )
- {
- TOOLS_WARN_EXCEPTION("chart2", "" );
- }
- }//next series in x slot (next y slot)
- }//next category
- }//next x slot
+ if(!bDoExplode)
+ {
+ ShapeFactory::setShapeName( xPointShape
+ , ObjectIdentifier::createPointCID(
+ pSeries->getPointCID_Stub(), nPropIdx ) );
+ }
+ else try
+ {
+ ///enable dragging of outer segments
+
+ double fAngle = aParam.mfUnitCircleStartAngleDegree + aParam.mfUnitCircleWidthAngleDegree/2.0;
+ double fMaxDeltaRadius = aParam.mfUnitCircleOuterRadius-aParam.mfUnitCircleInnerRadius;
+ drawing::Position3D aOrigin = m_aPosHelper.transformUnitCircleToScene( fAngle, aParam.mfUnitCircleOuterRadius, aParam.mfLogicZ );
+ drawing::Position3D aNewOrigin = m_aPosHelper.transformUnitCircleToScene( fAngle, aParam.mfUnitCircleOuterRadius + fMaxDeltaRadius, aParam.mfLogicZ );
+
+ sal_Int32 nOffsetPercent( static_cast<sal_Int32>(aParam.mfExplodePercentage * 100.0) );
+
+ awt::Point aMinimumPosition( PlottingPositionHelper::transformSceneToScreenPosition(
+ aOrigin, m_xLogicTarget, m_nDimension ) );
+ awt::Point aMaximumPosition( PlottingPositionHelper::transformSceneToScreenPosition(
+ aNewOrigin, m_xLogicTarget, m_nDimension ) );
+
+ //enable dragging of piesegments
+ OUString aPointCIDStub( ObjectIdentifier::createSeriesSubObjectStub( OBJECTTYPE_DATA_POINT
+ , pSeries->getSeriesParticle()
+ , ObjectIdentifier::getPieSegmentDragMethodServiceName()
+ , ObjectIdentifier::createPieSegmentDragParameterString(
+ nOffsetPercent, aMinimumPosition, aMaximumPosition )
+ ) );
+
+ ShapeFactory::setShapeName( xPointShape
+ , ObjectIdentifier::createPointCID( aPointCIDStub,
+ nPropIdx ) );
+ }
+ catch( const uno::Exception& )
+ {
+ TOOLS_WARN_EXCEPTION("chart2", "" );
+ }
+ }//next series in x slot (next y slot)
+ }//next category
+}
+
+void PieChart::createOneBar(
+ enum SubPieType eType,
+ ShapeParam& aParam,
+ const rtl::Reference<SvxShapeGroupAnyD>& xSeriesTarget,
+ const rtl::Reference<SvxShapeGroup>& xTextTarget,
+ VDataSeries* pSeries,
+ const PieDataSrcBase *pDataSrc,
+ sal_Int32 n3DRelativeHeight)
+{
+ bool bHasFillColorMapping = pSeries->hasPropertyMapping("FillColor");
+
+ sal_Int32 nBarPtCnt = pDataSrc->getNPoints(pSeries, eType);
+
+ // Find sum of entries for this bar chart
+ double barSum = 0;
+ for (sal_Int32 nPointIndex = 0; nPointIndex < nBarPtCnt; nPointIndex++ ) {
+ double fY = pDataSrc->getData(pSeries, nPointIndex, eType);
+ if (!std::isnan(fY) ) barSum += fY;
+ }
+
+ double fBarBottom = 0.0;
+ double fBarTop = -0.5; // make the bar go from -0.5 to 0.5
+ ///iterate through all points to create shapes
+ for(sal_Int32 nPointIndex = 0; nPointIndex < nBarPtCnt; nPointIndex++ )
+ {
+ aParam.mfDepth = getTransformedDepth() * (n3DRelativeHeight / 100.0);
+
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget);
+
+ ///collect data point information (logic coordinates, style ):
+ double fY = pDataSrc->getData(pSeries, nPointIndex, eType) / barSum;
+ if( std::isnan(fY) )
+ continue;
+ if(fY==0.0)//@todo: continue also if the resolution is too small
+ continue;
+ fBarBottom = fBarTop;
+ fBarTop += fY;
+
+ uno::Reference< beans::XPropertySet > xPointProperties =
+ pDataSrc->getProps(pSeries, nPointIndex, eType);
+
+ ///create data point
+ aParam.mfLogicZ = -1.0; // For 3D pie chart label position
+
+ rtl::Reference<SvxShape> xPointShape =
+ createBarDataPoint(xSeriesGroupShape_Shapes,
+ xPointProperties, aParam,
+ fBarBottom, fBarTop);
+
+ sal_Int32 nPropIdx = propIndex(nPointIndex, eType, pDataSrc, pSeries);
+
+ ///point color:
+ if (!pSeries->hasPointOwnColor(nPropIdx) && m_xColorScheme.is())
+ {
+ xPointShape->setPropertyValue("FillColor",
+ uno::Any(m_xColorScheme->getColorByIndex( nPropIdx )));
+ }
+
+
+ if(bHasFillColorMapping)
+ {
+ double nPropVal = pSeries->getValueByProperty(nPropIdx, "FillColor");
+ if(!std::isnan(nPropVal))
+ {
+ xPointShape->setPropertyValue("FillColor", uno::Any(static_cast<sal_Int32>( nPropVal)));
+ }
+ }
+
+ ///create label
+ createTextLabelShape(xTextTarget, *pSeries, nPropIdx, aParam);
+
+ ShapeFactory::setShapeName( xPointShape,
+ ObjectIdentifier::createPointCID( pSeries->getPointCID_Stub(),
+ nPropIdx ) );
+ }//next category
}
PieChart::PieLabelInfo::PieLabelInfo()
@@ -1129,7 +1607,7 @@ bool PieChart::tryMoveLabels( PieLabelInfo const * pFirstBorder, PieLabelInfo co
PieLabelInfo* p2 = pCenter->pNext;
//return true when successful
- bool bLabelOrderIsAntiClockWise = m_pPosHelper->isMathematicalOrientationAngle();
+ bool bLabelOrderIsAntiClockWise = m_aPosHelper.isMathematicalOrientationAngle();
///two loops are performed simultaneously: the outer loop iterates on
///`PieLabelInfo` objects in the list starting from the central element
@@ -1239,7 +1717,7 @@ void PieChart::rearrangeLabelToAvoidOverlapIfRequested( const awt::Size& rPageSi
if(!bMoveableFound)
return;
- double fPageDiagonaleLength = sqrt( double(rPageSize.Width)*double(rPageSize.Width) + double(rPageSize.Height)*double(rPageSize.Height) );
+ double fPageDiagonaleLength = std::hypot(rPageSize.Width, rPageSize.Height);
if( fPageDiagonaleLength == 0.0 )
return;
@@ -1269,20 +1747,11 @@ void PieChart::rearrangeLabelToAvoidOverlapIfRequested( const awt::Size& rPageSi
{
if( labelInfo.bMoved && labelInfo.bShowLeaderLine )
{
+ const basegfx::B2IRectangle aRect(lcl_getRect(labelInfo.xLabelGroupShape));
sal_Int32 nX1 = labelInfo.aOuterPosition.getX();
sal_Int32 nY1 = labelInfo.aOuterPosition.getY();
- sal_Int32 nX2 = nX1;
- sal_Int32 nY2 = nY1;
- ::basegfx::B2IRectangle aRect( lcl_getRect( labelInfo.xLabelGroupShape ) );
- if( nX1 < aRect.getMinX() )
- nX2 = aRect.getMinX();
- else if( nX1 > aRect.getMaxX() )
- nX2 = aRect.getMaxX();
-
- if( nY1 < aRect.getMinY() )
- nY2 = aRect.getMinY();
- else if( nY1 > aRect.getMaxY() )
- nY2 = aRect.getMaxY();
+ const sal_Int32 nX2 = std::clamp(nX1, aRect.getMinX(), aRect.getMaxX());
+ const sal_Int32 nY2 = std::clamp(nY1, aRect.getMinY(), aRect.getMaxY());
//when the line is very short compared to the page size don't create one
::basegfx::B2DVector aLength(nX1-nX2, nY1-nY2);
@@ -1291,11 +1760,10 @@ void PieChart::rearrangeLabelToAvoidOverlapIfRequested( const awt::Size& rPageSi
drawing::PointSequenceSequence aPoints{ { {nX1, nY1}, {nX2, nY2} } };
- uno::Reference< beans::XPropertySet > xProp( labelInfo.xTextShape, uno::UNO_QUERY);
- if( xProp.is() )
+ if( labelInfo.xTextShape.is() )
{
sal_Int32 nColor = 0;
- xProp->getPropertyValue("CharColor") >>= nColor;
+ labelInfo.xTextShape->SvxShape::getPropertyValue("CharColor") >>= nColor;
if( nColor != -1 )//automatic font color does not work for lines -> fallback to black
aVLineProperties.Color <<= nColor;
}
@@ -1394,7 +1862,7 @@ bool PieChart::performLabelBestFitInnerPlacement(ShapeParam& rShapeParam, PieLab
// get the middle point of the arc representing the pie slice border
double fLogicZ = rShapeParam.mfLogicZ + 1.0;
awt::Point aMiddleArcPoint = PlottingPositionHelper::transformSceneToScreenPosition(
- m_pPosHelper->transformUnitCircleToScene(
+ m_aPosHelper.transformUnitCircleToScene(
fBisectingRayAngleDeg,
rShapeParam.mfUnitCircleOuterRadius,
fLogicZ ),
@@ -1480,8 +1948,7 @@ bool PieChart::performLabelBestFitInnerPlacement(ShapeParam& rShapeParam, PieLab
// compute the length of the diagonal vector d,
// that is the distance between P and F
- double fSquaredDistancePF = fDistancePM * fDistancePM + fOrthogonalEdgeLength * fOrthogonalEdgeLength;
- double fDistancePF = sqrt( fSquaredDistancePF );
+ double fDistancePF = std::hypot(fDistancePM, fOrthogonalEdgeLength);
SAL_INFO( "chart2.pie.label.bestfit.inside",
" width = " << fLabelWidth );
@@ -1691,6 +2158,92 @@ bool PieChart::performLabelBestFitInnerPlacement(ShapeParam& rShapeParam, PieLab
return true;
}
+//=======================
+// class PieDataSrc
+//=======================
+double PieDataSrc::getData(const VDataSeries* pSeries, sal_Int32 nPtIdx,
+ [[maybe_unused]] enum SubPieType eType) const
+{
+ return fabs(pSeries->getYValue( nPtIdx ));
+}
+
+sal_Int32 PieDataSrc::getNPoints(const VDataSeries* pSeries,
+ [[maybe_unused]] enum SubPieType eType) const
+{
+ assert(eType == SubPieType::NONE);
+ return pSeries->getTotalPointCount();
+}
+
+uno::Reference< beans::XPropertySet > PieDataSrc::getProps(
+ const VDataSeries* pSeries, sal_Int32 nPtIdx,
+ [[maybe_unused]] enum SubPieType eType) const
+{
+ assert(eType == SubPieType::NONE);
+ return pSeries->getPropertiesOfPoint(nPtIdx);
+}
+
+
+//=======================
+// class OfPieDataSrc
+//=======================
+
+// For now, just implement the default Excel behavior, which is that the
+// right pie consists of the last three entries in the series. Other
+// behaviors should be supported later.
+// TODO
+
+sal_Int32 OfPieDataSrc::getNPoints(const VDataSeries* pSeries,
+ enum SubPieType eType) const
+{
+ if (eType == SubPieType::LEFT) {
+ return pSeries->getTotalPointCount() - 2;
+ } else {
+ assert(eType == SubPieType::RIGHT);
+ return 3;
+ }
+}
+
+double OfPieDataSrc::getData(const VDataSeries* pSeries, sal_Int32 nPtIdx,
+ enum SubPieType eType) const
+{
+ const sal_Int32 n = pSeries->getTotalPointCount() - 3;
+ if (eType == SubPieType::LEFT) {
+ // nPtIdx should be in [0, n]
+ if (nPtIdx < n) {
+ return fabs(pSeries->getYValue( nPtIdx ));
+ } else {
+ assert(nPtIdx == n);
+ return fabs(pSeries->getYValue(n)) +
+ fabs(pSeries->getYValue(n+1)) +
+ fabs(pSeries->getYValue(n+2));
+ }
+ } else {
+ assert(eType == SubPieType::RIGHT);
+ return fabs(pSeries->getYValue(nPtIdx + n));
+ }
+}
+
+uno::Reference< beans::XPropertySet > OfPieDataSrc::getProps(
+ const VDataSeries* pSeries, sal_Int32 nPtIdx,
+ enum SubPieType eType) const
+{
+ const sal_Int32 nPts = pSeries->getTotalPointCount();
+ const sal_Int32 n = nPts - 3;
+ if (eType == SubPieType::LEFT) {
+ // nPtIdx should be in [0, n]
+ if (nPtIdx < n) {
+ return pSeries->getPropertiesOfPoint( nPtIdx );
+ } else {
+ // The aggregated wedge
+ assert(nPtIdx == n);
+ return pSeries->getPropertiesOfPoint(nPts);
+ }
+ } else {
+ assert(eType == SubPieType::RIGHT);
+ return pSeries->getPropertiesOfPoint(nPtIdx + n);
+ }
+}
+
} //namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/charttypes/PieChart.hxx b/chart2/source/view/charttypes/PieChart.hxx
index 5bd25eed53e6..ccbe9cb94d94 100644
--- a/chart2/source/view/charttypes/PieChart.hxx
+++ b/chart2/source/view/charttypes/PieChart.hxx
@@ -21,13 +21,103 @@
#include <memory>
#include <VSeriesPlotter.hxx>
+#include <PlottingPositionHelper.hxx>
#include <basegfx/vector/b2ivector.hxx>
#include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/chart2/PieChartSubType.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::chart2;
namespace chart
{
-class PiePositionHelper;
+class PiePositionHelper : public PolarPlottingPositionHelper
+{
+public:
+ PiePositionHelper( double fAngleDegreeOffset );
+
+ bool getInnerAndOuterRadius( double fCategoryX, double& fLogicInnerRadius, double& fLogicOuterRadius, bool bUseRings, double fMaxOffset ) const;
+
+ // Determine if the pie wedges are ordered clockwise (returns true) or
+ // counterclockwise (returns false)
+ bool clockwiseWedges() const;
+
+public:
+ //Distance between different category rings, seen relative to width of a ring:
+ double m_fRingDistance; //>=0 m_fRingDistance=1 --> distance == width
+};
+
+enum class SubPieType {
+ NONE, // solo pie or donut
+ LEFT, // left pie in pie-of-pie
+ RIGHT // right pie in pie-of-pie
+};
+
+
+//=======================
+// class PieDataSrcBase
+//=======================
+class PieDataSrcBase
+{
+public:
+ PieDataSrcBase() = default;
+ virtual ~PieDataSrcBase() = default;
+
+ // Number of data points for given pie subtype
+ virtual sal_Int32 getNPoints(const VDataSeries* pSeries,
+ enum SubPieType eType) const = 0;
+
+ // Get the value for the given pie wedge, for the given subtype
+ virtual double getData(const VDataSeries* pSeries, sal_Int32 nPtIdx,
+ enum SubPieType eType) const = 0;
+
+ // Get the properties for the wedge and subtype
+ virtual uno::Reference< beans::XPropertySet > getProps(
+ const VDataSeries* pSeries, sal_Int32 nPtIdx,
+ enum SubPieType eType) const = 0;
+};
+
+//=======================
+// class PieDataSrc
+//=======================
+class PieDataSrc : public PieDataSrcBase
+{
+public:
+ sal_Int32 getNPoints(const VDataSeries* pSeries,
+ enum SubPieType eType) const;
+
+ double getData(const VDataSeries* pSeries, sal_Int32 nPtIdx,
+ [[maybe_unused]]enum SubPieType eType) const;
+
+ virtual uno::Reference< beans::XPropertySet > getProps(
+ const VDataSeries* pSeries, sal_Int32 nPtIdx,
+ enum SubPieType eType) const;
+};
+
+//=======================
+// class OfPieDataSrc
+//=======================
+class OfPieDataSrc : public PieDataSrcBase
+{
+public:
+ // Minimum sensible number of data points
+ static constexpr sal_Int32 minPoints = 4;
+
+ sal_Int32 getNPoints(const VDataSeries* pSeries,
+ enum SubPieType eType) const;
+
+ double getData(const VDataSeries* pSeries, sal_Int32 nPtIdx,
+ enum SubPieType eType) const;
+
+ virtual uno::Reference< beans::XPropertySet > getProps(
+ const VDataSeries* pSeries, sal_Int32 nPtIdx,
+ enum SubPieType eType) const;
+};
+
+//=======================
+// class PieChart
+//=======================
class PieChart : public VSeriesPlotter
{
struct ShapeParam;
@@ -35,7 +125,7 @@ class PieChart : public VSeriesPlotter
public:
PieChart() = delete;
- PieChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
+ PieChart( const rtl::Reference< ::chart::ChartType >& xChartTypeModel
, sal_Int32 nDimensionCount, bool bExcludingPositioning );
virtual ~PieChart() override;
@@ -65,10 +155,18 @@ public:
private: //methods
rtl::Reference<SvxShape>
createDataPoint(
+ enum SubPieType eType,
const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const css::uno::Reference<css::beans::XPropertySet>& xObjectProperties,
- const ShapeParam& rParam );
+ const ShapeParam& rParam,
+ const sal_Int32 nPointCount,
+ const bool bConcentricExplosion);
+ rtl::Reference<SvxShape> createBarDataPoint(
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
+ const uno::Reference<beans::XPropertySet>& xObjectProperties,
+ const ShapeParam& rParam,
+ double fBarSegBottom, double fBarSegTop);
/** This method creates a text shape for a label of a data point.
*
* @param xTextTarget
@@ -107,11 +205,48 @@ struct PieLabelInfo;
bool performLabelBestFitInnerPlacement( ShapeParam& rShapeParam
, PieLabelInfo const & rPieLabelInfo );
+ // A standalone pie, one pie in a pie-of-pie, or one ring of a donut
+ void createOneRing([[maybe_unused]]enum SubPieType eType
+ , double fSlotX
+ , ShapeParam& aParam
+ , const rtl::Reference<SvxShapeGroupAnyD>& xSeriesTarget
+ , const rtl::Reference<SvxShapeGroup>& xTextTarget
+ , VDataSeries* pSeries
+ , const PieDataSrcBase *pDataSrc
+ , sal_Int32 n3DRelativeHeight);
+
+ // A bar chart in a bar-of-pie
+ void createOneBar(
+ enum SubPieType eType,
+ ShapeParam& aParam,
+ const rtl::Reference<SvxShapeGroupAnyD>& xSeriesTarget,
+ const rtl::Reference<SvxShapeGroup>& xTextTarget,
+ VDataSeries* pSeries,
+ const PieDataSrcBase *pDataSrc,
+ sal_Int32 n3DRelativeHeight);
+
private: //member
- std::unique_ptr<PiePositionHelper>
- m_pPosHelper;
+ // Constants for of-pie charts. Some of these will want to become
+ // user-selectable values. TODO
+
+ // Radius scalings for left and right of-pie subcharts
+ static constexpr double m_fLeftScale = 2.0/3;
+ static constexpr double m_fRightScale = 1.0/3;
+ // Shifts left/right for of-pie subcharts
+ static constexpr double m_fLeftShift = -0.75;
+ static constexpr double m_fRightShift = 0.75;
+ // Height of bar-of-pie bar
+ static constexpr double m_fFullBarHeight = 1.0;
+ // Bar-of-pie bar left side position
+ static constexpr double m_fBarLeft = 0.75;
+ // Bar-of-pie bar right side position
+ static constexpr double m_fBarRight = 1.25;
+
+ PiePositionHelper m_aPosHelper;
+
bool m_bUseRings;
bool m_bSizeExcludesLabelsAndExplodedSegments;
+ ::css::chart2::PieChartSubType m_eSubType;
struct PieLabelInfo
{
@@ -119,8 +254,8 @@ private: //member
bool moveAwayFrom( const PieLabelInfo* pFix, const css::awt::Size& rPageSize
, bool bMoveHalfWay, bool bMoveClockwise );
- css::uno::Reference< css::drawing::XShape > xTextShape;
- css::uno::Reference< css::drawing::XShape > xLabelGroupShape;
+ rtl::Reference< SvxShapeText > xTextShape;
+ rtl::Reference< SvxShapeGroupAnyD > xLabelGroupShape;
::basegfx::B2IVector aFirstPosition;
::basegfx::B2IVector aOuterPosition;
::basegfx::B2IVector aOrigin;
@@ -138,6 +273,7 @@ private: //member
double m_fMaxOffset; /// cached max offset value (init'ed to NaN)
};
+
} //namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/charttypes/Splines.cxx b/chart2/source/view/charttypes/Splines.cxx
index bd54b266345a..15980b638bc8 100644
--- a/chart2/source/view/charttypes/Splines.cxx
+++ b/chart2/source/view/charttypes/Splines.cxx
@@ -19,12 +19,11 @@
#include "Splines.hxx"
#include <osl/diagnose.h>
-#include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
#include <com/sun/star/drawing/Position3D.hpp>
#include <vector>
#include <algorithm>
-#include <memory>
+#include <optional>
#include <cmath>
#include <limits>
@@ -121,7 +120,7 @@ lcl_SplineCalculation::lcl_SplineCalculation(
m_fYp1( fY1FirstDerivation ),
m_fYpN( fYnFirstDerivation ),
m_nKLow( 0 ),
- m_nKHigh( rSortedPoints.size() - 1 ),
+ m_nKHigh( m_aPoints.size() - 1 ),
m_fLastInterpolatedValue(std::numeric_limits<double>::infinity())
{
Calculate();
@@ -133,7 +132,7 @@ lcl_SplineCalculation::lcl_SplineCalculation(
m_fYp1( 0.0 ), /*dummy*/
m_fYpN( 0.0 ), /*dummy*/
m_nKLow( 0 ),
- m_nKHigh( rSortedPoints.size() - 1 ),
+ m_nKHigh( m_aPoints.size() - 1 ),
m_fLastInterpolatedValue(std::numeric_limits<double>::infinity())
{
CalculatePeriodic();
@@ -411,26 +410,19 @@ bool createParameterT(const tPointVecType& rUniquePoints, double* t)
bool bIsSuccessful = true;
const lcl_tSizeType n = rUniquePoints.size() - 1;
t[0]=0.0;
- double dx = 0.0;
- double dy = 0.0;
- double fDiffMax = 1.0; //dummy values
double fDenominator = 0.0; // initialized for summing up
for (lcl_tSizeType i=1; i<=n ; ++i)
{ // 4th root(dx^2+dy^2)
- dx = rUniquePoints[i].first - rUniquePoints[i-1].first;
- dy = rUniquePoints[i].second - rUniquePoints[i-1].second;
- // scaling to avoid underflow or overflow
- fDiffMax = std::max(fabs(dx), fabs(dy));
- if (fDiffMax == 0.0)
+ double dx = rUniquePoints[i].first - rUniquePoints[i-1].first;
+ double dy = rUniquePoints[i].second - rUniquePoints[i-1].second;
+ if (dx == 0 && dy == 0)
{
bIsSuccessful = false;
break;
}
else
{
- dx /= fDiffMax;
- dy /= fDiffMax;
- fDenominator += sqrt(sqrt(dx * dx + dy * dy)) * sqrt(fDiffMax);
+ fDenominator += sqrt(std::hypot(dx, dy));
}
}
if (fDenominator == 0.0)
@@ -444,13 +436,9 @@ bool createParameterT(const tPointVecType& rUniquePoints, double* t)
double fNumerator = 0.0;
for (lcl_tSizeType i=1; i<=j ; ++i)
{
- dx = rUniquePoints[i].first - rUniquePoints[i-1].first;
- dy = rUniquePoints[i].second - rUniquePoints[i-1].second;
- fDiffMax = std::max(fabs(dx), fabs(dy));
- // same as above, so should not be zero
- dx /= fDiffMax;
- dy /= fDiffMax;
- fNumerator += sqrt(sqrt(dx * dx + dy * dy)) * sqrt(fDiffMax);
+ double dx = rUniquePoints[i].first - rUniquePoints[i-1].first;
+ double dy = rUniquePoints[i].second - rUniquePoints[i-1].second;
+ fNumerator += sqrt(std::hypot(dx, dy));
}
t[j] = fNumerator / fDenominator;
@@ -581,8 +569,8 @@ void SplineCalculater::CalculateCubicSplines(
// generate a spline for each coordinate. It holds the complete
// information to calculate each point of the curve
- std::unique_ptr<lcl_SplineCalculation> aSplineX;
- std::unique_ptr<lcl_SplineCalculation> aSplineY;
+ std::optional<lcl_SplineCalculation> aSplineX;
+ std::optional<lcl_SplineCalculation> aSplineY;
// lcl_SplineCalculation* aSplineZ; the z-coordinates of all points in
// a data series are equal. No spline calculation needed, but copy
// coordinate to output
@@ -592,16 +580,15 @@ void SplineCalculater::CalculateCubicSplines(
pOld[ 0 ].PositionZ == pOld[nMaxIndexPoints].PositionZ &&
nMaxIndexPoints >=2 )
{ // periodic spline
- aSplineX.reset(new lcl_SplineCalculation( std::move(aInputX)));
- aSplineY.reset(new lcl_SplineCalculation( std::move(aInputY)));
- // aSplineZ = new lcl_SplineCalculation( aInputZ) ;
+ aSplineX.emplace(std::move(aInputX));
+ aSplineY.emplace(std::move(aInputY));
}
else // generate the kind "natural spline"
{
double fXDerivation = std::numeric_limits<double>::infinity();
double fYDerivation = std::numeric_limits<double>::infinity();
- aSplineX.reset(new lcl_SplineCalculation( std::move(aInputX), fXDerivation, fXDerivation ));
- aSplineY.reset(new lcl_SplineCalculation( std::move(aInputY), fYDerivation, fYDerivation ));
+ aSplineX.emplace(std::move(aInputX), fXDerivation, fXDerivation);
+ aSplineY.emplace(std::move(aInputY), fYDerivation, fYDerivation);
}
// fill result polygon with calculated values
@@ -690,29 +677,23 @@ void SplineCalculater::CalculateBSplines(
continue; // need at least 2 points, degree p needs at least n+1 points
// next piece of series
- std::unique_ptr<double[]> t(new double [n+1]);
- if (!createParameterT(aPointsIn, t.get()))
+ std::vector<double> t(n + 1);
+ if (!createParameterT(aPointsIn, t.data()))
{
continue; // next piece of series
}
lcl_tSizeType m = n + p + 1;
- std::unique_ptr<double[]> u(new double [m+1]);
- createKnotVector(n, p, t.get(), u.get());
+ std::vector<double> u(m + 1);
+ createKnotVector(n, p, t.data(), u.data());
// The matrix N contains the B-spline basis functions applied to parameters.
// In each row only p+1 adjacent elements are non-zero. The starting
// column in a higher row is equal or greater than in the lower row.
// To store this matrix the non-zero elements are shifted to column 0
// and the amount of shifting is remembered in an array.
- std::unique_ptr<double*[]> aMatN(new double*[n+1]);
- for (lcl_tSizeType row = 0; row <=n; ++row)
- {
- aMatN[row] = new double[p+1];
- for (sal_uInt32 col = 0; col <= p; ++col)
- aMatN[row][col] = 0.0;
- }
- std::unique_ptr<lcl_tSizeType[]> aShift(new lcl_tSizeType[n+1]);
+ std::vector<std::vector<double>> aMatN(n + 1, std::vector<double>(p + 1));
+ std::vector<lcl_tSizeType> aShift(n + 1);
aMatN[0][0] = 1.0; //all others are zero
aShift[0] = 0;
aMatN[n][0] = 1.0;
@@ -732,7 +713,7 @@ void SplineCalculater::CalculateBSplines(
// index in reduced matrix aMatN = (index in full matrix N) - (i-p)
aShift[k] = i - p;
- applyNtoParameterT(i, t[k], p, u.get(), aMatN[k]);
+ applyNtoParameterT(i, t[k], p, u.data(), aMatN[k].data());
} // next row k
// Get matrix C of control points from the matrix equation aMatN * C = aPointsIn
@@ -742,9 +723,6 @@ void SplineCalculater::CalculateBSplines(
lcl_tSizeType c = 0; // true column index
double fDivisor = 1.0; // used for diagonal element
double fEliminate = 1.0; // used for the element, that will become zero
- double fHelp;
- tPointType aHelp;
- lcl_tSizeType nHelp; // used in triangle change
bool bIsSuccessful = true;
for (c = 0 ; c <= n && bIsSuccessful; ++c)
{
@@ -764,18 +742,9 @@ void SplineCalculater::CalculateBSplines(
// exchange total row r with total row c if necessary
if (r != c)
{
- for ( sal_uInt32 i = 0; i <= p ; ++i)
- {
- fHelp = aMatN[r][i];
- aMatN[r][i] = aMatN[c][i];
- aMatN[c][i] = fHelp;
- }
- aHelp = aPointsIn[r];
- aPointsIn[r] = aPointsIn[c];
- aPointsIn[c] = aHelp;
- nHelp = aShift[r];
- aShift[r] = aShift[c];
- aShift[c] = nHelp;
+ std::swap( aMatN[r], aMatN[c] );
+ std::swap( aPointsIn[r], aPointsIn[c] );
+ std::swap( aShift[r], aShift[c] );
}
// divide row c, so that element(c,c) becomes 1
@@ -843,7 +812,7 @@ void SplineCalculater::CalculateBSplines(
pNew[nNewSize -1 ].PositionX = aPointsIn[n].first;
pNew[nNewSize -1 ].PositionY = aPointsIn[n].second;
pNew[nNewSize -1 ].PositionZ = fZCoordinate;
- std::unique_ptr<double[]> aP(new double[m+1]);
+ std::vector<double> aP(m + 1);
lcl_tSizeType nLow = 0;
for ( lcl_tSizeType nTIndex = 0; nTIndex <= n-1; ++nTIndex)
{
@@ -895,10 +864,6 @@ void SplineCalculater::CalculateBSplines(
}
}
}
- for (lcl_tSizeType row = 0; row <=n; ++row)
- {
- delete[] aMatN[row];
- }
} // next piece of the series
}
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index af54871ff49d..b9773494d785 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <cstddef>
#include <limits>
#include <memory>
#include <VSeriesPlotter.hxx>
@@ -25,18 +26,23 @@
#include <ShapeFactory.hxx>
#include <Diagram.hxx>
#include <BaseCoordinateSystem.hxx>
+#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <CommonConverters.hxx>
#include <ExplicitCategoriesProvider.hxx>
+#include <FormattedString.hxx>
#include <ObjectIdentifier.hxx>
#include <StatisticsHelper.hxx>
#include <PlottingPositionHelper.hxx>
#include <LabelPositionHelper.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <Clipping.hxx>
#include <servicenames_charttypes.hxx>
#include <NumberFormatterWrapper.hxx>
#include <DataSeriesHelper.hxx>
+#include <RegressionCurveModel.hxx>
#include <RegressionCurveHelper.hxx>
#include <VLegendSymbolFactory.hxx>
#include <FormattedStringHelper.hxx>
@@ -61,9 +67,9 @@
#include <com/sun/star/chart/TimeUnit.hpp>
#include <com/sun/star/chart2/MovingAverageType.hpp>
#include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
-#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
+#include <o3tl/safeint.hxx>
#include <tools/color.hxx>
#include <tools/UnitConversion.hxx>
#include <rtl/ustrbuf.hxx>
@@ -71,13 +77,13 @@
#include <basegfx/vector/b2dvector.hxx>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <unotools/localedatawrapper.hxx>
#include <comphelper/sequence.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
#include <functional>
@@ -90,6 +96,7 @@ namespace chart {
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart;
using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -137,12 +144,11 @@ sal_Int32 VDataSeriesGroup::getSeriesCount() const
return m_aSeriesVector.size();
}
-VSeriesPlotter::VSeriesPlotter( const uno::Reference<XChartType>& xChartTypeModel
+VSeriesPlotter::VSeriesPlotter( rtl::Reference<ChartType> xChartTypeModel
, sal_Int32 nDimensionCount, bool bCategoryXAxis )
: PlotterBase( nDimensionCount )
, m_pMainPosHelper( nullptr )
- , m_xChartTypeModel(xChartTypeModel)
- , m_xChartTypeModelProps( uno::Reference< beans::XPropertySet >::query( xChartTypeModel ))
+ , m_xChartTypeModel(std::move(xChartTypeModel))
, m_bCategoryXAxis(bCategoryXAxis)
, m_nTimeResolution(css::chart::TimeUnit::DAY)
, m_aNullDate(30,12,1899)
@@ -193,7 +199,7 @@ void VSeriesPlotter::addSeries( std::unique_ptr<VDataSeries> pSeries, sal_Int32
pSeries->setXValuesIfNone( m_pExplicitCategoriesProvider->getOriginalCategories() );
}
- if(zSlot<0 || zSlot>=static_cast<sal_Int32>(m_aZSlots.size()))
+ if(zSlot<0 || o3tl::make_unsigned(zSlot)>=m_aZSlots.size())
{
//new z slot
std::vector< VDataSeriesGroup > aZSlot;
@@ -205,7 +211,7 @@ void VSeriesPlotter::addSeries( std::unique_ptr<VDataSeries> pSeries, sal_Int32
//existing zslot
std::vector< VDataSeriesGroup >& rXSlots = m_aZSlots[zSlot];
- if(xSlot<0 || xSlot>=static_cast<sal_Int32>(rXSlots.size()))
+ if(xSlot<0 || o3tl::make_unsigned(xSlot)>=rXSlots.size())
{
//append the series to already existing x series
rXSlots.emplace_back( std::move(pSeries) );
@@ -513,8 +519,8 @@ rtl::Reference<SvxShapeText> VSeriesPlotter::createDataLabel( const rtl::Referen
OUString aRole;
if ( m_xChartTypeModel )
aRole = m_xChartTypeModel->getRoleOfSequenceForSeriesLabel();
- const uno::Reference< XDataSeries >& xSeries( rDataSeries.getModel() );
- pTextList[i] = DataSeriesHelper::getDataSeriesLabel( xSeries, aRole );
+ const rtl::Reference< DataSeries >& xSeries( rDataSeries.getModel() );
+ pTextList[i] = xSeries->getLabelForRole( aRole );
break;
}
case DataPointCustomLabelFieldType_PERCENTAGE:
@@ -571,8 +577,8 @@ rtl::Reference<SvxShapeText> VSeriesPlotter::createDataLabel( const rtl::Referen
OUString aRole;
if ( m_xChartTypeModel )
aRole = m_xChartTypeModel->getRoleOfSequenceForSeriesLabel();
- const uno::Reference< XDataSeries >& xSeries( rDataSeries.getModel() );
- pTextList[1] = DataSeriesHelper::getDataSeriesLabel( xSeries, aRole );
+ const rtl::Reference< DataSeries >& xSeries( rDataSeries.getModel() );
+ pTextList[1] = xSeries->getLabelForRole( aRole );
}
if( pLabel->ShowNumber )
@@ -592,7 +598,7 @@ rtl::Reference<SvxShapeText> VSeriesPlotter::createDataLabel( const rtl::Referen
}
}
- for( auto const & line : std::as_const(aTextList) )
+ for (auto const& line : aTextList)
{
if( !line.isEmpty() )
{
@@ -698,26 +704,20 @@ rtl::Reference<SvxShapeText> VSeriesPlotter::createDataLabel( const rtl::Referen
{
xTextShape->setPosition(aRelPos);
if( !m_xChartTypeModel->getChartType().equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE) &&
- rDataSeries.getPropertiesOfSeries()->getPropertyValue( "ShowCustomLeaderLines" ).get<sal_Bool>())
+ // "ShowCustomLeaderLines"
+ rDataSeries.getModel()->getFastPropertyValue( PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES ).get<sal_Bool>())
{
+ const basegfx::B2IRectangle aRect(
+ BaseGFXHelper::makeRectangle(aRelPos, xTextShape->getSize()));
sal_Int32 nX1 = rScreenPosition2D.X;
sal_Int32 nY1 = rScreenPosition2D.Y;
- sal_Int32 nX2 = nX1;
- sal_Int32 nY2 = nY1;
- ::basegfx::B2IRectangle aRect(BaseGFXHelper::makeRectangle(aRelPos, xTextShape->getSize()));
- if (nX1 < aRelPos.X)
- nX2 = aRelPos.X;
- else if (nX1 > aRect.getMaxX())
- nX2 = aRect.getMaxX();
-
- if (nY1 < aRect.getMinY())
- nY2 = aRect.getMinY();
- else if (nY1 > aRect.getMaxY())
- nY2 = aRect.getMaxY();
+ const sal_Int32 nX2 = std::clamp(nX1, aRelPos.X, aRect.getMaxX());
+ const sal_Int32 nY2 = std::clamp(nY1, aRect.getMinY(), aRect.getMaxY());
//when the line is very short compared to the page size don't create one
::basegfx::B2DVector aLength(nX1 - nX2, nY1 - nY2);
- double fPageDiagonaleLength = sqrt(double(m_aPageReferenceSize.Width)*double(m_aPageReferenceSize.Width) + double(m_aPageReferenceSize.Height)*double(m_aPageReferenceSize.Height));
+ double fPageDiagonaleLength
+ = std::hypot(m_aPageReferenceSize.Width, m_aPageReferenceSize.Height);
if ((aLength.getLength() / fPageDiagonaleLength) >= 0.01)
{
drawing::PointSequenceSequence aPoints{ { {nX1, nY1}, {nX2, nY2} } };
@@ -731,13 +731,11 @@ rtl::Reference<SvxShapeText> VSeriesPlotter::createDataLabel( const rtl::Referen
// in case legend symbol has to be displayed, text shape position is
// slightly changed.
- const awt::Point aUnrotatedTextPos(xTextShape->getPosition());
if( xSymbol.is() )
{
- const awt::Point aOldTextPos( xTextShape->getPosition() );
- awt::Point aNewTextPos( aOldTextPos );
+ awt::Point aNewTextPos(xTextShape->getPosition());
- awt::Point aSymbolPosition( aUnrotatedTextPos );
+ awt::Point aSymbolPosition(aNewTextPos);
awt::Size aSymbolSize( xSymbol->getSize() );
awt::Size aTextSize = xTextShape->getSize();
@@ -1041,7 +1039,21 @@ void VSeriesPlotter::createErrorBar(
fLocalX-=fLength;
aNegative = m_pPosHelper->transformLogicToScene( fLocalX, fLocalY, fZ, true );
}
- bCreateNegativeBorder = m_pPosHelper->isLogicVisible( fLocalX, fLocalY, fZ);
+ if (std::isfinite(aNegative.PositionX) &&
+ std::isfinite(aNegative.PositionY) &&
+ std::isfinite(aNegative.PositionZ)) {
+ bCreateNegativeBorder = m_pPosHelper->isLogicVisible( fLocalX, fLocalY, fZ);
+ } else {
+ // If error bars result in a numerical problem (e.g., an
+ // error bar on a logarithmic chart that results in a point
+ // <= 0) then just turn off the error bar.
+ //
+ // TODO: This perhaps should display a warning, so the user
+ // knows why a bar is not appearing.
+ // TODO: This test could also be added to the positive case,
+ // though a numerical overflow there is less likely.
+ bShowNegative = false;
+ }
}
else
bShowNegative = false;
@@ -1088,10 +1100,7 @@ void VSeriesPlotter::addErrorBorder(
,const rtl::Reference<SvxShapeGroupAnyD>& rTarget
,const uno::Reference< beans::XPropertySet >& rErrorBorderProp )
{
- std::vector<std::vector<css::drawing::Position3D>> aPoly;
- sal_Int32 nSequenceIndex = 0;
- AddPointToPoly( aPoly, rPos0, nSequenceIndex );
- AddPointToPoly( aPoly, rPos1, nSequenceIndex );
+ std::vector<std::vector<css::drawing::Position3D>> aPoly { { rPos0, rPos1} };
rtl::Reference<SvxShapePolyPolygon> xShape = ShapeFactory::createLine2D(
rTarget, aPoly );
PropertyMapper::setMappedProperties( *xShape, rErrorBorderProp,
@@ -1293,24 +1302,23 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSer
{
if(m_nDimension!=2)
return;
- uno::Reference< XRegressionCurveContainer > xContainer( rVDataSeries.getModel(), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xContainer( rVDataSeries.getModel() );
if(!xContainer.is())
return;
if (!m_pPosHelper)
return;
- uno::Sequence< uno::Reference< XRegressionCurve > > aCurveList = xContainer->getRegressionCurves();
+ const std::vector< rtl::Reference< ::chart::RegressionCurveModel > > & aCurveList = xContainer->getRegressionCurves2();
- for(sal_Int32 nN=0; nN<aCurveList.getLength(); nN++)
+ for(std::size_t nN=0; nN<aCurveList.size(); nN++)
{
- uno::Reference< XRegressionCurveCalculator > xCalculator( aCurveList[nN]->getCalculator() );
+ const auto & rCurve = aCurveList[nN];
+ uno::Reference< XRegressionCurveCalculator > xCalculator( rCurve->getCalculator() );
if( !xCalculator.is())
continue;
- uno::Reference< beans::XPropertySet > xProperties( aCurveList[nN], uno::UNO_QUERY );
-
- bool bAverageLine = RegressionCurveHelper::isMeanValueLine( aCurveList[nN] );
+ bool bAverageLine = RegressionCurveHelper::isMeanValueLine( rCurve );
sal_Int32 aDegree = 2;
sal_Int32 aPeriod = 2;
@@ -1320,16 +1328,16 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSer
bool bForceIntercept = false;
double aInterceptValue = 0.0;
- if ( xProperties.is() && !bAverageLine )
+ if ( !bAverageLine )
{
- xProperties->getPropertyValue( "PolynomialDegree") >>= aDegree;
- xProperties->getPropertyValue( "MovingAveragePeriod") >>= aPeriod;
- xProperties->getPropertyValue( "MovingAverageType") >>= aMovingAverageType;
- xProperties->getPropertyValue( "ExtrapolateForward") >>= aExtrapolateForward;
- xProperties->getPropertyValue( "ExtrapolateBackward") >>= aExtrapolateBackward;
- xProperties->getPropertyValue( "ForceIntercept") >>= bForceIntercept;
+ rCurve->getPropertyValue( "PolynomialDegree") >>= aDegree;
+ rCurve->getPropertyValue( "MovingAveragePeriod") >>= aPeriod;
+ rCurve->getPropertyValue( "MovingAverageType") >>= aMovingAverageType;
+ rCurve->getPropertyValue( "ExtrapolateForward") >>= aExtrapolateForward;
+ rCurve->getPropertyValue( "ExtrapolateBackward") >>= aExtrapolateBackward;
+ rCurve->getPropertyValue( "ForceIntercept") >>= bForceIntercept;
if (bForceIntercept)
- xProperties->getPropertyValue( "InterceptValue") >>= aInterceptValue;
+ rCurve->getPropertyValue( "InterceptValue") >>= aInterceptValue;
}
double fChartMinX = m_pPosHelper->getLogicMinX();
@@ -1421,7 +1429,7 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSer
if( aRegressionPoly.SequenceX.hasElements() && aRegressionPoly.SequenceX[0].hasElements() )
{
VLineProperties aVLineProperties;
- aVLineProperties.initFromPropertySet( xProperties );
+ aVLineProperties.initFromPropertySet( rCurve );
//create an extra group shape for each curve for selection handling
rtl::Reference<SvxShapeGroupAnyD> xRegressionGroupShapes =
@@ -1433,7 +1441,7 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSer
}
// curve equation and correlation coefficient
- uno::Reference< beans::XPropertySet > xEquationProperties( aCurveList[nN]->getEquationProperties());
+ uno::Reference< beans::XPropertySet > xEquationProperties( rCurve->getEquationProperties());
if( xEquationProperties.is())
{
createRegressionCurveEquationShapes(
@@ -2289,12 +2297,83 @@ OUString VSeriesPlotter::getCategoryName( sal_Int32 nPointIndex ) const
return OUString();
}
-uno::Sequence< OUString > VSeriesPlotter::getSeriesNames() const
+namespace {
+// The following it to support rendering order for combo charts. A chart type
+// with a lower rendering order is rendered before (i.e., behind) a chart with a
+// higher rendering order. The rendering orders are based on rough guesses about
+// how much one chart (type) will obscure another chart (type). The intent is to
+// minimize obscuring of data, by putting charts that generally cover more
+// pixels (e.g., area charts) behind ones that generally cover fewer (e.g., line
+// charts).
+struct ROrderPair
+{
+ ROrderPair(OUString n, sal_Int32 r) : chartName(n), renderOrder(r) {}
+
+ OUString chartName;
+ sal_Int32 renderOrder;
+};
+
+const ROrderPair pairList[] = {
+ ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_AREA, 0),
+ ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_BAR, 6), // bar & column are same
+ ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_COLUMN, 6),
+ ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_LINE, 8),
+ ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_SCATTER, 5),
+ ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_PIE, 1),
+ ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_NET, 3),
+ ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET, 2),
+ ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK, 7),
+ ROrderPair(CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE, 4)
+};
+} // unnamed
+
+sal_Int32 VSeriesPlotter::getRenderOrder() const
+{
+ OUString aChartType = m_xChartTypeModel->getChartType();
+ for (const auto& elem : pairList) {
+ if (aChartType.equalsIgnoreAsciiCase(elem.chartName)) {
+ return elem.renderOrder;
+ }
+ }
+ SAL_WARN("chart2", "Unsupported chart type in getRenderOrder()");
+ return 0;
+}
+
+std::vector<VDataSeries const*> VSeriesPlotter::getAllSeries() const
+{
+ std::vector<VDataSeries const*> aAllSeries;
+ for (std::vector<VDataSeriesGroup> const & rXSlot : m_aZSlots)
+ {
+ for(VDataSeriesGroup const & rGroup : rXSlot)
+ {
+ for (std::unique_ptr<VDataSeries> const & p : rGroup.m_aSeriesVector)
+ aAllSeries.push_back(p.get());
+ }
+ }
+ return aAllSeries;
+}
+
+
+std::vector<VDataSeries*> VSeriesPlotter::getAllSeries()
+{
+ std::vector<VDataSeries*> aAllSeries;
+ for (std::vector<VDataSeriesGroup> const & rXSlot : m_aZSlots)
+ {
+ for(VDataSeriesGroup const & rGroup : rXSlot)
+ {
+ for (std::unique_ptr<VDataSeries> const & p : rGroup.m_aSeriesVector)
+ aAllSeries.push_back(p.get());
+ }
+ }
+ return aAllSeries;
+}
+
+uno::Sequence<OUString> VSeriesPlotter::getSeriesNames() const
{
std::vector<OUString> aRetVector;
OUString aRole;
- if( m_xChartTypeModel.is() )
+ if (m_xChartTypeModel.is())
aRole = m_xChartTypeModel->getRoleOfSequenceForSeriesLabel();
for (auto const& rGroup : m_aZSlots)
@@ -2305,10 +2384,10 @@ uno::Sequence< OUString > VSeriesPlotter::getSeriesNames() const
if (!rSeriesGroup.m_aSeriesVector.empty())
{
VDataSeries const * pSeries = rSeriesGroup.m_aSeriesVector[0].get();
- uno::Reference< XDataSeries > xSeries( pSeries ? pSeries->getModel() : nullptr );
+ rtl::Reference< DataSeries > xSeries( pSeries ? pSeries->getModel() : nullptr );
if( xSeries.is() )
{
- OUString aSeriesName( DataSeriesHelper::getDataSeriesLabel( xSeries, aRole ) );
+ OUString aSeriesName( xSeries->getLabelForRole( aRole ) );
aRetVector.push_back( aSeriesName );
}
}
@@ -2317,6 +2396,25 @@ uno::Sequence< OUString > VSeriesPlotter::getSeriesNames() const
return comphelper::containerToSequence( aRetVector );
}
+uno::Sequence<OUString> VSeriesPlotter::getAllSeriesNames() const
+{
+ std::vector<OUString> aRetVector;
+
+ OUString aRole;
+ if (m_xChartTypeModel.is())
+ aRole = m_xChartTypeModel->getRoleOfSequenceForSeriesLabel();
+
+ for (VDataSeries const* pSeries : getAllSeries())
+ {
+ if (pSeries)
+ {
+ OUString aSeriesName(pSeries->getModel()->getLabelForRole(aRole));
+ aRetVector.push_back(aSeriesName);
+ }
+ }
+ return comphelper::containerToSequence(aRetVector);
+}
+
void VSeriesPlotter::setPageReferenceSize( const css::awt::Size & rPageRefSize )
{
m_aPageReferenceSize = rPageRefSize;
@@ -2388,7 +2486,8 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntries(
if (!pSeries)
continue;
- if (!pSeries->getPropertiesOfSeries()->getPropertyValue("ShowLegendEntry").get<sal_Bool>())
+ // "ShowLegendEntry"
+ if (!pSeries->getModel()->getFastPropertyValue(PROP_DATASERIES_SHOW_LEGEND_ENTRY).get<sal_Bool>())
{
continue;
}
@@ -2434,18 +2533,45 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntries(
return aResult;
}
-std::vector<VDataSeries*> VSeriesPlotter::getAllSeries()
+std::vector<ViewLegendSymbol> VSeriesPlotter::createSymbols(const awt::Size& rEntryKeyAspectRatio
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget
+ , const Reference<uno::XComponentContext>& xContext)
{
- std::vector<VDataSeries*> aAllSeries;
- for (std::vector<VDataSeriesGroup> const & rXSlot : m_aZSlots)
+ std::vector<ViewLegendSymbol> aResult;
+
+ if( xTarget.is() )
{
- for(VDataSeriesGroup const & rGroup : rXSlot)
+ bool bBreak = false;
+ bool bFirstSeries = true;
+
+ for (std::vector<VDataSeriesGroup> const & rGroupVector : m_aZSlots)
{
- for (std::unique_ptr<VDataSeries> const & p : rGroup.m_aSeriesVector)
- aAllSeries.push_back(p.get());
+ for (VDataSeriesGroup const & rGroup : rGroupVector)
+ {
+ for (std::unique_ptr<VDataSeries> const & pSeries : rGroup.m_aSeriesVector)
+ {
+ if (!pSeries)
+ continue;
+
+ std::vector<ViewLegendSymbol> aSeriesSymbols = createSymbolsForSeries(rEntryKeyAspectRatio, *pSeries, xTarget, xContext);
+
+ //add series entries to the result now
+
+ // use only the first series if VaryColorsByPoint is set for the first series
+ if (bFirstSeries && pSeries->isVaryColorsByPoint())
+ bBreak = true;
+
+ bFirstSeries = false;
+
+ aResult.insert(aResult.end(), aSeriesSymbols.begin(), aSeriesSymbols.end());
+ }
+ if (bBreak)
+ return aResult;
+ }
}
}
- return aAllSeries;
+
+ return aResult;
}
namespace
@@ -2468,19 +2594,11 @@ bool lcl_HasVisibleLine( const uno::Reference< beans::XPropertySet >& xProps, bo
bool lcl_HasRegressionCurves( const VDataSeries& rSeries, bool& rbHasDashedLine )
{
bool bHasRegressionCurves = false;
- Reference< XRegressionCurveContainer > xRegrCont( rSeries.getModel(), uno::UNO_QUERY );
- if( xRegrCont.is())
+ rtl::Reference< DataSeries > xRegrCont( rSeries.getModel() );
+ for( const rtl::Reference< RegressionCurveModel > & rCurve : xRegrCont->getRegressionCurves2() )
{
- Sequence< Reference< XRegressionCurve > > aCurves( xRegrCont->getRegressionCurves() );
- sal_Int32 i = 0, nCount = aCurves.getLength();
- for( i=0; i<nCount; ++i )
- {
- if( aCurves[i].is() )
- {
- bHasRegressionCurves = true;
- lcl_HasVisibleLine( uno::Reference< beans::XPropertySet >( aCurves[i], uno::UNO_QUERY ), rbHasDashedLine );
- }
- }
+ bHasRegressionCurves = true;
+ lcl_HasVisibleLine( rCurve, rbHasDashedLine );
}
return bHasRegressionCurves;
}
@@ -2646,10 +2764,11 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
CHART2_SERVICE_NAME_CHARTTYPE_PIE);
try
{
- if (bIsPie && m_xChartTypeModelProps.is())
+ if (bIsPie)
{
bool bDonut = false;
- if ((m_xChartTypeModelProps->getPropertyValue("UseRings") >>= bDonut) && bDonut)
+ // "UseRings"
+ if ((m_xChartTypeModel->getFastPropertyValue(PROP_PIECHARTTYPE_USE_RINGS) >>= bDonut) && bDonut)
bIsPie = false;
}
}
@@ -2665,7 +2784,8 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
Sequence<sal_Int32> deletedLegendEntries;
try
{
- rSeries.getPropertiesOfSeries()->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntries;
+ // "DeletedLegendEntries"
+ rSeries.getModel()->getFastPropertyValue(PROP_DATASERIES_DELETED_LEGEND_ENTRIES) >>= deletedLegendEntries;
}
catch (const uno::Exception&)
{
@@ -2673,7 +2793,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
for( sal_Int32 nIdx=0; nIdx<aCategoryNames.getLength(); ++nIdx )
{
bool deletedLegendEntry = false;
- for (const auto& deletedLegendEntryIdx : std::as_const(deletedLegendEntries))
+ for (const auto& deletedLegendEntryIdx : deletedLegendEntries)
{
if (nIdx == deletedLegendEntryIdx)
{
@@ -2706,7 +2826,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
aLabelText = aCategoryNames[nIdx];
if( xShape.is() || !aLabelText.isEmpty() )
{
- aEntry.aLabel = FormattedStringHelper::createFormattedStringSequence( xContext, aLabelText, xTextProperties );
+ aEntry.xLabel = FormattedStringHelper::createFormattedString( aLabelText, xTextProperties );
aResult.push_back(aEntry);
}
}
@@ -2731,8 +2851,8 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
}
// label
- aLabelText = DataSeriesHelper::getDataSeriesLabel( rSeries.getModel(), m_xChartTypeModel.is() ? m_xChartTypeModel->getRoleOfSequenceForSeriesLabel() : "values-y");
- aEntry.aLabel = FormattedStringHelper::createFormattedStringSequence( xContext, aLabelText, xTextProperties );
+ aLabelText = rSeries.getModel()->getLabelForRole( m_xChartTypeModel.is() ? m_xChartTypeModel->getRoleOfSequenceForSeriesLabel() : "values-y");
+ aEntry.xLabel = FormattedStringHelper::createFormattedString( aLabelText, xTextProperties );
aResult.push_back(aEntry);
}
@@ -2742,44 +2862,41 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
if (!ChartTypeHelper::isSupportingStatisticProperties( m_xChartTypeModel, m_nDimension ))
return aResult;
- Reference< XRegressionCurveContainer > xRegrCont( rSeries.getModel(), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xRegrCont = rSeries.getModel();
if( xRegrCont.is())
{
- Sequence< Reference< XRegressionCurve > > aCurves( xRegrCont->getRegressionCurves());
- sal_Int32 i = 0, nCount = aCurves.getLength();
+ const std::vector< rtl::Reference< RegressionCurveModel > > & aCurves = xRegrCont->getRegressionCurves2();
+ sal_Int32 i = 0, nCount = aCurves.size();
for( i=0; i<nCount; ++i )
{
- if( aCurves[i].is() )
+ //label
+ OUString aResStr( RegressionCurveHelper::getUINameForRegressionCurve( aCurves[i] ) );
+ replaceParamterInString( aResStr, u"%SERIESNAME", aLabelText );
+ aEntry.xLabel = FormattedStringHelper::createFormattedString( aResStr, xTextProperties );
+
+ // symbol
+ rtl::Reference<SvxShapeGroup> xSymbolGroup(ShapeFactory::createGroup2D( xTarget ));
+
+ // create the symbol
+ rtl::Reference<SvxShapeGroup> xShape = VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio,
+ xSymbolGroup, LegendSymbolStyle::Line,
+ aCurves[i],
+ VLegendSymbolFactory::PropertyType::Line, uno::Any() );
+
+ // set CID to symbol for selection
+ if( xShape.is())
{
- //label
- OUString aResStr( RegressionCurveHelper::getUINameForRegressionCurve( aCurves[i] ) );
- replaceParamterInString( aResStr, "%SERIESNAME", aLabelText );
- aEntry.aLabel = FormattedStringHelper::createFormattedStringSequence( xContext, aResStr, xTextProperties );
-
- // symbol
- rtl::Reference<SvxShapeGroup> xSymbolGroup(ShapeFactory::createGroup2D( xTarget ));
-
- // create the symbol
- rtl::Reference<SvxShapeGroup> xShape = VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio,
- xSymbolGroup, LegendSymbolStyle::Line,
- Reference< beans::XPropertySet >( aCurves[i], uno::UNO_QUERY ),
- VLegendSymbolFactory::PropertyType::Line, uno::Any() );
-
- // set CID to symbol for selection
- if( xShape.is())
- {
- aEntry.xSymbol = xSymbolGroup;
-
- bool bAverageLine = RegressionCurveHelper::isMeanValueLine( aCurves[i] );
- ObjectType eObjectType = bAverageLine ? OBJECTTYPE_DATA_AVERAGE_LINE : OBJECTTYPE_DATA_CURVE;
- OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( eObjectType, i ) );
- aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) );
- OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle );
- ShapeFactory::setShapeName( xShape, aCID );
- }
+ aEntry.xSymbol = xSymbolGroup;
- aResult.push_back(aEntry);
+ bool bAverageLine = RegressionCurveHelper::isMeanValueLine( aCurves[i] );
+ ObjectType eObjectType = bAverageLine ? OBJECTTYPE_DATA_AVERAGE_LINE : OBJECTTYPE_DATA_CURVE;
+ OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( eObjectType, i ) );
+ aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) );
+ OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle );
+ ShapeFactory::setShapeName( xShape, aCID );
}
+
+ aResult.push_back(aEntry);
}
}
}
@@ -2790,8 +2907,42 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
return aResult;
}
+std::vector<ViewLegendSymbol> VSeriesPlotter::createSymbolsForSeries(
+ const awt::Size& rEntryKeyAspectRatio
+ , const VDataSeries& rSeries
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget
+ , const Reference<uno::XComponentContext>& xContext)
+{
+ std::vector<ViewLegendSymbol> aResult;
+
+ if (!(xTarget.is() && xContext.is()))
+ return aResult;
+
+ try
+ {
+ ViewLegendSymbol aEntry;
+ // symbol
+ rtl::Reference<SvxShapeGroup> xSymbolGroup(ShapeFactory::createGroup2D(xTarget));
+
+ // create the symbol
+ rtl::Reference<SvxShapeGroup> xShape = createLegendSymbolForSeries(rEntryKeyAspectRatio, rSeries, xSymbolGroup );
+
+ // set CID to symbol for selection
+ if (xShape.is())
+ {
+ aEntry.xSymbol = xSymbolGroup;
+ aResult.push_back(aEntry);
+ }
+ }
+ catch (const uno::Exception &)
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2" );
+ }
+ return aResult;
+}
+
VSeriesPlotter* VSeriesPlotter::createSeriesPlotter(
- const uno::Reference<XChartType>& xChartTypeModel
+ const rtl::Reference<ChartType>& xChartTypeModel
, sal_Int32 nDimensionCount
, bool bExcludingPositioning )
{
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index 8deea35e2d48..ff660a485d04 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -19,11 +19,13 @@
#include <ShapeFactory.hxx>
#include <VDiagram.hxx>
+#include <Diagram.hxx>
#include <PropertyMapper.hxx>
#include <ViewDefines.hxx>
#include <Stripe.hxx>
#include <ObjectIdentifier.hxx>
#include <DiagramHelper.hxx>
+#include <ChartType.hxx>
#include <BaseGFXHelper.hxx>
#include <ChartTypeHelper.hxx>
#include <ThreeDHelper.hxx>
@@ -31,7 +33,7 @@
#include <editeng/unoprnms.hxx>
#include <svx/scene3d.hxx>
#include <svx/e3dsceneupdater.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
@@ -39,7 +41,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
VDiagram::VDiagram(
- const uno::Reference<XDiagram> & xDiagram, const drawing::Direction3D& rPreferredAspectRatio,
+ const rtl::Reference<Diagram> & xDiagram, const drawing::Direction3D& rPreferredAspectRatio,
sal_Int32 nDimension )
: m_nDimensionCount(nDimension)
, m_xDiagram(xDiagram)
@@ -52,13 +54,12 @@ VDiagram::VDiagram(
if( m_nDimensionCount != 3)
return;
- uno::Reference< beans::XPropertySet > xSourceProp( m_xDiagram, uno::UNO_QUERY );
- ThreeDHelper::getRotationAngleFromDiagram( xSourceProp, m_fXAnglePi, m_fYAnglePi, m_fZAnglePi );
+ xDiagram->getRotationAngle( m_fXAnglePi, m_fYAnglePi, m_fZAnglePi );
if( ChartTypeHelper::isSupportingRightAngledAxes(
- DiagramHelper::getChartTypeByIndex( m_xDiagram, 0 ) ) )
+ m_xDiagram->getChartTypeByIndex( 0 ) ) )
{
- if(xSourceProp.is())
- xSourceProp->getPropertyValue("RightAngledAxes") >>= m_bRightAngledAxes;
+ if(xDiagram.is())
+ xDiagram->getPropertyValue("RightAngledAxes") >>= m_bRightAngledAxes;
if( m_bRightAngledAxes )
{
ThreeDHelper::adaptRadAnglesForRightAngledAxes( m_fXAnglePi, m_fYAnglePi );
@@ -142,7 +143,7 @@ void VDiagram::createShapes_2d()
//create independent group shape as container for datapoints and such things
m_xCoordinateRegionShape = ShapeFactory::createGroup2D(xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID");
- bool bAddFloorAndWall = DiagramHelper::isSupportingFloorAndWall( m_xDiagram );
+ bool bAddFloorAndWall = m_xDiagram->isSupportingFloorAndWall();
//add back wall
{
@@ -182,7 +183,7 @@ void VDiagram::createShapes_2d()
static E3dScene* lcl_getE3dScene( const rtl::Reference<SvxShapeGroupAnyD>& xShape )
{
- return dynamic_cast< E3dScene* >(xShape->GetSdrObject());
+ return DynCastE3dScene(xShape->GetSdrObject());
}
static void lcl_setLightSources(
@@ -441,7 +442,7 @@ void VDiagram::createShapes_3d()
m_xAspectRatio3D = xOuterGroup_Shapes;
- bool bAddFloorAndWall = DiagramHelper::isSupportingFloorAndWall( m_xDiagram );
+ bool bAddFloorAndWall = m_xDiagram->isSupportingFloorAndWall();
const bool bDoubleSided = false;
@@ -456,8 +457,8 @@ void VDiagram::createShapes_3d()
aWallCID.clear();
rtl::Reference<Svx3DSceneObject> xWallGroup_Shapes = ShapeFactory::createGroup3D( xOuterGroup_Shapes, aWallCID );
- CuboidPlanePosition eLeftWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardLeftWall( uno::Reference< beans::XPropertySet >( m_xDiagram, uno::UNO_QUERY ) ) );
- CuboidPlanePosition eBackWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBackWall( uno::Reference< beans::XPropertySet >( m_xDiagram, uno::UNO_QUERY ) ) );
+ CuboidPlanePosition eLeftWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardLeftWall( m_xDiagram ) );
+ CuboidPlanePosition eBackWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBackWall( m_xDiagram ) );
//add left wall
{
@@ -519,27 +520,25 @@ void VDiagram::createShapes_3d()
try
{
- uno::Reference< beans::XPropertySet > xSourceProp( m_xDiagram, uno::UNO_QUERY_THROW );
-
//perspective
{
//ignore distance and focal length from file format and model completely
//use vrp only to indicate the distance of the camera and thus influence the perspective
m_xOuterGroupShape->setPropertyValue( UNO_NAME_3D_SCENE_DISTANCE, uno::Any(
- static_cast<sal_Int32>(ThreeDHelper::getCameraDistance( xSourceProp ))));
+ static_cast<sal_Int32>(m_xDiagram->getCameraDistance())));
m_xOuterGroupShape->setPropertyValue( UNO_NAME_3D_SCENE_PERSPECTIVE,
- xSourceProp->getPropertyValue( UNO_NAME_3D_SCENE_PERSPECTIVE));
+ m_xDiagram->getPropertyValue( UNO_NAME_3D_SCENE_PERSPECTIVE));
}
//light
{
m_xOuterGroupShape->setPropertyValue( UNO_NAME_3D_SCENE_SHADE_MODE,
- xSourceProp->getPropertyValue( UNO_NAME_3D_SCENE_SHADE_MODE));
+ m_xDiagram->getPropertyValue( UNO_NAME_3D_SCENE_SHADE_MODE));
m_xOuterGroupShape->setPropertyValue( UNO_NAME_3D_SCENE_AMBIENTCOLOR,
- xSourceProp->getPropertyValue( UNO_NAME_3D_SCENE_AMBIENTCOLOR));
+ m_xDiagram->getPropertyValue( UNO_NAME_3D_SCENE_AMBIENTCOLOR));
m_xOuterGroupShape->setPropertyValue( UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING,
- xSourceProp->getPropertyValue( UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING));
- lcl_setLightSources( xSourceProp, m_xOuterGroupShape );
+ m_xDiagram->getPropertyValue( UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING));
+ lcl_setLightSources( m_xDiagram, m_xOuterGroupShape );
}
//rotation
@@ -583,7 +582,7 @@ void VDiagram::createShapes_3d()
ShapeFactory::createStripe(xOuterGroup_Shapes, aStripe
, xFloorProp, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), bDoubleSided );
- CuboidPlanePosition eBottomPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBottom( uno::Reference< beans::XPropertySet >( m_xDiagram, uno::UNO_QUERY ) ) );
+ CuboidPlanePosition eBottomPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBottom( m_xDiagram ) );
if( !bAddFloorAndWall || (eBottomPos!=CuboidPlanePosition_Bottom) )
{
//we always need this object as dummy object for correct scene dimensions
diff --git a/chart2/source/view/inc/ConfigAccess.hxx b/chart2/source/view/inc/ConfigAccess.hxx
deleted file mode 100644
index df59b16a3f75..000000000000
--- a/chart2/source/view/inc/ConfigAccess.hxx
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- 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 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 .
- */
-
-#pragma once
-
-namespace chart::ConfigAccess
-{
-/** @descr Retrieve the setting for showing errors in charts from the registry
- settings of the Calc application.
-
- If this setting is not found, it is set to false (the default setting).
-
- @return boolean UseErrorRectangle.
- */
-bool getUseErrorRectangle();
-
-} //namespace chart::ConfigAccess
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/inc/DataTableView.hxx b/chart2/source/view/inc/DataTableView.hxx
new file mode 100644
index 000000000000..0bccaaddde31
--- /dev/null
+++ b/chart2/source/view/inc/DataTableView.hxx
@@ -0,0 +1,88 @@
+/* -*- 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/.
+ *
+ */
+#pragma once
+
+#include <svx/unoshape.hxx>
+#include <svx/unodraw/SvxTableShape.hxx>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/table/XTable.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <DataTable.hxx>
+#include "VLineProperties.hxx"
+
+namespace chart
+{
+class VSeriesPlotter;
+class ChartModel;
+class LegendEntryProvider;
+
+/**
+ * DataTableView is responsible to create the table object, set the cell
+ * properties accordingly to the model and fill it with the chart series
+ * data.
+ */
+class DataTableView final
+{
+private:
+ rtl::Reference<::chart::ChartModel> m_xChartModel;
+ // the target shape
+ rtl::Reference<SvxShapeGroupAnyD> m_xTarget;
+ // the data table shape
+ rtl::Reference<SvxTableShape> m_xTableShape;
+ // the data table model
+ rtl::Reference<DataTable> m_xDataTableModel;
+ css::uno::Reference<css::uno::XComponentContext> m_xComponentContext;
+ css::uno::Reference<css::table::XTable> m_xTable;
+ VLineProperties m_aLineProperties;
+ std::vector<VSeriesPlotter*> m_pSeriesPlotterList;
+
+ // data series names
+ std::vector<OUString> m_aDataSeriesNames;
+ // X axis names
+ std::vector<OUString> m_aXValues;
+ // list of data series values
+ std::vector<std::vector<OUString>> m_pDataSeriesValues;
+
+ // if the header vales should be aligned with the x-axis vales
+ bool m_bAlignAxisValuesWithColumns;
+
+ /** Set the char and paragraph properties for the input (value) cell */
+ void
+ setCellCharAndParagraphProperties(css::uno::Reference<css::beans::XPropertySet>& xPropertySet);
+
+ /** Set the common cell properties (for all cells in the data table,
+ * including headers)
+ */
+ void setCellProperties(css::uno::Reference<css::beans::XPropertySet>& xPropertySet, bool bLeft,
+ bool bTop, bool bRight, bool bBottom);
+
+public:
+ DataTableView(rtl::Reference<::chart::ChartModel> const& xChartDoc,
+ rtl::Reference<DataTable> const& rDataTableModel,
+ css::uno::Reference<css::uno::XComponentContext> const& rComponentContext,
+ bool bAlignAxisValuesWithColumns);
+
+ /** Initializes and prepares the target and data table shape */
+ void initializeShapes(const rtl::Reference<SvxShapeGroupAnyD>& xTarget);
+
+ /** Prepares the values of the chart, which will be shown it the data table */
+ void initializeValues(std::vector<std::unique_ptr<VSeriesPlotter>>& rSeriesPlotterList);
+
+ /** Creates the data table and fills the values */
+ void createShapes(basegfx::B2DVector const& rStart, basegfx::B2DVector const& rEnd,
+ sal_Int32 nAxisStepWidth);
+
+ /** Repositions the data table shape */
+ void changePosition(sal_Int32 x, sal_Int32 y);
+};
+
+} //namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/inc/LabelPositionHelper.hxx b/chart2/source/view/inc/LabelPositionHelper.hxx
index 63125d621731..4f2f3ba2797a 100644
--- a/chart2/source/view/inc/LabelPositionHelper.hxx
+++ b/chart2/source/view/inc/LabelPositionHelper.hxx
@@ -39,7 +39,7 @@ public:
LabelPositionHelper() = delete;
LabelPositionHelper(
sal_Int32 nDimensionCount
- , const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget );
+ , rtl::Reference<SvxShapeGroupAnyD> xLogicTarget );
virtual ~LabelPositionHelper();
css::awt::Point transformSceneToScreenPosition(
diff --git a/chart2/source/view/inc/LegendEntryProvider.hxx b/chart2/source/view/inc/LegendEntryProvider.hxx
index e0133771cd27..ce7722b0edfd 100644
--- a/chart2/source/view/inc/LegendEntryProvider.hxx
+++ b/chart2/source/view/inc/LegendEntryProvider.hxx
@@ -36,6 +36,7 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
+class FormattedString;
enum class LegendSymbolStyle
{
@@ -62,8 +63,16 @@ struct ViewLegendEntry
/** The descriptive text for a legend entry.
*/
- css::uno::Sequence<
- css::uno::Reference< css::chart2::XFormattedString2 > > aLabel;
+ rtl::Reference< ::chart::FormattedString > xLabel;
+};
+
+
+struct ViewLegendSymbol
+{
+ /** The legend symbol that represents a data series or other
+ information contained in the legend
+ */
+ rtl::Reference<SvxShapeGroup> xSymbol;
};
class LegendEntryProvider
diff --git a/chart2/source/view/inc/PlottingPositionHelper.hxx b/chart2/source/view/inc/PlottingPositionHelper.hxx
index c0480a4e3b2c..916668dd6c14 100644
--- a/chart2/source/view/inc/PlottingPositionHelper.hxx
+++ b/chart2/source/view/inc/PlottingPositionHelper.hxx
@@ -400,11 +400,7 @@ inline bool PlottingPositionHelper::clipYRange( double& rMin, double& rMax ) con
{
//returns true if something remains
if( rMin > rMax )
- {
- double fHelp = rMin;
- rMin = rMax;
- rMax = fHelp;
- }
+ std::swap( rMin, rMax );
if( rMin > getLogicMaxY() )
return false;
if( rMax < getLogicMinY() )
diff --git a/chart2/source/view/inc/PropertyMapper.hxx b/chart2/source/view/inc/PropertyMapper.hxx
index 652a6a05131c..c4d9a1fa2577 100644
--- a/chart2/source/view/inc/PropertyMapper.hxx
+++ b/chart2/source/view/inc/PropertyMapper.hxx
@@ -20,7 +20,6 @@
#include <sal/config.h>
-#include <optional>
#include <unordered_map>
#include <com/sun/star/uno/Sequence.h>
@@ -28,7 +27,6 @@
namespace com::sun::star::beans { class XPropertySet; }
class SvxShape;
-class SdrPathObj;
namespace chart
{
@@ -102,9 +100,6 @@ public:
static const tPropertyNameMap& getPropertyNameMapForTextShapeProperties();
static const tPropertyNameMap& getPropertyNameMapForFilledSeriesProperties();
- static void setPropertyNameMapForFilledSeriesProperties(SdrPathObj* pShape,
- const css::uno::Reference< css::beans::XPropertySet >& xSource,
- std::optional<sal_Int32> xFillColor = {});
static const tPropertyNameMap& getPropertyNameMapForLineSeriesProperties();
static const tPropertyNameMap& getPropertyNameMapForTextLabelProperties();
diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx
index c9e7aab8384a..b44612e74a4f 100644
--- a/chart2/source/view/inc/ShapeFactory.hxx
+++ b/chart2/source/view/inc/ShapeFactory.hxx
@@ -27,6 +27,7 @@
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
#include <svx/unoshape.hxx>
+#include <svx/unodraw/SvxTableShape.hxx>
#include <svx/unopage.hxx>
namespace chart { struct VLineProperties; }
@@ -40,7 +41,6 @@ namespace com::sun::star::drawing { struct Position3D; }
namespace com::sun::star::graphic { class XGraphic; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
namespace com::sun::star::drawing { struct Direction3D; }
-class SdrPathObj;
namespace chart
{
@@ -148,10 +148,9 @@ public:
, const std::vector<std::vector<css::drawing::Position3D>>& rPolyPolygon
, double fDepth);
- static SdrPathObj*
+ static rtl::Reference<SvxShapePolyPolygon>
createArea2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
- , const std::vector<std::vector<css::drawing::Position3D>>& rPolyPolygon
- , bool bSetZOrderToZero = true);
+ , const std::vector<std::vector<css::drawing::Position3D>>& rPolyPolygon);
static rtl::Reference<SvxShapePolyPolygon>
createSymbol2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
@@ -205,7 +204,7 @@ public:
static rtl::Reference<SvxShapeText>
createText(const rtl::Reference<SvxShapeGroupAnyD>& xTarget
- , css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > >& xFormattedString
+ , const css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > >& xFormattedString
, const tNameSequence& rPropNames
, const tAnySequence& rPropValues
, const css::uno::Any& rATransformation);
@@ -218,6 +217,8 @@ public:
const css::uno::Reference< css::beans::XPropertySet > & xTextProperties,
double nRotation, const OUString& aName, sal_Int32 nTextMaxWidth );
+ static rtl::Reference<SvxTableShape> createTable(rtl::Reference<SvxShapeGroupAnyD> const& xTarget, OUString const& rName = OUString());
+
static rtl::Reference<SvxShapeRect>
createInvisibleRectangle(
const rtl::Reference<SvxShapeGroupAnyD>& xTarget
@@ -249,8 +250,6 @@ public:
static void setShapeName( const rtl::Reference< SvxShape >& xShape
, const OUString& rName );
- static void setShapeName( SdrPathObj* pPath
- , const OUString& rName );
static OUString getShapeName( const css::uno::Reference< css::drawing::XShape >& xShape );
@@ -259,7 +258,7 @@ public:
static OUString getStackedString( const OUString& rString, bool bStacked );
static bool hasPolygonAnyLines( const std::vector<std::vector<css::drawing::Position3D>>& rPoly );
- static bool isPolygonEmptyOrSinglePoint( css::drawing::PolyPolygonShape3D& rPoly );
+ static bool isPolygonEmptyOrSinglePoint( const css::drawing::PolyPolygonShape3D& rPoly );
static bool isPolygonEmptyOrSinglePoint( const std::vector<std::vector<css::drawing::Position3D>>& rPoly );
static void closePolygon( css::drawing::PolyPolygonShape3D& rPoly );
static void closePolygon( std::vector<std::vector<css::drawing::Position3D>>& rPoly );
diff --git a/chart2/source/view/inc/VCoordinateSystem.hxx b/chart2/source/view/inc/VCoordinateSystem.hxx
index 2beac4a05631..61dda842d02b 100644
--- a/chart2/source/view/inc/VCoordinateSystem.hxx
+++ b/chart2/source/view/inc/VCoordinateSystem.hxx
@@ -20,6 +20,7 @@
#include "MinimumAndMaximumSupplier.hxx"
#include <ThreeDHelper.hxx>
+#include "VSeriesPlotter.hxx"
#include <chartview/ExplicitScaleValues.hxx>
#include <com/sun/star/drawing/HomogenMatrix.hpp>
#include <com/sun/star/uno/Sequence.h>
@@ -30,8 +31,6 @@
#include <memory>
#include <vector>
-namespace chart { class ExplicitCategoriesProvider; }
-namespace chart { class ScaleAutomatism; }
namespace com::sun::star::awt { struct Rectangle; }
namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::beans { class XPropertySet; }
@@ -40,12 +39,16 @@ namespace com::sun::star::chart2 { class XChartDocument; }
namespace com::sun::star::chart2 { class XCoordinateSystem; }
namespace com::sun::star::drawing { class XShapes; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
-
+namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
+class ExplicitCategoriesProvider;
+class ScaleAutomatism;
+class ChartModel;
+class Axis;
class BaseCoordinateSystem;
-
+class GridProperties;
class VAxisBase;
class VCoordinateSystem
@@ -115,10 +118,12 @@ public:
* Create "view" axis objects 'VAxis' from the coordinate system model.
*/
virtual void createVAxisList(
- const css::uno::Reference< css::chart2::XChartDocument> & xChartDoc
- , const css::awt::Size& rFontReferenceSize
- , const css::awt::Rectangle& rMaximumSpaceForLabels
- , bool bLimitSpaceForLabels );
+ const rtl::Reference<::chart::ChartModel> & xChartDoc,
+ const css::awt::Size& rFontReferenceSize,
+ const css::awt::Rectangle& rMaximumSpaceForLabels,
+ bool bLimitSpaceForLabels,
+ std::vector<std::unique_ptr<VSeriesPlotter>>& rSeriesPlotterList,
+ css::uno::Reference<css::uno::XComponentContext> const& rComponentContext);
virtual void initVAxisInList();
virtual void updateScalesAndIncrementsOnAxes();
@@ -138,22 +143,20 @@ public:
void setSeriesNamesForAxis( const css::uno::Sequence< OUString >& rSeriesNames );
protected: //methods
- VCoordinateSystem( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys );
+ VCoordinateSystem( rtl::Reference< ::chart::BaseCoordinateSystem > xCooSys );
- css::uno::Reference< css::chart2::XAxis >
+ rtl::Reference< ::chart::Axis >
getAxisByDimension( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const;
- static css::uno::Sequence< css::uno::Reference< css::beans::XPropertySet > >
- getGridListFromAxis( const css::uno::Reference< css::chart2::XAxis >& xAxis );
+ static std::vector< rtl::Reference< ::chart::GridProperties > >
+ getGridListFromAxis( const rtl::Reference< ::chart::Axis >& xAxis );
VAxisBase* getVAxis( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex );
OUString createCIDForAxis( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex );
OUString createCIDForGrid( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex );
- sal_Int32 getNumberFormatKeyForAxis( const css::uno::Reference<
- css::chart2::XAxis >& xAxis
- , const css::uno::Reference<
- css::chart2::XChartDocument>& xChartDoc);
+ sal_Int32 getNumberFormatKeyForAxis( const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference<::chart::ChartModel>& xChartDoc);
private: //methods
static void impl_adjustDimension( sal_Int32& rDimensionIndex );
diff --git a/chart2/source/view/inc/VDataSeries.hxx b/chart2/source/view/inc/VDataSeries.hxx
index 11d916510961..dd5054d26bd8 100644
--- a/chart2/source/view/inc/VDataSeries.hxx
+++ b/chart2/source/view/inc/VDataSeries.hxx
@@ -20,11 +20,13 @@
#include "PropertyMapper.hxx"
+#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart2/StackingDirection.hpp>
-#include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
+#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/drawing/Position3D.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/chart2/PieChartSubType.hpp>
#include <rtl/ref.hxx>
#include <svx/unoshape.hxx>
@@ -35,12 +37,12 @@ namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::chart2 { class XChartType; }
namespace com::sun::star::chart2 { class XDataSeries; }
namespace com::sun::star::chart2::data { class XDataSequence; }
-namespace com::sun::star::chart2 { struct DataPointLabel; }
-namespace com::sun::star::chart2 { struct Symbol; }
namespace com::sun::star::drawing { class XShapes; }
namespace chart
{
+class ChartType;
+class DataSeries;
class VDataSequence
{
@@ -52,22 +54,21 @@ public:
sal_Int32 detectNumberFormatKey( sal_Int32 index ) const;
sal_Int32 getLength() const;
- css::uno::Reference<css::chart2::data::XDataSequence> Model;
-
- mutable css::uno::Sequence<double> Doubles;
+ css::uno::Reference<css::chart2::data::XDataSequence> m_xModel;
+ mutable css::uno::Sequence<double> m_aValues;
};
class VDataSeries final
{
public:
- VDataSeries( const css::uno::Reference<css::chart2::XDataSeries>& xDataSeries );
+ VDataSeries( const rtl::Reference<::chart::DataSeries>& xDataSeries );
~VDataSeries();
VDataSeries(const VDataSeries&) = delete;
const VDataSeries& operator=(const VDataSeries&) = delete;
- const css::uno::Reference<css::chart2::XDataSeries>& getModel() const;
+ const rtl::Reference<::chart::DataSeries>& getModel() const;
void setCategoryXAxis();
void setXValues( const css::uno::Reference<css::chart2::data::XDataSequence>& xValues );
@@ -107,15 +108,16 @@ public:
sal_Int32 detectNumberFormatKey( sal_Int32 nPointIndex ) const;
sal_Int32 getLabelPlacement(
- sal_Int32 nPointIndex, const css::uno::Reference<css::chart2::XChartType>& xChartType,
+ sal_Int32 nPointIndex, const rtl::Reference<::chart::ChartType>& xChartType,
bool bSwapXAndY ) const;
css::awt::Point getLabelPosition( css::awt::Point aTextShapePos, sal_Int32 nPointIndex ) const;
bool isLabelCustomPos( sal_Int32 nPointIndex ) const;
+ css::awt::Size getLabelCustomSize(sal_Int32 nPointIndex) const;
css::uno::Reference<css::beans::XPropertySet> getPropertiesOfPoint( sal_Int32 index ) const;
- css::uno::Reference<css::beans::XPropertySet> getPropertiesOfSeries() const;
+ const css::uno::Reference<css::beans::XPropertySet> & getPropertiesOfSeries() const;
css::chart2::Symbol* getSymbolProperties( sal_Int32 index ) const;
@@ -194,7 +196,7 @@ public: //member
rtl::Reference<SvxShapeGroupAnyD> m_xBackSubGroupShape;
private: //member
- css::uno::Reference<css::chart2::XDataSeries> m_xDataSeries;
+ rtl::Reference<::chart::DataSeries> m_xDataSeries;
css::uno::Reference<css::beans::XPropertySet> m_xDataSeriesProps; // cached
//all points given by the model data (here are not only the visible points meant)
@@ -238,20 +240,19 @@ private: //member
sal_Int32 m_nGlobalSeriesIndex;
//some cached values for data labels as they are very expensive
- mutable std::unique_ptr<css::chart2::DataPointLabel>
- m_apLabel_Series;
- mutable std::unique_ptr<tNameSequence> m_apLabelPropNames_Series;
- mutable std::unique_ptr<tAnySequence> m_apLabelPropValues_Series;
- mutable std::unique_ptr<css::chart2::Symbol> m_apSymbolProperties_Series;
-
- mutable std::unique_ptr<css::chart2::DataPointLabel>
- m_apLabel_AttributedPoint;
- mutable std::unique_ptr<tNameSequence> m_apLabelPropNames_AttributedPoint;
- mutable std::unique_ptr<tAnySequence> m_apLabelPropValues_AttributedPoint;
- mutable std::unique_ptr<css::chart2::Symbol> m_apSymbolProperties_AttributedPoint;
- mutable std::unique_ptr<css::chart2::Symbol>
- m_apSymbolProperties_InvisibleSymbolForSelection;
- mutable sal_Int32 m_nCurrentAttributedPoint;
+ mutable std::optional<css::chart2::DataPointLabel>
+ m_oLabel_Series;
+ mutable std::optional<tNameSequence> m_oLabelPropNames_Series;
+ mutable std::optional<tAnySequence> m_oLabelPropValues_Series;
+ mutable std::optional<css::chart2::Symbol> m_oSymbolProperties_Series;
+
+ mutable std::optional<css::chart2::DataPointLabel>
+ m_oLabel_AttributedPoint;
+ mutable std::optional<tNameSequence> m_oLabelPropNames_AttributedPoint;
+ mutable std::optional<tAnySequence> m_oLabelPropValues_AttributedPoint;
+ mutable std::optional<css::chart2::Symbol> m_oSymbolProperties_AttributedPoint;
+ mutable std::optional<css::chart2::Symbol> m_oSymbolProperties_InvisibleSymbolForSelection;
+ mutable sal_Int32 m_nCurrentAttributedPoint;
css::awt::Size m_aReferenceSize;
sal_Int32 m_nMissingValueTreatment;
diff --git a/chart2/source/view/inc/VDiagram.hxx b/chart2/source/view/inc/VDiagram.hxx
index 7d8dd3069479..ab391f7bc0d3 100644
--- a/chart2/source/view/inc/VDiagram.hxx
+++ b/chart2/source/view/inc/VDiagram.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/awt/Point.hpp>
#include <svx/unoshape.hxx>
+#include <rtl/ref.hxx>
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::chart2 { class XDiagram; }
@@ -32,7 +33,7 @@ namespace com::sun::star::drawing { class XShape; }
namespace chart
{
-
+class Diagram;
class ShapeFactory;
/** The VDiagram is responsible to generate the visible parts of the Diagram
@@ -44,7 +45,7 @@ diagram.
class VDiagram final
{
public: //methods
- VDiagram( const css::uno::Reference<css::chart2::XDiagram>& xDiagram,
+ VDiagram( const rtl::Reference<::chart::Diagram>& xDiagram,
const css::drawing::Direction3D& rPreferredAspectRatio,
sal_Int32 nDimension );
~VDiagram();
@@ -92,8 +93,8 @@ private: //members
rtl::Reference<SvxShapeGroupAnyD> m_xCoordinateRegionShape;
rtl::Reference<SvxShapeRect> m_xWall2D;
- sal_Int32 m_nDimensionCount;
- css::uno::Reference< css::chart2::XDiagram > m_xDiagram;
+ sal_Int32 m_nDimensionCount;
+ rtl::Reference< ::chart::Diagram > m_xDiagram;
css::drawing::Direction3D m_aPreferredAspectRatio;
css::uno::Reference< css::beans::XPropertySet > m_xAspectRatio3D;
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx
index 83d97bc8b671..45676830b538 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -49,6 +49,7 @@ namespace com::sun::star {
namespace chart {
+class ChartType;
class NumberFormatterWrapper;
class AxesNumberFormats
@@ -215,10 +216,22 @@ public:
const css::uno::Reference< css::uno::XComponentContext >& xContext
);
- std::vector< VDataSeries* > getAllSeries();
+ std::vector<ViewLegendSymbol> createSymbols(
+ const css::awt::Size& rEntryKeyAspectRatio
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget
+ , const css::uno::Reference<css::uno::XComponentContext>& xContext);
+
+ std::vector<ViewLegendSymbol> createSymbolsForSeries(
+ const css::awt::Size& rEntryKeyAspectRatio
+ , const VDataSeries& rSeries
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget
+ , const css::uno::Reference<css::uno::XComponentContext>& xContext);
+
+ std::vector<VDataSeries*> getAllSeries();
+ std::vector<VDataSeries const*> getAllSeries() const;
// This method creates a series plotter of the requested type; e.g. : return new PieChart...
- static VSeriesPlotter* createSeriesPlotter( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
+ static VSeriesPlotter* createSeriesPlotter( const rtl::Reference< ::chart::ChartType >& xChartTypeModel
, sal_Int32 nDimensionCount
, bool bExcludingPositioning /*for pie and donut charts labels and exploded segments are excluded from the given size*/);
@@ -232,8 +245,13 @@ public:
void setExplicitCategoriesProvider( ExplicitCategoriesProvider* pExplicitCategoriesProvider );
+ ExplicitCategoriesProvider* getExplicitCategoriesProvider() { return m_pExplicitCategoriesProvider; }
+
//get series names for the z axis labels
- css::uno::Sequence< OUString > getSeriesNames() const;
+ css::uno::Sequence<OUString> getSeriesNames() const;
+
+ //get all series names
+ css::uno::Sequence<OUString> getAllSeriesNames() const;
void setPageReferenceSize( const css::awt::Size & rPageRefSize );
//better performance for big data
@@ -252,9 +270,16 @@ public:
bool WantToPlotInFrontOfAxisLine();
virtual bool shouldSnapRectToUsedArea();
+ /// This method returns a text string representation of the passed numeric
+ /// value by exploiting a NumberFormatterWrapper object.
+ OUString getLabelTextForValue(VDataSeries const & rDataSeries, sal_Int32 nPointIndex,
+ double fValue, bool bAsPercentage);
+
+ sal_Int32 getRenderOrder() const;
+
protected:
- VSeriesPlotter( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel
+ VSeriesPlotter( rtl::Reference< ::chart::ChartType > xChartTypeModel
, sal_Int32 nDimensionCount
, bool bCategoryXAxis=true );
@@ -320,13 +345,6 @@ protected:
, sal_Int32 nOffset=0
, sal_Int32 nTextWidth = 0 );
- /// This method returns a text string representation of the passed numeric
- /// value by exploiting a NumberFormatterWrapper object.
- OUString getLabelTextForValue( VDataSeries const & rDataSeries
- , sal_Int32 nPointIndex
- , double fValue
- , bool bAsPercentage );
-
/** creates two T-shaped error bars in both directions (up/down or
left/right depending on the bVertical parameter)
@@ -398,8 +416,7 @@ protected:
protected:
PlottingPositionHelper* m_pMainPosHelper;
- css::uno::Reference< css::chart2::XChartType > m_xChartTypeModel;
- css::uno::Reference< css::beans::XPropertySet > m_xChartTypeModelProps;
+ rtl::Reference< ::chart::ChartType > m_xChartTypeModel;
std::vector< std::vector< VDataSeriesGroup > > m_aZSlots;
diff --git a/chart2/source/view/main/AxisUsage.hxx b/chart2/source/view/main/AxisUsage.hxx
new file mode 100644
index 000000000000..51a32a59b0e1
--- /dev/null
+++ b/chart2/source/view/main/AxisUsage.hxx
@@ -0,0 +1,143 @@
+/* -*- 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 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 .
+ */
+
+#pragma once
+
+#include <sal/types.h>
+#include <memory>
+#include <map>
+
+#include <VCoordinateSystem.hxx>
+#include <AxisHelper.hxx>
+#include <ScaleAutomatism.hxx>
+
+namespace chart
+{
+//first index is the dimension, second index is the axis index that indicates whether this is a main or secondary axis
+typedef std::pair<sal_Int32, sal_Int32> tFullAxisIndex;
+typedef std::map<VCoordinateSystem*, tFullAxisIndex> tCoordinateSystemMap;
+
+/** This class handles a collection of coordinate systems and is used for
+ * executing some action on all coordinate systems such as
+ * "prepareAutomaticAxisScaling" and "setExplicitScaleAndIncrement".
+ * Moreover it contains the "aAutoScaling" object that is an instance of
+ * the "ScaleAutomatism" class. The initialization of "aAutoScaling" is
+ * performed in the "SeriesPlotterContainer::initAxisUsageList" method and is
+ * used in the "SeriesPlotterContainer::doAutoScaling" for calculating explicit
+ * scale and increment objects (see "SeriesPlotterContainer::doAutoScaling").
+ */
+class AxisUsage
+{
+public:
+ AxisUsage()
+ : aAutoScaling(AxisHelper::createDefaultScale(), Date(Date::SYSTEM))
+ {
+ }
+
+ void addCoordinateSystem(VCoordinateSystem* pCooSys, sal_Int32 nDimensionIndex,
+ sal_Int32 nAxisIndex)
+ {
+ if (!pCooSys)
+ return;
+
+ tFullAxisIndex aFullAxisIndex(nDimensionIndex, nAxisIndex);
+ tCoordinateSystemMap::const_iterator aFound(aCoordinateSystems.find(pCooSys));
+
+ //use one scale only once for each coordinate system
+ //main axis are preferred over secondary axis
+ //value scales are preferred
+ if (aFound != aCoordinateSystems.end())
+ {
+ sal_Int32 nFoundAxisIndex = aFound->second.second;
+ if (nFoundAxisIndex < nAxisIndex)
+ return;
+ sal_Int32 nFoundDimension = aFound->second.first;
+ if (nFoundDimension == 1)
+ return;
+ if (nFoundDimension < nDimensionIndex)
+ return;
+ }
+ aCoordinateSystems[pCooSys] = std::move(aFullAxisIndex);
+
+ //set maximum scale index
+ auto aIter = aMaxIndexPerDimension.find(nDimensionIndex);
+ if (aIter != aMaxIndexPerDimension.end())
+ {
+ sal_Int32 nCurrentMaxIndex = aIter->second;
+ if (nCurrentMaxIndex < nAxisIndex)
+ aMaxIndexPerDimension[nDimensionIndex] = nAxisIndex;
+ }
+ else
+ aMaxIndexPerDimension[nDimensionIndex] = nAxisIndex;
+ }
+
+ std::vector<VCoordinateSystem*> getCoordinateSystems(sal_Int32 nDimensionIndex,
+ sal_Int32 nAxisIndex)
+ {
+ std::vector<VCoordinateSystem*> aRet;
+
+ for (auto const& coordinateSystem : aCoordinateSystems)
+ {
+ if (coordinateSystem.second.first != nDimensionIndex)
+ continue;
+ if (coordinateSystem.second.second != nAxisIndex)
+ continue;
+ aRet.push_back(coordinateSystem.first);
+ }
+
+ return aRet;
+ }
+
+ sal_Int32 getMaxAxisIndexForDimension(sal_Int32 nDimensionIndex)
+ {
+ sal_Int32 nRet = -1;
+ auto aIter = aMaxIndexPerDimension.find(nDimensionIndex);
+ if (aIter != aMaxIndexPerDimension.end())
+ nRet = aIter->second;
+ return nRet;
+ }
+
+ void prepareAutomaticAxisScaling(ScaleAutomatism& rScaleAutomatism, sal_Int32 nDimIndex,
+ sal_Int32 nAxisIndex)
+ {
+ std::vector<VCoordinateSystem*> aVCooSysList = getCoordinateSystems(nDimIndex, nAxisIndex);
+ for (VCoordinateSystem* pVCoordinateSystem : aVCooSysList)
+ pVCoordinateSystem->prepareAutomaticAxisScaling(rScaleAutomatism, nDimIndex,
+ nAxisIndex);
+ }
+
+ void setExplicitScaleAndIncrement(sal_Int32 nDimIndex, sal_Int32 nAxisIndex,
+ const ExplicitScaleData& rScale,
+ const ExplicitIncrementData& rInc)
+ {
+ std::vector<VCoordinateSystem*> aVCooSysList = getCoordinateSystems(nDimIndex, nAxisIndex);
+ for (VCoordinateSystem* pVCoordinateSystem : aVCooSysList)
+ pVCoordinateSystem->setExplicitScaleAndIncrement(nDimIndex, nAxisIndex, rScale, rInc);
+ }
+
+ ScaleAutomatism aAutoScaling;
+
+private:
+ tCoordinateSystemMap aCoordinateSystems;
+ std::map<sal_Int32, sal_Int32> aMaxIndexPerDimension;
+};
+
+} //end chart2 namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx
index 37e78c116b76..e28bb97f81db 100644
--- a/chart2/source/view/main/ChartItemPool.cxx
+++ b/chart2/source/view/main/ChartItemPool.cxx
@@ -19,6 +19,10 @@
#include "ChartItemPool.hxx"
#include <chartview/ChartSfxItemIds.hxx>
+#include <DataSeries.hxx>
+#include <FormattedString.hxx>
+#include <Legend.hxx>
+#include <Axis.hxx>
#include <svx/chrtitem.hxx>
#include <svx/sdangitm.hxx>
#include <svx/svdpool.hxx>
@@ -43,167 +47,168 @@
namespace chart
{
-ChartItemPool::ChartItemPool():
- SfxItemPool( "ChartItemPool" , SCHATTR_START, SCHATTR_END, nullptr, nullptr ),
- pItemInfos(new SfxItemInfo[SCHATTR_END - SCHATTR_START + 1])
+static ItemInfoPackage& getItemInfoPackageChart()
{
- /**************************************************************************
- * PoolDefaults
- **************************************************************************/
- std::vector<SfxPoolItem*>* ppPoolDefaults = new std::vector<SfxPoolItem*>(SCHATTR_END - SCHATTR_START + 1);
- std::vector<SfxPoolItem*>& rPoolDefaults = *ppPoolDefaults;
- rPoolDefaults[SCHATTR_DATADESCR_SHOW_NUMBER - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_NUMBER);
- rPoolDefaults[SCHATTR_DATADESCR_SHOW_PERCENTAGE- SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_PERCENTAGE);
- rPoolDefaults[SCHATTR_DATADESCR_SHOW_CATEGORY - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_CATEGORY);
- rPoolDefaults[SCHATTR_DATADESCR_SHOW_SYMBOL - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_SYMBOL);
- rPoolDefaults[SCHATTR_DATADESCR_SHOW_DATA_SERIES_NAME - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_DATA_SERIES_NAME);
- rPoolDefaults[SCHATTR_DATADESCR_WRAP_TEXT - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_WRAP_TEXT);
- rPoolDefaults[SCHATTR_DATADESCR_SEPARATOR - SCHATTR_START] = new SfxStringItem(SCHATTR_DATADESCR_SEPARATOR," ");
- rPoolDefaults[SCHATTR_DATADESCR_PLACEMENT - SCHATTR_START] = new SfxInt32Item(SCHATTR_DATADESCR_PLACEMENT,0);
- rPoolDefaults[SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS - SCHATTR_START] = new SfxIntegerListItem(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, std::vector < sal_Int32 >() );
- rPoolDefaults[SCHATTR_DATADESCR_NO_PERCENTVALUE - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_NO_PERCENTVALUE);
- rPoolDefaults[SCHATTR_DATADESCR_CUSTOM_LEADER_LINES - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_CUSTOM_LEADER_LINES, true);
- rPoolDefaults[SCHATTR_PERCENT_NUMBERFORMAT_VALUE - SCHATTR_START] = new SfxUInt32Item(SCHATTR_PERCENT_NUMBERFORMAT_VALUE, 0);
- rPoolDefaults[SCHATTR_PERCENT_NUMBERFORMAT_SOURCE - SCHATTR_START] = new SfxBoolItem(SCHATTR_PERCENT_NUMBERFORMAT_SOURCE);
-
- //legend
- rPoolDefaults[SCHATTR_LEGEND_POS - SCHATTR_START] = new SfxInt32Item(SCHATTR_LEGEND_POS, sal_Int32(css::chart2::LegendPosition_LINE_END) );
- rPoolDefaults[SCHATTR_LEGEND_SHOW - SCHATTR_START] = new SfxBoolItem(SCHATTR_LEGEND_SHOW, true);
- rPoolDefaults[SCHATTR_LEGEND_NO_OVERLAY - SCHATTR_START] = new SfxBoolItem(SCHATTR_LEGEND_NO_OVERLAY, true);
-
- //text
- rPoolDefaults[SCHATTR_TEXT_DEGREES - SCHATTR_START] = new SdrAngleItem(SCHATTR_TEXT_DEGREES, 0_deg100);
- rPoolDefaults[SCHATTR_TEXT_STACKED - SCHATTR_START] = new SfxBoolItem(SCHATTR_TEXT_STACKED,false);
-
- //statistic
- rPoolDefaults[SCHATTR_STAT_AVERAGE - SCHATTR_START] = new SfxBoolItem (SCHATTR_STAT_AVERAGE);
- rPoolDefaults[SCHATTR_STAT_KIND_ERROR - SCHATTR_START] = new SvxChartKindErrorItem (SvxChartKindError::NONE, SCHATTR_STAT_KIND_ERROR);
- rPoolDefaults[SCHATTR_STAT_PERCENT - SCHATTR_START] = new SvxDoubleItem (0.0, SCHATTR_STAT_PERCENT);
- rPoolDefaults[SCHATTR_STAT_BIGERROR - SCHATTR_START] = new SvxDoubleItem (0.0, SCHATTR_STAT_BIGERROR);
- rPoolDefaults[SCHATTR_STAT_CONSTPLUS - SCHATTR_START] = new SvxDoubleItem (0.0, SCHATTR_STAT_CONSTPLUS);
- rPoolDefaults[SCHATTR_STAT_CONSTMINUS - SCHATTR_START] = new SvxDoubleItem (0.0, SCHATTR_STAT_CONSTMINUS);
- rPoolDefaults[SCHATTR_STAT_INDICATE - SCHATTR_START] = new SvxChartIndicateItem (SvxChartIndicate::NONE, SCHATTR_STAT_INDICATE);
- rPoolDefaults[SCHATTR_STAT_RANGE_POS - SCHATTR_START] = new SfxStringItem (SCHATTR_STAT_RANGE_POS, OUString());
- rPoolDefaults[SCHATTR_STAT_RANGE_NEG - SCHATTR_START] = new SfxStringItem (SCHATTR_STAT_RANGE_NEG, OUString());
- rPoolDefaults[SCHATTR_STAT_ERRORBAR_TYPE - SCHATTR_START] = new SfxBoolItem(SCHATTR_STAT_ERRORBAR_TYPE, true);
-
- rPoolDefaults[SCHATTR_STYLE_DEEP - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_DEEP, false);
- rPoolDefaults[SCHATTR_STYLE_3D - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_3D, false);
- rPoolDefaults[SCHATTR_STYLE_VERTICAL - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_VERTICAL, false);
- rPoolDefaults[SCHATTR_STYLE_BASETYPE - SCHATTR_START] = new SfxInt32Item(SCHATTR_STYLE_BASETYPE, 0);
- rPoolDefaults[SCHATTR_STYLE_LINES - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_LINES, false);
- rPoolDefaults[SCHATTR_STYLE_PERCENT - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_PERCENT, false);
- rPoolDefaults[SCHATTR_STYLE_STACKED - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_STACKED, false);
- rPoolDefaults[SCHATTR_STYLE_SPLINES - SCHATTR_START] = new SfxInt32Item (SCHATTR_STYLE_SPLINES, 0); //Bug: was Bool! test ->Fileformat (touches only 5's)
- rPoolDefaults[SCHATTR_STYLE_SYMBOL - SCHATTR_START] = new SfxInt32Item (SCHATTR_STYLE_SYMBOL, 0);
- rPoolDefaults[SCHATTR_STYLE_SHAPE - SCHATTR_START] = new SfxInt32Item (SCHATTR_STYLE_SHAPE, 0);
-
- rPoolDefaults[SCHATTR_AXIS - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS,2); //2 = Y-Axis!!!
-
- //axis scale
- rPoolDefaults[SCHATTR_AXISTYPE - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXISTYPE, CHART_AXIS_REALNUMBER);
- rPoolDefaults[SCHATTR_AXIS_REVERSE - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_REVERSE,false);
- rPoolDefaults[SCHATTR_AXIS_AUTO_MIN - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_MIN);
- rPoolDefaults[SCHATTR_AXIS_MIN - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_MIN);
- rPoolDefaults[SCHATTR_AXIS_AUTO_MAX - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_MAX);
- rPoolDefaults[SCHATTR_AXIS_MAX - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_MAX);
- rPoolDefaults[SCHATTR_AXIS_AUTO_STEP_MAIN - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_MAIN);
- rPoolDefaults[SCHATTR_AXIS_STEP_MAIN - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_STEP_MAIN);
- rPoolDefaults[SCHATTR_AXIS_MAIN_TIME_UNIT - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_MAIN_TIME_UNIT,2);
- rPoolDefaults[SCHATTR_AXIS_AUTO_STEP_HELP - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_HELP);
- rPoolDefaults[SCHATTR_AXIS_STEP_HELP - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_STEP_HELP,0);
- rPoolDefaults[SCHATTR_AXIS_HELP_TIME_UNIT - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_HELP_TIME_UNIT,2);
- rPoolDefaults[SCHATTR_AXIS_AUTO_TIME_RESOLUTION - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_TIME_RESOLUTION);
- rPoolDefaults[SCHATTR_AXIS_TIME_RESOLUTION - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_TIME_RESOLUTION,2);
- rPoolDefaults[SCHATTR_AXIS_LOGARITHM - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_LOGARITHM);
- rPoolDefaults[SCHATTR_AXIS_AUTO_DATEAXIS - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_DATEAXIS);
- rPoolDefaults[SCHATTR_AXIS_ALLOW_DATEAXIS - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_ALLOW_DATEAXIS);
- rPoolDefaults[SCHATTR_AXIS_AUTO_ORIGIN - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_ORIGIN);
- rPoolDefaults[SCHATTR_AXIS_ORIGIN - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_ORIGIN);
-
- //axis position
- rPoolDefaults[SCHATTR_AXIS_TICKS - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_TICKS,CHAXIS_MARK_OUTER);
- rPoolDefaults[SCHATTR_AXIS_HELPTICKS - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_HELPTICKS,0);
- rPoolDefaults[SCHATTR_AXIS_POSITION - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_POSITION,0);
- rPoolDefaults[SCHATTR_AXIS_POSITION_VALUE - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_POSITION_VALUE);
- rPoolDefaults[SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT - SCHATTR_START] = new SfxUInt32Item(SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT,0);
- rPoolDefaults[SCHATTR_AXIS_SHIFTED_CATEGORY_POSITION - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_SHIFTED_CATEGORY_POSITION,false);
- rPoolDefaults[SCHATTR_AXIS_LABEL_POSITION - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_LABEL_POSITION,0);
- rPoolDefaults[SCHATTR_AXIS_MARK_POSITION - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_MARK_POSITION,0);
-
- //axis label
- rPoolDefaults[SCHATTR_AXIS_SHOWDESCR - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_SHOWDESCR,false);
- rPoolDefaults[SCHATTR_AXIS_LABEL_ORDER - SCHATTR_START] = new SvxChartTextOrderItem(SvxChartTextOrder::SideBySide, SCHATTR_AXIS_LABEL_ORDER);
- rPoolDefaults[SCHATTR_AXIS_LABEL_OVERLAP - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_LABEL_OVERLAP,false);
- rPoolDefaults[SCHATTR_AXIS_LABEL_BREAK - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_LABEL_BREAK, false );
-
- rPoolDefaults[SCHATTR_SYMBOL_BRUSH - SCHATTR_START] = new SvxBrushItem(SCHATTR_SYMBOL_BRUSH);
- rPoolDefaults[SCHATTR_STOCK_VOLUME - SCHATTR_START] = new SfxBoolItem(SCHATTR_STOCK_VOLUME,false);
- rPoolDefaults[SCHATTR_STOCK_UPDOWN - SCHATTR_START] = new SfxBoolItem(SCHATTR_STOCK_UPDOWN,false);
- rPoolDefaults[SCHATTR_SYMBOL_SIZE - SCHATTR_START] = new SvxSizeItem(SCHATTR_SYMBOL_SIZE,Size(0,0));
- rPoolDefaults[SCHATTR_HIDE_DATA_POINT_LEGEND_ENTRY - SCHATTR_START] = new SfxBoolItem(SCHATTR_HIDE_DATA_POINT_LEGEND_ENTRY, false);
-
- // new for New Chart
- rPoolDefaults[SCHATTR_BAR_OVERLAP - SCHATTR_START] = new SfxInt32Item(SCHATTR_BAR_OVERLAP,0);
- rPoolDefaults[SCHATTR_BAR_GAPWIDTH - SCHATTR_START] = new SfxInt32Item(SCHATTR_BAR_GAPWIDTH,0);
- rPoolDefaults[SCHATTR_BAR_CONNECT - SCHATTR_START] = new SfxBoolItem(SCHATTR_BAR_CONNECT, false);
- rPoolDefaults[SCHATTR_NUM_OF_LINES_FOR_BAR - SCHATTR_START] = new SfxInt32Item( SCHATTR_NUM_OF_LINES_FOR_BAR, 0 );
- rPoolDefaults[SCHATTR_SPLINE_ORDER - SCHATTR_START] = new SfxInt32Item( SCHATTR_SPLINE_ORDER, 3 );
- rPoolDefaults[SCHATTR_SPLINE_RESOLUTION - SCHATTR_START] = new SfxInt32Item( SCHATTR_SPLINE_RESOLUTION, 20 );
- rPoolDefaults[SCHATTR_GROUP_BARS_PER_AXIS - SCHATTR_START] = new SfxBoolItem(SCHATTR_GROUP_BARS_PER_AXIS, false);
- rPoolDefaults[SCHATTR_STARTING_ANGLE - SCHATTR_START] = new SdrAngleItem( SCHATTR_STARTING_ANGLE, 9000_deg100 );
- rPoolDefaults[SCHATTR_CLOCKWISE - SCHATTR_START] = new SfxBoolItem( SCHATTR_CLOCKWISE, false );
-
- rPoolDefaults[SCHATTR_MISSING_VALUE_TREATMENT - SCHATTR_START] = new SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT, 0);
- rPoolDefaults[SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS - SCHATTR_START] = new SfxIntegerListItem(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, std::vector < sal_Int32 >() );
- rPoolDefaults[SCHATTR_INCLUDE_HIDDEN_CELLS - SCHATTR_START] = new SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, true);
- rPoolDefaults[SCHATTR_HIDE_LEGEND_ENTRY - SCHATTR_START] = new SfxBoolItem(SCHATTR_HIDE_LEGEND_ENTRY, false);
-
- rPoolDefaults[SCHATTR_AXIS_FOR_ALL_SERIES - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_FOR_ALL_SERIES, 0);
-
- rPoolDefaults[SCHATTR_REGRESSION_TYPE - SCHATTR_START] = new SvxChartRegressItem (SvxChartRegress::NONE, SCHATTR_REGRESSION_TYPE);
- rPoolDefaults[SCHATTR_REGRESSION_SHOW_EQUATION - SCHATTR_START] = new SfxBoolItem(SCHATTR_REGRESSION_SHOW_EQUATION, false);
- rPoolDefaults[SCHATTR_REGRESSION_SHOW_COEFF - SCHATTR_START] = new SfxBoolItem(SCHATTR_REGRESSION_SHOW_COEFF, false);
- rPoolDefaults[SCHATTR_REGRESSION_DEGREE - SCHATTR_START] = new SfxInt32Item(SCHATTR_REGRESSION_DEGREE, 2);
- rPoolDefaults[SCHATTR_REGRESSION_PERIOD - SCHATTR_START] = new SfxInt32Item(SCHATTR_REGRESSION_PERIOD, 2);
- rPoolDefaults[SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD);
- rPoolDefaults[SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD);
- rPoolDefaults[SCHATTR_REGRESSION_SET_INTERCEPT - SCHATTR_START] = new SfxBoolItem(SCHATTR_REGRESSION_SET_INTERCEPT, false);
- rPoolDefaults[SCHATTR_REGRESSION_INTERCEPT_VALUE - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_REGRESSION_INTERCEPT_VALUE);
- rPoolDefaults[SCHATTR_REGRESSION_CURVE_NAME - SCHATTR_START] = new SfxStringItem(SCHATTR_REGRESSION_CURVE_NAME, OUString());
- rPoolDefaults[SCHATTR_REGRESSION_XNAME - SCHATTR_START] = new SfxStringItem(SCHATTR_REGRESSION_XNAME, "x");
- rPoolDefaults[SCHATTR_REGRESSION_YNAME - SCHATTR_START] = new SfxStringItem(SCHATTR_REGRESSION_YNAME, "f(x)");
- rPoolDefaults[SCHATTR_REGRESSION_MOVING_TYPE - SCHATTR_START] = new SfxInt32Item(SCHATTR_REGRESSION_MOVING_TYPE, css::chart2::MovingAverageType::Prior);
-
- /**************************************************************************
- * ItemInfos
- **************************************************************************/
- const sal_uInt16 nMax = SCHATTR_END - SCHATTR_START + 1;
- for( sal_uInt16 i = 0; i < nMax; i++ )
+ class ItemInfoPackageChart : public ItemInfoPackage
{
- pItemInfos[i]._nSID = 0;
- pItemInfos[i]._bPoolable = true;
- }
-
- // slot ids differing from which ids
- pItemInfos[SCHATTR_SYMBOL_BRUSH - SCHATTR_START]._nSID = SID_ATTR_BRUSH;
- pItemInfos[SCHATTR_STYLE_SYMBOL - SCHATTR_START]._nSID = SID_ATTR_SYMBOLTYPE;
- pItemInfos[SCHATTR_SYMBOL_SIZE - SCHATTR_START]._nSID = SID_ATTR_SYMBOLSIZE;
+ typedef std::array<ItemInfoStatic, SCHATTR_END - SCHATTR_START + 1> ItemInfoArrayChart;
+ ItemInfoArrayChart maItemInfos {{
+ // m_nWhich, m_pItem, m_nSlotID, m_nItemInfoFlags
+ { SCHATTR_DATADESCR_SHOW_NUMBER, new SfxBoolItem(SCHATTR_DATADESCR_SHOW_NUMBER), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATADESCR_SHOW_PERCENTAGE, new SfxBoolItem(SCHATTR_DATADESCR_SHOW_PERCENTAGE), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATADESCR_SHOW_CATEGORY, new SfxBoolItem(SCHATTR_DATADESCR_SHOW_CATEGORY), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATADESCR_SHOW_SYMBOL, new SfxBoolItem(SCHATTR_DATADESCR_SHOW_SYMBOL), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATADESCR_WRAP_TEXT, new SfxBoolItem(SCHATTR_DATADESCR_WRAP_TEXT), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATADESCR_SEPARATOR, new SfxStringItem(SCHATTR_DATADESCR_SEPARATOR," "), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATADESCR_PLACEMENT, new SfxInt32Item(SCHATTR_DATADESCR_PLACEMENT,0), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, new SfxIntegerListItem(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, std::vector < sal_Int32 >() ), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATADESCR_NO_PERCENTVALUE, new SfxBoolItem(SCHATTR_DATADESCR_NO_PERCENTVALUE), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATADESCR_CUSTOM_LEADER_LINES, new SfxBoolItem(SCHATTR_DATADESCR_CUSTOM_LEADER_LINES, true), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_PERCENT_NUMBERFORMAT_VALUE, new SfxUInt32Item(SCHATTR_PERCENT_NUMBERFORMAT_VALUE, 0), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, new SfxBoolItem(SCHATTR_PERCENT_NUMBERFORMAT_SOURCE), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATADESCR_SHOW_DATA_SERIES_NAME, new SfxBoolItem(SCHATTR_DATADESCR_SHOW_DATA_SERIES_NAME), 0, SFX_ITEMINFOFLAG_NONE },
+
+ //legend
+ { SCHATTR_LEGEND_POS, new SfxInt32Item(SCHATTR_LEGEND_POS, sal_Int32(css::chart2::LegendPosition_LINE_END) ), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_LEGEND_SHOW, new SfxBoolItem(SCHATTR_LEGEND_SHOW, true), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_LEGEND_NO_OVERLAY, new SfxBoolItem(SCHATTR_LEGEND_NO_OVERLAY, true), 0, SFX_ITEMINFOFLAG_NONE },
+
+ //text
+ { SCHATTR_TEXT_DEGREES, new SdrAngleItem(SCHATTR_TEXT_DEGREES, 0_deg100), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_TEXT_STACKED, new SfxBoolItem(SCHATTR_TEXT_STACKED,false), 0, SFX_ITEMINFOFLAG_NONE },
+
+ //statistic
+ { SCHATTR_STAT_AVERAGE, new SfxBoolItem (SCHATTR_STAT_AVERAGE), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STAT_KIND_ERROR, new SvxChartKindErrorItem (SvxChartKindError::NONE, SCHATTR_STAT_KIND_ERROR), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STAT_PERCENT, new SvxDoubleItem (0.0, SCHATTR_STAT_PERCENT), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STAT_BIGERROR, new SvxDoubleItem (0.0, SCHATTR_STAT_BIGERROR), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STAT_CONSTPLUS, new SvxDoubleItem (0.0, SCHATTR_STAT_CONSTPLUS), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STAT_CONSTMINUS, new SvxDoubleItem (0.0, SCHATTR_STAT_CONSTMINUS), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STAT_INDICATE, new SvxChartIndicateItem (SvxChartIndicate::NONE, SCHATTR_STAT_INDICATE), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STAT_RANGE_POS, new SfxStringItem (SCHATTR_STAT_RANGE_POS, OUString()), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STAT_RANGE_NEG, new SfxStringItem (SCHATTR_STAT_RANGE_NEG, OUString()), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STAT_ERRORBAR_TYPE, new SfxBoolItem(SCHATTR_STAT_ERRORBAR_TYPE, true), 0, SFX_ITEMINFOFLAG_NONE },
+
+ { SCHATTR_STYLE_DEEP, new SfxBoolItem (SCHATTR_STYLE_DEEP, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STYLE_3D, new SfxBoolItem (SCHATTR_STYLE_3D, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STYLE_VERTICAL, new SfxBoolItem (SCHATTR_STYLE_VERTICAL, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STYLE_BASETYPE, new SfxInt32Item(SCHATTR_STYLE_BASETYPE, 0), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STYLE_LINES, new SfxBoolItem (SCHATTR_STYLE_LINES, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STYLE_PERCENT, new SfxBoolItem (SCHATTR_STYLE_PERCENT, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STYLE_STACKED, new SfxBoolItem (SCHATTR_STYLE_STACKED, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STYLE_SPLINES, new SfxInt32Item (SCHATTR_STYLE_SPLINES, 0), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STYLE_SYMBOL, new SfxInt32Item (SCHATTR_STYLE_SYMBOL, 0), SID_ATTR_SYMBOLTYPE, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STYLE_SHAPE, new SfxInt32Item (SCHATTR_STYLE_SHAPE, 0), 0, SFX_ITEMINFOFLAG_NONE },
+
+ { SCHATTR_AXIS, new SfxInt32Item(SCHATTR_AXIS,2), 0, SFX_ITEMINFOFLAG_NONE },
+
+ //axis scale
+ { SCHATTR_AXISTYPE, new SfxInt32Item(SCHATTR_AXISTYPE, CHART_AXIS_REALNUMBER), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_REVERSE, new SfxBoolItem(SCHATTR_AXIS_REVERSE,false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_AUTO_MIN, new SfxBoolItem(SCHATTR_AXIS_AUTO_MIN), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_MIN, new SvxDoubleItem(0.0, SCHATTR_AXIS_MIN), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_AUTO_MAX, new SfxBoolItem(SCHATTR_AXIS_AUTO_MAX), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_MAX, new SvxDoubleItem(0.0, SCHATTR_AXIS_MAX), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_AUTO_STEP_MAIN, new SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_MAIN), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_STEP_MAIN, new SvxDoubleItem(0.0, SCHATTR_AXIS_STEP_MAIN), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_MAIN_TIME_UNIT, new SfxInt32Item(SCHATTR_AXIS_MAIN_TIME_UNIT,2), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_AUTO_STEP_HELP, new SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_HELP), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_STEP_HELP, new SfxInt32Item(SCHATTR_AXIS_STEP_HELP,0), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_HELP_TIME_UNIT, new SfxInt32Item(SCHATTR_AXIS_HELP_TIME_UNIT,2), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_AUTO_TIME_RESOLUTION, new SfxBoolItem(SCHATTR_AXIS_AUTO_TIME_RESOLUTION), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_TIME_RESOLUTION, new SfxInt32Item(SCHATTR_AXIS_TIME_RESOLUTION,2), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_LOGARITHM, new SfxBoolItem(SCHATTR_AXIS_LOGARITHM), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_AUTO_DATEAXIS, new SfxBoolItem(SCHATTR_AXIS_AUTO_DATEAXIS), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_ALLOW_DATEAXIS, new SfxBoolItem(SCHATTR_AXIS_ALLOW_DATEAXIS), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_AUTO_ORIGIN, new SfxBoolItem(SCHATTR_AXIS_AUTO_ORIGIN), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_ORIGIN, new SvxDoubleItem(0.0, SCHATTR_AXIS_ORIGIN), 0, SFX_ITEMINFOFLAG_NONE },
+
+ //axis position
+ { SCHATTR_AXIS_TICKS, new SfxInt32Item(SCHATTR_AXIS_TICKS,CHAXIS_MARK_OUTER), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_HELPTICKS, new SfxInt32Item(SCHATTR_AXIS_HELPTICKS,0), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_POSITION, new SfxInt32Item(SCHATTR_AXIS_POSITION,0), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_POSITION_VALUE, new SvxDoubleItem(0.0, SCHATTR_AXIS_POSITION_VALUE), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT, new SfxUInt32Item(SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT,0), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_SHIFTED_CATEGORY_POSITION, new SfxBoolItem(SCHATTR_AXIS_SHIFTED_CATEGORY_POSITION,false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_LABEL_POSITION, new SfxInt32Item(SCHATTR_AXIS_LABEL_POSITION,0), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_MARK_POSITION, new SfxInt32Item(SCHATTR_AXIS_MARK_POSITION,0), 0, SFX_ITEMINFOFLAG_NONE },
+
+ //axis label
+ { SCHATTR_AXIS_SHOWDESCR, new SfxBoolItem(SCHATTR_AXIS_SHOWDESCR,false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_LABEL_ORDER, new SvxChartTextOrderItem(SvxChartTextOrder::SideBySide, SCHATTR_AXIS_LABEL_ORDER), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_LABEL_OVERLAP, new SfxBoolItem(SCHATTR_AXIS_LABEL_OVERLAP,false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AXIS_LABEL_BREAK, new SfxBoolItem(SCHATTR_AXIS_LABEL_BREAK, false ), 0, SFX_ITEMINFOFLAG_NONE },
+
+ { SCHATTR_SYMBOL_BRUSH, new SvxBrushItem(SCHATTR_SYMBOL_BRUSH), SID_ATTR_BRUSH, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STOCK_VOLUME, new SfxBoolItem(SCHATTR_STOCK_VOLUME,false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STOCK_UPDOWN, new SfxBoolItem(SCHATTR_STOCK_UPDOWN,false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_SYMBOL_SIZE, new SvxSizeItem(SCHATTR_SYMBOL_SIZE,Size(0,0)), SID_ATTR_SYMBOLSIZE, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_HIDE_DATA_POINT_LEGEND_ENTRY, new SfxBoolItem(SCHATTR_HIDE_DATA_POINT_LEGEND_ENTRY, false), 0, SFX_ITEMINFOFLAG_NONE },
+
+ // new for New Chart
+ { SCHATTR_BAR_OVERLAP, new SfxInt32Item(SCHATTR_BAR_OVERLAP,0), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_BAR_GAPWIDTH, new SfxInt32Item(SCHATTR_BAR_GAPWIDTH,0), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_BAR_CONNECT, new SfxBoolItem(SCHATTR_BAR_CONNECT, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_NUM_OF_LINES_FOR_BAR, new SfxInt32Item( SCHATTR_NUM_OF_LINES_FOR_BAR, 0 ), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_SPLINE_ORDER, new SfxInt32Item( SCHATTR_SPLINE_ORDER, 3 ), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_SPLINE_RESOLUTION, new SfxInt32Item( SCHATTR_SPLINE_RESOLUTION, 20 ), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_GROUP_BARS_PER_AXIS, new SfxBoolItem(SCHATTR_GROUP_BARS_PER_AXIS, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_STARTING_ANGLE, new SdrAngleItem( SCHATTR_STARTING_ANGLE, 9000_deg100 ), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_CLOCKWISE, new SfxBoolItem( SCHATTR_CLOCKWISE, false ), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_MISSING_VALUE_TREATMENT, new SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT, 0), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, new SfxIntegerListItem(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, std::vector < sal_Int32 >() ), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_INCLUDE_HIDDEN_CELLS, new SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, true), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_HIDE_LEGEND_ENTRY, new SfxBoolItem(SCHATTR_HIDE_LEGEND_ENTRY, false), 0, SFX_ITEMINFOFLAG_NONE },
+
+ { SCHATTR_AXIS_FOR_ALL_SERIES, new SfxInt32Item(SCHATTR_AXIS_FOR_ALL_SERIES, 0), 0, SFX_ITEMINFOFLAG_NONE },
+
+ { SCHATTR_REGRESSION_TYPE, new SvxChartRegressItem (SvxChartRegress::NONE, SCHATTR_REGRESSION_TYPE), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_REGRESSION_SHOW_EQUATION, new SfxBoolItem(SCHATTR_REGRESSION_SHOW_EQUATION, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_REGRESSION_SHOW_COEFF, new SfxBoolItem(SCHATTR_REGRESSION_SHOW_COEFF, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_REGRESSION_DEGREE, new SfxInt32Item(SCHATTR_REGRESSION_DEGREE, 2), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_REGRESSION_PERIOD, new SfxInt32Item(SCHATTR_REGRESSION_PERIOD, 2), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD, new SvxDoubleItem(0.0, SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD, new SvxDoubleItem(0.0, SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_REGRESSION_SET_INTERCEPT, new SfxBoolItem(SCHATTR_REGRESSION_SET_INTERCEPT, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_REGRESSION_INTERCEPT_VALUE, new SvxDoubleItem(0.0, SCHATTR_REGRESSION_INTERCEPT_VALUE), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_REGRESSION_CURVE_NAME, new SfxStringItem(SCHATTR_REGRESSION_CURVE_NAME, OUString()), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_REGRESSION_XNAME, new SfxStringItem(SCHATTR_REGRESSION_XNAME, "x"), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_REGRESSION_YNAME, new SfxStringItem(SCHATTR_REGRESSION_YNAME, "f(x)"), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_REGRESSION_MOVING_TYPE, new SfxInt32Item(SCHATTR_REGRESSION_MOVING_TYPE, css::chart2::MovingAverageType::Prior), 0, SFX_ITEMINFOFLAG_NONE },
+
+ { SCHATTR_DATA_TABLE_HORIZONTAL_BORDER, new SfxBoolItem(SCHATTR_DATA_TABLE_HORIZONTAL_BORDER, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATA_TABLE_VERTICAL_BORDER, new SfxBoolItem(SCHATTR_DATA_TABLE_VERTICAL_BORDER, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATA_TABLE_OUTLINE, new SfxBoolItem(SCHATTR_DATA_TABLE_OUTLINE, false), 0, SFX_ITEMINFOFLAG_NONE },
+ { SCHATTR_DATA_TABLE_KEYS, new SfxBoolItem(SCHATTR_DATA_TABLE_KEYS, false), 0, SFX_ITEMINFOFLAG_NONE }
+ }};
+
+ virtual const ItemInfoStatic& getItemInfoStatic(size_t nIndex) const override { return maItemInfos[nIndex]; }
+
+ public:
+ virtual size_t size() const override { return maItemInfos.size(); }
+ virtual const ItemInfo& getItemInfo(size_t nIndex, SfxItemPool& /*rPool*/) override { return maItemInfos[nIndex]; }
+ };
+
+ static std::unique_ptr<ItemInfoPackageChart> g_aItemInfoPackageChart;
+ if (!g_aItemInfoPackageChart)
+ g_aItemInfoPackageChart.reset(new ItemInfoPackageChart);
+ return *g_aItemInfoPackageChart;
+}
- SetDefaults(ppPoolDefaults);
- SetItemInfos(pItemInfos.get());
+ChartItemPool::ChartItemPool()
+: SfxItemPool("ChartItemPool")
+{
+ registerItemInfoPackage(getItemInfoPackageChart());
}
-ChartItemPool::ChartItemPool(const ChartItemPool& rPool):
- SfxItemPool(rPool)
+ChartItemPool::ChartItemPool(const ChartItemPool& rPool)
+: SfxItemPool(rPool)
{
}
ChartItemPool::~ChartItemPool()
{
- Delete();
- // release and delete static pool default items
- ReleaseDefaults(true);
+ sendShutdownHint();
}
rtl::Reference<SfxItemPool> ChartItemPool::Clone() const
@@ -216,48 +221,22 @@ MapUnit ChartItemPool::GetMetric(sal_uInt16 /* nWhich */) const
return MapUnit::Map100thMM;
}
-static rtl::Reference<SfxItemPool> g_Pool1, g_Pool2, g_Pool3;
-
-/** If we let the libc runtime clean us up, we trigger a crash */
-namespace
-{
-class TerminateListener : public ::cppu::WeakImplHelper< css::frame::XTerminateListener >
+rtl::Reference<SfxItemPool> ChartItemPool::CreateChartItemPool()
{
- void SAL_CALL queryTermination( const css::lang::EventObject& ) override
- {}
- void SAL_CALL notifyTermination( const css::lang::EventObject& ) override
- {
- g_Pool1.clear();
- g_Pool2.clear();
- g_Pool3.clear();
- }
- virtual void SAL_CALL disposing( const ::css::lang::EventObject& ) override
- {}
-};
-};
-
-SfxItemPool& ChartItemPool::GetGlobalChartItemPool()
-{
- if (!g_Pool1)
- {
- // similar logic to SdrModel's pool, but with our chart pool tagged on the end
- g_Pool1 = new SdrItemPool(nullptr);
- g_Pool2 = EditEngine::CreatePool();
- g_Pool3 = new ChartItemPool();
- g_Pool1->SetSecondaryPool(g_Pool2.get());
-
- g_Pool1->SetDefaultMetric(MapUnit::Map100thMM);
- g_Pool1->SetPoolDefaultItem(SfxBoolItem(EE_PARA_HYPHENATE, true) );
- g_Pool1->SetPoolDefaultItem(makeSvx3DPercentDiagonalItem (5));
-
- g_Pool2->SetSecondaryPool(g_Pool3.get());
- g_Pool1->FreezeIdRanges();
-
- css::uno::Reference< css::frame::XDesktop2 > xDesktop = css::frame::Desktop::create(comphelper::getProcessComponentContext());
- css::uno::Reference< css::frame::XTerminateListener > xListener( new TerminateListener );
- xDesktop->addTerminateListener( xListener );
- }
- return *g_Pool1;
+ // There are various default values which want to call
+ // OutputDevice::GetDefaultFont. Unfortunately, when processing
+ // UNO methods which may get called from out of process, this
+ // happens on a thread that does not take the SolarMutex, which
+ // causes trouble in ImplFontCache.
+ // Trying to take the SolarMutex when initialising these default
+ // leads to ABBA deadlocks.
+ // So rather just trigger the initialisation of these things here.
+ StaticDataSeriesDefaults();
+ StaticAxisDefaults();
+ StaticLegendDefaults();
+ StaticFormattedStringDefaults();
+
+ return new ChartItemPool();
}
} // namespace chart
diff --git a/chart2/source/view/main/ChartItemPool.hxx b/chart2/source/view/main/ChartItemPool.hxx
index 2ac440183740..558ab3c6e2fc 100644
--- a/chart2/source/view/main/ChartItemPool.hxx
+++ b/chart2/source/view/main/ChartItemPool.hxx
@@ -26,21 +26,16 @@ namespace chart
{
class ChartItemPool : public SfxItemPool
{
-private:
- std::unique_ptr<SfxItemInfo[]> pItemInfos;
-
+public:
ChartItemPool();
ChartItemPool(const ChartItemPool& rPool);
-
-protected:
virtual ~ChartItemPool() override;
-public:
virtual rtl::Reference<SfxItemPool> Clone() const override;
MapUnit GetMetric(sal_uInt16 nWhich) const override;
- /// get the pure chart item pool
- static SfxItemPool& GetGlobalChartItemPool();
+ /// creates a pure chart item pool
+ static rtl::Reference<SfxItemPool> CreateChartItemPool();
};
} // namespace chart
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index d1ec2a672571..dc09a83f810a 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -19,9 +19,13 @@
#include <config_feature_desktop.h>
+#include "SeriesPlotterContainer.hxx"
+
#include <ChartView.hxx>
#include <chartview/DrawModelWrapper.hxx>
#include <Diagram.hxx>
+#include <ChartType.hxx>
+#include <DataSeries.hxx>
#include <NumberFormatterWrapper.hxx>
#include <VDiagram.hxx>
#include "VTitle.hxx"
@@ -32,6 +36,7 @@
#include <VSeriesPlotter.hxx>
#include <CommonConverters.hxx>
#include <TitleHelper.hxx>
+#include <Legend.hxx>
#include <LegendHelper.hxx>
#include "VLegend.hxx"
#include <PropertyMapper.hxx>
@@ -42,13 +47,16 @@
#include <DiagramHelper.hxx>
#include <RelativePositionHelper.hxx>
#include <servicenames.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
+#include "AxisUsage.hxx"
#include <AxisIndexDefines.hxx>
#include <BaseGFXHelper.hxx>
#include <DataSeriesHelper.hxx>
#include <DateHelper.hxx>
#include <ExplicitCategoriesProvider.hxx>
#include <defines.hxx>
+#include <comphelper/dumpxmltostring.hxx>
#include <unonames.hxx>
#include <editeng/frmdiritem.hxx>
#include <editeng/eeitem.hxx>
@@ -62,22 +70,20 @@
#include <unotools/streamwrap.hxx>
#include <svx/svdpage.hxx>
#include <svx/unopage.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
#include <svx/unofill.hxx>
#include <drawinglayer/XShapeDumper.hxx>
+#include <sfx2/objsh.hxx>
#include <time.h>
-#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/chart/ChartAxisPosition.hpp>
#include <com/sun/star/chart/TimeUnit.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/StackingDirection.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/chart2/RelativeSize.hpp>
#include <com/sun/star/chart2/data/XPivotTableDataProvider.hpp>
@@ -101,897 +107,19 @@
#include <rtl/ustring.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/stream.hxx>
#include <memory>
#include <libxml/xmlwriter.h>
-namespace com::sun::star::chart2 { class XChartDocument; }
namespace chart {
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Any;
-namespace {
-
-typedef std::pair< sal_Int32, sal_Int32 > tFullAxisIndex; //first index is the dimension, second index is the axis index that indicates whether this is a main or secondary axis
-typedef std::map< VCoordinateSystem*, tFullAxisIndex > tCoordinateSystemMap;
-
-/** This class handles a collection of coordinate systems and is used for
- * executing some action on all coordinate systems such as
- * `prepareAutomaticAxisScaling` and `setExplicitScaleAndIncrement`.
- * Moreover it contains the `aAutoScaling` object that is an instance of
- * the `ScaleAutomatism` class. The initialization of `aAutoScaling` is
- * performed in the `SeriesPlotterContainer::initAxisUsageList` method and is
- * used in the `SeriesPlotterContainer::doAutoScaling` for calculating explicit
- * scale and increment objects (see `SeriesPlotterContainer::doAutoScaling`).
- */
-struct AxisUsage
-{
- AxisUsage();
- ~AxisUsage();
-
- void addCoordinateSystem( VCoordinateSystem* pCooSys, sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex );
- std::vector< VCoordinateSystem* > getCoordinateSystems( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex );
- sal_Int32 getMaxAxisIndexForDimension( sal_Int32 nDimensionIndex );
-
- void prepareAutomaticAxisScaling( ScaleAutomatism& rScaleAutomatism, sal_Int32 nDimIndex, sal_Int32 nAxisIndex );
- void setExplicitScaleAndIncrement( sal_Int32 nDimIndex, sal_Int32 nAxisIndex, const ExplicitScaleData& rScale, const ExplicitIncrementData& rInc );
-
- ScaleAutomatism aAutoScaling;
-
-private:
- tCoordinateSystemMap aCoordinateSystems;
- std::map< sal_Int32, sal_Int32 > aMaxIndexPerDimension;
-};
-
-AxisUsage::AxisUsage()
- : aAutoScaling(AxisHelper::createDefaultScale(), Date(Date::SYSTEM))
-{
-}
-
-AxisUsage::~AxisUsage()
-{
- aCoordinateSystems.clear();
-}
-
-void AxisUsage::addCoordinateSystem( VCoordinateSystem* pCooSys, sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex )
-{
- if(!pCooSys)
- return;
-
- tFullAxisIndex aFullAxisIndex( nDimensionIndex, nAxisIndex );
- tCoordinateSystemMap::const_iterator aFound( aCoordinateSystems.find(pCooSys) );
-
- //use one scale only once for each coordinate system
- //main axis are preferred over secondary axis
- //value scales are preferred
- if(aFound!=aCoordinateSystems.end())
- {
- sal_Int32 nFoundAxisIndex = aFound->second.second;
- if( nFoundAxisIndex < nAxisIndex )
- return;
- sal_Int32 nFoundDimension = aFound->second.first;
- if( nFoundDimension ==1 )
- return;
- if( nFoundDimension < nDimensionIndex )
- return;
- }
- aCoordinateSystems[pCooSys] = aFullAxisIndex;
-
- //set maximum scale index
- std::map< sal_Int32, sal_Int32 >::const_iterator aIter = aMaxIndexPerDimension.find(nDimensionIndex);
- if( aIter != aMaxIndexPerDimension.end() )
- {
- sal_Int32 nCurrentMaxIndex = aIter->second;
- if( nCurrentMaxIndex < nAxisIndex )
- aMaxIndexPerDimension[nDimensionIndex]=nAxisIndex;
- }
- else
- aMaxIndexPerDimension[nDimensionIndex]=nAxisIndex;
-}
-
-std::vector< VCoordinateSystem* > AxisUsage::getCoordinateSystems( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex )
-{
- std::vector< VCoordinateSystem* > aRet;
-
- for (auto const& coordinateSystem : aCoordinateSystems)
- {
- if( coordinateSystem.second.first != nDimensionIndex )
- continue;
- if( coordinateSystem.second.second != nAxisIndex )
- continue;
- aRet.push_back( coordinateSystem.first );
- }
-
- return aRet;
-}
-
-sal_Int32 AxisUsage::getMaxAxisIndexForDimension( sal_Int32 nDimensionIndex )
-{
- sal_Int32 nRet = -1;
- std::map< sal_Int32, sal_Int32 >::const_iterator aIter = aMaxIndexPerDimension.find(nDimensionIndex);
- if( aIter != aMaxIndexPerDimension.end() )
- nRet = aIter->second;
- return nRet;
-}
-
-void AxisUsage::prepareAutomaticAxisScaling( ScaleAutomatism& rScaleAutomatism, sal_Int32 nDimIndex, sal_Int32 nAxisIndex )
-{
- std::vector<VCoordinateSystem*> aVCooSysList = getCoordinateSystems(nDimIndex, nAxisIndex);
- for (VCoordinateSystem * i : aVCooSysList)
- i->prepareAutomaticAxisScaling(rScaleAutomatism, nDimIndex, nAxisIndex);
-}
-
-void AxisUsage::setExplicitScaleAndIncrement(
- sal_Int32 nDimIndex, sal_Int32 nAxisIndex, const ExplicitScaleData& rScale, const ExplicitIncrementData& rInc )
-{
- std::vector<VCoordinateSystem*> aVCooSysList = getCoordinateSystems(nDimIndex, nAxisIndex);
- for (VCoordinateSystem* i : aVCooSysList)
- i->setExplicitScaleAndIncrement(nDimIndex, nAxisIndex, rScale, rInc);
-}
-
-typedef std::vector<std::unique_ptr<VSeriesPlotter> > SeriesPlottersType;
-
-/** This class is a container of `SeriesPlotter` objects (such as `PieChart`
- * instances). It is used for initializing coordinate systems, axes and scales
- * of all series plotters which belongs to the container.
- */
-class SeriesPlotterContainer
-{
-public:
- explicit SeriesPlotterContainer( std::vector< std::unique_ptr<VCoordinateSystem> >& rVCooSysList );
- ~SeriesPlotterContainer();
-
- /** It is used to set coordinate systems (`m_rVCooSysList`), this method
- * is invoked by `ChartView::createShapes2D` before of
- * `ChartView::impl_createDiagramAndContent`.
- * Coordinate systems are retrieved through the `XCoordinateSystemContainer`
- * interface implemented by a diagram object which is provided by the
- * `ChartModel` object passed to the method (`rChartModel.getFirstDiagram()`).
- *
- * It is used for creating series plotters and appending them
- * to `m_aSeriesPlotterList`. The created series plotters are initialized
- * through data (number formats supplier, color scheme, data series),
- * extracted from the chart model or the diagram objects. An exception is
- * the explicit category provider that is retrieved through the
- * `VCoordinateSystem` object used by the series plotter.
- *
- * It sets the minimum-maximum supplier for a coordinate system:
- * this supplier is the series plotter itself which utilizes the given
- * coordinate system. In fact `VSeriesPlotter` has `MinimumMaximumSupplier`
- * as one of its base classes.
- * Hence, for instance, a `PieChart`, which is a series plotter, is
- * a `MinimumMaximumSupplier`, too.
- */
- void initializeCooSysAndSeriesPlotter( ChartModel& rModel );
-
- /** This method is invoked by `ChartView::impl_createDiagramAndContent`.
- * It iterates on every axis of every coordinate systems, and if the axis
- * is not yet present in `m_aAxisUsageList` it creates a new `AxisUsage`
- * object and initialize its `aAutoScaling` member to the `ScaleData`
- * object of the current axis.
- */
- void initAxisUsageList(const Date& rNullDate);
-
- /**
- * Perform automatic axis scaling and determine the amount and spacing of
- * increments. It assumes that the caller has determined the size of the
- * largest axis label text object prior to calling this method.
- *
- * The new axis scaling data will be stored in the VCoordinateSystem
- * objects. The label alignment direction for each axis will also get
- * determined during this process, and stored in VAxis.
- *
- * This method is invoked by `ChartView::impl_createDiagramAndContent`
- * soon after `initAxisUsageList`.
- * It initializes explicit scale and increment objects for all coordinate
- * systems in `m_rVCooSysList`.
- * This action is achieved by iterating on the `m_aAxisUsageList` container,
- * and performing 3 steps:
- * 1- call `VCoordinateSystem::prepareAutomaticAxisScaling` for setting
- * scaling parameters of the `aAutoScaling` member (a `ScaleAutomatism`
- * object) for the current `AxisUsage` instance
- * (see `VCoordinateSystem::prepareAutomaticAxisScaling`);
- * 2- calculate the explicit scale and increment objects
- * (see ScaleAutomatism::calculateExplicitScaleAndIncrement);
- * 3- set the explicit scale and increment objects for each coordinate
- * system.
- */
- void doAutoScaling( ChartModel& rModel );
-
- /**
- * After auto-scaling is performed, call this method to set the explicit
- * scaling and increment data to all relevant VAxis objects.
- */
- void updateScalesAndIncrementsOnAxes();
-
- /**
- * After auto-scaling is performed, call this method to set the explicit
- * scaling data to all the plotters.
- */
- void setScalesFromCooSysToPlotter();
-
- void setNumberFormatsFromAxes();
- drawing::Direction3D getPreferredAspectRatio();
-
- SeriesPlottersType& getSeriesPlotterList() { return m_aSeriesPlotterList; }
- std::vector< std::unique_ptr<VCoordinateSystem> >& getCooSysList() { return m_rVCooSysList; }
- std::vector< LegendEntryProvider* > getLegendEntryProviderList();
-
- void AdaptScaleOfYAxisWithoutAttachedSeries( ChartModel& rModel );
-
- bool isCategoryPositionShifted(
- const chart2::ScaleData& rSourceScale, bool bHasComplexCategories );
-
-private:
- /** A vector of series plotters.
- */
- SeriesPlottersType m_aSeriesPlotterList;
-
- /** A vector of coordinate systems.
- */
- std::vector< std::unique_ptr<VCoordinateSystem> >& m_rVCooSysList;
-
- /** A map whose key is a `XAxis` interface and the related value is
- * an object of `AxisUsage` type.
- */
- std::map< uno::Reference< XAxis >, AxisUsage > m_aAxisUsageList;
-
- /**
- * Max axis index of all dimensions. Currently this can be either 0 or 1
- * since we only support primary and secondary axes per dimension. The
- * value of 0 means all dimensions have only primary axis, while 1 means
- * at least one dimension has a secondary axis.
- */
- sal_Int32 m_nMaxAxisIndex;
-
- bool m_bChartTypeUsesShiftedCategoryPositionPerDefault;
- sal_Int32 m_nDefaultDateNumberFormat;
-};
-
-SeriesPlotterContainer::SeriesPlotterContainer( std::vector< std::unique_ptr<VCoordinateSystem> >& rVCooSysList )
- : m_rVCooSysList( rVCooSysList )
- , m_nMaxAxisIndex(0)
- , m_bChartTypeUsesShiftedCategoryPositionPerDefault(false)
- , m_nDefaultDateNumberFormat(0)
-{
-}
-
-SeriesPlotterContainer::~SeriesPlotterContainer()
-{
- // - remove plotter from coordinatesystems
- for(auto & nC : m_rVCooSysList)
- nC->clearMinimumAndMaximumSupplierList();
-}
-
-std::vector< LegendEntryProvider* > SeriesPlotterContainer::getLegendEntryProviderList()
-{
- std::vector< LegendEntryProvider* > aRet( m_aSeriesPlotterList.size() );
- sal_Int32 nN = 0;
- for( const std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList)
- aRet[nN++] = aPlotter.get();
- return aRet;
-}
-
-VCoordinateSystem* findInCooSysList( const std::vector< std::unique_ptr<VCoordinateSystem> >& rVCooSysList
- , const rtl::Reference< BaseCoordinateSystem >& xCooSys )
-{
- for(auto & pVCooSys : rVCooSysList)
- {
- if(pVCooSys->getModel()==xCooSys)
- return pVCooSys.get();
- }
- return nullptr;
-}
-
-VCoordinateSystem* lcl_getCooSysForPlotter( const std::vector< std::unique_ptr<VCoordinateSystem> >& rVCooSysList, MinimumAndMaximumSupplier* pMinimumAndMaximumSupplier )
-{
- if(!pMinimumAndMaximumSupplier)
- return nullptr;
- for(auto & pVCooSys : rVCooSysList)
- {
- if(pVCooSys->hasMinimumAndMaximumSupplier( pMinimumAndMaximumSupplier ))
- return pVCooSys.get();
- }
- return nullptr;
-}
-
-VCoordinateSystem* addCooSysToList( std::vector< std::unique_ptr<VCoordinateSystem> >& rVCooSysList
- , const rtl::Reference< BaseCoordinateSystem >& xCooSys
- , ChartModel& rChartModel )
-{
- VCoordinateSystem* pExistingVCooSys = findInCooSysList( rVCooSysList, xCooSys );
- if( pExistingVCooSys )
- return pExistingVCooSys;
-
- std::unique_ptr<VCoordinateSystem> pVCooSys = VCoordinateSystem::createCoordinateSystem(xCooSys );
- if(!pVCooSys)
- return nullptr;
-
- OUString aCooSysParticle( ObjectIdentifier::createParticleForCoordinateSystem( xCooSys, rChartModel ) );
- pVCooSys->setParticle(aCooSysParticle);
-
- pVCooSys->setExplicitCategoriesProvider( new ExplicitCategoriesProvider(xCooSys, rChartModel) );
- rVCooSysList.push_back( std::move(pVCooSys) );
- return rVCooSysList.back().get();
-}
-
-void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
- ChartModel& rChartModel )
-{
- rtl::Reference< Diagram > xDiagram = rChartModel.getFirstChartDiagram();
- if( !xDiagram.is())
- return;
-
- uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( &rChartModel );
- if( rChartModel.hasInternalDataProvider() && DiagramHelper::isSupportingDateAxis( xDiagram ) )
- m_nDefaultDateNumberFormat=DiagramHelper::getDateNumberFormat( xNumberFormatsSupplier );
-
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
- if(!nDimensionCount)
- {
- //@todo handle mixed dimension
- nDimensionCount = 2;
- }
-
- bool bSortByXValues = false;
- bool bConnectBars = false;
- bool bGroupBarsPerAxis = true;
- bool bIncludeHiddenCells = true;
- bool bSecondaryYaxisVisible = true;
- sal_Int32 nStartingAngle = 90;
- sal_Int32 n3DRelativeHeight = 100;
- try
- {
- xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= bSortByXValues;
- xDiagram->getPropertyValue( "ConnectBars" ) >>= bConnectBars;
- xDiagram->getPropertyValue( "GroupBarsPerAxis" ) >>= bGroupBarsPerAxis;
- xDiagram->getPropertyValue( "IncludeHiddenCells" ) >>= bIncludeHiddenCells;
- xDiagram->getPropertyValue( "StartingAngle" ) >>= nStartingAngle;
-
- if (nDimensionCount == 3)
- {
- xDiagram->getPropertyValue( "3DRelativeHeight" ) >>= n3DRelativeHeight;
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2" );
- }
-
- //prepare for autoscaling and shape creation
- // - create plotter for charttypes (for each first scale group at each plotter, as they are independent)
- // - add series to plotter (thus each charttype can provide minimum and maximum values for autoscaling)
- // - add plotter to coordinate systems
-
- //iterate through all coordinate systems
- uno::Reference< XColorScheme > xColorScheme( xDiagram->getDefaultColorScheme());
- auto & rCooSysList = xDiagram->getBaseCoordinateSystems();
- sal_Int32 nGlobalSeriesIndex = 0;//for automatic symbols
- for( sal_Int32 nCS = 0; nCS < static_cast<sal_Int32>(rCooSysList.size()); ++nCS )
- {
- rtl::Reference< BaseCoordinateSystem > xCooSys( rCooSysList[nCS] );
- VCoordinateSystem* pVCooSys = addCooSysToList(m_rVCooSysList,xCooSys,rChartModel);
- // Let's check whether the secondary Y axis is visible
- try
- {
- if (xCooSys->getMaximumAxisIndexByDimension(1) > 0)
- {
- Reference< beans::XPropertySet > xAxisProp(xCooSys->getAxisByDimension(1, 1), uno::UNO_QUERY);
- xAxisProp->getPropertyValue("Show") >>= bSecondaryYaxisVisible;
- }
- }
- catch (const lang::IndexOutOfBoundsException&)
- {
- TOOLS_WARN_EXCEPTION("chart2", "" );
- }
- //iterate through all chart types in the current coordinate system
- uno::Sequence< uno::Reference< XChartType > > aChartTypeList( xCooSys->getChartTypes() );
- for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT )
- {
- uno::Reference< XChartType > xChartType( aChartTypeList[nT] );
- if(nDimensionCount == 3 && xChartType->getChartType().equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE))
- {
- uno::Reference< beans::XPropertySet > xPropertySet( xChartType, uno::UNO_QUERY );
- if (xPropertySet.is())
- {
- try
- {
- sal_Int32 n3DRelativeHeightOldValue(100);
- uno::Any aAny = xPropertySet->getPropertyValue( "3DRelativeHeight" );
- aAny >>= n3DRelativeHeightOldValue;
- if (n3DRelativeHeightOldValue != n3DRelativeHeight)
- xPropertySet->setPropertyValue( "3DRelativeHeight", uno::Any(n3DRelativeHeight) );
- }
- catch (const uno::Exception&) { }
- }
- }
-
- if(nT==0)
- m_bChartTypeUsesShiftedCategoryPositionPerDefault = ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( xChartType );
-
- bool bExcludingPositioning = DiagramHelper::getDiagramPositioningMode( xDiagram ) == DiagramPositioningMode_EXCLUDING;
- VSeriesPlotter* pPlotter = VSeriesPlotter::createSeriesPlotter( xChartType, nDimensionCount, bExcludingPositioning );
- if( !pPlotter )
- continue;
-
- m_aSeriesPlotterList.push_back( std::unique_ptr<VSeriesPlotter>(pPlotter) );
- pPlotter->setNumberFormatsSupplier( xNumberFormatsSupplier );
- pPlotter->setColorScheme( xColorScheme );
- if(pVCooSys)
- pPlotter->setExplicitCategoriesProvider( pVCooSys->getExplicitCategoriesProvider() );
- sal_Int32 nMissingValueTreatment = DiagramHelper::getCorrectedMissingValueTreatment( xDiagram, xChartType );
-
- if(pVCooSys)
- pVCooSys->addMinimumAndMaximumSupplier(pPlotter);
-
- uno::Reference< XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY );
- OSL_ASSERT( xDataSeriesContainer.is());
- if( !xDataSeriesContainer.is() )
- continue;
-
- sal_Int32 zSlot=-1;
- sal_Int32 xSlot=-1;
- sal_Int32 ySlot=-1;
- uno::Sequence< uno::Reference< XDataSeries > > aSeriesList( xDataSeriesContainer->getDataSeries() );
- for( sal_Int32 nS = 0; nS < aSeriesList.getLength(); ++nS )
- {
- uno::Reference< XDataSeries > const & xDataSeries = aSeriesList[nS];
- if(!xDataSeries.is())
- continue;
- if( !bIncludeHiddenCells && !DataSeriesHelper::hasUnhiddenData(xDataSeries) )
- continue;
-
- std::unique_ptr<VDataSeries> pSeries(new VDataSeries( xDataSeries ));
-
- pSeries->setGlobalSeriesIndex(nGlobalSeriesIndex);
- nGlobalSeriesIndex++;
-
- if( bSortByXValues )
- pSeries->doSortByXValues();
-
- pSeries->setConnectBars( bConnectBars );
- pSeries->setGroupBarsPerAxis( bGroupBarsPerAxis );
- pSeries->setStartingAngle( nStartingAngle );
-
- pSeries->setMissingValueTreatment( nMissingValueTreatment );
-
- OUString aSeriesParticle( ObjectIdentifier::createParticleForSeries( 0, nCS, nT, nS ) );
- pSeries->setParticle(aSeriesParticle);
-
- OUString aRole( ChartTypeHelper::getRoleOfSequenceForDataLabelNumberFormatDetection( xChartType ) );
- pSeries->setRoleOfSequenceForDataLabelNumberFormatDetection(aRole);
-
- //ignore secondary axis for charttypes that do not support them
- if( pSeries->getAttachedAxisIndex() != MAIN_AXIS_INDEX &&
- ( !ChartTypeHelper::isSupportingSecondaryAxis( xChartType, nDimensionCount ) ||
- !bSecondaryYaxisVisible ) )
- {
- pSeries->setAttachedAxisIndex(MAIN_AXIS_INDEX);
- }
-
- StackingDirection eDirection = pSeries->getStackingDirection();
- switch(eDirection)
- {
- case StackingDirection_NO_STACKING:
- xSlot++; ySlot=-1;
- if(zSlot<0)
- zSlot=0;
- break;
- case StackingDirection_Y_STACKING:
- ySlot++;
- if(xSlot<0)
- xSlot=0;
- if(zSlot<0)
- zSlot=0;
- break;
- case StackingDirection_Z_STACKING:
- zSlot++; xSlot=-1; ySlot=-1;
- break;
- default:
- // UNO enums have one additional auto-generated case
- break;
- }
- pPlotter->addSeries( std::move(pSeries), zSlot, xSlot, ySlot );
- }
- }
- }
-
- //transport seriesnames to the coordinatesystems if needed
- if( m_aSeriesPlotterList.empty() )
- return;
-
- uno::Sequence< OUString > aSeriesNames;
- bool bSeriesNamesInitialized = false;
- for(auto & pVCooSys : m_rVCooSysList)
- {
- if( pVCooSys->needSeriesNamesForAxis() )
- {
- if(!bSeriesNamesInitialized)
- {
- aSeriesNames = m_aSeriesPlotterList[0]->getSeriesNames();
- bSeriesNamesInitialized = true;
- }
- pVCooSys->setSeriesNamesForAxis( aSeriesNames );
- }
- }
-}
-
-bool SeriesPlotterContainer::isCategoryPositionShifted(
- const chart2::ScaleData& rSourceScale, bool bHasComplexCategories )
-{
- if (rSourceScale.AxisType == AxisType::CATEGORY)
- return bHasComplexCategories || rSourceScale.ShiftedCategoryPosition || m_bChartTypeUsesShiftedCategoryPositionPerDefault;
-
- if (rSourceScale.AxisType == AxisType::DATE)
- return rSourceScale.ShiftedCategoryPosition;
-
- return rSourceScale.AxisType == AxisType::SERIES;
-}
-
-void SeriesPlotterContainer::initAxisUsageList(const Date& rNullDate)
-{
- m_aAxisUsageList.clear();
-
- // Loop through coordinate systems in the diagram (though for now
- // there should only be one coordinate system per diagram).
- for (auto & pVCooSys : m_rVCooSysList)
- {
- uno::Reference<XCoordinateSystem> xCooSys = pVCooSys->getModel();
- sal_Int32 nDimCount = xCooSys->getDimension();
- bool bComplexCategoryAllowed = ChartTypeHelper::isSupportingComplexCategory(AxisHelper::getChartTypeByIndex(xCooSys, 0));
-
- for (sal_Int32 nDimIndex = 0; nDimIndex < nDimCount; ++nDimIndex)
- {
- bool bDateAxisAllowed = ChartTypeHelper::isSupportingDateAxis(
- AxisHelper::getChartTypeByIndex(xCooSys, 0), nDimIndex);
-
- // Each dimension may have primary and secondary axes.
- const sal_Int32 nMaxAxisIndex = xCooSys->getMaximumAxisIndexByDimension(nDimIndex);
- for (sal_Int32 nAxisIndex = 0; nAxisIndex <= nMaxAxisIndex; ++nAxisIndex)
- {
- uno::Reference<XAxis> xAxis = xCooSys->getAxisByDimension(nDimIndex, nAxisIndex);
-
- if (!xAxis.is())
- continue;
-
- if (m_aAxisUsageList.find(xAxis) == m_aAxisUsageList.end())
- {
- // Create axis usage object for this axis.
-
- chart2::ScaleData aSourceScale = xAxis->getScaleData();
- ExplicitCategoriesProvider* pCatProvider = pVCooSys->getExplicitCategoriesProvider();
- if (nDimIndex == 0)
- AxisHelper::checkDateAxis( aSourceScale, pCatProvider, bDateAxisAllowed );
-
- bool bHasComplexCat = pCatProvider && pCatProvider->hasComplexCategories() && bComplexCategoryAllowed;
- aSourceScale.ShiftedCategoryPosition = isCategoryPositionShifted(aSourceScale, bHasComplexCat);
-
- m_aAxisUsageList[xAxis].aAutoScaling = ScaleAutomatism(aSourceScale, rNullDate);
- }
-
- AxisUsage& rAxisUsage = m_aAxisUsageList[xAxis];
- rAxisUsage.addCoordinateSystem(pVCooSys.get(), nDimIndex, nAxisIndex);
- }
- }
- }
-
- // Determine the highest axis index of all dimensions.
- m_nMaxAxisIndex = 0;
- for (const auto & pVCooSys : m_rVCooSysList)
- {
- uno::Reference<XCoordinateSystem> xCooSys = pVCooSys->getModel();
- sal_Int32 nDimCount = xCooSys->getDimension();
-
- for (sal_Int32 nDimIndex = 0; nDimIndex < nDimCount; ++nDimIndex)
- {
- for (auto & axisUsage : m_aAxisUsageList)
- {
- sal_Int32 nLocalMax = axisUsage.second.getMaxAxisIndexForDimension(nDimIndex);
- if (m_nMaxAxisIndex < nLocalMax)
- m_nMaxAxisIndex = nLocalMax;
- }
- }
- }
-}
-
-void SeriesPlotterContainer::setScalesFromCooSysToPlotter()
-{
- //set scales to plotter to enable them to provide the preferred scene AspectRatio
- for( const std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList )
- {
- VSeriesPlotter* pSeriesPlotter = aPlotter.get();
- VCoordinateSystem* pVCooSys = lcl_getCooSysForPlotter( m_rVCooSysList, pSeriesPlotter );
- if(pVCooSys)
- {
- pSeriesPlotter->setScales( pVCooSys->getExplicitScales(0,0), pVCooSys->getPropertySwapXAndYAxis() );
- sal_Int32 nMaxAxisIndex = pVCooSys->getMaximumAxisIndexByDimension(1);//only additional value axis are relevant for series plotter
- for( sal_Int32 nI=1; nI<=nMaxAxisIndex; nI++ )
- pSeriesPlotter->addSecondaryValueScale( pVCooSys->getExplicitScale(1,nI), nI );
- }
- }
-}
-
-void SeriesPlotterContainer::setNumberFormatsFromAxes()
-{
- //set numberformats to plotter to enable them to display the data labels in the numberformat of the axis
- for( const std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList )
- {
- VSeriesPlotter* pSeriesPlotter = aPlotter.get();
- VCoordinateSystem* pVCooSys = lcl_getCooSysForPlotter( m_rVCooSysList, pSeriesPlotter );
- if(pVCooSys)
- {
- AxesNumberFormats aAxesNumberFormats;
- const uno::Reference< XCoordinateSystem >& xCooSys = pVCooSys->getModel();
- sal_Int32 nDimensionCount = xCooSys->getDimension();
- for(sal_Int32 nDimensionIndex=0; nDimensionIndex<nDimensionCount; ++nDimensionIndex)
- {
- const sal_Int32 nMaximumAxisIndex = xCooSys->getMaximumAxisIndexByDimension(nDimensionIndex);
- for(sal_Int32 nAxisIndex=0; nAxisIndex<=nMaximumAxisIndex; ++nAxisIndex)
- {
- try
- {
- Reference< beans::XPropertySet > xAxisProp( xCooSys->getAxisByDimension( nDimensionIndex, nAxisIndex ), uno::UNO_QUERY );
- if( xAxisProp.is())
- {
- sal_Int32 nNumberFormatKey(0);
- if( xAxisProp->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormatKey )
- {
- aAxesNumberFormats.setFormat( nNumberFormatKey, nDimensionIndex, nAxisIndex );
- }
- else if( nDimensionIndex==0 )
- {
- //provide a default date format for date axis with own data
- aAxesNumberFormats.setFormat( m_nDefaultDateNumberFormat, nDimensionIndex, nAxisIndex );
- }
- }
- }
- catch( const lang::IndexOutOfBoundsException& )
- {
- TOOLS_WARN_EXCEPTION("chart2", "" );
- }
- }
- }
- }
- }
-}
-
-void SeriesPlotterContainer::updateScalesAndIncrementsOnAxes()
-{
- for(auto & nC : m_rVCooSysList)
- nC->updateScalesAndIncrementsOnAxes();
-}
-
-void SeriesPlotterContainer::doAutoScaling( ChartModel& rChartModel )
-{
- if (m_aSeriesPlotterList.empty() || m_aAxisUsageList.empty())
- // We need these two containers populated to do auto-scaling. Bail out.
- return;
-
- //iterate over the main scales first than secondary axis
- for (sal_Int32 nAxisIndex = 0; nAxisIndex <= m_nMaxAxisIndex; ++nAxisIndex)
- {
- // - first do autoscale for all x and z scales (because they are treated independent)
- for (auto & axisUsage : m_aAxisUsageList)
- {
- AxisUsage& rAxisUsage = axisUsage.second;
-
- rAxisUsage.prepareAutomaticAxisScaling(rAxisUsage.aAutoScaling, 0, nAxisIndex);
- rAxisUsage.prepareAutomaticAxisScaling(rAxisUsage.aAutoScaling, 2, nAxisIndex);
-
- ExplicitScaleData aExplicitScale;
- ExplicitIncrementData aExplicitIncrement;
- rAxisUsage.aAutoScaling.calculateExplicitScaleAndIncrement( aExplicitScale, aExplicitIncrement );
-
- rAxisUsage.setExplicitScaleAndIncrement(0, nAxisIndex, aExplicitScale, aExplicitIncrement);
- rAxisUsage.setExplicitScaleAndIncrement(2, nAxisIndex, aExplicitScale, aExplicitIncrement);
- }
-
- // - second do autoscale for the dependent y scales (the coordinate systems are prepared with x and z scales already )
- for (auto & axisUsage : m_aAxisUsageList)
- {
- AxisUsage& rAxisUsage = axisUsage.second;
-
- rAxisUsage.prepareAutomaticAxisScaling(rAxisUsage.aAutoScaling, 1, nAxisIndex);
-
- ExplicitScaleData aExplicitScale;
- ExplicitIncrementData aExplicitIncrement;
- rAxisUsage.aAutoScaling.calculateExplicitScaleAndIncrement( aExplicitScale, aExplicitIncrement );
-
- rAxisUsage.setExplicitScaleAndIncrement(0, nAxisIndex, aExplicitScale, aExplicitIncrement);
- rAxisUsage.setExplicitScaleAndIncrement(1, nAxisIndex, aExplicitScale, aExplicitIncrement);
- rAxisUsage.setExplicitScaleAndIncrement(2, nAxisIndex, aExplicitScale, aExplicitIncrement);
- }
- }
- AdaptScaleOfYAxisWithoutAttachedSeries( rChartModel );
-}
-
-void SeriesPlotterContainer::AdaptScaleOfYAxisWithoutAttachedSeries( ChartModel& rModel )
-{
- //issue #i80518#
- for( sal_Int32 nAxisIndex=0; nAxisIndex<=m_nMaxAxisIndex; nAxisIndex++ )
- {
- for (auto & axisUsage : m_aAxisUsageList)
- {
- AxisUsage& rAxisUsage = axisUsage.second;
- std::vector< VCoordinateSystem* > aVCooSysList_Y = rAxisUsage.getCoordinateSystems( 1, nAxisIndex );
- if( aVCooSysList_Y.empty() )
- continue;
-
- uno::Reference< XDiagram > xDiagram( rModel.getFirstDiagram() );
- if (!xDiagram.is())
- continue;
-
- bool bSeriesAttachedToThisAxis = false;
- sal_Int32 nAttachedAxisIndex = -1;
- {
- std::vector< Reference< XDataSeries > > aSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
- for (auto const& series : aSeriesVector)
- {
- sal_Int32 nCurrentIndex = DataSeriesHelper::getAttachedAxisIndex(series);
- if( nAxisIndex == nCurrentIndex )
- {
- bSeriesAttachedToThisAxis = true;
- break;
- }
- else if( nAttachedAxisIndex<0 || nAttachedAxisIndex>nCurrentIndex )
- nAttachedAxisIndex=nCurrentIndex;
- }
- }
-
- if (bSeriesAttachedToThisAxis || nAttachedAxisIndex < 0)
- continue;
-
- for(VCoordinateSystem* nC : aVCooSysList_Y)
- {
- nC->prepareAutomaticAxisScaling( rAxisUsage.aAutoScaling, 1, nAttachedAxisIndex );
-
- ExplicitScaleData aExplicitScaleSource = nC->getExplicitScale( 1,nAttachedAxisIndex );
- ExplicitIncrementData aExplicitIncrementSource = nC->getExplicitIncrement( 1,nAttachedAxisIndex );
-
- ExplicitScaleData aExplicitScaleDest = nC->getExplicitScale( 1,nAxisIndex );
- ExplicitIncrementData aExplicitIncrementDest = nC->getExplicitIncrement( 1,nAxisIndex );
-
- aExplicitScaleDest.Orientation = aExplicitScaleSource.Orientation;
- aExplicitScaleDest.Scaling = aExplicitScaleSource.Scaling;
- aExplicitScaleDest.AxisType = aExplicitScaleSource.AxisType;
-
- aExplicitIncrementDest.BaseValue = aExplicitIncrementSource.BaseValue;
-
- ScaleData aScale( rAxisUsage.aAutoScaling.getScale() );
- if( !aScale.Minimum.hasValue() )
- {
- bool bNewMinOK = true;
- double fMax=0.0;
- if( aScale.Maximum >>= fMax )
- bNewMinOK = (aExplicitScaleSource.Minimum <= fMax);
- if( bNewMinOK )
- aExplicitScaleDest.Minimum = aExplicitScaleSource.Minimum;
- }
- else
- aExplicitIncrementDest.BaseValue = aExplicitScaleDest.Minimum;
-
- if( !aScale.Maximum.hasValue() )
- {
- bool bNewMaxOK = true;
- double fMin=0.0;
- if( aScale.Minimum >>= fMin )
- bNewMaxOK = (fMin <= aExplicitScaleSource.Maximum);
- if( bNewMaxOK )
- aExplicitScaleDest.Maximum = aExplicitScaleSource.Maximum;
- }
- if( !aScale.Origin.hasValue() )
- aExplicitScaleDest.Origin = aExplicitScaleSource.Origin;
-
- if( !aScale.IncrementData.Distance.hasValue() )
- aExplicitIncrementDest.Distance = aExplicitIncrementSource.Distance;
-
- bool bAutoMinorInterval = true;
- if( aScale.IncrementData.SubIncrements.hasElements() )
- bAutoMinorInterval = !( aScale.IncrementData.SubIncrements[0].IntervalCount.hasValue() );
- if( bAutoMinorInterval )
- {
- if( !aExplicitIncrementDest.SubIncrements.empty() && !aExplicitIncrementSource.SubIncrements.empty() )
- aExplicitIncrementDest.SubIncrements[0].IntervalCount =
- aExplicitIncrementSource.SubIncrements[0].IntervalCount;
- }
-
- nC->setExplicitScaleAndIncrement( 1, nAxisIndex, aExplicitScaleDest, aExplicitIncrementDest );
- }
- }
- }
-
- if( !AxisHelper::isAxisPositioningEnabled() )
- return;
-
- //correct origin for y main axis (the origin is where the other main axis crosses)
- sal_Int32 nAxisIndex=0;
- sal_Int32 nDimensionIndex=1;
- for (auto & axisUsage : m_aAxisUsageList)
- {
- AxisUsage& rAxisUsage = axisUsage.second;
- std::vector< VCoordinateSystem* > aVCooSysList = rAxisUsage.getCoordinateSystems(nDimensionIndex,nAxisIndex);
- size_t nC;
- for( nC=0; nC < aVCooSysList.size(); nC++)
- {
- ExplicitScaleData aExplicitScale( aVCooSysList[nC]->getExplicitScale( nDimensionIndex, nAxisIndex ) );
- ExplicitIncrementData aExplicitIncrement( aVCooSysList[nC]->getExplicitIncrement( nDimensionIndex, nAxisIndex ) );
-
- Reference< chart2::XCoordinateSystem > xCooSys( aVCooSysList[nC]->getModel() );
- Reference< XAxis > xAxis( xCooSys->getAxisByDimension( nDimensionIndex, nAxisIndex ) );
- Reference< beans::XPropertySet > xCrossingMainAxis( AxisHelper::getCrossingMainAxis( xAxis, xCooSys ), uno::UNO_QUERY );
-
- if( xCrossingMainAxis.is() )
- {
- css::chart::ChartAxisPosition eCrossingMainAxisPos( css::chart::ChartAxisPosition_ZERO );
- xCrossingMainAxis->getPropertyValue("CrossoverPosition") >>= eCrossingMainAxisPos;
- if( eCrossingMainAxisPos == css::chart::ChartAxisPosition_VALUE )
- {
- double fValue = 0.0;
- xCrossingMainAxis->getPropertyValue("CrossoverValue") >>= fValue;
- aExplicitScale.Origin = fValue;
- }
- else if( eCrossingMainAxisPos == css::chart::ChartAxisPosition_ZERO )
- aExplicitScale.Origin = 0.0;
- else if( eCrossingMainAxisPos == css::chart::ChartAxisPosition_START )
- aExplicitScale.Origin = aExplicitScale.Minimum;
- else if( eCrossingMainAxisPos == css::chart::ChartAxisPosition_END )
- aExplicitScale.Origin = aExplicitScale.Maximum;
- }
-
- aVCooSysList[nC]->setExplicitScaleAndIncrement( nDimensionIndex, nAxisIndex, aExplicitScale, aExplicitIncrement );
- }
- }
-}
-
-drawing::Direction3D SeriesPlotterContainer::getPreferredAspectRatio()
-{
- drawing::Direction3D aPreferredAspectRatio(1.0,1.0,1.0);
-
- //get a list of all preferred aspect ratios and combine them
- //first with special demands wins (less or equal zero <-> arbitrary)
- double fx, fy, fz;
- fx = fy = fz = -1.0;
- for( const std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList )
- {
- drawing::Direction3D aSingleRatio( aPlotter->getPreferredDiagramAspectRatio() );
- if( fx<0 && aSingleRatio.DirectionX>0 )
- fx = aSingleRatio.DirectionX;
-
- if( fy<0 && aSingleRatio.DirectionY>0 )
- {
- if( fx>0 && aSingleRatio.DirectionX>0 )
- fy = fx*aSingleRatio.DirectionY/aSingleRatio.DirectionX;
- else if( fz>0 && aSingleRatio.DirectionZ>0 )
- fy = fz*aSingleRatio.DirectionY/aSingleRatio.DirectionZ;
- else
- fy = aSingleRatio.DirectionY;
- }
-
- if( fz<0 && aSingleRatio.DirectionZ>0 )
- {
- if( fx>0 && aSingleRatio.DirectionX>0 )
- fz = fx*aSingleRatio.DirectionZ/aSingleRatio.DirectionX;
- else if( fy>0 && aSingleRatio.DirectionY>0 )
- fz = fy*aSingleRatio.DirectionZ/aSingleRatio.DirectionY;
- else
- fz = aSingleRatio.DirectionZ;
- }
-
- if( fx>0 && fy>0 && fz>0 )
- break;
- }
- aPreferredAspectRatio = drawing::Direction3D(fx, fy, fz);
- return aPreferredAspectRatio;
-}
-
-}
-
struct CreateShapeParam2D
{
css::awt::Rectangle maRemainingSpace;
@@ -1028,18 +156,13 @@ struct CreateShapeParam2D
mbUseFixedInnerSize(false) {}
};
-const uno::Sequence<sal_Int8>& ExplicitValueProvider::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit theExplicitValueProviderUnoTunnelId;
- return theExplicitValueProviderUnoTunnelId.getSeq();
-}
+
ChartView::ChartView(
- uno::Reference<uno::XComponentContext> const & xContext,
+ uno::Reference<uno::XComponentContext> xContext,
ChartModel& rModel)
- : m_xCC(xContext)
+ : m_xCC(std::move(xContext))
, mrChartModel(rModel)
- , m_aListenerContainer( m_aMutex )
, m_bViewDirty(true)
, m_bInViewUpdate(false)
, m_bViewUpdatePending(false)
@@ -1101,10 +224,10 @@ void ChartView::impl_deleteCoordinateSystems()
// datatransfer::XTransferable
namespace
{
-constexpr OUStringLiteral lcl_aGDIMetaFileMIMEType(
- u"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" );
-constexpr OUStringLiteral lcl_aGDIMetaFileMIMETypeHighContrast(
- u"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"" );
+constexpr OUString lcl_aGDIMetaFileMIMEType(
+ u"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\""_ustr );
+constexpr OUString lcl_aGDIMetaFileMIMETypeHighContrast(
+ u"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\""_ustr );
} // anonymous namespace
void ChartView::getMetaFile( const uno::Reference< io::XOutputStream >& xOutStream
@@ -1182,12 +305,6 @@ sal_Bool SAL_CALL ChartView::isDataFlavorSupported( const datatransfer::DataFlav
aFlavor.MimeType == lcl_aGDIMetaFileMIMETypeHighContrast );
}
-// ____ XUnoTunnel ___
-::sal_Int64 SAL_CALL ChartView::getSomething( const uno::Sequence< ::sal_Int8 >& aIdentifier )
-{
- return comphelper::getSomethingImpl<ExplicitValueProvider>(aIdentifier, this);
-}
-
// lang::XServiceInfo
OUString SAL_CALL ChartView::getImplementationName()
@@ -1219,19 +336,19 @@ static ::basegfx::B3DHomMatrix createTransformationSceneToScreen(
namespace
{
-bool lcl_IsPieOrDonut( const uno::Reference< XDiagram >& xDiagram )
+bool lcl_IsPieOrDonut( const rtl::Reference< Diagram >& xDiagram )
{
//special treatment for pie charts
//the size is checked after complete creation to get the datalabels into the given space
//todo: this is just a workaround at the moment for pie and donut labels
- return DiagramHelper::isPieOrDonutChart( xDiagram );
+ return xDiagram->isPieOrDonutChart();
}
void lcl_setDefaultWritingMode( const std::shared_ptr< DrawModelWrapper >& pDrawModelWrapper, ChartModel& rModel)
{
//get writing mode from parent document:
- if( !SvtCTLOptions().IsCTLFontEnabled() )
+ if( !SvtCTLOptions::IsCTLFontEnabled() )
return;
try
@@ -1354,7 +471,7 @@ void lcl_setDefaultWritingMode( const std::shared_ptr< DrawModelWrapper >& pDraw
if( nWritingMode != -1 && nWritingMode != text::WritingMode2::PAGE )
{
if( pDrawModelWrapper )
- pDrawModelWrapper->GetItemPool().SetPoolDefaultItem(SvxFrameDirectionItem(static_cast<SvxFrameDirection>(nWritingMode), EE_PARA_WRITINGDIR) );
+ pDrawModelWrapper->GetItemPool().SetUserDefaultItem(SvxFrameDirectionItem(static_cast<SvxFrameDirection>(nWritingMode), EE_PARA_WRITINGDIR) );
}
}
catch( const uno::Exception& )
@@ -1369,7 +486,7 @@ sal_Int16 lcl_getDefaultWritingModeFromPool( const std::shared_ptr<DrawModelWrap
if(!pDrawModelWrapper)
return nWritingMode;
- const SfxPoolItem& rItem = pDrawModelWrapper->GetItemPool().GetDefaultItem(EE_PARA_WRITINGDIR);
+ const SfxPoolItem& rItem = pDrawModelWrapper->GetItemPool().GetUserOrPoolDefaultItem(EE_PARA_WRITINGDIR);
nWritingMode
= static_cast<sal_Int16>(static_cast<const SvxFrameDirectionItem&>(rItem).GetValue());
return nWritingMode;
@@ -1382,11 +499,11 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
//return the used rectangle
awt::Rectangle aUsedOuterRect(rParam.maRemainingSpace.X, rParam.maRemainingSpace.Y, 0, 0);
- uno::Reference< XDiagram > xDiagram( mrChartModel.getFirstDiagram() );
+ rtl::Reference< Diagram > xDiagram( mrChartModel.getFirstChartDiagram() );
if( !xDiagram.is())
return aUsedOuterRect;
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
+ sal_Int32 nDimensionCount = xDiagram->getDimension();
if(!nDimensionCount)
{
//@todo handle mixed dimension
@@ -1396,26 +513,23 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
basegfx::B2IRectangle aAvailableOuterRect = BaseGFXHelper::makeRectangle(rParam.maRemainingSpace);
const std::vector< std::unique_ptr<VCoordinateSystem> >& rVCooSysList( rParam.mpSeriesPlotterContainer->getCooSysList() );
- SeriesPlottersType& rSeriesPlotterList = rParam.mpSeriesPlotterContainer->getSeriesPlotterList();
+ auto& rSeriesPlotterList = rParam.mpSeriesPlotterContainer->getSeriesPlotterList();
//create VAxis, so they can give necessary information for automatic scaling
- uno::Reference<chart2::XChartDocument> const xChartDoc(&mrChartModel);
uno::Reference<util::XNumberFormatsSupplier> const xNumberFormatsSupplier(
mrChartModel.getNumberFormatsSupplier());
- size_t nC = 0;
- for( nC=0; nC < rVCooSysList.size(); nC++)
+
+ for (auto& rpVCooSys : rVCooSysList)
{
- VCoordinateSystem* pVCooSys = rVCooSysList[nC].get();
- if(nDimensionCount==3)
+ if (nDimensionCount == 3)
{
- uno::Reference<beans::XPropertySet> xSceneProperties( xDiagram, uno::UNO_QUERY );
- CuboidPlanePosition eLeftWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardLeftWall( xSceneProperties ) );
- CuboidPlanePosition eBackWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBackWall( xSceneProperties ) );
- CuboidPlanePosition eBottomPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBottom( xSceneProperties ) );
- pVCooSys->set3DWallPositions( eLeftWallPos, eBackWallPos, eBottomPos );
+ CuboidPlanePosition eLeftWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardLeftWall( xDiagram ) );
+ CuboidPlanePosition eBackWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBackWall( xDiagram ) );
+ CuboidPlanePosition eBottomPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBottom( xDiagram ) );
+ rpVCooSys->set3DWallPositions( eLeftWallPos, eBackWallPos, eBottomPos );
}
-
- pVCooSys->createVAxisList(xChartDoc, rPageSize, rParam.maRemainingSpace, rParam.mbUseFixedInnerSize);
+ rpVCooSys->createVAxisList(&mrChartModel, rPageSize, rParam.maRemainingSpace,
+ rParam.mbUseFixedInnerSize, rSeriesPlotterList, getComponentContext());
}
// - prepare list of all axis and how they are used
@@ -1452,15 +566,14 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
// - create axis and grids for all coordinate systems
//init all coordinate systems
- for( nC=0; nC < rVCooSysList.size(); nC++)
+ for (auto& rpVCooSys : rVCooSysList)
{
- VCoordinateSystem* pVCooSys = rVCooSysList[nC].get();
- pVCooSys->initPlottingTargets(xSeriesTargetInFrontOfAxis,xTextTargetShapes,xSeriesTargetBehindAxis);
+ rpVCooSys->initPlottingTargets(xSeriesTargetInFrontOfAxis, xTextTargetShapes, xSeriesTargetBehindAxis);
- pVCooSys->setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix(
+ rpVCooSys->setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix(
createTransformationSceneToScreen( aVDiagram.getCurrentRectangle() ) ));
- pVCooSys->initVAxisInList();
+ rpVCooSys->initVAxisInList();
}
//calculate resulting size respecting axis label layout and fontscaling
@@ -1498,7 +611,9 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
|| aConsumedOuterRect.getMaxX() < aAvailableOuterRect.getMaxX()
|| aConsumedOuterRect.getMinY() > aAvailableOuterRect.getMinY()
|| aConsumedOuterRect.getMinY() < aAvailableOuterRect.getMaxY() )
+ {
bLessSpaceConsumedThanExpected = true;
+ }
}
if (bLessSpaceConsumedThanExpected && !rParam.mbUseFixedInnerSize)
@@ -1506,20 +621,28 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
aVDiagram.adjustInnerSize( aConsumedOuterRect );
pVCooSys->setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix(
createTransformationSceneToScreen( aVDiagram.getCurrentRectangle() ) ));
+
+ // Need to re-adjust again if the labels have changed height because of
+ // text can break. Ideally this shouldn't be needed, but the chart height
+ // isn't readjusted otherwise.
+ pVCooSys->createAxesLabels();
+ aConsumedOuterRect = ShapeFactory::getRectangleOfShape(*xBoundingShape);
+ aVDiagram.adjustInnerSize(aConsumedOuterRect);
+ pVCooSys->setTransformationSceneToScreen(B3DHomMatrixToHomogenMatrix(
+ createTransformationSceneToScreen(aVDiagram.getCurrentRectangle())));
+
}
pVCooSys->updatePositions();//todo: logically this belongs to the condition above, but it seems also to be necessary to give the axes group shapes the right bounding rects for hit test - probably caused by bug i106183 -> check again if fixed
}
//create axes and grids for the final size
- for( nC=0; nC < rVCooSysList.size(); nC++)
+ for (auto& rpVCooSys : rVCooSysList)
{
- VCoordinateSystem* pVCooSys = rVCooSysList[nC].get();
-
- pVCooSys->setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix(
+ rpVCooSys->setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix(
createTransformationSceneToScreen( aVDiagram.getCurrentRectangle() ) ));
- pVCooSys->createAxesShapes();
- pVCooSys->createGridShapes();
+ rpVCooSys->createAxesShapes();
+ rpVCooSys->createGridShapes();
}
// - create data series for all charttypes
@@ -1537,7 +660,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
}
pSeriesPlotter->initPlotter( xSeriesTarget,xTextTargetShapes,OUString() );
pSeriesPlotter->setPageReferenceSize( rPageSize );
- VCoordinateSystem* pVCooSys = lcl_getCooSysForPlotter( rVCooSysList, pSeriesPlotter );
+ VCoordinateSystem* pVCooSys = SeriesPlotterContainer::getCooSysForPlotter( rVCooSysList, pSeriesPlotter );
if(nDimensionCount==2)
pSeriesPlotter->setTransformationSceneToScreen( pVCooSys->getTransformationSceneToScreen() );
//better performance for big data
@@ -1578,17 +701,16 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
ShapeFactory::removeSubShapes( xTextTargetShapes );
//set new transformation
- for( nC=0; nC < rVCooSysList.size(); nC++)
+ for (auto& rpVCooSys : rVCooSysList)
{
- VCoordinateSystem* pVCooSys = rVCooSysList[nC].get();
- pVCooSys->setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix(
- createTransformationSceneToScreen( aNewInnerRect ) ));
+ auto aMatrix = createTransformationSceneToScreen(aNewInnerRect);
+ rpVCooSys->setTransformationSceneToScreen(B3DHomMatrixToHomogenMatrix(aMatrix));
}
// - create data series for all charttypes
for( std::unique_ptr<VSeriesPlotter>& aPlotter : rSeriesPlotterList )
{
- VCoordinateSystem* pVCooSys = lcl_getCooSysForPlotter( rVCooSysList, aPlotter.get() );
+ VCoordinateSystem* pVCooSys = SeriesPlotterContainer::getCooSysForPlotter( rVCooSysList, aPlotter.get() );
if(nDimensionCount==2)
aPlotter->setTransformationSceneToScreen( pVCooSys->getTransformationSceneToScreen() );
// Now we can move data labels in case of pie or donut chart!
@@ -1622,7 +744,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
else
{
::basegfx::B2IRectangle aConsumedInnerRect = aVDiagram.getCurrentRectangle();
- m_aResultingDiagramRectangleExcludingAxes = awt::Rectangle( aConsumedInnerRect.getMinX(), aConsumedInnerRect.getMinY(), aConsumedInnerRect.getWidth(), aConsumedInnerRect.getHeight() );
+ m_aResultingDiagramRectangleExcludingAxes = BaseGFXHelper::toAwtRectangle(aConsumedInnerRect);
}
}
else
@@ -1632,7 +754,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
else
{
::basegfx::B2IRectangle aConsumedInnerRect = aVDiagram.getCurrentRectangle();
- m_aResultingDiagramRectangleExcludingAxes = awt::Rectangle( aConsumedInnerRect.getMinX(), aConsumedInnerRect.getMinY(), aConsumedInnerRect.getWidth(), aConsumedInnerRect.getHeight() );
+ m_aResultingDiagramRectangleExcludingAxes = BaseGFXHelper::toAwtRectangle(aConsumedInnerRect);
}
}
@@ -1642,8 +764,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
awt::Size aSize(rParam.maRemainingSpace.Width, rParam.maRemainingSpace.Height);
bool bPosSizeExcludeAxesProperty = true;
- uno::Reference< beans::XPropertySet > xDiaProps( xDiagram, uno::UNO_QUERY_THROW );
- xDiaProps->getPropertyValue("PosSizeExcludeAxes") >>= bPosSizeExcludeAxesProperty;
+ xDiagram->getPropertyValue("PosSizeExcludeAxes") >>= bPosSizeExcludeAxesProperty;
if (rParam.mbUseFixedInnerSize || bPosSizeExcludeAxesProperty)
{
aPos = awt::Point( m_aResultingDiagramRectangleExcludingAxes.X, m_aResultingDiagramRectangleExcludingAxes.Y );
@@ -1657,7 +778,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
}
bool ChartView::getExplicitValuesForAxis(
- uno::Reference< XAxis > xAxis
+ rtl::Reference< Axis > xAxis
, ExplicitScaleData& rExplicitScale
, ExplicitIncrementData& rExplicitIncrement )
{
@@ -1668,8 +789,8 @@ bool ChartView::getExplicitValuesForAxis(
if(!xAxis.is())
return false;
- rtl::Reference< BaseCoordinateSystem > xCooSys = AxisHelper::getCoordinateSystemOfAxis(xAxis, mrChartModel.getFirstDiagram() );
- const VCoordinateSystem* pVCooSys = findInCooSysList(m_aVCooSysList,xCooSys);
+ rtl::Reference< BaseCoordinateSystem > xCooSys = AxisHelper::getCoordinateSystemOfAxis(xAxis, mrChartModel.getFirstChartDiagram() );
+ const VCoordinateSystem* pVCooSys = SeriesPlotterContainer::findInCooSysList(m_aVCooSysList, xCooSys);
if(!pVCooSys)
return false;
@@ -1717,13 +838,17 @@ SdrPage* ChartView::getSdrPage()
return nullptr;
}
-uno::Reference< drawing::XShape > ChartView::getShapeForCID( const OUString& rObjectCID )
+rtl::Reference< SvxShape > ChartView::getShapeForCID( const OUString& rObjectCID )
{
SolarMutexGuard aSolarGuard;
SdrObject* pObj = DrawModelWrapper::getNamedSdrObject( rObjectCID, this->getSdrPage() );
- if( pObj )
- return uno::Reference< drawing::XShape >( pObj->getUnoShape(), uno::UNO_QUERY);
- return nullptr;
+ if( !pObj )
+ return nullptr;
+
+ uno::Reference< drawing::XShape > xShape = pObj->getUnoShape();
+ rtl::Reference<SvxShape> xShape2 = dynamic_cast<SvxShape*>(xShape.get());
+ assert(xShape2 || !xShape);
+ return xShape2;
}
awt::Rectangle ChartView::getDiagramRectangleExcludingAxes()
@@ -1737,7 +862,7 @@ awt::Rectangle ChartView::getRectangleOfObject( const OUString& rObjectCID, bool
impl_updateView();
awt::Rectangle aRet;
- uno::Reference< drawing::XShape > xShape( getShapeForCID(rObjectCID) );
+ rtl::Reference< SvxShape > xShape = getShapeForCID(rObjectCID);
if(xShape.is())
{
//special handling for axis for old api:
@@ -1746,7 +871,7 @@ awt::Rectangle ChartView::getRectangleOfObject( const OUString& rObjectCID, bool
if( eObjectType == OBJECTTYPE_AXIS || eObjectType == OBJECTTYPE_DIAGRAM )
{
SolarMutexGuard aSolarGuard;
- SdrObject* pRootSdrObject = SdrObject::getSdrObjectFromXShape( xShape );
+ SdrObject* pRootSdrObject = xShape->GetSdrObject();
if( pRootSdrObject )
{
SdrObjList* pRootList = pRootSdrObject->GetSubList();
@@ -1757,7 +882,10 @@ awt::Rectangle ChartView::getRectangleOfObject( const OUString& rObjectCID, bool
aShapeName = "PlotAreaIncludingAxes";
SdrObject* pShape = DrawModelWrapper::getNamedSdrObject( aShapeName, pRootList );
if( pShape )
- xShape.set( pShape->getUnoShape(), uno::UNO_QUERY);
+ {
+ xShape = dynamic_cast<SvxShape*>(pShape->getUnoShape().get());
+ assert(xShape);
+ }
}
}
}
@@ -1768,7 +896,7 @@ awt::Rectangle ChartView::getRectangleOfObject( const OUString& rObjectCID, bool
if( bSnapRect )
{
//for rotated objects the shape size and position differs from the visible rectangle
- SdrObject* pSdrObject = SdrObject::getSdrObjectFromXShape( xShape );
+ SdrObject* pSdrObject = xShape->GetSdrObject();
if( pSdrObject )
{
tools::Rectangle aSnapRect( pSdrObject->GetSnapRect() );
@@ -1786,168 +914,31 @@ std::shared_ptr< DrawModelWrapper > ChartView::getDrawModelWrapper()
namespace
{
-sal_Int32 lcl_getDiagramTitleSpace()
-{
- return 200; //=0,2 cm spacing
-}
-bool lcl_getPropertySwapXAndYAxis( const rtl::Reference< Diagram >& xDiagram )
-{
- bool bSwapXAndY = false;
- if( xDiagram.is() )
- {
- const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysList( xDiagram->getBaseCoordinateSystems() );
- if( !aCooSysList.empty() )
- {
- try
- {
- aCooSysList[0]->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXAndY;
- }
- catch( const uno::Exception& )
- {
- TOOLS_WARN_EXCEPTION("chart2", "" );
- }
- }
- }
- return bSwapXAndY;
-}
+constexpr double constPageLayoutDistancePercentage = 0.02;
+constexpr sal_Int32 constPageLayoutFixedDistance = 350;
-}
-
-sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
- const Reference< chart2::XAxis >& xAxis
- , const Reference< chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
- , const Reference<chart2::XChartDocument>& xChartDoc)
-{
- return AxisHelper::getExplicitNumberFormatKeyForAxis( xAxis, xCorrespondingCoordinateSystem, xChartDoc
- , true /*bSearchForParallelAxisIfNothingIsFound*/ );
-}
-
-sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel( const uno::Reference< beans::XPropertySet >& xSeriesOrPointProp )
+bool getAvailablePosAndSizeForDiagram(
+ CreateShapeParam2D& rParam, const awt::Size & rPageSize, rtl::Reference<Diagram> const& xDiagram)
{
- sal_Int32 nFormat=0;
- if( !xSeriesOrPointProp.is() )
- return nFormat;
+ uno::Reference<beans::XPropertySet> const& xProp(xDiagram);
+ rParam.mbUseFixedInnerSize = false;
- try
- {
- xSeriesOrPointProp->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nFormat;
- }
- catch (const beans::UnknownPropertyException&) {}
+ //@todo: we need a size dependent on the axis labels
+ rtl::Reference<ChartType> xChartType;
+ if (xDiagram)
+ xChartType = xDiagram->getChartTypeByIndex(0);
- if(nFormat<0)
- nFormat=0;
- return nFormat;
-}
+ sal_Int32 nXDistance = sal_Int32(rPageSize.Width * constPageLayoutDistancePercentage);
+ sal_Int32 nYDistance = sal_Int32(rPageSize.Height * constPageLayoutDistancePercentage);
-sal_Int32 ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabel(
- const uno::Reference< beans::XPropertySet >& xSeriesOrPointProp,
- const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier )
-{
- sal_Int32 nFormat=0;
- if( !xSeriesOrPointProp.is() )
- return nFormat;
- if( !(xSeriesOrPointProp->getPropertyValue("PercentageNumberFormat") >>= nFormat) )
+ // Only pie chart uses fixed size margins
+ if (xChartType.is() && xChartType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_PIE)
{
- nFormat = DiagramHelper::getPercentNumberFormat( xNumberFormatsSupplier );
+ nXDistance = constPageLayoutFixedDistance;
+ nYDistance = constPageLayoutFixedDistance;
}
- if(nFormat<0)
- nFormat=0;
- return nFormat;
-}
-
-awt::Rectangle ExplicitValueProvider::AddSubtractAxisTitleSizes(
- ChartModel& rModel
- , ExplicitValueProvider* pChartView
- , const awt::Rectangle& rPositionAndSize, bool bSubtract )
-{
- awt::Rectangle aRet(rPositionAndSize);
-
- //add axis title sizes to the diagram size
- uno::Reference< chart2::XTitle > xTitle_Height( TitleHelper::getTitle( TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION, rModel ) );
- uno::Reference< chart2::XTitle > xTitle_Width( TitleHelper::getTitle( TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION, rModel ) );
- uno::Reference< chart2::XTitle > xSecondTitle_Height( TitleHelper::getTitle( TitleHelper::SECONDARY_X_AXIS_TITLE, rModel ) );
- uno::Reference< chart2::XTitle > xSecondTitle_Width( TitleHelper::getTitle( TitleHelper::SECONDARY_Y_AXIS_TITLE, rModel ) );
- if( xTitle_Height.is() || xTitle_Width.is() || xSecondTitle_Height.is() || xSecondTitle_Width.is() )
- {
- ExplicitValueProvider* pExplicitValueProvider = pChartView;
- if( pExplicitValueProvider )
- {
- //detect whether x axis points into x direction or not
- if( lcl_getPropertySwapXAndYAxis( rModel.getFirstChartDiagram() ) )
- {
- std::swap( xTitle_Height, xTitle_Width );
- std::swap( xSecondTitle_Height, xSecondTitle_Width );
- }
-
- sal_Int32 nTitleSpaceWidth = 0;
- sal_Int32 nTitleSpaceHeight = 0;
- sal_Int32 nSecondTitleSpaceWidth = 0;
- sal_Int32 nSecondTitleSpaceHeight = 0;
- if( xTitle_Height.is() )
- {
- OUString aCID_X( ObjectIdentifier::createClassifiedIdentifierForObject( xTitle_Height, rModel ) );
- nTitleSpaceHeight = pExplicitValueProvider->getRectangleOfObject( aCID_X, true ).Height;
- if( nTitleSpaceHeight )
- nTitleSpaceHeight+=lcl_getDiagramTitleSpace();
- }
- if( xTitle_Width.is() )
- {
- OUString aCID_Y( ObjectIdentifier::createClassifiedIdentifierForObject( xTitle_Width, rModel ) );
- nTitleSpaceWidth = pExplicitValueProvider->getRectangleOfObject( aCID_Y, true ).Width;
- if(nTitleSpaceWidth)
- nTitleSpaceWidth+=lcl_getDiagramTitleSpace();
- }
- if( xSecondTitle_Height.is() )
- {
- OUString aCID_X( ObjectIdentifier::createClassifiedIdentifierForObject( xSecondTitle_Height, rModel ) );
- nSecondTitleSpaceHeight = pExplicitValueProvider->getRectangleOfObject( aCID_X, true ).Height;
- if( nSecondTitleSpaceHeight )
- nSecondTitleSpaceHeight+=lcl_getDiagramTitleSpace();
- }
- if( xSecondTitle_Width.is() )
- {
- OUString aCID_Y( ObjectIdentifier::createClassifiedIdentifierForObject( xSecondTitle_Width, rModel ) );
- nSecondTitleSpaceWidth += pExplicitValueProvider->getRectangleOfObject( aCID_Y, true ).Width;
- if( nSecondTitleSpaceWidth )
- nSecondTitleSpaceWidth+=lcl_getDiagramTitleSpace();
- }
- if( bSubtract )
- {
- aRet.X += nTitleSpaceWidth;
- aRet.Y += nSecondTitleSpaceHeight;
- aRet.Width -= (nTitleSpaceWidth + nSecondTitleSpaceWidth);
- aRet.Height -= (nTitleSpaceHeight + nSecondTitleSpaceHeight);
- }
- else
- {
-
- aRet.X -= nTitleSpaceWidth;
- aRet.Y -= nSecondTitleSpaceHeight;
- aRet.Width += nTitleSpaceWidth + nSecondTitleSpaceWidth;
- aRet.Height += nTitleSpaceHeight + nSecondTitleSpaceHeight;
- }
- }
- }
- return aRet;
-}
-
-namespace {
-
-double lcl_getPageLayoutDistancePercentage()
-{
- return 0.02;
-}
-
-bool getAvailablePosAndSizeForDiagram(
- CreateShapeParam2D& rParam, const awt::Size & rPageSize, const uno::Reference< beans::XPropertySet >& xProp)
-{
- rParam.mbUseFixedInnerSize = false;
-
- //@todo: we need a size dependent on the axis labels
- sal_Int32 nYDistance = static_cast<sal_Int32>(rPageSize.Height*lcl_getPageLayoutDistancePercentage());
- sal_Int32 nXDistance = static_cast<sal_Int32>(rPageSize.Width*lcl_getPageLayoutDistancePercentage());
rParam.maRemainingSpace.X += nXDistance;
rParam.maRemainingSpace.Width -= 2*nXDistance;
rParam.maRemainingSpace.Y += nYDistance;
@@ -2000,7 +991,7 @@ bool getAvailablePosAndSizeForDiagram(
return true;
}
-enum TitleAlignment { ALIGN_LEFT, ALIGN_TOP, ALIGN_RIGHT, ALIGN_BOTTOM, ALIGN_Z };
+enum class TitleAlignment { ALIGN_LEFT, ALIGN_TOP, ALIGN_RIGHT, ALIGN_BOTTOM, ALIGN_Z };
void changePositionOfAxisTitle( VTitle* pVTitle, TitleAlignment eAlignment
, awt::Rectangle const & rDiagramPlusAxesRect, const awt::Size & rPageSize )
@@ -2010,32 +1001,30 @@ void changePositionOfAxisTitle( VTitle* pVTitle, TitleAlignment eAlignment
awt::Point aNewPosition(0,0);
awt::Size aTitleSize = pVTitle->getFinalSize();
- sal_Int32 nYDistance = static_cast<sal_Int32>(rPageSize.Height*lcl_getPageLayoutDistancePercentage());
- sal_Int32 nXDistance = static_cast<sal_Int32>(rPageSize.Width*lcl_getPageLayoutDistancePercentage());
- switch( eAlignment )
+ sal_Int32 nYDistance = static_cast<sal_Int32>(rPageSize.Height * constPageLayoutDistancePercentage);
+ sal_Int32 nXDistance = static_cast<sal_Int32>(rPageSize.Width * constPageLayoutDistancePercentage);
+ switch (eAlignment)
{
- case ALIGN_TOP:
+ case TitleAlignment::ALIGN_TOP:
aNewPosition = awt::Point( rDiagramPlusAxesRect.X + rDiagramPlusAxesRect.Width/2
, rDiagramPlusAxesRect.Y - aTitleSize.Height/2 - nYDistance );
break;
- case ALIGN_BOTTOM:
+ case TitleAlignment::ALIGN_BOTTOM:
aNewPosition = awt::Point( rDiagramPlusAxesRect.X + rDiagramPlusAxesRect.Width/2
, rDiagramPlusAxesRect.Y + rDiagramPlusAxesRect.Height + aTitleSize.Height/2 + nYDistance );
break;
- case ALIGN_LEFT:
+ case TitleAlignment::ALIGN_LEFT:
aNewPosition = awt::Point( rDiagramPlusAxesRect.X - aTitleSize.Width/2 - nXDistance
, rDiagramPlusAxesRect.Y + rDiagramPlusAxesRect.Height/2 );
break;
- case ALIGN_RIGHT:
+ case TitleAlignment::ALIGN_RIGHT:
aNewPosition = awt::Point( rDiagramPlusAxesRect.X + rDiagramPlusAxesRect.Width + aTitleSize.Width/2 + nXDistance
, rDiagramPlusAxesRect.Y + rDiagramPlusAxesRect.Height/2 );
break;
- case ALIGN_Z:
+ case TitleAlignment::ALIGN_Z:
aNewPosition = awt::Point( rDiagramPlusAxesRect.X + rDiagramPlusAxesRect.Width + aTitleSize.Width/2 + nXDistance
, rDiagramPlusAxesRect.Y + rDiagramPlusAxesRect.Height - aTitleSize.Height/2 );
break;
- default:
- break;
}
sal_Int32 nMaxY = rPageSize.Height - aTitleSize.Height/2;
@@ -2065,7 +1054,7 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
std::shared_ptr<VTitle> apVTitle;
// #i109336# Improve auto positioning in chart
- double fPercentage = lcl_getPageLayoutDistancePercentage();
+ double fPercentage = constPageLayoutDistancePercentage;
sal_Int32 nXDistance = static_cast< sal_Int32 >( rPageSize.Width * fPercentage );
sal_Int32 nYDistance = static_cast< sal_Int32 >( rPageSize.Height * fPercentage );
if ( eType == TitleHelper::MAIN_TITLE )
@@ -2081,7 +1070,7 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
nXDistance = 450; // 1/100 mm
}
- uno::Reference< XTitle > xTitle( TitleHelper::getTitle( eType, rModel ) );
+ rtl::Reference< Title > xTitle( TitleHelper::getTitle( eType, rModel ) );
OUString aCompleteString = TitleHelper::getCompleteString(xTitle);
if (aCompleteString.isEmpty() || !VTitle::isVisible(xTitle))
return apVTitle;
@@ -2108,7 +1097,7 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
bYAxisTitle = true;
}
apVTitle = std::make_shared<VTitle>(xTitle);
- OUString aCID = ObjectIdentifier::createClassifiedIdentifierForObject(xTitle, rModel);
+ OUString aCID = ObjectIdentifier::createClassifiedIdentifierForObject(xTitle, &rModel);
apVTitle->init(xPageShapes, aCID);
apVTitle->createShapes(awt::Point(0, 0), rPageSize, aTextMaxWidth, bYAxisTitle);
awt::Size aTitleUnrotatedSize = apVTitle->getUnrotatedSize();
@@ -2118,8 +1107,7 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
rbAutoPosition = true;
awt::Point aNewPosition(0,0);
chart2::RelativePosition aRelativePosition;
- uno::Reference<beans::XPropertySet> xProp(xTitle, uno::UNO_QUERY);
- if (xProp.is() && (xProp->getPropertyValue("RelativePosition") >>= aRelativePosition))
+ if (xTitle.is() && (xTitle->getPropertyValue("RelativePosition") >>= aRelativePosition))
{
rbAutoPosition = false;
@@ -2136,23 +1124,23 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
{
switch( eAlignment )
{
- case ALIGN_TOP:
+ case TitleAlignment::ALIGN_TOP:
aNewPosition = awt::Point( rRemainingSpace.X + rRemainingSpace.Width/2
, rRemainingSpace.Y + aTitleSize.Height/2 + nYDistance );
break;
- case ALIGN_BOTTOM:
+ case TitleAlignment::ALIGN_BOTTOM:
aNewPosition = awt::Point( rRemainingSpace.X + rRemainingSpace.Width/2
, rRemainingSpace.Y + rRemainingSpace.Height - aTitleSize.Height/2 - nYDistance );
break;
- case ALIGN_LEFT:
+ case TitleAlignment::ALIGN_LEFT:
aNewPosition = awt::Point( rRemainingSpace.X + aTitleSize.Width/2 + nXDistance
, rRemainingSpace.Y + rRemainingSpace.Height/2 );
break;
- case ALIGN_RIGHT:
+ case TitleAlignment::ALIGN_RIGHT:
aNewPosition = awt::Point( rRemainingSpace.X + rRemainingSpace.Width - aTitleSize.Width/2 - nXDistance
, rRemainingSpace.Y + rRemainingSpace.Height/2 );
break;
- default:
+ case TitleAlignment::ALIGN_Z:
break;
}
@@ -2162,32 +1150,32 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
//remaining space
switch( eAlignment )
{
- case ALIGN_TOP:
+ case TitleAlignment::ALIGN_TOP:
// Push the remaining space down from top.
rRemainingSpace.Y += ( aTitleSize.Height + nYDistance );
rRemainingSpace.Height -= ( aTitleSize.Height + nYDistance );
break;
- case ALIGN_BOTTOM:
+ case TitleAlignment::ALIGN_BOTTOM:
// Push the remaining space up from bottom.
rRemainingSpace.Height -= ( aTitleSize.Height + nYDistance );
break;
- case ALIGN_LEFT:
+ case TitleAlignment::ALIGN_LEFT:
// Push the remaining space to the right from left edge.
rRemainingSpace.X += ( aTitleSize.Width + nXDistance );
rRemainingSpace.Width -= ( aTitleSize.Width + nXDistance );
break;
- case ALIGN_RIGHT:
+ case TitleAlignment::ALIGN_RIGHT:
// Push the remaining space to the left from right edge.
rRemainingSpace.Width -= ( aTitleSize.Width + nXDistance );
break;
- default:
+ case TitleAlignment::ALIGN_Z:
break;
}
return apVTitle;
}
-bool lcl_createLegend( const uno::Reference< XLegend > & xLegend
+bool lcl_createLegend( const rtl::Reference< Legend > & xLegend
, const rtl::Reference<SvxShapeGroupAnyD>& xPageShapes
, const uno::Reference< uno::XComponentContext > & xContext
, awt::Rectangle & rRemainingSpace
@@ -2311,7 +1299,7 @@ void formatPage(
}
}
-void lcl_removeEmptyGroupShapes( SdrObject& rParent )
+void lcl_removeEmptyGroupShapes( const SdrObject& rParent )
{
SdrObjList* pObjList = rParent.getChildrenOfSdrObject();
if (!pObjList || pObjList->GetObjCount() == 0)
@@ -2327,8 +1315,7 @@ void lcl_removeEmptyGroupShapes( SdrObject& rParent )
if (pChildObjList->GetObjCount() == 0)
{
//remove empty group shape
- SdrObject* pRemoved = pObjList->NbcRemoveObject(nIdx);
- SdrObject::Free( pRemoved );
+ pObjList->NbcRemoveObject(nIdx);
}
else
lcl_removeEmptyGroupShapes(*pChildSdrObject);
@@ -2368,7 +1355,7 @@ void ChartView::createShapes()
{
SolarMutexGuard aSolarGuard;
- osl::MutexGuard aTimedGuard(maTimeMutex);
+ std::unique_lock aTimedGuard(maTimeMutex);
if(mrChartModel.isTimeBased())
{
maTimeBased.bTimeBased = true;
@@ -2393,9 +1380,12 @@ void ChartView::createShapes()
if(!mxRootShape.is())
mxRootShape = ShapeFactory::getOrCreateChartRootShape( m_xDrawPage );
- SdrPage* pPage = ChartView::getSdrPage();
- if(pPage) //it is necessary to use the implementation here as the uno page does not provide a propertyset
+ SdrPage* pPage = getSdrPage();
+
+ if (pPage) //it is necessary to use the implementation here as the uno page does not provide a propertyset
+ {
pPage->SetSize(Size(aPageSize.Width,aPageSize.Height));
+ }
else
{
OSL_FAIL("could not set page size correctly");
@@ -2421,6 +1411,35 @@ void SAL_CALL ChartView::disposing( const lang::EventObject& /* rSource */ )
{
}
+namespace
+{
+// Disables setting the chart's modified state, as well as its parent's (if exists).
+// Painting a chart must not set these states.
+struct ChartModelDisableSetModified
+{
+ ChartModel& mrChartModel;
+ SfxObjectShell* mpParentShell;
+ bool mbWasUnmodified;
+ ChartModelDisableSetModified(ChartModel& rChartModel)
+ : mrChartModel(rChartModel)
+ , mpParentShell(SfxObjectShell::GetShellFromComponent(rChartModel.getParent()))
+ , mbWasUnmodified(!rChartModel.isModified())
+ {
+ if (mpParentShell && mpParentShell->IsEnableSetModified())
+ mpParentShell->EnableSetModified(false);
+ else
+ mpParentShell = nullptr;
+ }
+ ~ChartModelDisableSetModified()
+ {
+ if (mbWasUnmodified && mrChartModel.isModified())
+ mrChartModel.setModified(false);
+ if (mpParentShell)
+ mpParentShell->EnableSetModified(true);
+ }
+};
+}
+
void ChartView::impl_updateView( bool bCheckLockedCtrler )
{
if( !m_pDrawModelWrapper )
@@ -2451,6 +1470,9 @@ void ChartView::impl_updateView( bool bCheckLockedCtrler )
m_pDrawModelWrapper->lockControllers();
}
+ // Rendering the chart must not set its (or its parent) modified status
+ ChartModelDisableSetModified dontSetModified(mrChartModel);
+
//create chart view
{
m_bViewDirty = false;
@@ -2567,16 +1589,11 @@ void ChartView::impl_notifyModeChangeListener( const OUString& rNewMode )
{
try
{
- comphelper::OInterfaceContainerHelper2* pIC = m_aListenerContainer
- .getContainer( cppu::UnoType<util::XModeChangeListener>::get());
- if( pIC )
+ std::unique_lock g(m_aMutex);
+ if( m_aModeChangeListeners.getLength(g) )
{
util::ModeChangeEvent aEvent( static_cast< uno::XWeak* >( this ), rNewMode );
- comphelper::OInterfaceIteratorHelper2 aIt( *pIC );
- while( aIt.hasMoreElements() )
- {
- static_cast< util::XModeChangeListener* >( aIt.next() )->modeChanged( aEvent );
- }
+ m_aModeChangeListeners.notifyEach( g, &css::util::XModeChangeListener::modeChanged, aEvent);
}
}
catch( const uno::Exception& )
@@ -2589,13 +1606,13 @@ void ChartView::impl_notifyModeChangeListener( const OUString& rNewMode )
void SAL_CALL ChartView::addModeChangeListener( const uno::Reference< util::XModeChangeListener >& xListener )
{
- m_aListenerContainer.addInterface(
- cppu::UnoType<util::XModeChangeListener>::get(), xListener );
+ std::unique_lock g(m_aMutex);
+ m_aModeChangeListeners.addInterface(g, xListener );
}
void SAL_CALL ChartView::removeModeChangeListener( const uno::Reference< util::XModeChangeListener >& xListener )
{
- m_aListenerContainer.removeInterface(
- cppu::UnoType<util::XModeChangeListener>::get(), xListener );
+ std::unique_lock g(m_aMutex);
+ m_aModeChangeListeners.removeInterface(g, xListener );
}
void SAL_CALL ChartView::addModeChangeApproveListener( const uno::Reference< util::XModeChangeApproveListener >& /* _rxListener */ )
{
@@ -2664,20 +1681,16 @@ void SAL_CALL ChartView::setPropertyValue( const OUString& rPropertyName
if( ! (rValue >>= aZoomFactors) )
throw lang::IllegalArgumentException( "Property 'ZoomFactors' requires value of type Sequence< PropertyValue >", nullptr, 0 );
- sal_Int32 nFilterArgs = aZoomFactors.getLength();
- const beans::PropertyValue* pDataValues = aZoomFactors.getConstArray();
- while( nFilterArgs-- )
+ for (auto& propval : aZoomFactors)
{
- if ( pDataValues->Name == "ScaleXNumerator" )
- pDataValues->Value >>= m_nScaleXNumerator;
- else if ( pDataValues->Name == "ScaleXDenominator" )
- pDataValues->Value >>= m_nScaleXDenominator;
- else if ( pDataValues->Name == "ScaleYNumerator" )
- pDataValues->Value >>= m_nScaleYNumerator;
- else if ( pDataValues->Name == "ScaleYDenominator" )
- pDataValues->Value >>= m_nScaleYDenominator;
-
- pDataValues++;
+ if (propval.Name == "ScaleXNumerator")
+ propval.Value >>= m_nScaleXNumerator;
+ else if (propval.Name == "ScaleXDenominator")
+ propval.Value >>= m_nScaleXDenominator;
+ else if (propval.Name == "ScaleYNumerator")
+ propval.Value >>= m_nScaleYNumerator;
+ else if (propval.Name == "ScaleYDenominator")
+ propval.Value >>= m_nScaleYDenominator;
}
}
else if( rPropertyName == "SdrViewIsInEditMode" )
@@ -2799,8 +1812,13 @@ uno::Sequence< OUString > ChartView::getAvailableServiceNames()
return aServiceNames;
}
-OUString ChartView::dump()
+OUString ChartView::dump(OUString const & kind)
{
+ if (kind.isEmpty()) {
+ return comphelper::dumpXmlToString([this](auto writer) { return dumpAsXml(writer); });
+ }
+
+ // kind == "shapes":
#if HAVE_FEATURE_DESKTOP
// Used for unit tests and in chartcontroller only, no need to drag in this when cross-compiling
// for non-desktop
@@ -2847,7 +1865,7 @@ void ChartView::dumpAsXml(xmlTextWriterPtr pWriter) const
void ChartView::setViewDirty()
{
- osl::MutexGuard aGuard(maTimeMutex);
+ std::unique_lock aGuard(maTimeMutex);
m_bViewDirty = true;
}
@@ -2870,10 +1888,9 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
aParam.maRemainingSpace.Height = rPageSize.Height;
//create the group shape for diagram and axes first to have title and legends on top of it
- uno::Reference< XDiagram > xDiagram( mrChartModel.getFirstDiagram() );
- uno::Reference< beans::XPropertySet > xProp(xDiagram, uno::UNO_QUERY);
+ rtl::Reference< Diagram > xDiagram( mrChartModel.getFirstChartDiagram() );
bool bHasRelativeSize = false;
- if( xProp.is() && xProp->getPropertyValue("RelativeSize").hasValue() )
+ if( xDiagram.is() && xDiagram->getPropertyValue("RelativeSize").hasValue() )
bHasRelativeSize = true;
OUString aDiagramCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) ) );//todo: other index if more than one diagram is possible
@@ -2897,13 +1914,13 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
lcl_createTitle(
TitleHelper::MAIN_TITLE, mxRootShape, mrChartModel,
- aParam.maRemainingSpace, rPageSize, ALIGN_TOP, bAutoPositionDummy);
+ aParam.maRemainingSpace, rPageSize, TitleAlignment::ALIGN_TOP, bAutoPositionDummy);
if (!bHasRelativeSize && (aParam.maRemainingSpace.Width <= 0 || aParam.maRemainingSpace.Height <= 0))
return;
lcl_createTitle(
TitleHelper::SUB_TITLE, mxRootShape, mrChartModel,
- aParam.maRemainingSpace, rPageSize, ALIGN_TOP, bAutoPositionDummy );
+ aParam.maRemainingSpace, rPageSize, TitleAlignment::ALIGN_TOP, bAutoPositionDummy );
if (!bHasRelativeSize && (aParam.maRemainingSpace.Width <= 0 || aParam.maRemainingSpace.Height <= 0))
return;
@@ -2911,7 +1928,7 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
aParam.mpSeriesPlotterContainer->initializeCooSysAndSeriesPlotter( mrChartModel );
if(maTimeBased.bTimeBased && maTimeBased.nFrame != 0)
{
- SeriesPlottersType& rSeriesPlotter = aParam.mpSeriesPlotterContainer->getSeriesPlotterList();
+ auto& rSeriesPlotter = aParam.mpSeriesPlotterContainer->getSeriesPlotterList();
size_t n = rSeriesPlotter.size();
for(size_t i = 0; i < n; ++i)
{
@@ -2928,7 +1945,7 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
}
lcl_createLegend(
- LegendHelper::getLegend( mrChartModel ), mxRootShape, m_xCC,
+ LegendHelper::getLegend( mrChartModel ), mxRootShape, getComponentContext(),
aParam.maRemainingSpace, rPageSize, mrChartModel, aParam.mpSeriesPlotterContainer->getLegendEntryProviderList(),
lcl_getDefaultWritingModeFromPool( m_pDrawModelWrapper ) );
@@ -2939,9 +1956,9 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
return;
bool bDummy = false;
- bool bIsVertical = DiagramHelper::getVertical(xDiagram, bDummy, bDummy);
+ bool bIsVertical = xDiagram && xDiagram->getVertical(bDummy, bDummy);
- if (getAvailablePosAndSizeForDiagram(aParam, rPageSize, xProp))
+ if (getAvailablePosAndSizeForDiagram(aParam, rPageSize, xDiagram))
{
awt::Rectangle aUsedOuterRect = impl_createDiagramAndContent(aParam, rPageSize);
@@ -2954,15 +1971,15 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
//correct axis title position
awt::Rectangle aDiagramPlusAxesRect( aUsedOuterRect );
if (aParam.mbAutoPosTitleX)
- changePositionOfAxisTitle(aParam.mpVTitleX.get(), ALIGN_BOTTOM, aDiagramPlusAxesRect, rPageSize);
+ changePositionOfAxisTitle(aParam.mpVTitleX.get(), TitleAlignment::ALIGN_BOTTOM, aDiagramPlusAxesRect, rPageSize);
if (aParam.mbAutoPosTitleY)
- changePositionOfAxisTitle(aParam.mpVTitleY.get(), ALIGN_LEFT, aDiagramPlusAxesRect, rPageSize);
+ changePositionOfAxisTitle(aParam.mpVTitleY.get(), TitleAlignment::ALIGN_LEFT, aDiagramPlusAxesRect, rPageSize);
if (aParam.mbAutoPosTitleZ)
- changePositionOfAxisTitle(aParam.mpVTitleZ.get(), ALIGN_Z, aDiagramPlusAxesRect, rPageSize);
+ changePositionOfAxisTitle(aParam.mpVTitleZ.get(), TitleAlignment::ALIGN_Z, aDiagramPlusAxesRect, rPageSize);
if (aParam.mbAutoPosSecondTitleX)
- changePositionOfAxisTitle(aParam.mpVTitleSecondX.get(), bIsVertical? ALIGN_RIGHT : ALIGN_TOP, aDiagramPlusAxesRect, rPageSize);
+ changePositionOfAxisTitle(aParam.mpVTitleSecondX.get(), bIsVertical? TitleAlignment::ALIGN_RIGHT : TitleAlignment::ALIGN_TOP, aDiagramPlusAxesRect, rPageSize);
if (aParam.mbAutoPosSecondTitleY)
- changePositionOfAxisTitle(aParam.mpVTitleSecondY.get(), bIsVertical? ALIGN_TOP : ALIGN_RIGHT, aDiagramPlusAxesRect, rPageSize);
+ changePositionOfAxisTitle(aParam.mpVTitleSecondY.get(), bIsVertical? TitleAlignment::ALIGN_TOP : TitleAlignment::ALIGN_RIGHT, aDiagramPlusAxesRect, rPageSize);
}
//cleanup: remove all empty group shapes to avoid grey border lines:
@@ -2971,7 +1988,7 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
if(maTimeBased.bTimeBased && maTimeBased.nFrame % 60 == 0)
{
// create copy of the data for next frame
- SeriesPlottersType& rSeriesPlotter = aParam.mpSeriesPlotterContainer->getSeriesPlotterList();
+ auto& rSeriesPlotter = aParam.mpSeriesPlotterContainer->getSeriesPlotterList();
size_t n = rSeriesPlotter.size();
maTimeBased.m_aDataSeriesList.clear();
maTimeBased.m_aDataSeriesList.resize(n);
@@ -3000,41 +2017,46 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
bool ChartView::createAxisTitleShapes2D( CreateShapeParam2D& rParam, const css::awt::Size& rPageSize, bool bHasRelativeSize )
{
- uno::Reference<XDiagram> xDiagram = mrChartModel.getFirstDiagram();
+ rtl::Reference<Diagram> xDiagram = mrChartModel.getFirstChartDiagram();
- Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) );
- sal_Int32 nDimension = DiagramHelper::getDimension( xDiagram );
+ rtl::Reference< ChartType > xChartType;
+ sal_Int32 nDimension = 0;
+ if (xDiagram)
+ {
+ xChartType = xDiagram->getChartTypeByIndex( 0 );
+ nDimension = xDiagram->getDimension();
+ }
if( ChartTypeHelper::isSupportingMainAxis( xChartType, nDimension, 0 ) )
rParam.mpVTitleX = lcl_createTitle( TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION, mxRootShape, mrChartModel
- , rParam.maRemainingSpace, rPageSize, ALIGN_BOTTOM, rParam.mbAutoPosTitleX );
+ , rParam.maRemainingSpace, rPageSize, TitleAlignment::ALIGN_BOTTOM, rParam.mbAutoPosTitleX );
if (!bHasRelativeSize && (rParam.maRemainingSpace.Width <= 0 || rParam.maRemainingSpace.Height <= 0))
return false;
if( ChartTypeHelper::isSupportingMainAxis( xChartType, nDimension, 1 ) )
rParam.mpVTitleY = lcl_createTitle( TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION, mxRootShape, mrChartModel
- , rParam.maRemainingSpace, rPageSize, ALIGN_LEFT, rParam.mbAutoPosTitleY );
+ , rParam.maRemainingSpace, rPageSize, TitleAlignment::ALIGN_LEFT, rParam.mbAutoPosTitleY );
if (!bHasRelativeSize && (rParam.maRemainingSpace.Width <= 0 || rParam.maRemainingSpace.Height <= 0))
return false;
if( ChartTypeHelper::isSupportingMainAxis( xChartType, nDimension, 2 ) )
rParam.mpVTitleZ = lcl_createTitle( TitleHelper::Z_AXIS_TITLE, mxRootShape, mrChartModel
- , rParam.maRemainingSpace, rPageSize, ALIGN_RIGHT, rParam.mbAutoPosTitleZ );
+ , rParam.maRemainingSpace, rPageSize, TitleAlignment::ALIGN_RIGHT, rParam.mbAutoPosTitleZ );
if (!bHasRelativeSize && (rParam.maRemainingSpace.Width <= 0 || rParam.maRemainingSpace.Height <= 0))
return false;
bool bDummy = false;
- bool bIsVertical = DiagramHelper::getVertical( xDiagram, bDummy, bDummy );
+ bool bIsVertical = xDiagram && xDiagram->getVertical( bDummy, bDummy );
if( ChartTypeHelper::isSupportingSecondaryAxis( xChartType, nDimension ) )
rParam.mpVTitleSecondX = lcl_createTitle( TitleHelper::SECONDARY_X_AXIS_TITLE, mxRootShape, mrChartModel
- , rParam.maRemainingSpace, rPageSize, bIsVertical? ALIGN_RIGHT : ALIGN_TOP, rParam.mbAutoPosSecondTitleX );
+ , rParam.maRemainingSpace, rPageSize, bIsVertical? TitleAlignment::ALIGN_RIGHT : TitleAlignment::ALIGN_TOP, rParam.mbAutoPosSecondTitleX );
if (!bHasRelativeSize && (rParam.maRemainingSpace.Width <= 0 || rParam.maRemainingSpace.Height <= 0))
return false;
if( ChartTypeHelper::isSupportingSecondaryAxis( xChartType, nDimension ) )
rParam.mpVTitleSecondY = lcl_createTitle( TitleHelper::SECONDARY_Y_AXIS_TITLE, mxRootShape, mrChartModel
- , rParam.maRemainingSpace, rPageSize, bIsVertical? ALIGN_TOP : ALIGN_RIGHT, rParam.mbAutoPosSecondTitleY );
+ , rParam.maRemainingSpace, rPageSize, bIsVertical? TitleAlignment::ALIGN_TOP : TitleAlignment::ALIGN_RIGHT, rParam.mbAutoPosSecondTitleY );
if (!bHasRelativeSize && (rParam.maRemainingSpace.Width <= 0 || rParam.maRemainingSpace.Height <= 0))
return false;
diff --git a/chart2/source/view/main/Clipping.cxx b/chart2/source/view/main/Clipping.cxx
index 7509f53fb28d..713e88c26bd0 100644
--- a/chart2/source/view/main/Clipping.cxx
+++ b/chart2/source/view/main/Clipping.cxx
@@ -21,6 +21,7 @@
#include <CommonConverters.hxx>
#include <BaseGFXHelper.hxx>
+#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <com/sun/star/drawing/Position3D.hpp>
@@ -217,7 +218,7 @@ void lcl_addPointToPoly( std::vector<std::vector<css::drawing::Position3D>>& rPo
}
//make sure that we have enough polygons
- if(nPolygonIndex >= static_cast<sal_Int32>(rPoly.size()) )
+ if(o3tl::make_unsigned(nPolygonIndex) >= rPoly.size() )
{
rPoly.resize(nPolygonIndex+1);
rResultPointCount.resize(nPolygonIndex+1,0);
diff --git a/chart2/source/view/main/DataTableView.cxx b/chart2/source/view/main/DataTableView.cxx
new file mode 100644
index 000000000000..eacd91a6a651
--- /dev/null
+++ b/chart2/source/view/main/DataTableView.cxx
@@ -0,0 +1,559 @@
+/* -*- 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 <DataTableView.hxx>
+#include <VSeriesPlotter.hxx>
+#include <ShapeFactory.hxx>
+#include <ExplicitCategoriesProvider.hxx>
+#include <ChartModel.hxx>
+#include <ObjectIdentifier.hxx>
+
+#include <svx/svdotable.hxx>
+
+#include <com/sun/star/table/BorderLine.hpp>
+#include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/table/TableBorder.hpp>
+#include <com/sun/star/table/BorderLineStyle.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/util/XBroadcaster.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <o3tl/unit_conversion.hxx>
+
+using namespace css;
+
+namespace chart
+{
+namespace
+{
+void setTopCell(uno::Reference<beans::XPropertySet>& xPropertySet)
+{
+ xPropertySet->setPropertyValue("FillColor", uno::Any(Color(0xFFFFFF)));
+ xPropertySet->setPropertyValue("TextVerticalAdjust", uno::Any(drawing::TextVerticalAdjust_TOP));
+ xPropertySet->setPropertyValue("ParaAdjust", uno::Any(style::ParagraphAdjust_CENTER));
+
+ table::BorderLine2 aBorderLine;
+ aBorderLine.LineWidth = 0;
+ aBorderLine.Color = 0x000000;
+
+ xPropertySet->setPropertyValue("TopBorder", uno::Any(aBorderLine));
+ xPropertySet->setPropertyValue("LeftBorder", uno::Any(aBorderLine));
+}
+
+void copyProperty(uno::Reference<beans::XPropertySet>& xOut,
+ uno::Reference<beans::XPropertySet>& xIn, OUString const& sPropertyName)
+{
+ xOut->setPropertyValue(sPropertyName, xIn->getPropertyValue(sPropertyName));
+}
+
+uno::Reference<text::XTextRange> getFirstParagraph(uno::Reference<text::XText> const& xText)
+{
+ uno::Reference<text::XTextRange> xParagraph;
+ uno::Reference<container::XEnumerationAccess> xEnumAccess(xText, uno::UNO_QUERY);
+ if (!xEnumAccess.is())
+ return xParagraph;
+ uno::Reference<container::XEnumeration> xEnumeration(xEnumAccess->createEnumeration());
+ xParagraph.set(xEnumeration->nextElement(), uno::UNO_QUERY);
+ return xParagraph;
+}
+
+uno::Reference<beans::XPropertySet>
+getFirstParagraphProperties(uno::Reference<text::XText> const& xText)
+{
+ uno::Reference<beans::XPropertySet> xPropertySet;
+ auto xParagraph = getFirstParagraph(xText);
+ if (!xParagraph.is())
+ return xPropertySet;
+ xPropertySet.set(xParagraph, uno::UNO_QUERY);
+ return xPropertySet;
+}
+
+} // end anonymous namespace
+
+DataTableView::DataTableView(
+ rtl::Reference<::chart::ChartModel> const& xChartModel,
+ rtl::Reference<DataTable> const& rDataTableModel,
+ css::uno::Reference<css::uno::XComponentContext> const& rComponentContext,
+ bool bAlignAxisValuesWithColumns)
+ : m_xChartModel(xChartModel)
+ , m_xDataTableModel(rDataTableModel)
+ , m_xComponentContext(rComponentContext)
+ , m_bAlignAxisValuesWithColumns(bAlignAxisValuesWithColumns)
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(m_xDataTableModel);
+ m_aLineProperties.initFromPropertySet(xPropertySet);
+}
+
+void DataTableView::setCellCharAndParagraphProperties(
+ uno::Reference<beans::XPropertySet>& xPropertySet)
+{
+ uno::Reference<beans::XPropertySet> xDataTableProperties(m_xDataTableModel);
+
+ copyProperty(xPropertySet, xDataTableProperties, "CharColor");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontFamily");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontFamilyAsian");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontFamilyComplex");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontCharSet");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontCharSetAsian");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontCharSetComplex");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontName");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontNameAsian");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontNameComplex");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontPitch");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontPitchAsian");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontPitchComplex");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontStyleName");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontStyleNameAsian");
+ copyProperty(xPropertySet, xDataTableProperties, "CharFontStyleNameComplex");
+
+ copyProperty(xPropertySet, xDataTableProperties, "CharHeight");
+ copyProperty(xPropertySet, xDataTableProperties, "CharHeightAsian");
+ copyProperty(xPropertySet, xDataTableProperties, "CharHeightComplex");
+ copyProperty(xPropertySet, xDataTableProperties, "CharKerning");
+ copyProperty(xPropertySet, xDataTableProperties, "CharLocale");
+ copyProperty(xPropertySet, xDataTableProperties, "CharLocaleAsian");
+ copyProperty(xPropertySet, xDataTableProperties, "CharLocaleComplex");
+ copyProperty(xPropertySet, xDataTableProperties, "CharPosture");
+ copyProperty(xPropertySet, xDataTableProperties, "CharPostureAsian");
+ copyProperty(xPropertySet, xDataTableProperties, "CharPostureComplex");
+ copyProperty(xPropertySet, xDataTableProperties, "CharRelief");
+ copyProperty(xPropertySet, xDataTableProperties, "CharShadowed");
+ copyProperty(xPropertySet, xDataTableProperties, "CharStrikeout");
+ copyProperty(xPropertySet, xDataTableProperties, "CharUnderline");
+ copyProperty(xPropertySet, xDataTableProperties, "CharUnderlineColor");
+ copyProperty(xPropertySet, xDataTableProperties, "CharUnderlineHasColor");
+ copyProperty(xPropertySet, xDataTableProperties, "CharOverline");
+ copyProperty(xPropertySet, xDataTableProperties, "CharOverlineColor");
+ copyProperty(xPropertySet, xDataTableProperties, "CharOverlineHasColor");
+ copyProperty(xPropertySet, xDataTableProperties, "CharWeight");
+ copyProperty(xPropertySet, xDataTableProperties, "CharWeightAsian");
+ copyProperty(xPropertySet, xDataTableProperties, "CharWeightComplex");
+ copyProperty(xPropertySet, xDataTableProperties, "CharWordMode");
+
+ drawing::FillStyle eFillStyle = drawing::FillStyle_NONE;
+ xDataTableProperties->getPropertyValue("FillStyle") >>= eFillStyle;
+ if (eFillStyle == drawing::FillStyle_SOLID)
+ {
+ sal_Int32 aColor = 0;
+ if (xDataTableProperties->getPropertyValue("FillColor") >>= aColor)
+ xPropertySet->setPropertyValue("CharBackColor", uno::Any(aColor));
+ }
+
+ xPropertySet->setPropertyValue("ParaAdjust", uno::Any(style::ParagraphAdjust_CENTER));
+}
+
+void DataTableView::setCellProperties(css::uno::Reference<beans::XPropertySet>& xPropertySet,
+ bool bLeft, bool bTop, bool bRight, bool bBottom)
+{
+ xPropertySet->setPropertyValue("FillColor", uno::Any(Color(0xFFFFFF)));
+
+ uno::Reference<beans::XPropertySet> xDataTableProperties(m_xDataTableModel);
+ float fFontHeight = 0.0;
+ xDataTableProperties->getPropertyValue("CharHeight") >>= fFontHeight;
+ fFontHeight = o3tl::convert(fFontHeight, o3tl::Length::pt, o3tl::Length::mm100);
+ sal_Int32 nXDistance = std::round(fFontHeight * 0.18f);
+ sal_Int32 nYDistance = std::round(fFontHeight * 0.30f);
+
+ xPropertySet->setPropertyValue("TextLeftDistance", uno::Any(nXDistance));
+ xPropertySet->setPropertyValue("TextRightDistance", uno::Any(nXDistance));
+ xPropertySet->setPropertyValue("TextUpperDistance", uno::Any(nYDistance));
+ xPropertySet->setPropertyValue("TextLowerDistance", uno::Any(nYDistance));
+
+ xPropertySet->setPropertyValue("TextVerticalAdjust", uno::Any(drawing::TextVerticalAdjust_TOP));
+
+ drawing::LineStyle eStyle = drawing::LineStyle_NONE;
+ m_aLineProperties.LineStyle >>= eStyle;
+
+ if (eStyle != drawing::LineStyle_NONE)
+ {
+ table::BorderLine2 aBorderLine;
+
+ sal_Int32 nWidth = 0;
+ m_aLineProperties.Width >>= nWidth;
+ aBorderLine.LineWidth = o3tl::convert(nWidth, o3tl::Length::mm100, o3tl::Length::twip);
+
+ sal_Int32 nColor = 0;
+ m_aLineProperties.Color >>= nColor;
+ aBorderLine.Color = nColor;
+
+ aBorderLine.LineStyle = table::BorderLineStyle::SOLID;
+
+ if (eStyle == drawing::LineStyle_DASH)
+ {
+ OUString aDashName;
+ m_aLineProperties.DashName >>= aDashName;
+ if (!aDashName.isEmpty() && m_xChartModel.is())
+ {
+ uno::Reference<container::XNameContainer> xDashTable(
+ m_xChartModel->createInstance("com.sun.star.drawing.DashTable"),
+ uno::UNO_QUERY);
+ if (xDashTable.is() && xDashTable->hasByName(aDashName))
+ {
+ drawing::LineDash aLineDash;
+ xDashTable->getByName(aDashName) >>= aLineDash;
+
+ if (aLineDash.Dots == 0 && aLineDash.Dashes == 0)
+ aBorderLine.LineStyle = table::BorderLineStyle::SOLID;
+ else if (aLineDash.Dots == 1 && aLineDash.Dashes == 0)
+ aBorderLine.LineStyle = table::BorderLineStyle::DOTTED;
+ else if (aLineDash.Dots == 0 && aLineDash.Dashes == 1)
+ aBorderLine.LineStyle = table::BorderLineStyle::DASHED;
+ else if (aLineDash.Dots == 1 && aLineDash.Dashes == 1)
+ aBorderLine.LineStyle = table::BorderLineStyle::DASH_DOT;
+ else if (aLineDash.Dots == 2 && aLineDash.Dashes == 1)
+ aBorderLine.LineStyle = table::BorderLineStyle::DASH_DOT_DOT;
+ else
+ aBorderLine.LineStyle = table::BorderLineStyle::DASHED;
+ }
+ }
+ }
+
+ if (bLeft)
+ xPropertySet->setPropertyValue("LeftBorder", uno::Any(aBorderLine));
+ if (bTop)
+ xPropertySet->setPropertyValue("TopBorder", uno::Any(aBorderLine));
+ if (bRight)
+ xPropertySet->setPropertyValue("RightBorder", uno::Any(aBorderLine));
+ if (bBottom)
+ xPropertySet->setPropertyValue("BottomBorder", uno::Any(aBorderLine));
+ }
+}
+
+void DataTableView::createShapes(basegfx::B2DVector const& rStart, basegfx::B2DVector const& rEnd,
+ sal_Int32 nAxisStepWidth)
+{
+ if (!m_xTarget.is())
+ return;
+
+ // Remove shapes first before we add the new ones
+ ShapeFactory::removeSubShapes(m_xTarget);
+ auto sParticle = ObjectIdentifier::createParticleForDataTable(m_xChartModel);
+ auto sCID = ObjectIdentifier::createClassifiedIdentifierForParticle(sParticle);
+ m_xTableShape = ShapeFactory::createTable(m_xTarget, sCID);
+
+ // calculate the table size
+ auto rDelta = rEnd - rStart;
+ sal_Int32 nTableSize = basegfx::fround(rDelta.getX());
+ m_xTableShape->setSize({ nTableSize, 0 });
+
+ try
+ {
+ m_xTableShape->getPropertyValue("Model") >>= m_xTable;
+ }
+ catch (const uno::Exception&)
+ {
+ return;
+ }
+
+ if (!m_xTable.is())
+ return;
+
+ uno::Reference<util::XBroadcaster> xBroadcaster(m_xTable, uno::UNO_QUERY);
+
+ if (!xBroadcaster.is())
+ return;
+
+ xBroadcaster->lockBroadcasts();
+
+ auto* pTableObject = static_cast<sdr::table::SdrTableObj*>(m_xTableShape->GetSdrObject());
+
+ // get the data table properties from the model
+ bool bHBorder = false;
+ bool bVBorder = false;
+ bool bOutline = false;
+ bool bKeys = false;
+
+ std::vector<ViewLegendSymbol> aSymbols;
+
+ m_xDataTableModel->getPropertyValue("HBorder") >>= bHBorder;
+ m_xDataTableModel->getPropertyValue("VBorder") >>= bVBorder;
+ m_xDataTableModel->getPropertyValue("Outline") >>= bOutline;
+ m_xDataTableModel->getPropertyValue("Keys") >>= bKeys;
+
+ // set the data table row and column size
+ sal_Int32 nColumnCount = m_aXValues.size();
+ uno::Reference<table::XTableColumns> xTableColumns = m_xTable->getColumns();
+ xTableColumns->insertByIndex(0, nColumnCount);
+
+ sal_Int32 nRowCount = m_aDataSeriesNames.size();
+ uno::Reference<table::XTableRows> xTableRows = m_xTable->getRows();
+ xTableRows->insertByIndex(0, nRowCount);
+
+ sal_Int32 nColumnWidth = 0.0;
+
+ // If we don't align, we have to calculate the column width ourselves,
+ // otherwise the column width is taken from the x-axis width
+ if (m_bAlignAxisValuesWithColumns)
+ nColumnWidth = nAxisStepWidth;
+ else
+ nColumnWidth = double(nTableSize) / nColumnCount;
+
+ // Setup empty top-left cell
+ {
+ uno::Reference<table::XCell> xCell = m_xTable->getCellByPosition(0, 0);
+ uno::Reference<beans::XPropertySet> xPropertySet(xCell, uno::UNO_QUERY);
+ if (xPropertySet.is())
+ {
+ setTopCell(xPropertySet);
+ }
+ }
+
+ sal_Int32 nColumn;
+ sal_Int32 nRow;
+
+ // COLUMN HEADER
+
+ nColumn = 1;
+ for (auto const& rString : m_aXValues)
+ {
+ uno::Reference<table::XCell> xCell = m_xTable->getCellByPosition(nColumn, 0);
+ uno::Reference<beans::XPropertySet> xPropertySet(xCell, uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCellTextRange(xCell, uno::UNO_QUERY);
+ if (xCellTextRange.is())
+ {
+ auto xText = xCellTextRange->getText();
+ xText->insertString(xText->getStart(), rString, false);
+ auto xTextPropertySet = getFirstParagraphProperties(xText);
+ if (!xTextPropertySet.is())
+ continue;
+
+ bool bLeft
+ = (bOutline && nColumn == 1) || (bVBorder && nColumn > 1 && nColumn < nColumnCount);
+ bool bRight = (bOutline && nColumn == nColumnCount)
+ || (bVBorder && nColumn > 1 && nColumn < nColumnCount);
+ setCellCharAndParagraphProperties(xTextPropertySet);
+ setCellProperties(xPropertySet, bLeft, bOutline, bRight, bOutline);
+ }
+ nColumn++;
+ }
+
+ // ROW HEADER
+ // Prepare keys (symbols)
+ sal_Int32 nMaxSymbolWidth = 0;
+ constexpr const sal_Int32 constSymbolMargin = 100; // 1mm
+ if (bKeys)
+ {
+ uno::Reference<beans::XPropertySet> xDataTableProperties(m_xDataTableModel);
+ float fFontHeight = 0.0;
+ xDataTableProperties->getPropertyValue("CharHeight") >>= fFontHeight;
+ fFontHeight = o3tl::convert(fFontHeight, o3tl::Length::pt, o3tl::Length::mm100);
+
+ sal_Int32 nSymbolHeight = sal_Int32(fFontHeight * 0.6);
+ sal_Int32 nSymbolWidth = nSymbolHeight;
+
+ for (VSeriesPlotter* pSeriesPlotter : m_pSeriesPlotterList)
+ {
+ if (pSeriesPlotter)
+ {
+ awt::Size aCurrentRatio = pSeriesPlotter->getPreferredLegendKeyAspectRatio();
+ sal_Int32 nCurrentWidth = aCurrentRatio.Width;
+ if (aCurrentRatio.Height > 0)
+ nCurrentWidth = nSymbolHeight * aCurrentRatio.Width / aCurrentRatio.Height;
+ nSymbolWidth = std::max(nSymbolWidth, nCurrentWidth);
+ }
+ }
+ nMaxSymbolWidth = nSymbolWidth;
+
+ for (VSeriesPlotter* pSeriesPlotter : m_pSeriesPlotterList)
+ {
+ if (pSeriesPlotter)
+ {
+ awt::Size aSize(nSymbolWidth, nSymbolHeight);
+ std::vector<ViewLegendSymbol> aNewEntries
+ = pSeriesPlotter->createSymbols(aSize, m_xTarget, m_xComponentContext);
+
+ for (auto const& rSymbol : aNewEntries)
+ aSymbols.push_back(rSymbol);
+ }
+ }
+ }
+
+ nRow = 1;
+ for (auto const& rSeriesName : m_aDataSeriesNames)
+ {
+ uno::Reference<table::XCell> xCell = m_xTable->getCellByPosition(0, nRow);
+ uno::Reference<beans::XPropertySet> xCellPropertySet(xCell, uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCellTextRange(xCell, uno::UNO_QUERY);
+ if (xCellTextRange.is())
+ {
+ bool bTop = (bOutline && nRow == 1) || (bHBorder && nRow > 1 && nRow < nRowCount);
+ bool bBottom
+ = (bOutline && nRow == nRowCount) || (bHBorder && nRow > 1 && nRow < nRowCount);
+
+ auto xText = xCellTextRange->getText();
+ xText->insertString(xText->getStart(), rSeriesName, false);
+ auto xTextPropertySet = getFirstParagraphProperties(xText);
+ if (!xTextPropertySet.is())
+ continue;
+ setCellCharAndParagraphProperties(xTextPropertySet);
+ setCellProperties(xCellPropertySet, bOutline, bTop, bOutline, bBottom);
+
+ xCellPropertySet->setPropertyValue("ParaAdjust", uno::Any(style::ParagraphAdjust_LEFT));
+ if (bKeys)
+ {
+ xCellPropertySet->setPropertyValue(
+ "ParaLeftMargin", uno::Any(nMaxSymbolWidth + sal_Int32(2 * constSymbolMargin)));
+ }
+ }
+ nRow++;
+ }
+
+ // TABLE
+ nRow = 1;
+ for (auto const& rSeries : m_pDataSeriesValues)
+ {
+ nColumn = 1;
+ for (auto const& rValue : rSeries)
+ {
+ uno::Reference<table::XCell> xCell = m_xTable->getCellByPosition(nColumn, nRow);
+ uno::Reference<beans::XPropertySet> xCellPropertySet(xCell, uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCellTextRange(xCell, uno::UNO_QUERY);
+ if (xCellTextRange.is())
+ {
+ auto xText = xCellTextRange->getText();
+ xText->insertString(xText->getStart(), rValue, false);
+ auto xTextPropertySet = getFirstParagraphProperties(xText);
+ if (!xTextPropertySet.is())
+ continue;
+
+ bool bLeft = false;
+ bool bTop = false;
+ bool bRight = false;
+ bool bBottom = false;
+
+ if (nColumn > 1 && bVBorder)
+ bLeft = true;
+
+ if (nRow > 1 && bHBorder)
+ bTop = true;
+
+ if (nRow == nRowCount && bOutline)
+ bBottom = true;
+
+ if (nColumn == nColumnCount && bOutline)
+ bRight = true;
+
+ setCellCharAndParagraphProperties(xTextPropertySet);
+ setCellProperties(xCellPropertySet, bLeft, bTop, bRight, bBottom);
+ }
+ nColumn++;
+ }
+ nRow++;
+ }
+
+ // force recalculation of column widths in the table shape
+ xBroadcaster->unlockBroadcasts();
+ pTableObject->DistributeColumns(0, nColumnCount, true, true);
+
+ xBroadcaster->lockBroadcasts();
+
+ // reposition the data table
+ changePosition(basegfx::fround(rStart.getX()), basegfx::fround(rStart.getY()));
+
+ sal_Int32 nTableX = m_xTableShape->getPosition().X;
+ sal_Int32 nTableY = m_xTableShape->getPosition().Y;
+
+ uno::Reference<beans::XPropertySet> xPropertySet(xTableColumns->getByIndex(0), uno::UNO_QUERY);
+
+ for (sal_Int32 i = 1; i < xTableColumns->getCount(); ++i)
+ {
+ xPropertySet.set(xTableColumns->getByIndex(i), uno::UNO_QUERY);
+ xPropertySet->setPropertyValue("Width", uno::Any(nColumnWidth));
+ }
+
+ // force recalculation of row heights in the table shape
+ xBroadcaster->unlockBroadcasts();
+ pTableObject->DistributeRows(0, nRowCount, true, true);
+
+ if (bKeys)
+ {
+ sal_Int32 nTotalHeight = 0;
+ for (sal_Int32 i = 0; i < xTableRows->getCount(); i++)
+ {
+ sal_Int32 nSymbolIndex = i - 1;
+ if (nSymbolIndex < sal_Int32(aSymbols.size()))
+ {
+ xPropertySet.set(xTableRows->getByIndex(i), uno::UNO_QUERY);
+ sal_Int32 nHeight = 0;
+ xPropertySet->getPropertyValue("Height") >>= nHeight;
+ if (i > 0)
+ {
+ auto& rSymbol = aSymbols[nSymbolIndex].xSymbol;
+ sal_Int32 nSymbolHeight = rSymbol->getSize().Height;
+ sal_Int32 nSymbolY
+ = basegfx::fround(double(nHeight) / 2.0 - double(nSymbolHeight) / 2.0);
+ rSymbol->setPosition(
+ { nTableX + constSymbolMargin, nTableY + nTotalHeight + nSymbolY });
+ }
+ nTotalHeight += nHeight;
+ }
+ }
+ }
+}
+
+void DataTableView::changePosition(sal_Int32 x, sal_Int32 y)
+{
+ if (!m_xTable.is())
+ return;
+
+ uno::Reference<table::XTableColumns> xTableColumns = m_xTable->getColumns();
+ uno::Reference<beans::XPropertySet> xPropertySet(xTableColumns->getByIndex(0), uno::UNO_QUERY);
+
+ sal_Int32 nWidth = 0;
+ xPropertySet->getPropertyValue("Width") >>= nWidth;
+
+ m_xTarget->setPosition({ x - nWidth, y });
+}
+
+void DataTableView::initializeShapes(const rtl::Reference<SvxShapeGroupAnyD>& xTarget)
+{
+ m_xTarget = xTarget;
+}
+
+void DataTableView::initializeValues(
+ std::vector<std::unique_ptr<VSeriesPlotter>>& rSeriesPlotterList)
+{
+ for (auto& rSeriesPlotter : rSeriesPlotterList)
+ {
+ m_pSeriesPlotterList.push_back(rSeriesPlotter.get());
+
+ for (auto const& rCategory :
+ rSeriesPlotter->getExplicitCategoriesProvider()->getSimpleCategories())
+ {
+ m_aXValues.push_back(rCategory);
+ }
+
+ for (auto const& rString : rSeriesPlotter->getAllSeriesNames())
+ {
+ m_aDataSeriesNames.push_back(rString);
+ }
+
+ for (VDataSeries* pSeries : rSeriesPlotter->getAllSeries())
+ {
+ auto& rValues = m_pDataSeriesValues.emplace_back();
+ for (int i = 0; i < pSeries->getTotalPointCount(); i++)
+ {
+ double nValue = pSeries->getYValue(i);
+ rValues.push_back(rSeriesPlotter->getLabelTextForValue(*pSeries, i, nValue, false));
+ }
+ }
+ }
+}
+
+} //namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index ff2171f596a1..71cd8d699cf7 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -25,6 +25,7 @@
#include <svl/itempool.hxx>
#include <svx/objfac3d.hxx>
#include <svx/svdpage.hxx>
+#include <svx/svx3ditems.hxx>
#include <svx/xtable.hxx>
#include <svx/svdoutl.hxx>
#include <editeng/unolingu.hxx>
@@ -43,13 +44,19 @@ namespace chart
{
DrawModelWrapper::DrawModelWrapper()
-: SdrModel(&ChartItemPool::GetGlobalChartItemPool())
+: SdrModel()
{
- SetVOCInvalidationIsReliable(true);
- SetScaleUnit(MapUnit::Map100thMM);
- SetScaleFraction(Fraction(1, 1));
+ m_xChartItemPool = ChartItemPool::CreateChartItemPool();
+
SetDefaultFontHeight(423); // 12pt
+ SfxItemPool* pMasterPool = &GetItemPool();
+ pMasterPool->SetDefaultMetric(MapUnit::Map100thMM);
+ pMasterPool->SetUserDefaultItem(SfxBoolItem(EE_PARA_HYPHENATE, true) );
+ pMasterPool->SetUserDefaultItem(makeSvx3DPercentDiagonalItem (5));
+
+ // append chart pool to end of pool chain
+ pMasterPool->GetLastPoolInChain()->SetSecondaryPool(m_xChartItemPool.get());
SetTextDefaults();
//this factory needs to be created before first use of 3D scenes once upon an office runtime
@@ -93,19 +100,36 @@ DrawModelWrapper::DrawModelWrapper()
DrawModelWrapper::~DrawModelWrapper()
{
+ // normally call from ~SdrModel, but do it here explicitly before we clear m_xChartItemPool
+ implDtorClearModel();
+
+ //remove m_pChartItemPool from pool chain
+ if (m_xChartItemPool)
+ {
+ SfxItemPool* pPool = &GetItemPool();
+ for (;;)
+ {
+ SfxItemPool* pSecondary = pPool->GetSecondaryPool();
+ if(pSecondary == m_xChartItemPool.get())
+ {
+ pPool->SetSecondaryPool (nullptr);
+ break;
+ }
+ pPool = pSecondary;
+ }
+ m_xChartItemPool.clear();
+ }
m_pRefDevice.disposeAndClear();
}
-uno::Reference< uno::XInterface > DrawModelWrapper::createUnoModel()
+uno::Reference< frame::XModel > DrawModelWrapper::createUnoModel()
{
- uno::Reference< lang::XComponent > xComponent = new SvxUnoDrawingModel( this ); //tell Andreas Schluens if SvxUnoDrawingModel is not needed anymore -> remove export from svx to avoid link problems in writer
- return uno::Reference< uno::XInterface >::query( xComponent );
+ return new SvxUnoDrawingModel( this ); //tell Andreas Schluens if SvxUnoDrawingModel is not needed anymore -> remove export from svx to avoid link problems in writer
}
uno::Reference< frame::XModel > DrawModelWrapper::getUnoModel()
{
- uno::Reference< uno::XInterface > xI = SdrModel::getUnoModel();
- return uno::Reference<frame::XModel>::query( xI );
+ return SdrModel::getUnoModel();
}
SdrModel& DrawModelWrapper::getSdrModel()
@@ -268,17 +292,13 @@ SdrObject* DrawModelWrapper::getNamedSdrObject( const OUString& rObjectCID, SdrO
{
if(!pSearchList || rObjectCID.isEmpty())
return nullptr;
- const size_t nCount = pSearchList->GetObjCount();
- for( size_t nN=0; nN<nCount; ++nN )
+ for (const rtl::Reference<SdrObject>& pObj : *pSearchList)
{
- SdrObject* pObj = pSearchList->GetObj(nN);
- if(!pObj)
- continue;
if( ObjectIdentifier::areIdenticalObjects( rObjectCID, pObj->GetName() ) )
- return pObj;
- pObj = DrawModelWrapper::getNamedSdrObject( rObjectCID, pObj->GetSubList() );
- if(pObj)
- return pObj;
+ return pObj.get();
+ SdrObject* pNamedObj = DrawModelWrapper::getNamedSdrObject( rObjectCID, pObj->GetSubList() );
+ if(pNamedObj)
+ return pNamedObj;
}
return nullptr;
}
diff --git a/chart2/source/view/main/ExplicitValueProvider.cxx b/chart2/source/view/main/ExplicitValueProvider.cxx
new file mode 100644
index 000000000000..52f259d341c9
--- /dev/null
+++ b/chart2/source/view/main/ExplicitValueProvider.cxx
@@ -0,0 +1,203 @@
+/* -*- 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 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 .
+ */
+
+#include <chartview/ExplicitValueProvider.hxx>
+#include <AxisHelper.hxx>
+#include <ChartModel.hxx>
+#include <Diagram.hxx>
+#include <DiagramHelper.hxx>
+#include <unonames.hxx>
+#include <BaseCoordinateSystem.hxx>
+#include <TitleHelper.hxx>
+#include <ObjectIdentifier.hxx>
+
+#include <comphelper/servicehelper.hxx>
+#include <comphelper/diagnose_ex.hxx>
+
+namespace chart
+{
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::chart2;
+using ::com::sun::star::uno::Reference;
+
+namespace
+{
+constexpr sal_Int32 constDiagramTitleSpace = 200; //=0,2 cm spacing
+
+bool lcl_getPropertySwapXAndYAxis(const rtl::Reference<Diagram>& xDiagram)
+{
+ bool bSwapXAndY = false;
+
+ if (xDiagram.is())
+ {
+ const std::vector<rtl::Reference<BaseCoordinateSystem>>& aCooSysList(
+ xDiagram->getBaseCoordinateSystems());
+ if (!aCooSysList.empty())
+ {
+ try
+ {
+ aCooSysList[0]->getPropertyValue("SwapXAndYAxis") >>= bSwapXAndY;
+ }
+ catch (const uno::Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("chart2", "");
+ }
+ }
+ }
+ return bSwapXAndY;
+}
+
+} // end anonymous namespace
+
+sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
+ const rtl::Reference<::chart::Axis>& xAxis,
+ const rtl::Reference<::chart::BaseCoordinateSystem>& xCorrespondingCoordinateSystem,
+ const rtl::Reference<::chart::ChartModel>& xChartDoc)
+{
+ return AxisHelper::getExplicitNumberFormatKeyForAxis(
+ xAxis, xCorrespondingCoordinateSystem, xChartDoc,
+ true /*bSearchForParallelAxisIfNothingIsFound*/);
+}
+
+sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel(
+ const uno::Reference<beans::XPropertySet>& xSeriesOrPointProp)
+{
+ sal_Int32 nFormat = 0;
+ if (!xSeriesOrPointProp.is())
+ return nFormat;
+
+ try
+ {
+ xSeriesOrPointProp->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nFormat;
+ }
+ catch (const beans::UnknownPropertyException&)
+ {
+ }
+
+ if (nFormat < 0)
+ nFormat = 0;
+ return nFormat;
+}
+
+sal_Int32 ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabel(
+ const uno::Reference<beans::XPropertySet>& xSeriesOrPointProp,
+ const uno::Reference<util::XNumberFormatsSupplier>& xNumberFormatsSupplier)
+{
+ sal_Int32 nFormat = 0;
+ if (!xSeriesOrPointProp.is())
+ return nFormat;
+ if (!(xSeriesOrPointProp->getPropertyValue("PercentageNumberFormat") >>= nFormat))
+ {
+ nFormat = DiagramHelper::getPercentNumberFormat(xNumberFormatsSupplier);
+ }
+ if (nFormat < 0)
+ nFormat = 0;
+ return nFormat;
+}
+
+awt::Rectangle ExplicitValueProvider::AddSubtractAxisTitleSizes(
+ ChartModel& rModel, ExplicitValueProvider* pChartView, const awt::Rectangle& rPositionAndSize,
+ bool bSubtract)
+{
+ awt::Rectangle aRet(rPositionAndSize);
+
+ //add axis title sizes to the diagram size
+ rtl::Reference<::chart::Title> xTitle_Height(
+ TitleHelper::getTitle(TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION, rModel));
+ rtl::Reference<::chart::Title> xTitle_Width(
+ TitleHelper::getTitle(TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION, rModel));
+ rtl::Reference<::chart::Title> xSecondTitle_Height(
+ TitleHelper::getTitle(TitleHelper::SECONDARY_X_AXIS_TITLE, rModel));
+ rtl::Reference<::chart::Title> xSecondTitle_Width(
+ TitleHelper::getTitle(TitleHelper::SECONDARY_Y_AXIS_TITLE, rModel));
+ if (xTitle_Height.is() || xTitle_Width.is() || xSecondTitle_Height.is()
+ || xSecondTitle_Width.is())
+ {
+ ExplicitValueProvider* pExplicitValueProvider = pChartView;
+ if (pExplicitValueProvider)
+ {
+ //detect whether x axis points into x direction or not
+ if (lcl_getPropertySwapXAndYAxis(rModel.getFirstChartDiagram()))
+ {
+ std::swap(xTitle_Height, xTitle_Width);
+ std::swap(xSecondTitle_Height, xSecondTitle_Width);
+ }
+
+ sal_Int32 nTitleSpaceWidth = 0;
+ sal_Int32 nTitleSpaceHeight = 0;
+ sal_Int32 nSecondTitleSpaceWidth = 0;
+ sal_Int32 nSecondTitleSpaceHeight = 0;
+
+ if (xTitle_Height.is())
+ {
+ OUString aCID_X(
+ ObjectIdentifier::createClassifiedIdentifierForObject(xTitle_Height, &rModel));
+ nTitleSpaceHeight
+ = pExplicitValueProvider->getRectangleOfObject(aCID_X, true).Height;
+ if (nTitleSpaceHeight)
+ nTitleSpaceHeight += constDiagramTitleSpace;
+ }
+ if (xTitle_Width.is())
+ {
+ OUString aCID_Y(
+ ObjectIdentifier::createClassifiedIdentifierForObject(xTitle_Width, &rModel));
+ nTitleSpaceWidth = pExplicitValueProvider->getRectangleOfObject(aCID_Y, true).Width;
+ if (nTitleSpaceWidth)
+ nTitleSpaceWidth += constDiagramTitleSpace;
+ }
+ if (xSecondTitle_Height.is())
+ {
+ OUString aCID_X(ObjectIdentifier::createClassifiedIdentifierForObject(
+ xSecondTitle_Height, &rModel));
+ nSecondTitleSpaceHeight
+ = pExplicitValueProvider->getRectangleOfObject(aCID_X, true).Height;
+ if (nSecondTitleSpaceHeight)
+ nSecondTitleSpaceHeight += constDiagramTitleSpace;
+ }
+ if (xSecondTitle_Width.is())
+ {
+ OUString aCID_Y(ObjectIdentifier::createClassifiedIdentifierForObject(
+ xSecondTitle_Width, &rModel));
+ nSecondTitleSpaceWidth
+ += pExplicitValueProvider->getRectangleOfObject(aCID_Y, true).Width;
+ if (nSecondTitleSpaceWidth)
+ nSecondTitleSpaceWidth += constDiagramTitleSpace;
+ }
+ if (bSubtract)
+ {
+ aRet.X += nTitleSpaceWidth;
+ aRet.Y += nSecondTitleSpaceHeight;
+ aRet.Width -= (nTitleSpaceWidth + nSecondTitleSpaceWidth);
+ aRet.Height -= (nTitleSpaceHeight + nSecondTitleSpaceHeight);
+ }
+ else
+ {
+ aRet.X -= nTitleSpaceWidth;
+ aRet.Y -= nSecondTitleSpaceHeight;
+ aRet.Width += nTitleSpaceWidth + nSecondTitleSpaceWidth;
+ aRet.Height += nTitleSpaceHeight + nSecondTitleSpaceHeight;
+ }
+ }
+ }
+ return aRet;
+}
+
+} //namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/main/LabelPositionHelper.cxx b/chart2/source/view/main/LabelPositionHelper.cxx
index ec169ce4f4cc..3112c591243d 100644
--- a/chart2/source/view/main/LabelPositionHelper.cxx
+++ b/chart2/source/view/main/LabelPositionHelper.cxx
@@ -24,20 +24,19 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
-#include <com/sun/star/drawing/XShape.hpp>
#include <cmath>
+#include <utility>
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
LabelPositionHelper::LabelPositionHelper(
sal_Int32 nDimensionCount
- , const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget)
+ , rtl::Reference<SvxShapeGroupAnyD> xLogicTarget)
: m_nDimensionCount(nDimensionCount)
- , m_xLogicTarget(xLogicTarget)
+ , m_xLogicTarget(std::move(xLogicTarget))
{
}
@@ -53,28 +52,28 @@ awt::Point LabelPositionHelper::transformSceneToScreenPosition( const drawing::P
void LabelPositionHelper::changeTextAdjustment( tAnySequence& rPropValues, const tNameSequence& rPropNames, LabelAlignment eAlignment)
{
- //HorizontalAdjustment
+ uno::Any* pHorizontalAdjustAny
+ = PropertyMapper::getValuePointer(rPropValues, rPropNames, u"TextHorizontalAdjust");
+ if (pHorizontalAdjustAny)
{
drawing::TextHorizontalAdjust eHorizontalAdjust = drawing::TextHorizontalAdjust_CENTER;
if( eAlignment==LABEL_ALIGN_RIGHT || eAlignment==LABEL_ALIGN_RIGHT_TOP || eAlignment==LABEL_ALIGN_RIGHT_BOTTOM )
eHorizontalAdjust = drawing::TextHorizontalAdjust_LEFT;
else if( eAlignment==LABEL_ALIGN_LEFT || eAlignment==LABEL_ALIGN_LEFT_TOP || eAlignment==LABEL_ALIGN_LEFT_BOTTOM )
eHorizontalAdjust = drawing::TextHorizontalAdjust_RIGHT;
- uno::Any* pHorizontalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,u"TextHorizontalAdjust");
- if(pHorizontalAdjustAny)
- *pHorizontalAdjustAny <<= eHorizontalAdjust;
+ *pHorizontalAdjustAny <<= eHorizontalAdjust;
}
- //VerticalAdjustment
+ uno::Any* pVerticalAdjustAny
+ = PropertyMapper::getValuePointer(rPropValues, rPropNames, u"TextVerticalAdjust");
+ if (pVerticalAdjustAny)
{
drawing::TextVerticalAdjust eVerticalAdjust = drawing::TextVerticalAdjust_CENTER;
if( eAlignment==LABEL_ALIGN_TOP || eAlignment==LABEL_ALIGN_RIGHT_TOP || eAlignment==LABEL_ALIGN_LEFT_TOP )
eVerticalAdjust = drawing::TextVerticalAdjust_BOTTOM;
else if( eAlignment==LABEL_ALIGN_BOTTOM || eAlignment==LABEL_ALIGN_RIGHT_BOTTOM || eAlignment==LABEL_ALIGN_LEFT_BOTTOM )
eVerticalAdjust = drawing::TextVerticalAdjust_TOP;
- uno::Any* pVerticalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,u"TextVerticalAdjust");
- if(pVerticalAdjustAny)
- *pVerticalAdjustAny <<= eVerticalAdjust;
+ *pVerticalAdjustAny <<= eVerticalAdjust;
}
}
diff --git a/chart2/source/view/main/PlotterBase.cxx b/chart2/source/view/main/PlotterBase.cxx
index a706f1600fc6..d09bba64aeef 100644
--- a/chart2/source/view/main/PlotterBase.cxx
+++ b/chart2/source/view/main/PlotterBase.cxx
@@ -25,7 +25,6 @@
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
PlotterBase::PlotterBase( sal_Int32 nDimensionCount )
: m_nDimension(nDimensionCount)
diff --git a/chart2/source/view/main/PlottingPositionHelper.cxx b/chart2/source/view/main/PlottingPositionHelper.cxx
index d4ed69579826..dfbf38bbd90e 100644
--- a/chart2/source/view/main/PlottingPositionHelper.cxx
+++ b/chart2/source/view/main/PlottingPositionHelper.cxx
@@ -28,7 +28,6 @@
#include <com/sun/star/chart/TimeUnit.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/drawing/Position3D.hpp>
-#include <com/sun/star/drawing/XShapes.hpp>
#include <rtl/math.hxx>
@@ -419,11 +418,7 @@ double PolarPlottingPositionHelper::getWidthAngleDegree( double& fStartLogicValu
{
const ExplicitScaleData& rAngleScale = m_bSwapXAndY ? m_aScales[1] : m_aScales[0];
if( rAngleScale.Orientation != AxisOrientation_MATHEMATICAL )
- {
- double fHelp = fEndLogicValueOnAngleAxis;
- fEndLogicValueOnAngleAxis = fStartLogicValueOnAngleAxis;
- fStartLogicValueOnAngleAxis = fHelp;
- }
+ std::swap( fStartLogicValueOnAngleAxis, fEndLogicValueOnAngleAxis );
double fStartAngleDegree = transformToAngleDegree( fStartLogicValueOnAngleAxis );
double fEndAngleDegree = transformToAngleDegree( fEndLogicValueOnAngleAxis );
diff --git a/chart2/source/view/main/PolarLabelPositionHelper.cxx b/chart2/source/view/main/PolarLabelPositionHelper.cxx
index d5c819954a91..44070603c75a 100644
--- a/chart2/source/view/main/PolarLabelPositionHelper.cxx
+++ b/chart2/source/view/main/PolarLabelPositionHelper.cxx
@@ -27,7 +27,6 @@
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
PolarLabelPositionHelper::PolarLabelPositionHelper(
PolarPlottingPositionHelper* pPosHelper
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index d7c1dd8f1c99..79206624f436 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -22,33 +22,12 @@
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/drawing/BitmapMode.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
-#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/drawing/LineJoint.hpp>
-#include <com/sun/star/drawing/LineStyle.hpp>
-#include <com/sun/star/drawing/RectanglePoint.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <svx/unoshape.hxx>
-#include <svx/svdopath.hxx>
-#include <svx/xfillit0.hxx>
-#include <svx/xflbckit.hxx>
-#include <svx/xflbmpit.hxx>
-#include <svx/xflbmsli.hxx>
-#include <svx/xflbmsxy.hxx>
-#include <svx/xflbmtit.hxx>
-#include <svx/xflboxy.hxx>
-#include <svx/xflbstit.hxx>
-#include <svx/xflbtoxy.hxx>
-#include <svx/xflclit.hxx>
-#include <svx/xfltrit.hxx>
-#include <svx/xlineit0.hxx>
-#include <svx/xlncapit.hxx>
-#include <svx/xlnclit.hxx>
-#include <svx/xlntrit.hxx>
-#include <svx/xlnwtit.hxx>
namespace chart
{
@@ -80,7 +59,7 @@ void PropertyMapper::setMappedProperties(
{
//do not set empty anys because of performance (otherwise SdrAttrObj::ItemChange will take much longer)
pNames[nN] = rTarget;
- pValues[nN] = aAny;
+ pValues[nN] = std::move(aAny);
++nN;
}
}
@@ -140,7 +119,7 @@ void PropertyMapper::setMappedProperties(
}
catch( const uno::Exception& )
{
- TOOLS_WARN_EXCEPTION("chart2", "" );
+ TOOLS_WARN_EXCEPTION("chart2", "exception mapping property from " << rSource << " to " << rTarget);
}
}
if (nN == 0)
@@ -289,7 +268,8 @@ const tPropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProperties
{"CharColor", "CharColor"},
{"CharContoured", "CharContoured"},
{"CharEmphasis", "CharEmphasis"},//the service style::CharacterProperties describes a property called 'CharEmphasize' which is nowhere implemented
-
+ {"CharEscapement", "CharEscapement"},
+ {"CharEscapementHeight", "CharEscapementHeight"},
{"CharFontFamily", "CharFontFamily"},
{"CharFontFamilyAsian", "CharFontFamilyAsian"},
{"CharFontFamilyComplex", "CharFontFamilyComplex"},
@@ -496,110 +476,6 @@ const tPropertyNameMap& PropertyMapper::getPropertyNameMapForFilledSeriesPropert
return s_aShapePropertyMapForFilledSeriesProperties;
}
-void PropertyMapper::setPropertyNameMapForFilledSeriesProperties(SdrPathObj* pShape
- , const uno::Reference< beans::XPropertySet >& xSource
- , std::optional<sal_Int32> xFillColor)
-{
- //shape property -- chart model object property
- static tPropertyNameMap s_aShapePropertyMapForFilledSeriesProperties{
- {"FillBackground", "FillBackground"},
- {"FillBitmapName", "FillBitmapName"},
- {"FillColor", "Color"},
- {"FillGradientName", "GradientName"},
- {"FillGradientStepCount", "GradientStepCount"},
- {"FillHatchName", "HatchName"},
- {"FillStyle", "FillStyle"},
- {"FillTransparence", "Transparency"},
- {"FillTransparenceGradientName", "TransparencyGradientName"},
- //bitmap properties
- {"FillBitmapMode", "FillBitmapMode"},
- {"FillBitmapSizeX", "FillBitmapSizeX"},
- {"FillBitmapSizeY", "FillBitmapSizeY"},
- {"FillBitmapLogicalSize", "FillBitmapLogicalSize"},
- {"FillBitmapOffsetX", "FillBitmapOffsetX"},
- {"FillBitmapOffsetY", "FillBitmapOffsetY"},
- {"FillBitmapRectanglePoint", "FillBitmapRectanglePoint"},
- {"FillBitmapPositionOffsetX", "FillBitmapPositionOffsetX"},
- {"FillBitmapPositionOffsetY", "FillBitmapPositionOffsetY"},
- //line properties
- {"LineColor", "BorderColor"},
- {"LineDashName", "BorderDashName"},
- {"LineStyle", "BorderStyle"},
- {"LineTransparence", "BorderTransparency"},
- {"LineWidth", "BorderWidth"},
- {"LineCap", "LineCap"}};
- std::optional<SfxItemSet> xOptionSet;
- for (auto const& elem : s_aShapePropertyMapForFilledSeriesProperties)
- {
- const OUString & rSource = elem.second;
- try
- {
- uno::Any aAny( xSource->getPropertyValue(rSource) );
- //do not set empty anys because of performance (otherwise SdrAttrObj::ItemChange will take much longer)
- if( !aAny.hasValue() )
- continue;
- if (!xOptionSet)
- xOptionSet.emplace(pShape->GetObjectItemPool());
- if (rSource == "FillBackground")
- xOptionSet->Put(XFillBackgroundItem(aAny.get<bool>()));
- else if (rSource == "Color")
- xOptionSet->Put(XFillColorItem(OUString(), Color(ColorTransparency, aAny.get<sal_Int32>())));
- else if (rSource == "FillStyle")
- xOptionSet->Put(XFillStyleItem(aAny.get<css::drawing::FillStyle>()));
- else if (rSource == "Transparency")
- xOptionSet->Put(XFillTransparenceItem(aAny.get<sal_uInt16>()));
- else if (rSource == "FillBitmapMode")
- {
- drawing::BitmapMode aMode;
- aAny >>= aMode;
- xOptionSet->Put( XFillBmpTileItem( aMode == drawing::BitmapMode_REPEAT ) );
- xOptionSet->Put( XFillBmpStretchItem( aMode == drawing::BitmapMode_STRETCH ) );
- }
- else if (rSource == "FillBitmapSizeX")
- xOptionSet->Put(XFillBmpSizeXItem(aAny.get<sal_Int32>()));
- else if (rSource == "FillBitmapSizeY")
- xOptionSet->Put(XFillBmpSizeYItem(aAny.get<sal_Int32>()));
- else if (rSource == "FillBitmapLogicalSize")
- xOptionSet->Put(XFillBmpSizeLogItem(aAny.get<bool>()));
- else if (rSource == "FillBitmapPositionOffsetX")
- xOptionSet->Put(XFillBmpPosOffsetXItem(aAny.get<sal_Int32>()));
- else if (rSource == "FillBitmapPositionOffsetY")
- xOptionSet->Put(XFillBmpPosOffsetYItem(aAny.get<sal_Int32>()));
- else if (rSource == "FillBitmapRectanglePoint")
- xOptionSet->Put(XFillBmpPosItem(static_cast<RectPoint>(aAny.get<css::drawing::RectanglePoint>())));
- else if (rSource == "FillBitmapOffsetX")
- xOptionSet->Put(XFillBmpTileOffsetXItem(aAny.get<sal_Int32>()));
- else if (rSource == "FillBitmapOffsetY")
- xOptionSet->Put(XFillBmpTileOffsetYItem(aAny.get<sal_Int32>()));
- else if (rSource == "BorderColor")
- xOptionSet->Put(XLineColorItem(OUString(), Color(ColorTransparency, aAny.get<sal_Int32>())));
- else if (rSource == "BorderStyle")
- xOptionSet->Put(XLineStyleItem(aAny.get<css::drawing::LineStyle>()));
- else if (rSource == "BorderTransparency")
- xOptionSet->Put(XLineTransparenceItem(aAny.get<sal_uInt16>()));
- else if (rSource == "BorderWidth")
- xOptionSet->Put(XLineWidthItem(aAny.get<sal_Int32>()));
- else if (rSource == "LineCap")
- xOptionSet->Put(XLineCapItem(aAny.get<css::drawing::LineCap>()));
- else
- SAL_WARN("chart2", "forgot this one " << rSource);
- }
- catch( const uno::Exception& )
- {
- TOOLS_WARN_EXCEPTION("chart2", "" );
- }
- }
- if (xFillColor)
- {
- if (!xOptionSet)
- xOptionSet.emplace(pShape->GetObjectItemPool());
- xOptionSet->Put(XFillColorItem(OUString(), Color(ColorTransparency, *xFillColor)));
- }
- if (xOptionSet)
- pShape->GetProperties().SetObjectItemSet(*xOptionSet);
-
-}
-
void PropertyMapper::setMultiProperties(
const tNameSequence& rNames
, const tAnySequence& rValues
diff --git a/chart2/source/view/main/SeriesPlotterContainer.cxx b/chart2/source/view/main/SeriesPlotterContainer.cxx
new file mode 100644
index 000000000000..afca7efbc463
--- /dev/null
+++ b/chart2/source/view/main/SeriesPlotterContainer.cxx
@@ -0,0 +1,759 @@
+/* -*- 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 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 .
+ */
+
+#include <sal/config.h>
+
+#include <cstddef>
+
+#include "SeriesPlotterContainer.hxx"
+
+#include <ChartView.hxx>
+#include <Diagram.hxx>
+#include <ChartType.hxx>
+#include <DataSeries.hxx>
+#include <ChartModel.hxx>
+#include <ChartTypeHelper.hxx>
+#include <ObjectIdentifier.hxx>
+#include <DiagramHelper.hxx>
+#include <Axis.hxx>
+#include <AxisIndexDefines.hxx>
+#include <DataSeriesHelper.hxx>
+#include <ExplicitCategoriesProvider.hxx>
+#include <unonames.hxx>
+
+#include <com/sun/star/chart/ChartAxisPosition.hpp>
+#include <com/sun/star/chart2/AxisType.hpp>
+#include <com/sun/star/chart2/PieChartSubType.hpp>
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+
+#include <comphelper/classids.hxx>
+#include <servicenames_charttypes.hxx>
+#include <comphelper/diagnose_ex.hxx>
+
+namespace chart
+{
+using namespace ::css;
+using namespace ::css::chart2;
+
+using ::css::uno::Reference;
+using ::css::uno::Sequence;
+using ::css::uno::Any;
+
+SeriesPlotterContainer::SeriesPlotterContainer(
+ std::vector<std::unique_ptr<VCoordinateSystem>>& rVCooSysList)
+ : m_rVCooSysList(rVCooSysList)
+ , m_nMaxAxisIndex(0)
+ , m_bChartTypeUsesShiftedCategoryPositionPerDefault(false)
+ , m_nDefaultDateNumberFormat(0)
+{
+}
+
+SeriesPlotterContainer::~SeriesPlotterContainer()
+{
+ // - remove plotter from coordinatesystems
+ for (auto& nC : m_rVCooSysList)
+ nC->clearMinimumAndMaximumSupplierList();
+}
+
+std::vector<LegendEntryProvider*> SeriesPlotterContainer::getLegendEntryProviderList()
+{
+ std::vector<LegendEntryProvider*> aRet(m_aSeriesPlotterList.size());
+ sal_Int32 nN = 0;
+ for (const std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList)
+ aRet[nN++] = aPlotter.get();
+ return aRet;
+}
+
+VCoordinateSystem* SeriesPlotterContainer::findInCooSysList(
+ const std::vector<std::unique_ptr<VCoordinateSystem>>& rVCooSysList,
+ const rtl::Reference<BaseCoordinateSystem>& xCooSys)
+{
+ for (auto& pVCooSys : rVCooSysList)
+ {
+ if (pVCooSys->getModel() == xCooSys)
+ return pVCooSys.get();
+ }
+ return nullptr;
+}
+
+VCoordinateSystem* SeriesPlotterContainer::getCooSysForPlotter(
+ const std::vector<std::unique_ptr<VCoordinateSystem>>& rVCooSysList,
+ MinimumAndMaximumSupplier* pMinimumAndMaximumSupplier)
+{
+ if (!pMinimumAndMaximumSupplier)
+ return nullptr;
+ for (auto& pVCooSys : rVCooSysList)
+ {
+ if (pVCooSys->hasMinimumAndMaximumSupplier(pMinimumAndMaximumSupplier))
+ return pVCooSys.get();
+ }
+ return nullptr;
+}
+
+VCoordinateSystem* SeriesPlotterContainer::addCooSysToList(
+ std::vector<std::unique_ptr<VCoordinateSystem>>& rVCooSysList,
+ const rtl::Reference<BaseCoordinateSystem>& xCooSys, ChartModel& rChartModel)
+{
+ VCoordinateSystem* pExistingVCooSys
+ = SeriesPlotterContainer::findInCooSysList(rVCooSysList, xCooSys);
+ if (pExistingVCooSys)
+ return pExistingVCooSys;
+
+ std::unique_ptr<VCoordinateSystem> pVCooSys
+ = VCoordinateSystem::createCoordinateSystem(xCooSys);
+ if (!pVCooSys)
+ return nullptr;
+
+ OUString aCooSysParticle(
+ ObjectIdentifier::createParticleForCoordinateSystem(xCooSys, &rChartModel));
+ pVCooSys->setParticle(aCooSysParticle);
+
+ pVCooSys->setExplicitCategoriesProvider(new ExplicitCategoriesProvider(xCooSys, rChartModel));
+ rVCooSysList.push_back(std::move(pVCooSys));
+ return rVCooSysList.back().get();
+}
+
+void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChartModel)
+{
+ rtl::Reference<Diagram> xDiagram = rChartModel.getFirstChartDiagram();
+ if (!xDiagram.is())
+ return;
+
+ uno::Reference<util::XNumberFormatsSupplier> xNumberFormatsSupplier(&rChartModel);
+ if (rChartModel.hasInternalDataProvider() && xDiagram->isSupportingDateAxis())
+ m_nDefaultDateNumberFormat = DiagramHelper::getDateNumberFormat(xNumberFormatsSupplier);
+
+ sal_Int32 nDimensionCount = xDiagram->getDimension();
+ if (!nDimensionCount)
+ {
+ //@todo handle mixed dimension
+ nDimensionCount = 2;
+ }
+
+ bool bSortByXValues = false;
+ bool bConnectBars = false;
+ bool bGroupBarsPerAxis = true;
+ bool bIncludeHiddenCells = true;
+ bool bSecondaryYaxisVisible = true;
+ sal_Int32 nStartingAngle = 90;
+ sal_Int32 n3DRelativeHeight = 100;
+ PieChartSubType ePieChartSubType = PieChartSubType_NONE;
+ try
+ {
+ xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= bSortByXValues;
+ xDiagram->getPropertyValue("ConnectBars") >>= bConnectBars;
+ xDiagram->getPropertyValue("GroupBarsPerAxis") >>= bGroupBarsPerAxis;
+ xDiagram->getPropertyValue("IncludeHiddenCells") >>= bIncludeHiddenCells;
+ xDiagram->getPropertyValue("StartingAngle") >>= nStartingAngle;
+
+ if (nDimensionCount == 3)
+ {
+ xDiagram->getPropertyValue("3DRelativeHeight") >>= n3DRelativeHeight;
+ }
+ xDiagram->getPropertyValue("SubPieType") >>= ePieChartSubType;
+ }
+ catch (const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+
+ if (xDiagram->getDataTable().is())
+ m_bTableShiftPosition = true;
+
+ //prepare for autoscaling and shape creation
+ // - create plotter for charttypes (for each first scale group at each plotter, as they are independent)
+ // - add series to plotter (thus each charttype can provide minimum and maximum values for autoscaling)
+ // - add plotter to coordinate systems
+
+ //iterate through all coordinate systems
+ uno::Reference<XColorScheme> xColorScheme(xDiagram->getDefaultColorScheme());
+ auto aCooSysList = xDiagram->getBaseCoordinateSystems();
+ sal_Int32 nGlobalSeriesIndex = 0; //for automatic symbols
+ for (std::size_t nCS = 0; nCS < aCooSysList.size(); ++nCS)
+ {
+ rtl::Reference<BaseCoordinateSystem> xCooSys(aCooSysList[nCS]);
+ VCoordinateSystem* pVCooSys
+ = SeriesPlotterContainer::addCooSysToList(m_rVCooSysList, xCooSys, rChartModel);
+ // Let's check whether the secondary Y axis is visible
+ try
+ {
+ if (xCooSys->getMaximumAxisIndexByDimension(1) > 0)
+ {
+ rtl::Reference<Axis> xAxisProp = xCooSys->getAxisByDimension2(1, 1);
+ xAxisProp->getPropertyValue("Show") >>= bSecondaryYaxisVisible;
+ }
+ }
+ catch (const lang::IndexOutOfBoundsException&)
+ {
+ TOOLS_WARN_EXCEPTION("chart2", "");
+ }
+ //iterate through all chart types in the current coordinate system
+ std::vector<rtl::Reference<ChartType>> aChartTypeList(xCooSys->getChartTypes2());
+ for (std::size_t nT = 0; nT < aChartTypeList.size(); ++nT)
+ {
+ rtl::Reference<ChartType> xChartType(aChartTypeList[nT]);
+ if (nDimensionCount == 3
+ && xChartType->getChartType().equalsIgnoreAsciiCase(
+ CHART2_SERVICE_NAME_CHARTTYPE_PIE))
+ {
+ try
+ {
+ sal_Int32 n3DRelativeHeightOldValue(100);
+ uno::Any aAny = xChartType->getFastPropertyValue(
+ PROP_PIECHARTTYPE_3DRELATIVEHEIGHT); // "3DRelativeHeight"
+ aAny >>= n3DRelativeHeightOldValue;
+ if (n3DRelativeHeightOldValue != n3DRelativeHeight)
+ xChartType->setFastPropertyValue(
+ PROP_PIECHARTTYPE_3DRELATIVEHEIGHT, // "3DRelativeHeight"
+ uno::Any(n3DRelativeHeight));
+ }
+ catch (const uno::Exception&)
+ {
+ }
+ }
+
+ if (ePieChartSubType != PieChartSubType_NONE)
+ {
+ xChartType->setFastPropertyValue(PROP_PIECHARTTYPE_SUBTYPE,
+ uno::Any(ePieChartSubType));
+ }
+
+ if (nT == 0)
+ m_bChartTypeUsesShiftedCategoryPositionPerDefault
+ = ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault(xChartType);
+
+ bool bExcludingPositioning
+ = xDiagram->getDiagramPositioningMode() == DiagramPositioningMode::Excluding;
+ VSeriesPlotter* pPlotter = VSeriesPlotter::createSeriesPlotter(
+ xChartType, nDimensionCount, bExcludingPositioning);
+ if (!pPlotter)
+ continue;
+
+ m_aSeriesPlotterList.push_back(std::unique_ptr<VSeriesPlotter>(pPlotter));
+ pPlotter->setNumberFormatsSupplier(xNumberFormatsSupplier);
+ pPlotter->setColorScheme(xColorScheme);
+ if (pVCooSys)
+ pPlotter->setExplicitCategoriesProvider(pVCooSys->getExplicitCategoriesProvider());
+ sal_Int32 nMissingValueTreatment
+ = xDiagram->getCorrectedMissingValueTreatment(xChartType);
+
+ if (pVCooSys)
+ pVCooSys->addMinimumAndMaximumSupplier(pPlotter);
+
+ sal_Int32 zSlot = -1;
+ sal_Int32 xSlot = -1;
+ sal_Int32 ySlot = -1;
+ const std::vector<rtl::Reference<DataSeries>>& aSeriesList
+ = xChartType->getDataSeries2();
+ for (std::size_t nS = 0; nS < aSeriesList.size(); ++nS)
+ {
+ rtl::Reference<DataSeries> const& xDataSeries = aSeriesList[nS];
+ if (!bIncludeHiddenCells && !xDataSeries->hasUnhiddenData())
+ continue;
+
+ std::unique_ptr<VDataSeries> pSeries(new VDataSeries(xDataSeries));
+
+ pSeries->setGlobalSeriesIndex(nGlobalSeriesIndex);
+ nGlobalSeriesIndex++;
+
+ if (bSortByXValues)
+ pSeries->doSortByXValues();
+
+ pSeries->setConnectBars(bConnectBars);
+ pSeries->setGroupBarsPerAxis(bGroupBarsPerAxis);
+ pSeries->setStartingAngle(nStartingAngle);
+
+ pSeries->setMissingValueTreatment(nMissingValueTreatment);
+
+ OUString aSeriesParticle(ObjectIdentifier::createParticleForSeries(0, nCS, nT, nS));
+ pSeries->setParticle(aSeriesParticle);
+
+ OUString aRole(ChartTypeHelper::getRoleOfSequenceForDataLabelNumberFormatDetection(
+ xChartType));
+ pSeries->setRoleOfSequenceForDataLabelNumberFormatDetection(aRole);
+
+ //ignore secondary axis for charttypes that do not support them
+ if (pSeries->getAttachedAxisIndex() != MAIN_AXIS_INDEX
+ && (!ChartTypeHelper::isSupportingSecondaryAxis(xChartType, nDimensionCount)
+ || !bSecondaryYaxisVisible))
+ {
+ pSeries->setAttachedAxisIndex(MAIN_AXIS_INDEX);
+ }
+
+ StackingDirection eDirection = pSeries->getStackingDirection();
+ switch (eDirection)
+ {
+ case StackingDirection_NO_STACKING:
+ xSlot++;
+ ySlot = -1;
+ if (zSlot < 0)
+ zSlot = 0;
+ break;
+ case StackingDirection_Y_STACKING:
+ ySlot++;
+ if (xSlot < 0)
+ xSlot = 0;
+ if (zSlot < 0)
+ zSlot = 0;
+ break;
+ case StackingDirection_Z_STACKING:
+ zSlot++;
+ xSlot = -1;
+ ySlot = -1;
+ break;
+ default:
+ // UNO enums have one additional auto-generated case
+ break;
+ }
+ pPlotter->addSeries(std::move(pSeries), zSlot, xSlot, ySlot);
+ }
+ }
+ }
+
+ auto order
+ = [](const std::unique_ptr<VSeriesPlotter>& a, const std::unique_ptr<VSeriesPlotter>& b) {
+ return a->getRenderOrder() < b->getRenderOrder();
+ };
+
+ std::stable_sort(m_aSeriesPlotterList.begin(), m_aSeriesPlotterList.end(), order);
+
+ //transport seriesnames to the coordinatesystems if needed
+ if (m_aSeriesPlotterList.empty())
+ return;
+
+ uno::Sequence<OUString> aSeriesNames;
+ bool bSeriesNamesInitialized = false;
+ for (auto& pVCooSys : m_rVCooSysList)
+ {
+ if (pVCooSys->needSeriesNamesForAxis())
+ {
+ if (!bSeriesNamesInitialized)
+ {
+ aSeriesNames = m_aSeriesPlotterList[0]->getSeriesNames();
+ bSeriesNamesInitialized = true;
+ }
+ pVCooSys->setSeriesNamesForAxis(aSeriesNames);
+ }
+ }
+}
+
+bool SeriesPlotterContainer::isCategoryPositionShifted(const chart2::ScaleData& rSourceScale,
+ bool bHasComplexCategories)
+{
+ if (rSourceScale.AxisType == AxisType::CATEGORY)
+ return bHasComplexCategories || rSourceScale.ShiftedCategoryPosition
+ || m_bTableShiftPosition || m_bChartTypeUsesShiftedCategoryPositionPerDefault;
+
+ if (rSourceScale.AxisType == AxisType::DATE)
+ return rSourceScale.ShiftedCategoryPosition;
+
+ return rSourceScale.AxisType == AxisType::SERIES;
+}
+
+void SeriesPlotterContainer::initAxisUsageList(const Date& rNullDate)
+{
+ m_aAxisUsageList.clear();
+
+ // Loop through coordinate systems in the diagram (though for now
+ // there should only be one coordinate system per diagram).
+ for (auto& pVCooSys : m_rVCooSysList)
+ {
+ rtl::Reference<BaseCoordinateSystem> xCooSys = pVCooSys->getModel();
+ sal_Int32 nDimCount = xCooSys->getDimension();
+ bool bComplexCategoryAllowed = ChartTypeHelper::isSupportingComplexCategory(
+ AxisHelper::getChartTypeByIndex(xCooSys, 0));
+
+ for (sal_Int32 nDimIndex = 0; nDimIndex < nDimCount; ++nDimIndex)
+ {
+ bool bDateAxisAllowed = ChartTypeHelper::isSupportingDateAxis(
+ AxisHelper::getChartTypeByIndex(xCooSys, 0), nDimIndex);
+
+ // Each dimension may have primary and secondary axes.
+ const sal_Int32 nMaxAxisIndex = xCooSys->getMaximumAxisIndexByDimension(nDimIndex);
+ for (sal_Int32 nAxisIndex = 0; nAxisIndex <= nMaxAxisIndex; ++nAxisIndex)
+ {
+ rtl::Reference<Axis> xAxis = xCooSys->getAxisByDimension2(nDimIndex, nAxisIndex);
+
+ if (!xAxis.is())
+ continue;
+
+ if (m_aAxisUsageList.find(xAxis) == m_aAxisUsageList.end())
+ {
+ // Create axis usage object for this axis.
+
+ chart2::ScaleData aSourceScale = xAxis->getScaleData();
+ ExplicitCategoriesProvider* pCatProvider
+ = pVCooSys->getExplicitCategoriesProvider();
+ if (nDimIndex == 0)
+ AxisHelper::checkDateAxis(aSourceScale, pCatProvider, bDateAxisAllowed);
+
+ bool bHasComplexCat = pCatProvider && pCatProvider->hasComplexCategories()
+ && bComplexCategoryAllowed;
+ aSourceScale.ShiftedCategoryPosition
+ = isCategoryPositionShifted(aSourceScale, bHasComplexCat);
+
+ m_aAxisUsageList[xAxis].aAutoScaling = ScaleAutomatism(aSourceScale, rNullDate);
+ }
+
+ AxisUsage& rAxisUsage = m_aAxisUsageList[xAxis];
+ rAxisUsage.addCoordinateSystem(pVCooSys.get(), nDimIndex, nAxisIndex);
+ }
+ }
+ }
+
+ // Determine the highest axis index of all dimensions.
+ m_nMaxAxisIndex = 0;
+ for (const auto& pVCooSys : m_rVCooSysList)
+ {
+ uno::Reference<XCoordinateSystem> xCooSys = pVCooSys->getModel();
+ sal_Int32 nDimCount = xCooSys->getDimension();
+
+ for (sal_Int32 nDimIndex = 0; nDimIndex < nDimCount; ++nDimIndex)
+ {
+ for (auto& axisUsage : m_aAxisUsageList)
+ {
+ sal_Int32 nLocalMax = axisUsage.second.getMaxAxisIndexForDimension(nDimIndex);
+ if (m_nMaxAxisIndex < nLocalMax)
+ m_nMaxAxisIndex = nLocalMax;
+ }
+ }
+ }
+}
+
+void SeriesPlotterContainer::setScalesFromCooSysToPlotter()
+{
+ //set scales to plotter to enable them to provide the preferred scene AspectRatio
+ for (const std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList)
+ {
+ VSeriesPlotter* pSeriesPlotter = aPlotter.get();
+ VCoordinateSystem* pVCooSys
+ = SeriesPlotterContainer::getCooSysForPlotter(m_rVCooSysList, pSeriesPlotter);
+ if (pVCooSys)
+ {
+ pSeriesPlotter->setScales(pVCooSys->getExplicitScales(0, 0),
+ pVCooSys->getPropertySwapXAndYAxis());
+ sal_Int32 nMaxAxisIndex = pVCooSys->getMaximumAxisIndexByDimension(
+ 1); //only additional value axis are relevant for series plotter
+ for (sal_Int32 nI = 1; nI <= nMaxAxisIndex; nI++)
+ pSeriesPlotter->addSecondaryValueScale(pVCooSys->getExplicitScale(1, nI), nI);
+ }
+ }
+}
+
+void SeriesPlotterContainer::setNumberFormatsFromAxes()
+{
+ //set numberformats to plotter to enable them to display the data labels in the numberformat of the axis
+ for (const std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList)
+ {
+ VSeriesPlotter* pSeriesPlotter = aPlotter.get();
+ VCoordinateSystem* pVCooSys
+ = SeriesPlotterContainer::getCooSysForPlotter(m_rVCooSysList, pSeriesPlotter);
+ if (pVCooSys)
+ {
+ AxesNumberFormats aAxesNumberFormats;
+ const rtl::Reference<BaseCoordinateSystem>& xCooSys = pVCooSys->getModel();
+ sal_Int32 nDimensionCount = xCooSys->getDimension();
+ for (sal_Int32 nDimensionIndex = 0; nDimensionIndex < nDimensionCount;
+ ++nDimensionIndex)
+ {
+ const sal_Int32 nMaximumAxisIndex
+ = xCooSys->getMaximumAxisIndexByDimension(nDimensionIndex);
+ for (sal_Int32 nAxisIndex = 0; nAxisIndex <= nMaximumAxisIndex; ++nAxisIndex)
+ {
+ try
+ {
+ rtl::Reference<Axis> xAxisProp
+ = xCooSys->getAxisByDimension2(nDimensionIndex, nAxisIndex);
+ if (xAxisProp.is())
+ {
+ sal_Int32 nNumberFormatKey(0);
+ if (xAxisProp->getPropertyValue(CHART_UNONAME_NUMFMT)
+ >>= nNumberFormatKey)
+ {
+ aAxesNumberFormats.setFormat(nNumberFormatKey, nDimensionIndex,
+ nAxisIndex);
+ }
+ else if (nDimensionIndex == 0)
+ {
+ //provide a default date format for date axis with own data
+ aAxesNumberFormats.setFormat(m_nDefaultDateNumberFormat,
+ nDimensionIndex, nAxisIndex);
+ }
+ }
+ }
+ catch (const lang::IndexOutOfBoundsException&)
+ {
+ TOOLS_WARN_EXCEPTION("chart2", "");
+ }
+ }
+ }
+ }
+ }
+}
+
+void SeriesPlotterContainer::updateScalesAndIncrementsOnAxes()
+{
+ for (auto& nC : m_rVCooSysList)
+ nC->updateScalesAndIncrementsOnAxes();
+}
+
+void SeriesPlotterContainer::doAutoScaling(ChartModel& rChartModel)
+{
+ if (m_aSeriesPlotterList.empty() || m_aAxisUsageList.empty())
+ // We need these two containers populated to do auto-scaling. Bail out.
+ return;
+
+ //iterate over the main scales first than secondary axis
+ for (sal_Int32 nAxisIndex = 0; nAxisIndex <= m_nMaxAxisIndex; ++nAxisIndex)
+ {
+ // - first do autoscale for all x and z scales (because they are treated independent)
+ for (auto & [ rAxis, rAxisUsage ] : m_aAxisUsageList)
+ {
+ (void)rAxis;
+ rAxisUsage.prepareAutomaticAxisScaling(rAxisUsage.aAutoScaling, 0, nAxisIndex);
+ rAxisUsage.prepareAutomaticAxisScaling(rAxisUsage.aAutoScaling, 2, nAxisIndex);
+
+ ExplicitScaleData aExplicitScale;
+ ExplicitIncrementData aExplicitIncrement;
+ rAxisUsage.aAutoScaling.calculateExplicitScaleAndIncrement(aExplicitScale,
+ aExplicitIncrement);
+
+ rAxisUsage.setExplicitScaleAndIncrement(0, nAxisIndex, aExplicitScale,
+ aExplicitIncrement);
+ rAxisUsage.setExplicitScaleAndIncrement(2, nAxisIndex, aExplicitScale,
+ aExplicitIncrement);
+ }
+
+ // - second do autoscale for the dependent y scales (the coordinate systems are prepared with x and z scales already )
+ for (auto & [ rAxis, rAxisUsage ] : m_aAxisUsageList)
+ {
+ (void)rAxis;
+ rAxisUsage.prepareAutomaticAxisScaling(rAxisUsage.aAutoScaling, 1, nAxisIndex);
+
+ ExplicitScaleData aExplicitScale;
+ ExplicitIncrementData aExplicitIncrement;
+ rAxisUsage.aAutoScaling.calculateExplicitScaleAndIncrement(aExplicitScale,
+ aExplicitIncrement);
+
+ rAxisUsage.setExplicitScaleAndIncrement(0, nAxisIndex, aExplicitScale,
+ aExplicitIncrement);
+ rAxisUsage.setExplicitScaleAndIncrement(1, nAxisIndex, aExplicitScale,
+ aExplicitIncrement);
+ rAxisUsage.setExplicitScaleAndIncrement(2, nAxisIndex, aExplicitScale,
+ aExplicitIncrement);
+ }
+ }
+ AdaptScaleOfYAxisWithoutAttachedSeries(rChartModel);
+}
+
+void SeriesPlotterContainer::AdaptScaleOfYAxisWithoutAttachedSeries(ChartModel& rModel)
+{
+ //issue #i80518#
+ for (sal_Int32 nAxisIndex = 0; nAxisIndex <= m_nMaxAxisIndex; nAxisIndex++)
+ {
+ for (auto & [ rAxis, rAxisUsage ] : m_aAxisUsageList)
+ {
+ (void)rAxis;
+ std::vector<VCoordinateSystem*> aVCooSysList_Y
+ = rAxisUsage.getCoordinateSystems(1, nAxisIndex);
+ if (aVCooSysList_Y.empty())
+ continue;
+
+ rtl::Reference<Diagram> xDiagram(rModel.getFirstChartDiagram());
+ if (!xDiagram.is())
+ continue;
+
+ bool bSeriesAttachedToThisAxis = false;
+ sal_Int32 nAttachedAxisIndex = -1;
+ {
+ std::vector<rtl::Reference<DataSeries>> aSeriesVector = xDiagram->getDataSeries();
+ for (auto const& series : aSeriesVector)
+ {
+ sal_Int32 nCurrentIndex = DataSeriesHelper::getAttachedAxisIndex(series);
+ if (nAxisIndex == nCurrentIndex)
+ {
+ bSeriesAttachedToThisAxis = true;
+ break;
+ }
+ else if (nAttachedAxisIndex < 0 || nAttachedAxisIndex > nCurrentIndex)
+ nAttachedAxisIndex = nCurrentIndex;
+ }
+ }
+
+ if (bSeriesAttachedToThisAxis || nAttachedAxisIndex < 0)
+ continue;
+
+ for (VCoordinateSystem* nC : aVCooSysList_Y)
+ {
+ nC->prepareAutomaticAxisScaling(rAxisUsage.aAutoScaling, 1, nAttachedAxisIndex);
+
+ ExplicitScaleData aExplicitScaleSource
+ = nC->getExplicitScale(1, nAttachedAxisIndex);
+ ExplicitIncrementData aExplicitIncrementSource
+ = nC->getExplicitIncrement(1, nAttachedAxisIndex);
+
+ ExplicitScaleData aExplicitScaleDest = nC->getExplicitScale(1, nAxisIndex);
+ ExplicitIncrementData aExplicitIncrementDest
+ = nC->getExplicitIncrement(1, nAxisIndex);
+
+ aExplicitScaleDest.Orientation = aExplicitScaleSource.Orientation;
+ aExplicitScaleDest.Scaling = aExplicitScaleSource.Scaling;
+ aExplicitScaleDest.AxisType = aExplicitScaleSource.AxisType;
+
+ aExplicitIncrementDest.BaseValue = aExplicitIncrementSource.BaseValue;
+
+ ScaleData aScale(rAxisUsage.aAutoScaling.getScale());
+ if (!aScale.Minimum.hasValue())
+ {
+ bool bNewMinOK = true;
+ double fMax = 0.0;
+ if (aScale.Maximum >>= fMax)
+ bNewMinOK = (aExplicitScaleSource.Minimum <= fMax);
+ if (bNewMinOK)
+ aExplicitScaleDest.Minimum = aExplicitScaleSource.Minimum;
+ }
+ else
+ aExplicitIncrementDest.BaseValue = aExplicitScaleDest.Minimum;
+
+ if (!aScale.Maximum.hasValue())
+ {
+ bool bNewMaxOK = true;
+ double fMin = 0.0;
+ if (aScale.Minimum >>= fMin)
+ bNewMaxOK = (fMin <= aExplicitScaleSource.Maximum);
+ if (bNewMaxOK)
+ aExplicitScaleDest.Maximum = aExplicitScaleSource.Maximum;
+ }
+ if (!aScale.Origin.hasValue())
+ aExplicitScaleDest.Origin = aExplicitScaleSource.Origin;
+
+ if (!aScale.IncrementData.Distance.hasValue())
+ aExplicitIncrementDest.Distance = aExplicitIncrementSource.Distance;
+
+ bool bAutoMinorInterval = true;
+ if (aScale.IncrementData.SubIncrements.hasElements())
+ bAutoMinorInterval
+ = !(aScale.IncrementData.SubIncrements[0].IntervalCount.hasValue());
+ if (bAutoMinorInterval)
+ {
+ if (!aExplicitIncrementDest.SubIncrements.empty()
+ && !aExplicitIncrementSource.SubIncrements.empty())
+ aExplicitIncrementDest.SubIncrements[0].IntervalCount
+ = aExplicitIncrementSource.SubIncrements[0].IntervalCount;
+ }
+
+ nC->setExplicitScaleAndIncrement(1, nAxisIndex, aExplicitScaleDest,
+ aExplicitIncrementDest);
+ }
+ }
+ }
+
+ if (!AxisHelper::isAxisPositioningEnabled())
+ return;
+
+ //correct origin for y main axis (the origin is where the other main axis crosses)
+ sal_Int32 nAxisIndex = 0;
+ sal_Int32 nDimensionIndex = 1;
+ for (auto & [ rAxis, rAxisUsage ] : m_aAxisUsageList)
+ {
+ (void)rAxis;
+ std::vector<VCoordinateSystem*> aVCooSysList
+ = rAxisUsage.getCoordinateSystems(nDimensionIndex, nAxisIndex);
+ size_t nC;
+ for (nC = 0; nC < aVCooSysList.size(); nC++)
+ {
+ ExplicitScaleData aExplicitScale(
+ aVCooSysList[nC]->getExplicitScale(nDimensionIndex, nAxisIndex));
+ ExplicitIncrementData aExplicitIncrement(
+ aVCooSysList[nC]->getExplicitIncrement(nDimensionIndex, nAxisIndex));
+
+ rtl::Reference<BaseCoordinateSystem> xCooSys(aVCooSysList[nC]->getModel());
+ rtl::Reference<Axis> xAxis = xCooSys->getAxisByDimension2(nDimensionIndex, nAxisIndex);
+ rtl::Reference<Axis> xCrossingMainAxis
+ = AxisHelper::getCrossingMainAxis(xAxis, xCooSys);
+
+ if (xCrossingMainAxis.is())
+ {
+ css::chart::ChartAxisPosition eCrossingMainAxisPos(
+ css::chart::ChartAxisPosition_ZERO);
+ xCrossingMainAxis->getPropertyValue("CrossoverPosition") >>= eCrossingMainAxisPos;
+ if (eCrossingMainAxisPos == css::chart::ChartAxisPosition_VALUE)
+ {
+ double fValue = 0.0;
+ xCrossingMainAxis->getPropertyValue("CrossoverValue") >>= fValue;
+ aExplicitScale.Origin = fValue;
+ }
+ else if (eCrossingMainAxisPos == css::chart::ChartAxisPosition_ZERO)
+ aExplicitScale.Origin = 0.0;
+ else if (eCrossingMainAxisPos == css::chart::ChartAxisPosition_START)
+ aExplicitScale.Origin = aExplicitScale.Minimum;
+ else if (eCrossingMainAxisPos == css::chart::ChartAxisPosition_END)
+ aExplicitScale.Origin = aExplicitScale.Maximum;
+ }
+
+ aVCooSysList[nC]->setExplicitScaleAndIncrement(nDimensionIndex, nAxisIndex,
+ aExplicitScale, aExplicitIncrement);
+ }
+ }
+}
+
+drawing::Direction3D SeriesPlotterContainer::getPreferredAspectRatio()
+{
+ drawing::Direction3D aPreferredAspectRatio(1.0, 1.0, 1.0);
+
+ //get a list of all preferred aspect ratios and combine them
+ //first with special demands wins (less or equal zero <-> arbitrary)
+ double fx, fy, fz;
+ fx = fy = fz = -1.0;
+ for (const std::unique_ptr<VSeriesPlotter>& aPlotter : m_aSeriesPlotterList)
+ {
+ drawing::Direction3D aSingleRatio(aPlotter->getPreferredDiagramAspectRatio());
+ if (fx < 0 && aSingleRatio.DirectionX > 0)
+ fx = aSingleRatio.DirectionX;
+
+ if (fy < 0 && aSingleRatio.DirectionY > 0)
+ {
+ if (fx > 0 && aSingleRatio.DirectionX > 0)
+ fy = fx * aSingleRatio.DirectionY / aSingleRatio.DirectionX;
+ else if (fz > 0 && aSingleRatio.DirectionZ > 0)
+ fy = fz * aSingleRatio.DirectionY / aSingleRatio.DirectionZ;
+ else
+ fy = aSingleRatio.DirectionY;
+ }
+
+ if (fz < 0 && aSingleRatio.DirectionZ > 0)
+ {
+ if (fx > 0 && aSingleRatio.DirectionX > 0)
+ fz = fx * aSingleRatio.DirectionZ / aSingleRatio.DirectionX;
+ else if (fy > 0 && aSingleRatio.DirectionY > 0)
+ fz = fy * aSingleRatio.DirectionZ / aSingleRatio.DirectionY;
+ else
+ fz = aSingleRatio.DirectionZ;
+ }
+
+ if (fx > 0 && fy > 0 && fz > 0)
+ break;
+ }
+ aPreferredAspectRatio = drawing::Direction3D(fx, fy, fz);
+ return aPreferredAspectRatio;
+}
+
+} //end chart2 namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/main/SeriesPlotterContainer.hxx b/chart2/source/view/main/SeriesPlotterContainer.hxx
new file mode 100644
index 000000000000..38f3c8b909c8
--- /dev/null
+++ b/chart2/source/view/main/SeriesPlotterContainer.hxx
@@ -0,0 +1,160 @@
+/* -*- 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 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 .
+ */
+
+#include <config_feature_desktop.h>
+#include <VSeriesPlotter.hxx>
+#include <BaseCoordinateSystem.hxx>
+#include "AxisUsage.hxx"
+
+namespace chart
+{
+/** This class is a container of `SeriesPlotter` objects (such as `PieChart`
+ * instances). It is used for initializing coordinate systems, axes and scales
+ * of all series plotters which belongs to the container.
+ */
+class SeriesPlotterContainer
+{
+public:
+ explicit SeriesPlotterContainer(std::vector<std::unique_ptr<VCoordinateSystem>>& rVCooSysList);
+ ~SeriesPlotterContainer();
+
+ /** It is used to set coordinate systems (`m_rVCooSysList`), this method
+ * is invoked by `ChartView::createShapes2D` before of
+ * `ChartView::impl_createDiagramAndContent`.
+ * Coordinate systems are retrieved through the `XCoordinateSystemContainer`
+ * interface implemented by a diagram object which is provided by the
+ * `ChartModel` object passed to the method (`rChartModel.getFirstDiagram()`).
+ *
+ * It is used for creating series plotters and appending them
+ * to `m_aSeriesPlotterList`. The created series plotters are initialized
+ * through data (number formats supplier, color scheme, data series),
+ * extracted from the chart model or the diagram objects. An exception is
+ * the explicit category provider that is retrieved through the
+ * `VCoordinateSystem` object used by the series plotter.
+ *
+ * It sets the minimum-maximum supplier for a coordinate system:
+ * this supplier is the series plotter itself which utilizes the given
+ * coordinate system. In fact `VSeriesPlotter` has `MinimumMaximumSupplier`
+ * as one of its base classes.
+ * Hence, for instance, a `PieChart`, which is a series plotter, is
+ * a `MinimumMaximumSupplier`, too.
+ */
+ void initializeCooSysAndSeriesPlotter(ChartModel& rModel);
+
+ /** This method is invoked by `ChartView::impl_createDiagramAndContent`.
+ * It iterates on every axis of every coordinate systems, and if the axis
+ * is not yet present in `m_aAxisUsageList` it creates a new `AxisUsage`
+ * object and initialize its `aAutoScaling` member to the `ScaleData`
+ * object of the current axis.
+ */
+ void initAxisUsageList(const Date& rNullDate);
+
+ /**
+ * Perform automatic axis scaling and determine the amount and spacing of
+ * increments. It assumes that the caller has determined the size of the
+ * largest axis label text object prior to calling this method.
+ *
+ * The new axis scaling data will be stored in the VCoordinateSystem
+ * objects. The label alignment direction for each axis will also get
+ * determined during this process, and stored in VAxis.
+ *
+ * This method is invoked by `ChartView::impl_createDiagramAndContent`
+ * soon after `initAxisUsageList`.
+ * It initializes explicit scale and increment objects for all coordinate
+ * systems in `m_rVCooSysList`.
+ * This action is achieved by iterating on the `m_aAxisUsageList` container,
+ * and performing 3 steps:
+ * 1- call `VCoordinateSystem::prepareAutomaticAxisScaling` for setting
+ * scaling parameters of the `aAutoScaling` member (a `ScaleAutomatism`
+ * object) for the current `AxisUsage` instance
+ * (see `VCoordinateSystem::prepareAutomaticAxisScaling`);
+ * 2- calculate the explicit scale and increment objects
+ * (see ScaleAutomatism::calculateExplicitScaleAndIncrement);
+ * 3- set the explicit scale and increment objects for each coordinate
+ * system.
+ */
+ void doAutoScaling(ChartModel& rModel);
+
+ /**
+ * After auto-scaling is performed, call this method to set the explicit
+ * scaling and increment data to all relevant VAxis objects.
+ */
+ void updateScalesAndIncrementsOnAxes();
+
+ /**
+ * After auto-scaling is performed, call this method to set the explicit
+ * scaling data to all the plotters.
+ */
+ void setScalesFromCooSysToPlotter();
+
+ void setNumberFormatsFromAxes();
+ css::drawing::Direction3D getPreferredAspectRatio();
+
+ std::vector<std::unique_ptr<VSeriesPlotter>>& getSeriesPlotterList()
+ {
+ return m_aSeriesPlotterList;
+ }
+ std::vector<std::unique_ptr<VCoordinateSystem>>& getCooSysList() { return m_rVCooSysList; }
+ std::vector<LegendEntryProvider*> getLegendEntryProviderList();
+
+ void AdaptScaleOfYAxisWithoutAttachedSeries(ChartModel& rModel);
+
+ bool isCategoryPositionShifted(const css::chart2::ScaleData& rSourceScale,
+ bool bHasComplexCategories);
+
+ static VCoordinateSystem*
+ getCooSysForPlotter(const std::vector<std::unique_ptr<VCoordinateSystem>>& rVCooSysList,
+ MinimumAndMaximumSupplier* pMinimumAndMaximumSupplier);
+ static VCoordinateSystem*
+ addCooSysToList(std::vector<std::unique_ptr<VCoordinateSystem>>& rVCooSysList,
+ const rtl::Reference<BaseCoordinateSystem>& xCooSys, ChartModel& rChartModel);
+ static VCoordinateSystem*
+ findInCooSysList(const std::vector<std::unique_ptr<VCoordinateSystem>>& rVCooSysList,
+ const rtl::Reference<BaseCoordinateSystem>& xCooSys);
+
+private:
+ /** A vector of series plotters.
+ */
+ std::vector<std::unique_ptr<VSeriesPlotter>> m_aSeriesPlotterList;
+
+ /** A vector of coordinate systems.
+ */
+ std::vector<std::unique_ptr<VCoordinateSystem>>& m_rVCooSysList;
+
+ /** A map whose key is a `XAxis` interface and the related value is
+ * an object of `AxisUsage` type.
+ */
+ std::map<rtl::Reference<Axis>, AxisUsage> m_aAxisUsageList;
+
+ /**
+ * Max axis index of all dimensions. Currently this can be either 0 or 1
+ * since we only support primary and secondary axes per dimension. The
+ * value of 0 means all dimensions have only primary axis, while 1 means
+ * at least one dimension has a secondary axis.
+ */
+ sal_Int32 m_nMaxAxisIndex;
+
+ bool m_bChartTypeUsesShiftedCategoryPositionPerDefault;
+ bool m_bTableShiftPosition = false;
+ sal_Int32 m_nDefaultDateNumberFormat;
+};
+
+} //end chart2 namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index c44988d58774..c681c581a7b3 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -41,7 +41,6 @@
#include <com/sun/star/drawing/XShapes2.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Any.hxx>
@@ -53,12 +52,14 @@
#include <basegfx/matrix/b3dhommatrix.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdopath.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/helpers.hxx>
#include <tools/UnitConversion.hxx>
#include <sal/log.hxx>
#include <algorithm>
+#include <cmath>
+#include <cstddef>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
@@ -85,7 +86,7 @@ css::drawing::PolyPolygonShape3D toPolyPolygonShape3D(const std::vector<std::vec
aUnoPoly.SequenceX.realloc(rPoints.size());
aUnoPoly.SequenceY.realloc(rPoints.size());
aUnoPoly.SequenceZ.realloc(rPoints.size());
- for (sal_Int32 nPolygonIndex=0; nPolygonIndex<static_cast<sal_Int32>(rPoints.size()); ++nPolygonIndex)
+ for (std::size_t nPolygonIndex=0; nPolygonIndex<rPoints.size(); ++nPolygonIndex)
{
drawing::DoubleSequence* pOuterSequenceX = &aUnoPoly.SequenceX.getArray()[nPolygonIndex];
drawing::DoubleSequence* pOuterSequenceY = &aUnoPoly.SequenceY.getArray()[nPolygonIndex];
@@ -96,7 +97,7 @@ css::drawing::PolyPolygonShape3D toPolyPolygonShape3D(const std::vector<std::vec
double* pInnerSequenceX = pOuterSequenceX->getArray();
double* pInnerSequenceY = pOuterSequenceY->getArray();
double* pInnerSequenceZ = pOuterSequenceZ->getArray();
- for (sal_Int32 nPointIndex=0; nPointIndex<static_cast<sal_Int32>(rPoints[nPolygonIndex].size()); ++nPointIndex)
+ for (std::size_t nPointIndex=0; nPointIndex<rPoints[nPolygonIndex].size(); ++nPointIndex)
{
auto& rPos = rPoints[nPolygonIndex][nPointIndex];
pInnerSequenceX[nPointIndex] = rPos.PositionX;
@@ -120,8 +121,8 @@ rtl::Reference<SvxShapeGroupAnyD> ShapeFactory::getOrCreateChartRootShape(
// shape is identified by having the name com.sun.star.chart2.shapes.
rtl::Reference<SvxShapeGroup> xShapeGroup = new SvxShapeGroup(nullptr, nullptr);
xShapeGroup->setShapeKind(SdrObjKind::Group);
- uno::Reference<drawing::XShape> xShape(static_cast<cppu::OWeakObject*>(xShapeGroup.get()), uno::UNO_QUERY);
- xDrawPage->addBottom(xShape);
+ // cast to resolve ambiguity in converting to XShape
+ xDrawPage->addBottom(static_cast<SvxShape*>(xShapeGroup.get()));
setShapeName(xShapeGroup, "com.sun.star.chart2.shapes");
xShapeGroup->setSize(awt::Size(0,0));
@@ -430,7 +431,7 @@ rtl::Reference<Svx3DExtrudeObject>
//create shape
rtl::Reference<Svx3DExtrudeObject> xShape = new Svx3DExtrudeObject(nullptr);
xShape->setShapeKind(SdrObjKind::E3D_Extrusion);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
//set properties
try
@@ -665,7 +666,7 @@ rtl::Reference<Svx3DLatheObject>
//create shape
rtl::Reference<Svx3DLatheObject> xShape = new Svx3DLatheObject(nullptr);
xShape->setShapeKind(SdrObjKind::E3D_Lathe);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
double fWidth = rSize.DirectionX/2.0; //The depth will be corrected within Matrix
double fRadius = fWidth; //!!!!!!!! problem in drawing layer: rotation object calculates wrong needed size -> wrong camera (it's a problem with bounding boxes)
@@ -895,7 +896,13 @@ rtl::Reference<SvxShapePolyPolygon>
//create shape
rtl::Reference<SvxShapePolyPolygon> xShape = new SvxShapePolyPolygon(nullptr);
xShape->setShapeKind(SdrObjKind::PathFill); // aka ClosedBezierShape
- xTarget->add(xShape); //need to add the shape before setting of properties
+ xTarget->addShape(*xShape); //need to add the shape before setting of properties
+
+ if (std::isnan(fUnitCircleWidthAngleDegree))
+ {
+ SAL_WARN("chart2", "fUnitCircleWidthAngleDegree isNaN");
+ return xShape;
+ }
//set properties
try
@@ -942,7 +949,7 @@ rtl::Reference<Svx3DExtrudeObject>
//create shape
rtl::Reference<Svx3DExtrudeObject> xShape = new Svx3DExtrudeObject(nullptr);
xShape->setShapeKind(SdrObjKind::E3D_Extrusion);
- xTarget->add(xShape); //need to add the shape before setting of properties
+ xTarget->addShape(*xShape); //need to add the shape before setting of properties
//set properties
try
@@ -1012,7 +1019,7 @@ rtl::Reference<Svx3DPolygonObject>
//create shape
rtl::Reference<Svx3DPolygonObject> xShape = new Svx3DPolygonObject(nullptr);
xShape->setShapeKind(SdrObjKind::E3D_Polygon);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
//set properties
try
@@ -1066,7 +1073,7 @@ rtl::Reference<Svx3DExtrudeObject>
//create shape
rtl::Reference<Svx3DExtrudeObject> xShape = new Svx3DExtrudeObject(nullptr);
xShape->setShapeKind(SdrObjKind::E3D_Extrusion);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
css::drawing::PolyPolygonShape3D aUnoPolyPolygon = toPolyPolygonShape3D(rPolyPolygon);
@@ -1107,21 +1114,16 @@ rtl::Reference<Svx3DExtrudeObject>
return xShape;
}
-SdrPathObj*
+rtl::Reference<SvxShapePolyPolygon>
ShapeFactory::createArea2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
- , const std::vector<std::vector<css::drawing::Position3D>>& rPolyPolygon
- , bool bSetZOrderToZero )
+ , const std::vector<std::vector<css::drawing::Position3D>>& rPolyPolygon )
{
if( !xTarget.is() )
return nullptr;
//create shape
- SdrPathObj* pPath = new SdrPathObj(xTarget->GetSdrObject()->getSdrModelFromSdrObject(), SdrObjKind::Polygon);
- if (bSetZOrderToZero)
- // insert at ZOrder 0, an area should always be behind other shapes
- xTarget->GetSdrObject()->GetSubList()->InsertObject(pPath, 0);
- else
- xTarget->GetSdrObject()->GetSubList()->InsertObject(pPath);
+ rtl::Reference<SdrPathObj> pPath = new SdrPathObj(xTarget->GetSdrObject()->getSdrModelFromSdrObject(), SdrObjKind::Polygon);
+ xTarget->GetSdrObject()->GetSubList()->InsertObject(pPath.get());
//set properties
try
@@ -1136,10 +1138,10 @@ SdrPathObj*
{
TOOLS_WARN_EXCEPTION("chart2", "" );
}
- return pPath;
+ return static_cast<SvxShapePolyPolygon*>(pPath->getUnoShape().get());
}
-static drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& rPos
+static drawing::PointSequenceSequence createPolyPolygon_Symbol( const drawing::Position3D& rPos
, const drawing::Direction3D& rSize
, sal_Int32 nStandardSymbol )
{
@@ -1186,267 +1188,196 @@ static drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Posi
break;
}
- drawing::PolyPolygonShape3D aPP;
-
- aPP.SequenceX.realloc(1);
- aPP.SequenceY.realloc(1);
- aPP.SequenceZ.realloc(1);
+ drawing::PointSequenceSequence aPP;
- drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray();
- drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray();
- drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray();
+ aPP.realloc(1);
- pOuterSequenceX->realloc(nPointCount);
- pOuterSequenceY->realloc(nPointCount);
- pOuterSequenceZ->realloc(nPointCount);
+ uno::Sequence<awt::Point>* pOuterSequence = aPP.getArray();
- double* pInnerSequenceX = pOuterSequenceX->getArray();
- double* pInnerSequenceY = pOuterSequenceY->getArray();
- double* pInnerSequenceZ = pOuterSequenceZ->getArray();
+ pOuterSequence->realloc(nPointCount);
- for(sal_Int32 nN = nPointCount; nN--;)
- *pInnerSequenceZ++ = 0.0;
+ awt::Point* pInnerSequence = pOuterSequence->getArray();
+ auto toPoint = [](double x, double y) -> awt::Point
+ {
+ return { static_cast<sal_Int32>(x), static_cast<sal_Int32>(y) };
+ };
switch(eSymbolType)
{
case Symbol_Square:
{
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fHeightH );
break;
}
case Symbol_UpArrow:
{
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX, fY-fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY+fHeightH );
break;
}
case Symbol_DownArrow:
{
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX, fY+fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fHeightH );
break;
}
case Symbol_RightArrow:
{
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fHeightH );
break;
}
case Symbol_LeftArrow:
{
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY );
break;
}
case Symbol_Bowtie:
{
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fHeightH );
break;
}
case Symbol_Sandglass:
{
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY+fHeightH );
break;
}
case Symbol_Diamond:
{
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY );
- *pInnerSequenceX++ = fX;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX, fY+fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY );
- *pInnerSequenceX++ = fX;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX, fY-fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY );
break;
}
case Symbol_HorizontalBar:
{
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-0.2*fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-0.2*fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY-0.2*fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY-0.2*fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY+0.2*fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY+0.2*fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY+0.2*fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY+0.2*fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-0.2*fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-0.2*fHeightH );
break;
}
case Symbol_VerticalBar:
{
- *pInnerSequenceX++ = fX-0.2*fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-0.2*fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX+0.2*fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX+0.2*fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX+0.2*fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX+0.2*fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX-0.2*fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX-0.2*fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX-0.2*fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-0.2*fWidthH, fY-fHeightH );
break;
}
case Symbol_Circle:
{
- double fOmega = 1.5707963267948966192 / (nQuarterCount + 1.0);
+ double fOmega = M_PI_2 / (nQuarterCount + 1.0);
// one point in the middle of each edge to get full size bounding rectangle
- *pInnerSequenceX++ = fX + fWidthH;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX + fWidthH, fY );
// 0 to PI/2
for (sal_Int32 i = 1; i <= nQuarterCount; ++i)
{
- *pInnerSequenceX++ = fX + fWidthH * cos( i * fOmega );
- *pInnerSequenceY++ = fY - fHeightH * sin( i * fOmega );
+ *pInnerSequence++ = toPoint( fX + fWidthH * cos( i * fOmega ), fY - fHeightH * sin( i * fOmega ) );
}
// PI/2 to PI
- *pInnerSequenceX++ = fX;
- *pInnerSequenceY++ = fY - fHeightH;
+ *pInnerSequence++ = toPoint( fX, fY - fHeightH );
for (sal_Int32 i = 1; i <= nQuarterCount; ++i)
{
- *pInnerSequenceX++ = fX - fWidthH * sin( i * fOmega);
- *pInnerSequenceY++ = fY - fHeightH * cos( i * fOmega);
+ *pInnerSequence++ = toPoint( fX - fWidthH * sin( i * fOmega), fY - fHeightH * cos( i * fOmega) );
}
// PI to 3/2*PI
- *pInnerSequenceX++ = fX - fWidthH;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX - fWidthH, fY );
for (sal_Int32 i = 1; i <= nQuarterCount; ++i)
{
- *pInnerSequenceX++ = fX - fWidthH * cos( i * fOmega);
- *pInnerSequenceY++ = fY + fHeightH * sin( i * fOmega);
+ *pInnerSequence++ = toPoint( fX - fWidthH * cos( i * fOmega), fY + fHeightH * sin( i * fOmega) );
}
// 3/2*PI to 2*PI
- *pInnerSequenceX++ = fX;
- *pInnerSequenceY++ = fY + fHeightH;
+ *pInnerSequence++ = toPoint( fX, fY + fHeightH );
for (sal_Int32 i = 1; i <= nQuarterCount; ++i)
{
- *pInnerSequenceX++ = fX + fWidthH * sin(i * fOmega);
- *pInnerSequenceY++ = fY + fHeightH * cos(i * fOmega);
+ *pInnerSequence++ = toPoint( fX + fWidthH * sin(i * fOmega), fY + fHeightH * cos(i * fOmega) );
}
// close polygon
- *pInnerSequenceX++ = fX + fWidthH;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX + fWidthH, fY );
break;
}
case Symbol_Star:
{
- *pInnerSequenceX++ = fX;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX, fY-fHeightH );
- *pInnerSequenceX++ = fX+0.2*fWidthH;
- *pInnerSequenceY++ = fY-0.2*fHeightH;
+ *pInnerSequence++ = toPoint( fX+0.2*fWidthH, fY-0.2*fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY );
- *pInnerSequenceX++ = fX+0.2*fWidthH;
- *pInnerSequenceY++ = fY+0.2*fHeightH;
+ *pInnerSequence++ = toPoint( fX+0.2*fWidthH, fY+0.2*fHeightH );
- *pInnerSequenceX++ = fX;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX, fY+fHeightH );
- *pInnerSequenceX++ = fX-0.2*fWidthH;
- *pInnerSequenceY++ = fY+0.2*fHeightH;
+ *pInnerSequence++ = toPoint( fX-0.2*fWidthH, fY+0.2*fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY );
- *pInnerSequenceX++ = fX-0.2*fWidthH;
- *pInnerSequenceY++ = fY-0.2*fHeightH;
+ *pInnerSequence++ = toPoint( fX-0.2*fWidthH, fY-0.2*fHeightH );
- *pInnerSequenceX++ = fX;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX, fY-fHeightH );
break;
}
case Symbol_X:
@@ -1456,44 +1387,31 @@ static drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Posi
const double fSmall = sqrt(200.0);
const double fLarge = 128.0 - fSmall;
- *pInnerSequenceX++ = fX;
- *pInnerSequenceY++ = fY - fScaleY * fSmall;
+ *pInnerSequence++ = toPoint( fX, fY - fScaleY * fSmall );
- *pInnerSequenceX++ = fX - fScaleX * fLarge;
- *pInnerSequenceY++ = fY - fHeightH;
+ *pInnerSequence++ = toPoint( fX - fScaleX * fLarge, fY - fHeightH );
- *pInnerSequenceX++ = fX - fWidthH;
- *pInnerSequenceY++ = fY - fScaleY * fLarge;
+ *pInnerSequence++ = toPoint( fX - fWidthH, fY - fScaleY * fLarge );
- *pInnerSequenceX++ = fX - fScaleX * fSmall;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX - fScaleX * fSmall, fY );
- *pInnerSequenceX++ = fX - fWidthH;
- *pInnerSequenceY++ = fY + fScaleY * fLarge;
+ *pInnerSequence++ = toPoint( fX - fWidthH, fY + fScaleY * fLarge );
- *pInnerSequenceX++ = fX - fScaleX * fLarge;
- *pInnerSequenceY++ = fY + fHeightH;
+ *pInnerSequence++ = toPoint( fX - fScaleX * fLarge, fY + fHeightH );
- *pInnerSequenceX++ = fX;
- *pInnerSequenceY++ = fY + fScaleY * fSmall;
+ *pInnerSequence++ = toPoint( fX, fY + fScaleY * fSmall );
- *pInnerSequenceX++ = fX + fScaleX * fLarge;
- *pInnerSequenceY++ = fY + fHeightH;
+ *pInnerSequence++ = toPoint( fX + fScaleX * fLarge, fY + fHeightH );
- *pInnerSequenceX++ = fX + fWidthH;
- *pInnerSequenceY++ = fY + fScaleY * fLarge;
+ *pInnerSequence++ = toPoint( fX + fWidthH, fY + fScaleY * fLarge );
- *pInnerSequenceX++ = fX + fScaleX * fSmall;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX + fScaleX * fSmall, fY );
- *pInnerSequenceX++ = fX + fWidthH;
- *pInnerSequenceY++ = fY - fScaleY * fLarge;
+ *pInnerSequence++ = toPoint( fX + fWidthH, fY - fScaleY * fLarge );
- *pInnerSequenceX++ = fX + fScaleX * fLarge;
- *pInnerSequenceY++ = fY - fHeightH;
+ *pInnerSequence++ = toPoint( fX + fScaleX * fLarge, fY - fHeightH );
- *pInnerSequenceX++ = fX;
- *pInnerSequenceY++ = fY - fScaleY * fSmall;
+ *pInnerSequence++ = toPoint( fX, fY - fScaleY * fSmall );
break;
}
@@ -1505,44 +1423,31 @@ static drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Posi
const double fdX = fScaleX * fHalf;
const double fdY = fScaleY * fHalf;
- *pInnerSequenceX++ = fX-fdX;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fdX, fY-fHeightH );
- *pInnerSequenceX++ = fX-fdX;
- *pInnerSequenceY++ = fY-fdY;
+ *pInnerSequence++ = toPoint( fX-fdX, fY-fdY );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fdY;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fdY );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY+fdY;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY+fdY );
- *pInnerSequenceX++ = fX-fdX;
- *pInnerSequenceY++ = fY+fdY;
+ *pInnerSequence++ = toPoint( fX-fdX, fY+fdY );
- *pInnerSequenceX++ = fX-fdX;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX-fdX, fY+fHeightH );
- *pInnerSequenceX++ = fX+fdX;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX+fdX, fY+fHeightH );
- *pInnerSequenceX++ = fX+fdX;
- *pInnerSequenceY++ = fY+fdY;
+ *pInnerSequence++ = toPoint( fX+fdX, fY+fdY );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY+fdY;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY+fdY );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY-fdY;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY-fdY );
- *pInnerSequenceX++ = fX+fdX;
- *pInnerSequenceY++ = fY-fdY;
+ *pInnerSequence++ = toPoint( fX+fdX, fY-fdY );
- *pInnerSequenceX++ = fX+fdY;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX+fdY, fY-fHeightH );
- *pInnerSequenceX++ = fX-fdX;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fdX, fY-fHeightH );
break;
}
@@ -1559,80 +1464,56 @@ static drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Posi
const double fScaleY = fHeightH / 128.0;
//1
- *pInnerSequenceX++ = fX-fScaleX * fHalf;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fScaleX * fHalf, fY-fHeightH );
//2
- *pInnerSequenceX++ = fX-fScaleX * fHalf;
- *pInnerSequenceY++ = fY-fScaleY * fTwoY;
+ *pInnerSequence++ = toPoint( fX-fScaleX * fHalf, fY-fScaleY * fTwoY );
//3
- *pInnerSequenceX++ = fX-fScaleX * fThreeX;
- *pInnerSequenceY++ = fY-fScaleY * fThreeY;
+ *pInnerSequence++ = toPoint( fX-fScaleX * fThreeX, fY-fScaleY * fThreeY );
//4
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fScaleY * fFourY;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fScaleY * fFourY );
//5
- *pInnerSequenceX++ = fX-fScaleX * fFiveX;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX-fScaleX * fFiveX, fY );
//6 as 4
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY+fScaleY * fFourY;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY+fScaleY * fFourY );
//7 as 3
- *pInnerSequenceX++ = fX-fScaleX * fThreeX;
- *pInnerSequenceY++ = fY+fScaleY * fThreeY;
+ *pInnerSequence++ = toPoint( fX-fScaleX * fThreeX, fY+fScaleY * fThreeY );
//8 as 2
- *pInnerSequenceX++ = fX-fScaleX * fHalf;
- *pInnerSequenceY++ = fY+fScaleY * fTwoY;
+ *pInnerSequence++ = toPoint( fX-fScaleX * fHalf, fY+fScaleY * fTwoY );
//9 as 1
- *pInnerSequenceX++ = fX-fScaleX * fHalf;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX-fScaleX * fHalf, fY+fHeightH );
//10 as 1
- *pInnerSequenceX++ = fX+fScaleX * fHalf;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX+fScaleX * fHalf, fY+fHeightH );
//11 as 2
- *pInnerSequenceX++ = fX+fScaleX * fHalf;
- *pInnerSequenceY++ = fY+fScaleY * fTwoY;
+ *pInnerSequence++ = toPoint( fX+fScaleX * fHalf, fY+fScaleY * fTwoY );
//12 as 3
- *pInnerSequenceX++ = fX+fScaleX * fThreeX;
- *pInnerSequenceY++ = fY+fScaleY * fThreeY;
+ *pInnerSequence++ = toPoint( fX+fScaleX * fThreeX, fY+fScaleY * fThreeY );
//13 as 4
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY+fScaleY * fFourY;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY+fScaleY * fFourY );
//14 as 5
- *pInnerSequenceX++ = fX+fScaleX * fFiveX;
- *pInnerSequenceY++ = fY;
+ *pInnerSequence++ = toPoint( fX+fScaleX * fFiveX, fY );
//15 as 4
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY-fScaleY * fFourY;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY-fScaleY * fFourY );
//16 as 3
- *pInnerSequenceX++ = fX+fScaleX * fThreeX;
- *pInnerSequenceY++ = fY-fScaleY * fThreeY;
+ *pInnerSequence++ = toPoint( fX+fScaleX * fThreeX, fY-fScaleY * fThreeY );
//17 as 2
- *pInnerSequenceX++ = fX+fScaleX * fHalf;
- *pInnerSequenceY++ = fY-fScaleY * fTwoY;
+ *pInnerSequence++ = toPoint( fX+fScaleX * fHalf, fY-fScaleY * fTwoY );
// 18 as 1
- *pInnerSequenceX++ = fX+fScaleX * fHalf;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX+fScaleX * fHalf, fY-fHeightH );
// 19 = 1, closing
- *pInnerSequenceX++ = fX-fScaleX * fHalf;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fScaleX * fHalf, fY-fHeightH );
break;
}
default: //case Symbol_Square:
{
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY+fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY+fHeightH );
- *pInnerSequenceX++ = fX+fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX+fWidthH, fY-fHeightH );
- *pInnerSequenceX++ = fX-fWidthH;
- *pInnerSequenceY++ = fY-fHeightH;
+ *pInnerSequence++ = toPoint( fX-fWidthH, fY-fHeightH );
break;
}
}
@@ -1655,13 +1536,13 @@ rtl::Reference<SvxShapePolyPolygon>
//create shape
rtl::Reference<SvxShapePolyPolygon> xShape = new SvxShapePolyPolygon(nullptr);
xShape->setShapeKind(SdrObjKind::Polygon);
- xTarget->add(uno::Reference<drawing::XShape>(xShape));
+ xTarget->addShape(*xShape);
//set properties
try
{
- drawing::PointSequenceSequence aPoints( PolyToPointSequence(
- createPolyPolygon_Symbol( rPosition, rSize, nStandardSymbol ) ));
+ drawing::PointSequenceSequence aPoints =
+ createPolyPolygon_Symbol( rPosition, rSize, nStandardSymbol );
//Polygon
xShape->SvxShape::setPropertyValue( UNO_NAME_POLYPOLYGON
@@ -1698,7 +1579,7 @@ rtl::Reference<SvxGraphicObject>
//create shape
rtl::Reference<SvxGraphicObject> xShape = new SvxGraphicObject(nullptr);
xShape->setShapeKind(SdrObjKind::Graphic);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
try
{
@@ -1736,8 +1617,8 @@ rtl::Reference< SvxShapeGroup >
//create and add to target
rtl::Reference<SvxShapeGroup> xShapeGroup = new SvxShapeGroup(nullptr, nullptr);
xShapeGroup->setShapeKind(SdrObjKind::Group);
- uno::Reference< drawing::XShape > xShape(static_cast<cppu::OWeakObject*>(xShapeGroup.get()), uno::UNO_QUERY_THROW);
- xTarget->add(xShape);
+ // cast to resolve ambiguity in converting to XShape
+ xTarget->addShape(*xShapeGroup);
//set name
if(!aName.isEmpty())
@@ -1768,8 +1649,8 @@ rtl::Reference< SvxShapeGroup >
//create and add to target
rtl::Reference<SvxShapeGroup> xShapeGroup = new SvxShapeGroup(nullptr, nullptr);
xShapeGroup->setShapeKind(SdrObjKind::Group);
- uno::Reference< drawing::XShape > xShape(static_cast<cppu::OWeakObject*>(xShapeGroup.get()), uno::UNO_QUERY_THROW);
- xTarget->add(xShape);
+ // cast to resolve ambiguity in converting to XShape
+ xTarget->add(static_cast<SvxShape*>(xShapeGroup.get()));
//set name
if(!aName.isEmpty())
@@ -1800,7 +1681,7 @@ rtl::Reference<Svx3DSceneObject>
//create shape
rtl::Reference<Svx3DSceneObject> xShape = new Svx3DSceneObject(nullptr, nullptr);
xShape->setShapeKind(SdrObjKind::E3D_Scene);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
//it is necessary to set the transform matrix to initialize the scene properly
//otherwise all objects which are placed into this Group will not be visible
@@ -1842,7 +1723,7 @@ rtl::Reference<SvxShapeCircle>
//create shape
rtl::Reference<SvxShapeCircle> xShape = new SvxShapeCircle(nullptr);
xShape->setShapeKind(SdrObjKind::CircleOrEllipse);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
try
{
@@ -1877,7 +1758,7 @@ rtl::Reference<SvxShapeCircle>
{
rtl::Reference<SvxShapeCircle> xShape = new SvxShapeCircle(nullptr);
xShape->setShapeKind(SdrObjKind::CircleOrEllipse);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
xShape->setSize( rSize );
xShape->setPosition( rPosition );
@@ -1898,7 +1779,7 @@ rtl::Reference<Svx3DPolygonObject>
//create shape
rtl::Reference<Svx3DPolygonObject> xShape = new Svx3DPolygonObject(nullptr);
xShape->setShapeKind(SdrObjKind::E3D_Polygon);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
css::drawing::PolyPolygonShape3D aUnoPoly = toPolyPolygonShape3D(rPoints);
@@ -1969,7 +1850,7 @@ rtl::Reference<SvxShapePolyPolygon>
//create shape
rtl::Reference<SvxShapePolyPolygon> xShape = new SvxShapePolyPolygon(nullptr);
xShape->setShapeKind(SdrObjKind::PolyLine);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
//set properties
try
@@ -2032,7 +1913,7 @@ rtl::Reference<SvxShapePolyPolygon>
//create shape
rtl::Reference<SvxShapePolyPolygon> xShape = new SvxShapePolyPolygon(nullptr);
xShape->setShapeKind(SdrObjKind::PolyLine);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
drawing::PointSequenceSequence aAnyPoints = PolyToPointSequence(rPoints);
@@ -2090,7 +1971,7 @@ rtl::Reference<SvxShapePolyPolygon>
//create shape
rtl::Reference<SvxShapePolyPolygon> xShape = new SvxShapePolyPolygon(nullptr);
xShape->setShapeKind(SdrObjKind::Line);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
xShape->setSize( rSize );
xShape->setPosition( rPosition );
@@ -2108,7 +1989,7 @@ rtl::Reference<SvxShapeRect> ShapeFactory::createInvisibleRectangle(
rtl::Reference<SvxShapeRect> xShape = new SvxShapeRect(nullptr);
xShape->setShapeKind(SdrObjKind::Rectangle);
- xTarget->add( xShape );
+ xTarget->addShape( *xShape );
ShapeFactory::makeShapeInvisible( xShape );
xShape->setSize( rSize );
return xShape;
@@ -2133,11 +2014,12 @@ rtl::Reference<SvxShapeRect> ShapeFactory::createRectangle(
if (ePos == StackPosition::Bottom)
{
uno::Reference<drawing::XShapes2> xTarget2(static_cast<cppu::OWeakObject*>(xTarget.get()), uno::UNO_QUERY);
+ assert(xTarget2);
if (xTarget2.is())
xTarget2->addBottom(xShape);
}
else
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
xShape->setPosition( rPosition );
xShape->setSize( rSize );
@@ -2152,7 +2034,7 @@ rtl::Reference<SvxShapeRect>
{
rtl::Reference<SvxShapeRect> xShape = new SvxShapeRect(nullptr);
xShape->setShapeKind(SdrObjKind::Rectangle);
- xTarget->add( xShape );
+ xTarget->addShape( *xShape );
return xShape;
}
@@ -2173,7 +2055,7 @@ rtl::Reference<SvxShapeText>
//create shape and add to page
rtl::Reference<SvxShapeText> xShape = new SvxShapeText(nullptr);
xShape->setShapeKind(SdrObjKind::Text);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
//set text
xShape->setString( rText );
@@ -2200,7 +2082,7 @@ rtl::Reference<SvxShapeText>
rtl::Reference<SvxShapeText>
ShapeFactory::createText( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
- , uno::Sequence< uno::Reference< chart2::XFormattedString > >& xFormattedString
+ , const uno::Sequence< uno::Reference< chart2::XFormattedString > >& xFormattedString
, const tNameSequence& rPropNames
, const tAnySequence& rPropValues
, const uno::Any& rATransformation )
@@ -2228,7 +2110,7 @@ rtl::Reference<SvxShapeText>
//create shape and add to page
rtl::Reference<SvxShapeText> xShape = new SvxShapeText(nullptr);
xShape->setShapeKind(SdrObjKind::Text);
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
//set paragraph properties
bNotEmpty = false;
@@ -2297,11 +2179,12 @@ rtl::Reference<SvxShapeText>
xShape->setShapeKind(SdrObjKind::Text);
try
{
- xTarget->add(xShape);
+ xTarget->addShape(*xShape);
//set text and text properties
uno::Reference< text::XTextCursor > xTextCursor( xShape->createTextCursor() );
- if( !xTextCursor.is() )
+ uno::Reference< text::XTextCursor > xSelectionCursor( xShape->createTextCursor() );
+ if( !xTextCursor.is() || !xSelectionCursor.is() )
return xShape;
tPropertyNameValueMap aValueMap;
@@ -2350,18 +2233,32 @@ rtl::Reference<SvxShapeText>
//if the characters should be stacked we use only the first character properties for code simplicity
if( xFormattedString.hasElements() )
{
- OUString aLabel;
- for( const auto & i : std::as_const(xFormattedString) )
- aLabel += i->getString();
- aLabel = ShapeFactory::getStackedString( aLabel, bStackCharacters );
-
- xTextCursor->gotoEnd(false);
- xShape->insertString( xTextCursor, aLabel, false );
- xTextCursor->gotoEnd(true);
- uno::Reference< beans::XPropertySet > xSourceProps( xFormattedString[0], uno::UNO_QUERY );
-
- PropertyMapper::setMappedProperties( *xShape, xSourceProps
- , PropertyMapper::getPropertyNameMapForCharacterProperties() );
+ size_t nLBreaks = xFormattedString.size() - 1;
+ uno::Reference< beans::XPropertySet > xSelectionProp(xSelectionCursor, uno::UNO_QUERY);
+ for (const uno::Reference<chart2::XFormattedString>& rxFS : xFormattedString)
+ {
+ if (!rxFS->getString().isEmpty())
+ {
+ xTextCursor->gotoEnd(false);
+ xSelectionCursor->gotoEnd(false);
+ OUString aLabel = ShapeFactory::getStackedString(rxFS->getString(), bStackCharacters);
+ if (nLBreaks-- > 0)
+ aLabel += OUStringChar('\r');
+ xShape->insertString(xTextCursor, aLabel, false);
+ xSelectionCursor->gotoEnd(true); // select current paragraph
+ uno::Reference< beans::XPropertySet > xSourceProps(rxFS, uno::UNO_QUERY);
+ if (xFormattedString.size() > 1 && xSelectionProp.is())
+ {
+ PropertyMapper::setMappedProperties(xSelectionProp, xSourceProps,
+ PropertyMapper::getPropertyNameMapForTextShapeProperties());
+ }
+ else
+ {
+ PropertyMapper::setMappedProperties(*xShape, xSourceProps,
+ PropertyMapper::getPropertyNameMapForTextShapeProperties());
+ }
+ }
+ }
// adapt font size according to page size
awt::Size aOldRefSize;
@@ -2373,23 +2270,34 @@ rtl::Reference<SvxShapeText>
}
else
{
- for( const uno::Reference< chart2::XFormattedString >& rxFS : std::as_const(xFormattedString) )
+ uno::Reference< beans::XPropertySet > xSelectionProp(xSelectionCursor, uno::UNO_QUERY);
+ for (const uno::Reference<chart2::XFormattedString>& rxFS : xFormattedString)
{
- xTextCursor->gotoEnd(false);
- xShape->insertString( xTextCursor, rxFS->getString(), false );
- xTextCursor->gotoEnd(true);
+ if (!rxFS->getString().isEmpty())
+ {
+ xTextCursor->gotoEnd(false);
+ xSelectionCursor->gotoEnd(false);
+ xShape->insertString(xTextCursor, rxFS->getString(), false);
+ xSelectionCursor->gotoEnd(true); // select current paragraph
+ uno::Reference< beans::XPropertySet > xSourceProps(rxFS, uno::UNO_QUERY);
+ if (xFormattedString.size() > 1 && xSelectionProp.is())
+ {
+ PropertyMapper::setMappedProperties(xSelectionProp, xSourceProps,
+ PropertyMapper::getPropertyNameMapForTextShapeProperties());
+ }
+ else
+ {
+ PropertyMapper::setMappedProperties(*xShape, xSourceProps,
+ PropertyMapper::getPropertyNameMapForTextShapeProperties());
+ }
+ }
}
- awt::Size aOldRefSize;
- bool bHasRefPageSize =
- ( xTextProperties->getPropertyValue( "ReferencePageSize") >>= aOldRefSize );
if( xFormattedString.hasElements() )
{
- uno::Reference< beans::XPropertySet > xSourceProps( xFormattedString[0], uno::UNO_QUERY );
- PropertyMapper::setMappedProperties( *xShape, xSourceProps, PropertyMapper::getPropertyNameMapForCharacterProperties() );
-
// adapt font size according to page size
- if( bHasRefPageSize )
+ awt::Size aOldRefSize;
+ if( xTextProperties->getPropertyValue("ReferencePageSize") >>= aOldRefSize )
{
RelativeSizeHelper::adaptFontSizes( *xShape, aOldRefSize, rSize );
}
@@ -2467,14 +2375,6 @@ void ShapeFactory::makeShapeInvisible( const rtl::Reference< SvxShape >& xShape
// set a name/CID at a shape (is used for selection handling)
-void ShapeFactory::setShapeName( SdrPathObj* pShape
- , const OUString& rName )
-{
- if(!pShape)
- return;
- pShape->SetName(rName);
-}
-
void ShapeFactory::setShapeName( const rtl::Reference< SvxShape >& xShape
, const OUString& rName )
{
@@ -2552,7 +2452,7 @@ bool ShapeFactory::hasPolygonAnyLines( const std::vector<std::vector<css::drawin
return false;
}
-bool ShapeFactory::isPolygonEmptyOrSinglePoint( drawing::PolyPolygonShape3D& rPoly)
+bool ShapeFactory::isPolygonEmptyOrSinglePoint( const drawing::PolyPolygonShape3D& rPoly)
{
// true, if empty polypolygon or one polygon with one point
return !rPoly.SequenceX.hasElements() ||
@@ -2666,6 +2566,21 @@ void ShapeFactory::removeSubShapes( const rtl::Reference<SvxShapeGroupAnyD>& xSh
}
}
+rtl::Reference<SvxTableShape>
+ShapeFactory::createTable(rtl::Reference<SvxShapeGroupAnyD> const& xTarget, OUString const& rName)
+{
+ if (!xTarget.is())
+ return nullptr;
+
+ //create table shape
+ rtl::Reference<SvxTableShape> xShape = new SvxTableShape(nullptr);
+ xShape->setShapeKind(SdrObjKind::Table);
+ xTarget->addShape(*xShape);
+ if (!rName.isEmpty())
+ setShapeName(xShape, rName);
+ return xShape;
+}
+
} //namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/main/VButton.cxx b/chart2/source/view/main/VButton.cxx
index dc8e22c4961d..25a770fb04bc 100644
--- a/chart2/source/view/main/VButton.cxx
+++ b/chart2/source/view/main/VButton.cxx
@@ -15,7 +15,6 @@
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <CommonConverters.hxx>
#include <editeng/unoprnms.hxx>
@@ -70,11 +69,11 @@ rtl::Reference<SvxShapePolyPolygon> VButton::createTriangle(awt::Size aSize)
pInnerSequenceY[2] = 0.0;
pInnerSequenceZ[2] = 0.0;
- xShape->SvxShape::setPropertyValue("Name", uno::makeAny(m_sCID));
+ xShape->SvxShape::setPropertyValue("Name", uno::Any(m_sCID));
xShape->SvxShape::setPropertyValue(UNO_NAME_POLYPOLYGON,
uno::Any(PolyToPointSequence(aPolyPolygon)));
- xShape->SvxShape::setPropertyValue("LineStyle", uno::makeAny(drawing::LineStyle_NONE));
- xShape->SvxShape::setPropertyValue("FillColor", uno::makeAny(m_nArrowColor));
+ xShape->SvxShape::setPropertyValue("LineStyle", uno::Any(drawing::LineStyle_NONE));
+ xShape->SvxShape::setPropertyValue("FillColor", uno::Any(m_nArrowColor));
return xShape;
}
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index a650adcef066..4527d4368b2f 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -20,53 +20,58 @@
#include <limits>
#include <memory>
#include <VDataSeries.hxx>
+#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <ObjectIdentifier.hxx>
#include <CommonConverters.hxx>
#include <LabelPositionHelper.hxx>
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
+#include <RegressionCurveCalculator.hxx>
#include <RegressionCurveHelper.hxx>
#include <unonames.hxx>
#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/XRegressionCurveCalculator.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
+#include <com/sun/star/chart2/RelativeSize.hpp>
+#include <o3tl/compare.hxx>
#include <osl/diagnose.h>
#include <tools/color.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
-#include <com/sun/star/chart2/data/XDataSource.hpp>
namespace chart {
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
+using namespace ::chart::DataSeriesProperties;
void VDataSequence::init( const uno::Reference< data::XDataSequence >& xModel )
{
- Model = xModel;
- Doubles = DataSequenceToDoubleSequence( xModel );
+ m_xModel = xModel;
+ m_aValues = DataSequenceToDoubleSequence( xModel );
}
bool VDataSequence::is() const
{
- return Model.is();
+ return m_xModel.is();
}
void VDataSequence::clear()
{
- Model = nullptr;
- Doubles.realloc(0);
+ m_xModel = nullptr;
+ m_aValues.realloc(0);
}
double VDataSequence::getValue( sal_Int32 index ) const
{
- if( 0<=index && index<Doubles.getLength() )
- return Doubles[index];
+ if( 0<=index && index<m_aValues.getLength() )
+ return m_aValues[index];
return std::numeric_limits<double>::quiet_NaN();
}
@@ -75,10 +80,9 @@ sal_Int32 VDataSequence::detectNumberFormatKey( sal_Int32 index ) const
sal_Int32 nNumberFormatKey = -1;
// -1 is allowed and means a key for the whole sequence
- if( -1<=index && index<Doubles.getLength() &&
- Model.is())
+ if( -1<=index && index<m_aValues.getLength() && m_xModel.is())
{
- nNumberFormatKey = Model->getNumberFormatKeyByIndex( index );
+ nNumberFormatKey = m_xModel->getNumberFormatKeyByIndex( index );
}
return nNumberFormatKey;
@@ -86,7 +90,7 @@ sal_Int32 VDataSequence::detectNumberFormatKey( sal_Int32 index ) const
sal_Int32 VDataSequence::getLength() const
{
- return Doubles.getLength();
+ return m_aValues.getLength();
}
namespace
@@ -98,7 +102,7 @@ struct lcl_LessXOfPoint
{
if( !first.empty() && !second.empty() )
{
- return first[0]<second[0];
+ return o3tl::strong_order(first[0], second[0]) < 0;
}
return false;
}
@@ -107,10 +111,10 @@ struct lcl_LessXOfPoint
void lcl_clearIfNoValuesButTextIsContained( VDataSequence& rData, const uno::Reference<data::XDataSequence>& xDataSequence )
{
//#i71686#, #i101968#, #i102428#
- sal_Int32 nCount = rData.Doubles.getLength();
+ sal_Int32 nCount = rData.m_aValues.getLength();
for( sal_Int32 i = 0; i < nCount; ++i )
{
- if( !std::isnan( rData.Doubles[i] ) )
+ if( !std::isnan( rData.m_aValues[i] ) )
return;
}
//no double value is contained
@@ -137,7 +141,7 @@ void lcl_maybeReplaceNanWithZero( double& rfValue, sal_Int32 nMissingValueTreatm
}
-VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
+VDataSeries::VDataSeries( const rtl::Reference< DataSeries >& xDataSeries )
: m_nPolygonIndex(0)
, m_fLogicMinX(0.0)
, m_fLogicMaxX(0.0)
@@ -159,17 +163,13 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
, mpOldSeries(nullptr)
, mnPercent(0.0)
{
- m_xDataSeriesProps.set(m_xDataSeries, css::uno::UNO_QUERY);
- uno::Reference<data::XDataSource> xDataSource( xDataSeries, uno::UNO_QUERY );
+ m_xDataSeriesProps = m_xDataSeries;
- uno::Sequence< uno::Reference<
- chart2::data::XLabeledDataSequence > > aDataSequences =
- xDataSource->getDataSequences();
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aDataSequences =
+ m_xDataSeries->getDataSequences2();
- for(sal_Int32 nN = aDataSequences.getLength();nN--;)
+ for(sal_Int32 nN = aDataSequences.size();nN--;)
{
- if(!aDataSequences[nN].is())
- continue;
uno::Reference<data::XDataSequence> xDataSequence( aDataSequences[nN]->getValues());
uno::Reference<beans::XPropertySet> xProp(xDataSequence, uno::UNO_QUERY );
if( xProp.is())
@@ -226,18 +226,17 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
m_nPointCount = m_aValues_Y_Last.getLength();
}
- uno::Reference<beans::XPropertySet> xProp(xDataSeries, uno::UNO_QUERY );
- if( !xProp.is())
+ if( !xDataSeries.is())
return;
try
{
- //get AttributedDataPoints
- xProp->getPropertyValue("AttributedDataPoints") >>= m_aAttributedDataPointIndexList;
+ // "AttributedDataPoints"
+ xDataSeries->getFastPropertyValue(PROP_DATASERIES_ATTRIBUTED_DATA_POINTS) >>= m_aAttributedDataPointIndexList;
- xProp->getPropertyValue("StackingDirection") >>= m_eStackingDirection;
+ xDataSeries->getFastPropertyValue(PROP_DATASERIES_STACKING_DIRECTION) >>= m_eStackingDirection; // "StackingDirection"
- xProp->getPropertyValue("AttachedAxisIndex") >>= m_nAxisIndex;
+ xDataSeries->getFastPropertyValue(PROP_DATASERIES_ATTACHED_AXIS_INDEX) >>= m_nAxisIndex; // "AttachedAxisIndex"
if(m_nAxisIndex<0)
m_nAxisIndex=0;
}
@@ -253,7 +252,7 @@ VDataSeries::~VDataSeries()
void VDataSeries::doSortByXValues()
{
- if( !(m_aValues_X.is() && m_aValues_X.Doubles.hasElements()) )
+ if( !(m_aValues_X.is() && m_aValues_X.m_aValues.hasElements()) )
return;
//prepare a vector for sorting
@@ -262,9 +261,9 @@ void VDataSeries::doSortByXValues()
for( nPointIndex=0; nPointIndex < m_nPointCount; nPointIndex++ )
{
aTmp.push_back(
- { ((nPointIndex < m_aValues_X.Doubles.getLength()) ? m_aValues_X.Doubles[nPointIndex]
+ { ((nPointIndex < m_aValues_X.m_aValues.getLength()) ? m_aValues_X.m_aValues[nPointIndex]
: std::numeric_limits<double>::quiet_NaN()),
- ((nPointIndex < m_aValues_Y.Doubles.getLength()) ? m_aValues_Y.Doubles[nPointIndex]
+ ((nPointIndex < m_aValues_Y.m_aValues.getLength()) ? m_aValues_Y.m_aValues[nPointIndex]
: std::numeric_limits<double>::quiet_NaN())
}
);
@@ -274,10 +273,10 @@ void VDataSeries::doSortByXValues()
std::stable_sort( aTmp.begin(), aTmp.end(), lcl_LessXOfPoint() );
//fill the sorted points back to the members
- m_aValues_X.Doubles.realloc( m_nPointCount );
- auto pDoublesX = m_aValues_X.Doubles.getArray();
- m_aValues_Y.Doubles.realloc( m_nPointCount );
- auto pDoublesY = m_aValues_Y.Doubles.getArray();
+ m_aValues_X.m_aValues.realloc( m_nPointCount );
+ auto pDoublesX = m_aValues_X.m_aValues.getArray();
+ m_aValues_Y.m_aValues.realloc( m_nPointCount );
+ auto pDoublesY = m_aValues_Y.m_aValues.getArray();
for( nPointIndex=0; nPointIndex < m_nPointCount; nPointIndex++ )
{
@@ -288,18 +287,18 @@ void VDataSeries::doSortByXValues()
void VDataSeries::releaseShapes()
{
- m_xGroupShape.set(nullptr);
- m_xLabelsGroupShape.set(nullptr);
- m_xErrorXBarsGroupShape.set(nullptr);
- m_xErrorYBarsGroupShape.set(nullptr);
- m_xFrontSubGroupShape.set(nullptr);
- m_xBackSubGroupShape.set(nullptr);
+ m_xGroupShape.clear();
+ m_xLabelsGroupShape.clear();
+ m_xErrorXBarsGroupShape.clear();
+ m_xErrorYBarsGroupShape.clear();
+ m_xFrontSubGroupShape.clear();
+ m_xBackSubGroupShape.clear();
m_aPolyPolygonShape3D.clear();
m_nPolygonIndex = 0;
}
-const uno::Reference<css::chart2::XDataSeries>& VDataSeries::getModel() const
+const rtl::Reference<::chart::DataSeries>& VDataSeries::getModel() const
{
return m_xDataSeries;
}
@@ -426,10 +425,10 @@ double VDataSeries::getXValue( sal_Int32 index ) const
{
if( 0<=index && index<m_aValues_X.getLength() )
{
- fRet = m_aValues_X.Doubles[index];
+ fRet = m_aValues_X.m_aValues[index];
if(mpOldSeries && index < mpOldSeries->m_aValues_X.getLength())
{
- double nOldVal = mpOldSeries->m_aValues_X.Doubles[index];
+ double nOldVal = mpOldSeries->m_aValues_X.m_aValues[index];
fRet = nOldVal + (fRet - nOldVal) * mnPercent;
}
}
@@ -451,10 +450,10 @@ double VDataSeries::getYValue( sal_Int32 index ) const
{
if( 0<=index && index<m_aValues_Y.getLength() )
{
- fRet = m_aValues_Y.Doubles[index];
+ fRet = m_aValues_Y.m_aValues[index];
if(mpOldSeries && index < mpOldSeries->m_aValues_Y.getLength())
{
- double nOldVal = mpOldSeries->m_aValues_Y.Doubles[index];
+ double nOldVal = mpOldSeries->m_aValues_Y.m_aValues[index];
fRet = nOldVal + (fRet - nOldVal) * mnPercent;
}
}
@@ -528,7 +527,7 @@ double VDataSeries::getBubble_Size( sal_Int32 index ) const
bool VDataSeries::hasExplicitNumberFormat( sal_Int32 nPointIndex, bool bForPercentage ) const
{
- OUString aPropName = bForPercentage ? OUString("PercentageNumberFormat") : OUString(CHART_UNONAME_NUMFMT);
+ OUString aPropName = bForPercentage ? OUString("PercentageNumberFormat") : CHART_UNONAME_NUMFMT;
bool bHasNumberFormat = false;
bool bLinkToSource = true;
uno::Reference< beans::XPropertySet > xPointProp( getPropertiesOfPoint( nPointIndex ));
@@ -542,7 +541,7 @@ bool VDataSeries::hasExplicitNumberFormat( sal_Int32 nPointIndex, bool bForPerce
}
sal_Int32 VDataSeries::getExplicitNumberFormat( sal_Int32 nPointIndex, bool bForPercentage ) const
{
- OUString aPropName = bForPercentage ? OUString("PercentageNumberFormat") : OUString(CHART_UNONAME_NUMFMT);
+ OUString aPropName = bForPercentage ? OUString("PercentageNumberFormat") : CHART_UNONAME_NUMFMT;
sal_Int32 nNumberFormat = -1;
uno::Reference< beans::XPropertySet > xPointProp( getPropertiesOfPoint( nPointIndex ));
if( xPointProp.is() )
@@ -574,7 +573,7 @@ sal_Int32 VDataSeries::detectNumberFormatKey( sal_Int32 index ) const
return nRet;
}
-sal_Int32 VDataSeries::getLabelPlacement( sal_Int32 nPointIndex, const uno::Reference< chart2::XChartType >& xChartType, bool bSwapXAndY ) const
+sal_Int32 VDataSeries::getLabelPlacement( sal_Int32 nPointIndex, const rtl::Reference< ChartType >& xChartType, bool bSwapXAndY ) const
{
sal_Int32 nLabelPlacement=0;
try
@@ -648,6 +647,26 @@ bool VDataSeries::isLabelCustomPos(sal_Int32 nPointIndex) const
return bCustom;
}
+awt::Size VDataSeries::getLabelCustomSize(sal_Int32 nPointIndex) const
+{
+ awt::Size aSize(-1, -1);
+ try
+ {
+ RelativeSize aCustomLabelSize;
+ const uno::Reference<beans::XPropertySet> xPointProps(getPropertiesOfPoint(nPointIndex));
+ if (xPointProps.is() && (xPointProps->getPropertyValue("CustomLabelSize") >>= aCustomLabelSize))
+ {
+ aSize.Width = static_cast<sal_Int32>(aCustomLabelSize.Primary * m_aReferenceSize.Width);
+ aSize.Height = static_cast<sal_Int32>(aCustomLabelSize.Secondary * m_aReferenceSize.Height);
+ }
+ }
+ catch (const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("chart2");
+ }
+ return aSize;
+}
+
double VDataSeries::getMinimumofAllDifferentYValues( sal_Int32 index ) const
{
double fMin = std::numeric_limits<double>::infinity();
@@ -724,12 +743,12 @@ uno::Sequence< double > const & VDataSeries::getAllX() const
{
//init x values from category indexes
//first category (index 0) matches with real number 1.0
- m_aValues_X.Doubles.realloc( m_nPointCount );
- auto pDoubles = m_aValues_X.Doubles.getArray();
+ m_aValues_X.m_aValues.realloc( m_nPointCount );
+ auto pDoubles = m_aValues_X.m_aValues.getArray();
for(sal_Int32 nN=m_aValues_X.getLength();nN--;)
pDoubles[nN] = nN+1;
}
- return m_aValues_X.Doubles;
+ return m_aValues_X.m_aValues;
}
uno::Sequence< double > const & VDataSeries::getAllY() const
@@ -738,19 +757,19 @@ uno::Sequence< double > const & VDataSeries::getAllY() const
{
//init y values from indexes
//first y-value (index 0) matches with real number 1.0
- m_aValues_Y.Doubles.realloc( m_nPointCount );
- auto pDoubles = m_aValues_Y.Doubles.getArray();
+ m_aValues_Y.m_aValues.realloc( m_nPointCount );
+ auto pDoubles = m_aValues_Y.m_aValues.getArray();
for(sal_Int32 nN=m_aValues_Y.getLength();nN--;)
pDoubles[nN] = nN+1;
}
- return m_aValues_Y.Doubles;
+ return m_aValues_Y.m_aValues;
}
double VDataSeries::getXMeanValue() const
{
if( std::isnan( m_fXMeanValue ) )
{
- uno::Reference< XRegressionCurveCalculator > xCalculator( RegressionCurveHelper::createRegressionCurveCalculatorByServiceName( u"com.sun.star.chart2.MeanValueRegressionCurve" ) );
+ rtl::Reference< RegressionCurveCalculator > xCalculator( RegressionCurveHelper::createRegressionCurveCalculatorByServiceName( u"com.sun.star.chart2.MeanValueRegressionCurve" ) );
uno::Sequence< double > aXValuesDummy;
xCalculator->recalculateRegression( aXValuesDummy, getAllX() );
m_fXMeanValue = xCalculator->getCurveValue( 1.0 );
@@ -762,7 +781,7 @@ double VDataSeries::getYMeanValue() const
{
if( std::isnan( m_fYMeanValue ) )
{
- uno::Reference< XRegressionCurveCalculator > xCalculator(
+ rtl::Reference< RegressionCurveCalculator > xCalculator(
RegressionCurveHelper::createRegressionCurveCalculatorByServiceName(u"com.sun.star.chart2.MeanValueRegressionCurve"));
uno::Sequence< double > aXValuesDummy;
xCalculator->recalculateRegression( aXValuesDummy, getAllY() );
@@ -771,26 +790,26 @@ double VDataSeries::getYMeanValue() const
return m_fYMeanValue;
}
-static std::unique_ptr<Symbol> getSymbolPropertiesFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp )
+static std::optional<Symbol> getSymbolPropertiesFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp )
{
- std::unique_ptr< Symbol > apSymbolProps( new Symbol() );
+ Symbol aSymbolProps;
try
{
- if( xProp->getPropertyValue("Symbol") >>= *apSymbolProps )
+ if( xProp->getPropertyValue("Symbol") >>= aSymbolProps )
{
//use main color to fill symbols
- xProp->getPropertyValue("Color") >>= apSymbolProps->FillColor;
+ xProp->getPropertyValue("Color") >>= aSymbolProps.FillColor;
// border of symbols always same as fill color
- apSymbolProps->BorderColor = apSymbolProps->FillColor;
+ aSymbolProps.BorderColor = aSymbolProps.FillColor;
}
else
- apSymbolProps.reset();
+ return std::nullopt;
}
catch(const uno::Exception &)
{
TOOLS_WARN_EXCEPTION("chart2", "" );
}
- return apSymbolProps;
+ return aSymbolProps;
}
Symbol* VDataSeries::getSymbolProperties( sal_Int32 index ) const
@@ -799,38 +818,38 @@ Symbol* VDataSeries::getSymbolProperties( sal_Int32 index ) const
if( isAttributedDataPoint( index ) )
{
adaptPointCache( index );
- if (!m_apSymbolProperties_AttributedPoint)
- m_apSymbolProperties_AttributedPoint
+ if (!m_oSymbolProperties_AttributedPoint)
+ m_oSymbolProperties_AttributedPoint
= getSymbolPropertiesFromPropertySet(getPropertiesOfPoint(index));
- pRet = m_apSymbolProperties_AttributedPoint.get();
+ pRet = &*m_oSymbolProperties_AttributedPoint;
//if a single data point does not have symbols but the dataseries itself has symbols
//we create an invisible symbol shape to enable selection of that point
if( !pRet || pRet->Style == SymbolStyle_NONE )
{
- if (!m_apSymbolProperties_Series)
- m_apSymbolProperties_Series
+ if (!m_oSymbolProperties_Series)
+ m_oSymbolProperties_Series
= getSymbolPropertiesFromPropertySet(getPropertiesOfSeries());
- if( m_apSymbolProperties_Series && m_apSymbolProperties_Series->Style != SymbolStyle_NONE )
+ if( m_oSymbolProperties_Series && m_oSymbolProperties_Series->Style != SymbolStyle_NONE )
{
- if (!m_apSymbolProperties_InvisibleSymbolForSelection)
+ if (!m_oSymbolProperties_InvisibleSymbolForSelection)
{
- m_apSymbolProperties_InvisibleSymbolForSelection.reset(new Symbol);
- m_apSymbolProperties_InvisibleSymbolForSelection->Style = SymbolStyle_STANDARD;
- m_apSymbolProperties_InvisibleSymbolForSelection->StandardSymbol = 0;//square
- m_apSymbolProperties_InvisibleSymbolForSelection->Size = com::sun::star::awt::Size(0, 0);//tdf#126033
- m_apSymbolProperties_InvisibleSymbolForSelection->BorderColor = 0xff000000;//invisible
- m_apSymbolProperties_InvisibleSymbolForSelection->FillColor = 0xff000000;//invisible
+ m_oSymbolProperties_InvisibleSymbolForSelection.emplace();
+ m_oSymbolProperties_InvisibleSymbolForSelection->Style = SymbolStyle_STANDARD;
+ m_oSymbolProperties_InvisibleSymbolForSelection->StandardSymbol = 0;//square
+ m_oSymbolProperties_InvisibleSymbolForSelection->Size = com::sun::star::awt::Size(0, 0);//tdf#126033
+ m_oSymbolProperties_InvisibleSymbolForSelection->BorderColor = 0xff000000;//invisible
+ m_oSymbolProperties_InvisibleSymbolForSelection->FillColor = 0xff000000;//invisible
}
- pRet = m_apSymbolProperties_InvisibleSymbolForSelection.get();
+ pRet = &*m_oSymbolProperties_InvisibleSymbolForSelection;
}
}
}
else
{
- if (!m_apSymbolProperties_Series)
- m_apSymbolProperties_Series
+ if (!m_oSymbolProperties_Series)
+ m_oSymbolProperties_Series
= getSymbolPropertiesFromPropertySet(getPropertiesOfSeries());
- pRet = m_apSymbolProperties_Series.get();
+ pRet = &*m_oSymbolProperties_Series;
}
if( pRet && pRet->Style == SymbolStyle_AUTO )
@@ -899,9 +918,8 @@ bool VDataSeries::isAttributedDataPoint( sal_Int32 index ) const
bool VDataSeries::isVaryColorsByPoint() const
{
bool bVaryColorsByPoint = false;
- Reference< beans::XPropertySet > xSeriesProp( getPropertiesOfSeries() );
- if( xSeriesProp.is() )
- xSeriesProp->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint;
+ if( m_xDataSeries )
+ m_xDataSeries->getFastPropertyValue(PROP_DATASERIES_VARY_COLORS_BY_POINT) >>= bVaryColorsByPoint; // "VaryColorsByPoint"
return bVaryColorsByPoint;
}
@@ -912,14 +930,14 @@ uno::Reference< beans::XPropertySet > VDataSeries::getPropertiesOfPoint( sal_Int
return getPropertiesOfSeries();
}
-uno::Reference<beans::XPropertySet> VDataSeries::getPropertiesOfSeries() const
+const uno::Reference<beans::XPropertySet> & VDataSeries::getPropertiesOfSeries() const
{
return m_xDataSeriesProps;
}
-static std::unique_ptr<DataPointLabel> getDataPointLabelFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp )
+static std::optional<DataPointLabel> getDataPointLabelFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp )
{
- std::unique_ptr< DataPointLabel > apLabel( new DataPointLabel() );
+ std::optional< DataPointLabel > apLabel( std::in_place );
try
{
if( !(xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= *apLabel) )
@@ -936,10 +954,10 @@ void VDataSeries::adaptPointCache( sal_Int32 nNewPointIndex ) const
{
if( m_nCurrentAttributedPoint != nNewPointIndex )
{
- m_apLabel_AttributedPoint.reset();
- m_apLabelPropNames_AttributedPoint.reset();
- m_apLabelPropValues_AttributedPoint.reset();
- m_apSymbolProperties_AttributedPoint.reset();
+ m_oLabel_AttributedPoint.reset();
+ m_oLabelPropNames_AttributedPoint.reset();
+ m_oLabelPropValues_AttributedPoint.reset();
+ m_oSymbolProperties_AttributedPoint.reset();
m_nCurrentAttributedPoint = nNewPointIndex;
}
}
@@ -950,17 +968,19 @@ DataPointLabel* VDataSeries::getDataPointLabel( sal_Int32 index ) const
if( isAttributedDataPoint( index ) )
{
adaptPointCache( index );
- if (!m_apLabel_AttributedPoint)
- m_apLabel_AttributedPoint
+ if (!m_oLabel_AttributedPoint)
+ m_oLabel_AttributedPoint
= getDataPointLabelFromPropertySet(getPropertiesOfPoint(index));
- pRet = m_apLabel_AttributedPoint.get();
+ if (m_oLabel_AttributedPoint)
+ pRet = &*m_oLabel_AttributedPoint;
}
else
{
- if (!m_apLabel_Series)
- m_apLabel_Series
+ if (!m_oLabel_Series)
+ m_oLabel_Series
= getDataPointLabelFromPropertySet(getPropertiesOfPoint(index));
- pRet = m_apLabel_Series.get();
+ if (m_oLabel_Series)
+ pRet = &*m_oLabel_Series;
}
if( !m_bAllowPercentValueInDataLabel )
{
@@ -989,33 +1009,33 @@ bool VDataSeries::getTextLabelMultiPropertyLists( sal_Int32 index
if( isAttributedDataPoint( index ) )
{
adaptPointCache( index );
- if (!m_apLabelPropValues_AttributedPoint)
+ if (!m_oLabelPropValues_AttributedPoint)
{
// Cache these properties for this point.
- m_apLabelPropNames_AttributedPoint.reset(new tNameSequence);
- m_apLabelPropValues_AttributedPoint.reset(new tAnySequence);
+ m_oLabelPropNames_AttributedPoint.emplace();
+ m_oLabelPropValues_AttributedPoint.emplace();
xTextProp.set( getPropertiesOfPoint( index ));
PropertyMapper::getTextLabelMultiPropertyLists(
- xTextProp, *m_apLabelPropNames_AttributedPoint, *m_apLabelPropValues_AttributedPoint);
+ xTextProp, *m_oLabelPropNames_AttributedPoint, *m_oLabelPropValues_AttributedPoint);
bDoDynamicFontResize = true;
}
- pPropNames = m_apLabelPropNames_AttributedPoint.get();
- pPropValues = m_apLabelPropValues_AttributedPoint.get();
+ pPropNames = &*m_oLabelPropNames_AttributedPoint;
+ pPropValues = &*m_oLabelPropValues_AttributedPoint;
}
else
{
- if (!m_apLabelPropValues_Series)
+ if (!m_oLabelPropValues_Series)
{
// Cache these properties for the whole series.
- m_apLabelPropNames_Series.reset(new tNameSequence);
- m_apLabelPropValues_Series.reset(new tAnySequence);
+ m_oLabelPropNames_Series.emplace();
+ m_oLabelPropValues_Series.emplace();
xTextProp.set( getPropertiesOfPoint( index ));
PropertyMapper::getTextLabelMultiPropertyLists(
- xTextProp, *m_apLabelPropNames_Series, *m_apLabelPropValues_Series);
+ xTextProp, *m_oLabelPropNames_Series, *m_oLabelPropValues_Series);
bDoDynamicFontResize = true;
}
- pPropNames = m_apLabelPropNames_Series.get();
- pPropValues = m_apLabelPropValues_Series.get();
+ pPropNames = &*m_oLabelPropNames_Series;
+ pPropValues = &*m_oLabelPropValues_Series;
}
if( bDoDynamicFontResize &&
@@ -1116,7 +1136,7 @@ double VDataSeries::getValueByProperty( sal_Int32 nIndex, const OUString& rPropN
bool VDataSeries::hasPropertyMapping(const OUString& rPropName ) const
{
- return m_PropertyMap.find(rPropName) != m_PropertyMap.end();
+ return m_PropertyMap.contains(rPropName);
}
} //namespace chart
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 1dfe3653e4d1..72c0165a69f5 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -19,9 +19,11 @@
#include "VLegend.hxx"
#include "VButton.hxx"
+#include <Legend.hxx>
#include <PropertyMapper.hxx>
#include <ChartModel.hxx>
#include <ObjectIdentifier.hxx>
+#include <FormattedString.hxx>
#include <RelativePositionHelper.hxx>
#include <ShapeFactory.hxx>
#include <RelativeSizeHelper.hxx>
@@ -40,9 +42,10 @@
#include <com/sun/star/chart2/data/PivotTableFieldEntry.hpp>
#include <rtl/math.hxx>
#include <svl/ctloptions.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/UnitConversion.hxx>
+#include <utility>
#include <vector>
#include <algorithm>
@@ -158,14 +161,17 @@ awt::Size lcl_createTextShapes(
try
{
OUString aLabelString;
- Sequence< Reference< XFormattedString2 > > aLabelSeq = rEntry.aLabel;
- for( sal_Int32 i = 0; i < aLabelSeq.getLength(); ++i )
+ if (rEntry.xLabel)
{
- // todo: support more than one text range
- if( i == 1 )
- break;
+ // tdf#150034 limit legend label text
+ if (rEntry.xLabel->getString().getLength() > 520)
+ {
+ sal_Int32 nIndex = rEntry.xLabel->getString().indexOf(' ', 500);
+ rEntry.xLabel->setString(
+ rEntry.xLabel->getString().copy(0, nIndex > 500 ? nIndex : 500));
+ }
- aLabelString += aLabelSeq[i]->getString();
+ aLabelString += rEntry.xLabel->getString();
// workaround for Issue #i67540#
if( aLabelString.isEmpty())
aLabelString = " ";
@@ -414,9 +420,9 @@ awt::Size lcl_placeLegendEntries(
{
try
{
- OUString aLabelString = rEntries[0].aLabel[0]->getString();
- static const OUStringLiteral sDots = u"...";
- for (sal_Int32 nNewLen = aLabelString.getLength() - sDots.getLength(); nNewLen > 0; nNewLen--)
+ OUString aLabelString = rEntries[0].xLabel->getString();
+ static constexpr OUString sDots = u"..."_ustr;
+ for (sal_Int32 nNewLen = aLabelString.getLength() - sDots.getLength(); nNewLen > 0; )
{
OUString aNewLabel = aLabelString.subView(0, nNewLen) + sDots;
rtl::Reference<SvxShapeText> xEntry = ShapeFactory::createText(
@@ -429,15 +435,21 @@ awt::Size lcl_placeLegendEntries(
if (rRemainingSpace.Width - nWidth >= 0)
{
aTextShapes.push_back(xEntry);
- rEntries[0].aLabel[0]->setString(aNewLabel);
+ rEntries[0].xLabel->setString(aNewLabel);
aRowHeights[0] = nSumHeight;
aColumnWidths[0] = nWidth;
break;
}
}
DrawModelWrapper::removeShape(xEntry);
+ // The intention here is to make pathological cases with extremely large labels
+ // converge a little faster
+ if (nNewLen > 10 && std::abs(nRemainingSpace) > nSumHeight / 10)
+ nNewLen -= nNewLen / 10;
+ else
+ --nNewLen;
}
- if (aTextShapes.size() == 0)
+ if (aTextShapes.empty())
{
DrawModelWrapper::removeShape(rEntries[0].xSymbol);
rEntries.pop_back();
@@ -795,7 +807,7 @@ bool lcl_shouldSymbolsBePlacedOnTheLeftSide( const Reference< beans::XPropertySe
bool bSymbolsLeftSide = true;
try
{
- if( SvtCTLOptions().IsCTLFontEnabled() )
+ if( SvtCTLOptions::IsCTLFontEnabled() )
{
if(xLegendProp.is())
{
@@ -869,13 +881,13 @@ std::vector<std::shared_ptr<VButton>> lcl_createButtons(
} // anonymous namespace
VLegend::VLegend(
- const Reference< XLegend > & xLegend,
+ rtl::Reference< Legend > xLegend,
const Reference< uno::XComponentContext > & xContext,
std::vector< LegendEntryProvider* >&& rLegendEntryProviderList,
- const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage,
+ rtl::Reference<SvxShapeGroupAnyD> xTargetPage,
ChartModel& rModel )
- : m_xTarget(xTargetPage)
- , m_xLegend(xLegend)
+ : m_xTarget(std::move(xTargetPage))
+ , m_xLegend(std::move(xLegend))
, mrModel(rModel)
, m_xContext(xContext)
, m_aLegendEntryProviderList(std::move(rLegendEntryProviderList))
@@ -888,7 +900,7 @@ void VLegend::setDefaultWritingMode( sal_Int16 nDefaultWritingMode )
m_nDefaultWritingMode = nDefaultWritingMode;
}
-bool VLegend::isVisible( const Reference< XLegend > & xLegend )
+bool VLegend::isVisible( const rtl::Reference< Legend > & xLegend )
{
if( ! xLegend.is())
return false;
@@ -896,8 +908,7 @@ bool VLegend::isVisible( const Reference< XLegend > & xLegend )
bool bShow = false;
try
{
- Reference< beans::XPropertySet > xLegendProp( xLegend, uno::UNO_QUERY_THROW );
- xLegendProp->getPropertyValue( "Show") >>= bShow;
+ xLegend->getPropertyValue( "Show") >>= bShow;
}
catch( const uno::Exception & )
{
@@ -918,7 +929,7 @@ void VLegend::createShapes(
try
{
//create shape and add to page
- OUString aLegendParticle( ObjectIdentifier::createParticleForLegend( mrModel ) );
+ OUString aLegendParticle( ObjectIdentifier::createParticleForLegend( &mrModel ) );
m_xShape = ShapeFactory::createGroup2D( m_xTarget,
ObjectIdentifier::createClassifiedIdentifierForParticle( aLegendParticle ) );
@@ -930,36 +941,32 @@ void VLegend::createShapes(
tPropertyValues aLineFillProperties;
tPropertyValues aTextProperties;
- Reference< beans::XPropertySet > xLegendProp( m_xLegend, uno::UNO_QUERY );
css::chart::ChartLegendExpansion eExpansion = css::chart::ChartLegendExpansion_HIGH;
awt::Size aLegendSize( rAvailableSpace );
bool bCustom = false;
LegendPosition eLegendPosition = LegendPosition_LINE_END;
- if (xLegendProp.is())
+ // get Expansion property
+ m_xLegend->getPropertyValue("Expansion") >>= eExpansion;
+ if( eExpansion == css::chart::ChartLegendExpansion_CUSTOM )
{
- // get Expansion property
- xLegendProp->getPropertyValue("Expansion") >>= eExpansion;
- if( eExpansion == css::chart::ChartLegendExpansion_CUSTOM )
+ RelativeSize aRelativeSize;
+ if (m_xLegend->getPropertyValue("RelativeSize") >>= aRelativeSize)
{
- RelativeSize aRelativeSize;
- if (xLegendProp->getPropertyValue("RelativeSize") >>= aRelativeSize)
- {
- aLegendSize.Width = static_cast<sal_Int32>(::rtl::math::approxCeil( aRelativeSize.Primary * rPageSize.Width ));
- aLegendSize.Height = static_cast<sal_Int32>(::rtl::math::approxCeil( aRelativeSize.Secondary * rPageSize.Height ));
- bCustom = true;
- }
- else
- {
- eExpansion = css::chart::ChartLegendExpansion_HIGH;
- }
+ aLegendSize.Width = static_cast<sal_Int32>(::rtl::math::approxCeil( aRelativeSize.Primary * rPageSize.Width ));
+ aLegendSize.Height = static_cast<sal_Int32>(::rtl::math::approxCeil( aRelativeSize.Secondary * rPageSize.Height ));
+ bCustom = true;
+ }
+ else
+ {
+ eExpansion = css::chart::ChartLegendExpansion_HIGH;
}
- xLegendProp->getPropertyValue("AnchorPosition") >>= eLegendPosition;
- lcl_getProperties( xLegendProp, aLineFillProperties, aTextProperties, rPageSize );
}
+ m_xLegend->getPropertyValue("AnchorPosition") >>= eLegendPosition;
+ lcl_getProperties( m_xLegend, aLineFillProperties, aTextProperties, rPageSize );
// create entries
- double fViewFontSize = lcl_CalcViewFontSize( xLegendProp, rPageSize );//todo
+ double fViewFontSize = lcl_CalcViewFontSize( m_xLegend, rPageSize );//todo
// #i109336# Improve auto positioning in chart
sal_Int32 nSymbolHeight = static_cast< sal_Int32 >( fViewFontSize * 0.6 );
sal_Int32 nSymbolWidth = nSymbolHeight;
@@ -985,13 +992,13 @@ void VLegend::createShapes(
if (pLegendEntryProvider)
{
std::vector<ViewLegendEntry> aNewEntries = pLegendEntryProvider->createLegendEntries(
- aMaxSymbolExtent, eLegendPosition, xLegendProp,
+ aMaxSymbolExtent, eLegendPosition, m_xLegend,
xLegendContainer, m_xContext, mrModel);
aViewEntries.insert( aViewEntries.end(), aNewEntries.begin(), aNewEntries.end() );
}
}
- bool bSymbolsLeftSide = lcl_shouldSymbolsBePlacedOnTheLeftSide( xLegendProp, m_nDefaultWritingMode );
+ bool bSymbolsLeftSide = lcl_shouldSymbolsBePlacedOnTheLeftSide( m_xLegend, m_nDefaultWritingMode );
uno::Reference<chart2::data::XPivotTableDataProvider> xPivotTableDataProvider( mrModel.getDataProvider(), uno::UNO_QUERY );
bool bIsPivotChart = xPivotTableDataProvider.is();
@@ -1055,18 +1062,17 @@ void VLegend::changePosition(
{
// determine position and alignment depending on default position
awt::Size aLegendSize = m_xShape->getSize();
- Reference< beans::XPropertySet > xLegendProp( m_xLegend, uno::UNO_QUERY_THROW );
chart2::RelativePosition aRelativePosition;
bool bDefaultLegendSize = rDefaultLegendSize.Width != 0 || rDefaultLegendSize.Height != 0;
bool bAutoPosition =
- ! (xLegendProp->getPropertyValue( "RelativePosition") >>= aRelativePosition);
+ ! (m_xLegend->getPropertyValue( "RelativePosition") >>= aRelativePosition);
LegendPosition ePos = LegendPosition_LINE_END;
- xLegendProp->getPropertyValue( "AnchorPosition") >>= ePos;
+ m_xLegend->getPropertyValue( "AnchorPosition") >>= ePos;
bool bOverlay = false;
- xLegendProp->getPropertyValue("Overlay") >>= bOverlay;
+ m_xLegend->getPropertyValue("Overlay") >>= bOverlay;
//calculate position
if( bAutoPosition )
{
diff --git a/chart2/source/view/main/VLegend.hxx b/chart2/source/view/main/VLegend.hxx
index c8931ce9f931..b6b6a0074e49 100644
--- a/chart2/source/view/main/VLegend.hxx
+++ b/chart2/source/view/main/VLegend.hxx
@@ -18,6 +18,8 @@
*/
#pragma once
+#include <Legend.hxx>
+
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ref.hxx>
#include <svx/unoshape.hxx>
@@ -35,15 +37,16 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
+class Legend;
class LegendEntryProvider;
class VLegend
{
public:
- VLegend( const css::uno::Reference< css::chart2::XLegend > & xLegend,
+ VLegend( rtl::Reference< ::chart::Legend > xLegend,
const css::uno::Reference< css::uno::XComponentContext > & xContext,
std::vector< LegendEntryProvider* >&& rLegendEntryProviderList,
- const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage,
+ rtl::Reference<SvxShapeGroupAnyD> xTargetPage,
ChartModel& rModel );
void setDefaultWritingMode( sal_Int16 nDefaultWritingMode );
@@ -67,11 +70,11 @@ public:
const css::awt::Size & rDefaultLegendSize );
static bool isVisible(
- const css::uno::Reference< css::chart2::XLegend > & xLegend );
+ const rtl::Reference< ::chart::Legend > & xLegend );
private:
rtl::Reference<SvxShapeGroupAnyD> m_xTarget;
- css::uno::Reference< css::chart2::XLegend > m_xLegend;
+ rtl::Reference<::chart::Legend> m_xLegend;
rtl::Reference< SvxShapeGroup > m_xShape;
ChartModel& mrModel;
diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx
index 451e32e45409..0b230ed07f34 100644
--- a/chart2/source/view/main/VLegendSymbolFactory.cxx
+++ b/chart2/source/view/main/VLegendSymbolFactory.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/drawing/Position3D.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/drawing/Direction3D.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
using namespace ::com::sun::star;
diff --git a/chart2/source/view/main/VLineProperties.cxx b/chart2/source/view/main/VLineProperties.cxx
index 49a3b4e77642..81685337f704 100644
--- a/chart2/source/view/main/VLineProperties.cxx
+++ b/chart2/source/view/main/VLineProperties.cxx
@@ -21,7 +21,7 @@
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/LineCap.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
diff --git a/chart2/source/view/main/VPolarTransformation.cxx b/chart2/source/view/main/VPolarTransformation.cxx
index 9d747d66c956..9ec2eea3fc58 100644
--- a/chart2/source/view/main/VPolarTransformation.cxx
+++ b/chart2/source/view/main/VPolarTransformation.cxx
@@ -18,7 +18,6 @@
*/
#include <VPolarTransformation.hxx>
-#include <CommonConverters.hxx>
using namespace ::com::sun::star;
diff --git a/chart2/source/view/main/VTitle.cxx b/chart2/source/view/main/VTitle.cxx
index 4d90a2fb7503..e251fe95971c 100644
--- a/chart2/source/view/main/VTitle.cxx
+++ b/chart2/source/view/main/VTitle.cxx
@@ -20,18 +20,19 @@
#include "VTitle.hxx"
#include <CommonConverters.hxx>
#include <ShapeFactory.hxx>
+#include <Title.hxx>
#include <com/sun/star/chart2/XTitle.hpp>
-#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <tools/diagnose_ex.h>
+#include <utility>
+#include <comphelper/diagnose_ex.hxx>
namespace chart
{
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
-VTitle::VTitle( const uno::Reference< XTitle > & xTitle )
- : m_xTitle(xTitle)
+VTitle::VTitle( uno::Reference< XTitle > xTitle )
+ : m_xTitle(std::move(xTitle))
, m_fRotationAngleDegree(0.0)
, m_nXPos(0)
, m_nYPos(0)
@@ -91,14 +92,13 @@ void VTitle::changePosition( const awt::Point& rPos )
}
}
-bool VTitle::isVisible(const uno::Reference< XTitle >& xTitle) {
+bool VTitle::isVisible(const rtl::Reference< Title >& xTitle) {
if (!xTitle.is()) {
return false;
}
bool bShow = true;
try {
- uno::Reference< beans::XPropertySet > xTitleProps(xTitle, uno::UNO_QUERY_THROW);
- xTitleProps->getPropertyValue("Visible") >>= bShow;
+ xTitle->getPropertyValue("Visible") >>= bShow;
} catch (const uno::Exception &) {
DBG_UNHANDLED_EXCEPTION("chart2");
}
diff --git a/chart2/source/view/main/VTitle.hxx b/chart2/source/view/main/VTitle.hxx
index 566128b95a3b..792d7f6a0a5c 100644
--- a/chart2/source/view/main/VTitle.hxx
+++ b/chart2/source/view/main/VTitle.hxx
@@ -34,11 +34,12 @@ class SvxShapeText;
namespace chart
{
+class Title;
class VTitle final
{
public:
- explicit VTitle( const css::uno::Reference< css::chart2::XTitle > & xTitle );
+ explicit VTitle( css::uno::Reference< css::chart2::XTitle > xTitle );
~VTitle();
void init( const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage
@@ -54,7 +55,7 @@ public:
css::awt::Size getFinalSize() const;
void changePosition( const css::awt::Point& rPos );
static bool isVisible(
- const css::uno::Reference< css::chart2::XTitle > & xTitle);
+ const rtl::Reference< ::chart::Title > & xTitle);
private:
rtl::Reference<SvxShapeGroupAnyD> m_xTarget;
diff --git a/chart2/uiconfig/menubar/menubar.xml b/chart2/uiconfig/menubar/menubar.xml
index 354ebbc1903a..e295d77a3943 100644
--- a/chart2/uiconfig/menubar/menubar.xml
+++ b/chart2/uiconfig/menubar/menubar.xml
@@ -56,6 +56,7 @@
<menu:menuitem menu:id=".uno:InsertMenuLegend"/>
<menu:menuitem menu:id=".uno:InsertMenuAxes"/>
<menu:menuitem menu:id=".uno:InsertMenuGrids"/>
+ <menu:menuitem menu:id=".uno:InsertMenuDataTable"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:InsertMenuDataLabels"/>
<menu:menuitem menu:id=".uno:InsertMenuTrendlines"/>
@@ -119,6 +120,7 @@
<menu:menuitem menu:id=".uno:View3D"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:FormatSelection" menu:style="text"/>
+ <menu:menuitem menu:id=".uno:FontDialog" menu:style="text"/>
<menu:menuitem menu:id=".uno:TransformDialog" menu:style="text"/>
<menu:menu menu:id=".uno:ArrangeRow">
<menu:menupopup>
@@ -139,10 +141,9 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:MacroSignature"/>
<menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
</menu:menupopup>
</menu:menu>
+ <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
<menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog" menu:style="text"/>
<menu:menuitem menu:id=".uno:ConfigureDialog" menu:style="text"/>
<menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
diff --git a/chart2/uiconfig/toolbar/basicshapes.xml b/chart2/uiconfig/toolbar/basicshapes.xml
index 148245f66672..a0debaab8fd5 100644
--- a/chart2/uiconfig/toolbar/basicshapes.xml
+++ b/chart2/uiconfig/toolbar/basicshapes.xml
@@ -45,4 +45,6 @@
<toolbar:toolbaritem xlink:href=".uno:BasicShapes.cross"/>
<toolbar:toolbaritem xlink:href=".uno:BasicShapes.frame"/>
<toolbar:toolbaritem xlink:href=".uno:BasicShapes.ring"/>
+ <toolbar:toolbarbreak/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.sinusoid"/>
</toolbar:toolbar>
diff --git a/chart2/uiconfig/toolbar/toolbar.xml b/chart2/uiconfig/toolbar/toolbar.xml
index 809174ba206d..21105871c095 100644
--- a/chart2/uiconfig/toolbar/toolbar.xml
+++ b/chart2/uiconfig/toolbar/toolbar.xml
@@ -20,6 +20,7 @@
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink">
<toolbar:toolbaritem xlink:href=".uno:ChartElementSelector"/>
<toolbar:toolbaritem xlink:href=".uno:FormatSelection"/>
+ <toolbar:toolbaritem xlink:href=".uno:FontDialog"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:DiagramType"/>
<toolbar:toolbaritem xlink:href=".uno:DiagramArea"/>
diff --git a/chart2/uiconfig/ui/charttypedialog.ui b/chart2/uiconfig/ui/charttypedialog.ui
index 5f7c1cb13f71..627a619d0b57 100644
--- a/chart2/uiconfig/ui/charttypedialog.ui
+++ b/chart2/uiconfig/ui/charttypedialog.ui
@@ -76,7 +76,19 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkBox" id="content">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
</child>
diff --git a/chart2/uiconfig/ui/dlg_InsertDataTable.ui b/chart2/uiconfig/ui/dlg_InsertDataTable.ui
new file mode 100644
index 000000000000..446f7a414e24
--- /dev/null
+++ b/chart2/uiconfig/ui/dlg_InsertDataTable.ui
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.2 -->
+<interface domain="chart">
+ <requires lib="gtk+" version="3.20"/>
+ <object class="GtkDialog" id="InsertDataTableDialog">
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
+ <property name="title" translatable="yes" context="dlg_InsertDataTable|dlg_InsertDataTable">Data Table</property>
+ <property name="modal">True</property>
+ <property name="default-width">0</property>
+ <property name="default-height">0</property>
+ <property name="type-hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label" translatable="yes" context="stock">_OK</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label" translatable="yes" context="stock">_Cancel</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label" translatable="yes" context="stock">_Help</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="margin-end">6</property>
+ <property name="use-underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack-type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="dlg_LegendPosition">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkCheckButton" id="showDataTable">
+ <property name="label" translatable="yes" context="dlg_InsertDataTable|horizontalBorderCB">Show data table</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
+ <child>
+ <object class="GtkBox" id="box4">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="margin-start">12</property>
+ <property name="margin-top">6</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="horizontalBorderCB">
+ <property name="label" translatable="yes" context="dlg_InsertDataTable|horizontalBorderCB">Show horizontal border</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="verticalBorderCB">
+ <property name="label" translatable="yes" context="dlg_InsertDataTable|verticalBorderCB">Show vertical border</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="outlineCB">
+ <property name="label" translatable="yes" context="dlg_InsertDataTable|outlineCB">Show outline</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="keysCB">
+ <property name="label" translatable="yes" context="dlg_InsertDataTable|keysCB">Show keys</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="dataTablePropertiesLabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes" context="dlg_InsertDataTable|dataTablePropertiesLabel">Data Table Properties</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-5">ok</action-widget>
+ <action-widget response="-6">cancel</action-widget>
+ <action-widget response="-11">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/chart2/uiconfig/ui/sidebaraxis.ui b/chart2/uiconfig/ui/sidebaraxis.ui
index db8ad151329b..873d6565ce1e 100644
--- a/chart2/uiconfig/ui/sidebaraxis.ui
+++ b/chart2/uiconfig/ui/sidebaraxis.ui
@@ -1,130 +1,130 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="chart">
<requires lib="gtk+" version="3.20"/>
<object class="GtkAdjustment" id="adjustmentSpinDegrees">
<property name="upper">359</property>
- <property name="step_increment">5</property>
+ <property name="step-increment">5</property>
</object>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid" id="ChartAxisPanel">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=4 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="border-width">6</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkCheckButton" id="checkbutton_show_label">
<property name="label" translatable="yes" context="sidebaraxis|checkbutton_show_label">Show labels</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ <property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="checkbutton_reverse">
<property name="label" translatable="yes" context="sidebaraxis|checkbutton_reverse">Reverse direction</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="label_props">
+ <object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin-start">12</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">5</property>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="label" translatable="yes" context="sidebaraxis|label1">_Label position:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">comboboxtext_label_position</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="comboboxtext_label_position">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <items>
- <item translatable="yes" context="sidebaraxis|comboboxtext_label_position">Near Axis</item>
- <item translatable="yes" context="sidebaraxis|comboboxtext_label_position">Near Axis (other side)</item>
- <item translatable="yes" context="sidebaraxis|comboboxtext_label_position">Outside start</item>
- <item translatable="yes" context="sidebaraxis|comboboxtext_label_position">Outside end</item>
- </items>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="label" translatable="yes" context="sidebaraxis|label2">_Text orientation:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">spinbutton1</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinbutton1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="truncate-multiline">True</property>
- <property name="adjustment">adjustmentSpinDegrees</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="sidebaraxis|label1">_Label position:</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">comboboxtext_label_position</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="comboboxtext_label_position">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <items>
+ <item translatable="yes" context="sidebaraxis|comboboxtext_label_position">Near Axis</item>
+ <item translatable="yes" context="sidebaraxis|comboboxtext_label_position">Near Axis (other side)</item>
+ <item translatable="yes" context="sidebaraxis|comboboxtext_label_position">Outside start</item>
+ <item translatable="yes" context="sidebaraxis|comboboxtext_label_position">Outside end</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="label" translatable="yes" context="sidebaraxis|label2">_Text orientation:</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">spinbutton1</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinbutton1">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="truncate-multiline">True</property>
+ <property name="adjustment">adjustmentSpinDegrees</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkBox" id="label_props">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
+ </packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
diff --git a/chart2/uiconfig/ui/sidebarelements.ui b/chart2/uiconfig/ui/sidebarelements.ui
index c16216bf6dae..f67c3b39903b 100644
--- a/chart2/uiconfig/ui/sidebarelements.ui
+++ b/chart2/uiconfig/ui/sidebarelements.ui
@@ -1,549 +1,469 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.2 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="chart">
<requires lib="gtk+" version="3.20"/>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid" id="ChartElementsPanel">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
- <object class="GtkBox" id="container">
+ <!-- n-columns=2 n-rows=16 -->
+ <object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="border-width">6</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
<child>
- <object class="GtkFrame" id="frame1">
+ <object class="GtkLabel" id="l">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">3</property>
+ <property name="label" translatable="yes" context="sidebarelements|l">Titles</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_title">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_title">Title</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <accessibility>
+ <relation type="label-for" target="edit_title"/>
+ </accessibility>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="edit_title">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="grid1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
- <property name="margin-start">12</property>
- <property name="margin-top">6</property>
- <child>
- <object class="GtkCheckButton" id="checkbutton_title">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_title">Title</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <accessibility>
- <relation type="label-for" target="edit_title"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_subtitle">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_subtitle">Subtitle</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <accessibility>
- <relation type="label-for" target="edit_subtitle"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="edit_title">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="truncate-multiline">True</property>
- <accessibility>
- <relation type="labelled-by" target="checkbutton_title"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="edit_subtitle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="truncate-multiline">True</property>
- <accessibility>
- <relation type="labelled-by" target="checkbutton_subtitle"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="l">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebarelements|l">Titles</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
+ <property name="truncate-multiline">True</property>
+ <accessibility>
+ <relation type="labelled-by" target="checkbutton_title"/>
+ </accessibility>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame3">
+ <object class="GtkCheckButton" id="checkbutton_subtitle">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_subtitle">Subtitle</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkBox" id="box_legend2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <property name="margin-start">12</property>
- <property name="margin-top">6</property>
- <child>
- <object class="GtkCheckButton" id="checkbutton_legend">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_legend">Show legend</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="sidebarelements|checkbutton_legend|tooltip_text">Show Legend</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box_legend">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="placement_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="margin-start">4</property>
- <property name="label" translatable="yes" context="sidebarelements|placement_label">_Placement:</property>
- <property name="use_underline">True</property>
- <property name="ellipsize">end</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="comboboxtext_legend">
- <property name="width_request">100</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <items>
- <item translatable="yes" context="sidebarelements|comboboxtext_legend">Right</item>
- <item translatable="yes" context="sidebarelements|comboboxtext_legend">Top</item>
- <item translatable="yes" context="sidebarelements|comboboxtext_legend">Bottom</item>
- <item translatable="yes" context="sidebarelements|comboboxtext_legend">Left</item>
- </items>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_no_overlay">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_no_overlay">Show the legend without overlapping the chart</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label_legen">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebarelements|label_legen">Legend</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <accessibility>
+ <relation type="label-for" target="edit_subtitle"/>
+ </accessibility>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame2">
+ <object class="GtkEntry" id="edit_subtitle">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="grid2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
- <property name="margin-start">12</property>
- <property name="margin-top">6</property>
- <child>
- <object class="GtkCheckButton" id="checkbutton_x_axis">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_x_axis">X axis</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_x_axis_title">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_x_axis_title">X axis title</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_y_axis">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_y_axis">Y axis</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_y_axis_title">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_y_axis_title">Y axis title</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_z_axis">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_z_axis">Z axis</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_z_axis_title">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_z_axis_title">Z axis title</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_2nd_x_axis">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_2nd_x_axis">2nd X axis</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_2nd_x_axis_title">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_2nd_x_axis_title">2nd X axis title</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_2nd_y_axis">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_2nd_y_axis">2nd Y axis</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_2nd_y_axis_title">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_2nd_y_axis_title">2nd Y axis title</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label_axes">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebarelements|label_axes">Axes</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
+ <property name="can-focus">True</property>
+ <property name="truncate-multiline">True</property>
+ <accessibility>
+ <relation type="labelled-by" target="checkbutton_subtitle"/>
+ </accessibility>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame4">
+ <object class="GtkLabel" id="label_legen">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="grid3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
- <property name="margin-start">12</property>
- <property name="margin-top">6</property>
- <child>
- <object class="GtkCheckButton" id="checkbutton_gridline_horizontal_major">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_gridline_horizontal_major">Horizontal major</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_gridline_vertical_major">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_gridline_vertical_major">Vertical major</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_gridline_horizontal_minor">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_gridline_horizontal_minor">Horizontal minor</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_gridline_vertical_minor">
- <property name="label" translatable="yes" context="sidebarelements|checkbutton_gridline_vertical_minor">Vertical minor</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label_gri">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebarelements|label_gri">Gridlines</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">3</property>
+ <property name="label" translatable="yes" context="sidebarelements|label_legen">Legend</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_legend">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_legend">Show legend</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="sidebarelements|checkbutton_legend|tooltip_text">Show Legend</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="grid4">
- <property name="can_focus">False</property>
+ <object class="GtkComboBoxText" id="comboboxtext_legend">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <items>
+ <item translatable="yes" context="sidebarelements|comboboxtext_legend">Right</item>
+ <item translatable="yes" context="sidebarelements|comboboxtext_legend">Top</item>
+ <item translatable="yes" context="sidebarelements|comboboxtext_legend">Bottom</item>
+ <item translatable="yes" context="sidebarelements|comboboxtext_legend">Left</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_no_overlay">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_no_overlay">Show the legend without overlapping the chart</property>
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">5</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_axes">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">3</property>
+ <property name="label" translatable="yes" context="sidebarelements|label_axes">Axes</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">6</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_x_axis">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_x_axis">X axis</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_y_axis">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_y_axis">Y axis</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_z_axis">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_z_axis">Z axis</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">9</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_2nd_x_axis">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_2nd_x_axis">2nd X axis</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">10</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_2nd_y_axis">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_2nd_y_axis">2nd Y axis</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">11</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_x_axis_title">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_x_axis_title">X axis title</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_y_axis_title">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_y_axis_title">Y axis title</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_z_axis_title">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_z_axis_title">Z axis title</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">9</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_2nd_x_axis_title">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_2nd_x_axis_title">2nd X axis title</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">10</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_2nd_y_axis_title">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_2nd_y_axis_title">2nd Y axis title</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">11</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_gri">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">3</property>
+ <property name="label" translatable="yes" context="sidebarelements|label_gri">Gridlines</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">12</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_gridline_horizontal_major">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_gridline_horizontal_major">Horizontal major</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">13</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_gridline_vertical_major">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_gridline_vertical_major">Vertical major</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">14</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_gridline_horizontal_minor">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_gridline_horizontal_minor">Horizontal minor</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">13</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_gridline_vertical_minor">
+ <property name="label" translatable="yes" context="sidebarelements|checkbutton_gridline_vertical_minor">Vertical minor</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">14</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box_legend">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="text_title">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
+ <property name="halign">start</property>
<property name="label" translatable="yes" context="sidebarelements|text_title">Title</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="text_subtitle">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
+ <property name="halign">start</property>
<property name="label" translatable="yes" context="sidebarelements|text_subtitle">Subtitle</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="placement_label">
+ <property name="can-focus">False</property>
+ <property name="halign">end</property>
+ <property name="margin-start">4</property>
+ <property name="label" translatable="yes" context="sidebarelements|placement_label">_Placement:</property>
+ <property name="use-underline">True</property>
+ <property name="ellipsize">end</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">15</property>
+ <property name="width">2</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
- <object class="GtkSizeGroup" id="sizegroup1">
- <widgets>
- <widget name="checkbutton_title"/>
- <widget name="checkbutton_x_axis"/>
- <widget name="checkbutton_y_axis"/>
- <widget name="checkbutton_z_axis"/>
- <widget name="checkbutton_2nd_x_axis"/>
- <widget name="checkbutton_2nd_y_axis"/>
- <widget name="checkbutton_gridline_vertical_major"/>
- <widget name="checkbutton_gridline_horizontal_major"/>
- </widgets>
- </object>
- <object class="GtkSizeGroup" id="sizegroup2">
- <widgets>
- <widget name="checkbutton_subtitle"/>
- <widget name="checkbutton_x_axis_title"/>
- <widget name="checkbutton_y_axis_title"/>
- <widget name="checkbutton_z_axis_title"/>
- <widget name="checkbutton_2nd_x_axis_title"/>
- <widget name="checkbutton_2nd_y_axis_title"/>
- <widget name="checkbutton_gridline_vertical_minor"/>
- <widget name="checkbutton_gridline_horizontal_minor"/>
- </widgets>
- </object>
</interface>
diff --git a/chart2/uiconfig/ui/sidebarerrorbar.ui b/chart2/uiconfig/ui/sidebarerrorbar.ui
index 7ffdc3a68192..32c3ef130ad0 100644
--- a/chart2/uiconfig/ui/sidebarerrorbar.ui
+++ b/chart2/uiconfig/ui/sidebarerrorbar.ui
@@ -1,218 +1,146 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="chart">
<requires lib="gtk+" version="3.20"/>
<object class="GtkAdjustment" id="adjustmentNEG">
<property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustmentPOS">
<property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
</object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon_name">chart2/res/errorup_30.png</property>
+ <property name="can-focus">False</property>
+ <property name="icon-name">chart2/res/errorup_30.png</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon_name">chart2/res/errorbothverti_30.png</property>
+ <property name="can-focus">False</property>
+ <property name="icon-name">chart2/res/errorbothverti_30.png</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon_name">chart2/res/errordown_30.png</property>
+ <property name="can-focus">False</property>
+ <property name="icon-name">chart2/res/errordown_30.png</property>
</object>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid" id="ChartErrorBarPanel">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
- <object class="GtkBox" id="box1">
+ <!-- n-columns=2 n-rows=4 -->
+ <object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <property name="baseline_position">top</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="border-width">6</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
<child>
- <object class="GtkBox" id="box3">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="sidebarerrorbar|label2">Category:</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">comboboxtext_type</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="comboboxtext_type">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <items>
+ <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Constant</item>
+ <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Percentage</item>
+ <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Cell Range or Data Table</item>
+ <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Standard deviation</item>
+ <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Standard error</item>
+ <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Variance</item>
+ <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Error margin</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="sidebarerrorbar|label3">Positive (+):</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="sidebarerrorbar|label4">Negative (-):</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinbutton_pos">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="text" translatable="yes" context="sidebarerrorbar|spinbutton_pos">0.00</property>
+ <property name="truncate-multiline">True</property>
+ <property name="adjustment">adjustmentPOS</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinbutton_neg">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="text" translatable="yes" context="sidebarerrorbar|spinbutton_neg">0.00</property>
+ <property name="truncate-multiline">True</property>
+ <property name="adjustment">adjustmentNEG</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="grid1">
+ <object class="GtkRadioButton" id="radiobutton_positive_negative">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes" context="sidebarerrorbar|label2">Category:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">comboboxtext_type</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="comboboxtext_type">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <items>
- <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Constant</item>
- <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Percentage</item>
- <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Cell Range or Data Table</item>
- <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Standard deviation</item>
- <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Standard error</item>
- <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Variance</item>
- <item translatable="yes" context="sidebarerrorbar|comboboxtext_type">Error margin</item>
- </items>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes" context="sidebarerrorbar|label3">Positive (+):</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes" context="sidebarerrorbar|label4">Negative (-):</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinbutton_pos">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="halign">start</property>
- <property name="text" translatable="yes" context="sidebarerrorbar|spinbutton_pos">0.00</property>
- <property name="adjustment">adjustmentPOS</property>
- <property name="truncate-multiline">True</property>
- <property name="digits">2</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinbutton_neg">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="halign">start</property>
- <property name="text" translatable="yes" context="sidebarerrorbar|spinbutton_neg">0.00</property>
- <property name="adjustment">adjustmentNEG</property>
- <property name="truncate-multiline">True</property>
- <property name="digits">2</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkRadioButton" id="radiobutton_positive_negative">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="sidebarerrorbar|radiobutton_positive_negative|tooltip_text">Positive and Negative</property>
- <property name="image">image2</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radiobutton_positive">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="sidebarerrorbar|radiobutton_positive|tooltip_text">Positive</property>
- <property name="image">image1</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton_positive_negative</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radiobutton_negative">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="sidebarerrorbar|radiobutton_negative|tooltip_text">Negative</property>
- <property name="image">image3</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton_positive_negative</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes" context="sidebarerrorbar|label5">Indicator</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="sidebarerrorbar|radiobutton_positive_negative|tooltip_text">Positive and Negative</property>
+ <property name="image">image2</property>
+ <property name="use-underline">True</property>
+ <property name="active">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -220,17 +148,62 @@
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkRadioButton" id="radiobutton_positive">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="sidebarerrorbar|radiobutton_positive|tooltip_text">Positive</property>
+ <property name="image">image1</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <property name="group">radiobutton_positive_negative</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radiobutton_negative">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="sidebarerrorbar|radiobutton_negative|tooltip_text">Negative</property>
+ <property name="image">image3</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <property name="group">radiobutton_positive_negative</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="sidebarerrorbar|label5">Indicator</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
diff --git a/chart2/uiconfig/ui/sidebarseries.ui b/chart2/uiconfig/ui/sidebarseries.ui
index e7ec66f134e5..7996f5c2e3a7 100644
--- a/chart2/uiconfig/ui/sidebarseries.ui
+++ b/chart2/uiconfig/ui/sidebarseries.ui
@@ -1,288 +1,241 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="chart">
<requires lib="gtk+" version="3.20"/>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid" id="ChartSeriesPanel">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
- <object class="GtkBox" id="box1">
+ <!-- n-columns=2 n-rows=10 -->
+ <object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="border-width">5</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
<child>
- <placeholder/>
+ <object class="GtkLabel" id="label_series_name">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">3</property>
+ <property name="label" translatable="no">Label</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_label">
+ <property name="label" translatable="yes" context="sidebarseries|checkbutton_label">Show data labels</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="comboboxtext_label">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <items>
+ <item translatable="yes" context="sidebarseries|comboboxtext_label">Above</item>
+ <item translatable="yes" context="sidebarseries|comboboxtext_label">Below</item>
+ <item translatable="yes" context="sidebarseries|comboboxtext_label">Center</item>
+ <item translatable="yes" context="sidebarseries|comboboxtext_label">Outside</item>
+ <item translatable="yes" context="sidebarseries|comboboxtext_label">Inside</item>
+ <item translatable="yes" context="sidebarseries|comboboxtext_label">Near origin</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
+ </packing>
</child>
<child>
- <object class="GtkFrame" id="frame1">
+ <object class="GtkCheckButton" id="checkbutton_trendline">
+ <property name="label" translatable="yes" context="sidebarseries|checkbutton_trendline">Show trendline</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">3</property>
+ <property name="label" translatable="yes" context="sidebarseries|label1">Error Bars</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_y_error">
+ <property name="label" translatable="yes" context="sidebarseries|checkbutton_y_error">Y error bars</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_x_error">
+ <property name="label" translatable="yes" context="sidebarseries|checkbutton_x_error">X error bars</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">5</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="axis_label">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">3</property>
+ <property name="label" translatable="yes" context="sidebarseries|axis_label">Align Series to Axis</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">6</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_series_tmpl">
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="sidebarseries|label_series_tmpl">Data series '%1'</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">8</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box5">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkBox" id="box2">
+ <object class="GtkRadioButton" id="radiobutton_primary_axis">
+ <property name="label" translatable="yes" context="sidebarseries|radiobutton_primary_axis">Primary Y axis</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <property name="margin-start">12</property>
- <property name="margin-top">6</property>
- <child>
- <object class="GtkBox" id="box3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkCheckButton" id="checkbutton_label">
- <property name="label" translatable="yes" context="sidebarseries|checkbutton_label">Show data labels</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="datalabel_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin-start">12</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebarseries|label_box">P_lacement:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">comboboxtext_label</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="comboboxtext_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <items>
- <item translatable="yes" context="sidebarseries|comboboxtext_label">Above</item>
- <item translatable="yes" context="sidebarseries|comboboxtext_label">Below</item>
- <item translatable="yes" context="sidebarseries|comboboxtext_label">Center</item>
- <item translatable="yes" context="sidebarseries|comboboxtext_label">Outside</item>
- <item translatable="yes" context="sidebarseries|comboboxtext_label">Inside</item>
- <item translatable="yes" context="sidebarseries|comboboxtext_label">Near origin</item>
- </items>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_trendline">
- <property name="label" translatable="yes" context="sidebarseries|checkbutton_trendline">Show trendline</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkFrame" id="frame3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkBox" id="box6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <property name="margin-start">12</property>
- <property name="margin-top">6</property>
- <child>
- <object class="GtkCheckButton" id="checkbutton_y_error">
- <property name="label" translatable="yes" context="sidebarseries|checkbutton_y_error">Y error bars</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_x_error">
- <property name="label" translatable="yes" context="sidebarseries|checkbutton_x_error">X error bars</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebarseries|label1">Error Bars</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkBox" id="box5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <property name="margin-start">12</property>
- <property name="margin-top">6</property>
- <child>
- <object class="GtkRadioButton" id="radiobutton_primary_axis">
- <property name="label" translatable="yes" context="sidebarseries|radiobutton_primary_axis">Primary Y axis</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radiobutton_secondary_axis">
- <property name="label" translatable="yes" context="sidebarseries|radiobutton_secondary_axis">Secondary Y axis</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton_primary_axis</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="axis_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebarseries|axis_label">Align Series to Axis</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_series_tmpl">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebarseries|label_series_tmpl">Data series '%1'</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">5</property>
- </packing>
- </child>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="active">True</property>
+ <property name="draw-indicator">True</property>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
- <child type="label">
- <object class="GtkLabel" id="label_series_name">
+ <child>
+ <object class="GtkRadioButton" id="radiobutton_secondary_axis">
+ <property name="label" translatable="yes" context="sidebarseries|radiobutton_secondary_axis">Secondary Y axis</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="no">Label</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <property name="group">radiobutton_primary_axis</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">7</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="datalabel_box">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="margin-start">12</property>
+ <child>
+ <object class="GtkLabel" id="label_box">
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes" context="sidebarseries|label_box">P_lacement:</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic_widget">comboboxtext_label</property>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">9</property>
+ <property name="width">2</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
diff --git a/chart2/uiconfig/ui/sidebartype.ui b/chart2/uiconfig/ui/sidebartype.ui
index ae410375d1c0..131a1c5eea5d 100644
--- a/chart2/uiconfig/ui/sidebartype.ui
+++ b/chart2/uiconfig/ui/sidebartype.ui
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="chart">
<requires lib="gtk+" version="3.20"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">1</property>
<property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
</object>
<object class="GtkTreeStore" id="liststore1">
<columns>
@@ -29,32 +29,33 @@
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid" id="ChartTypePanel">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=9 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
- <property name="border_width">6</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
+ <property name="border-width">6</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="subtypewin">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
+ <property name="margin-bottom">6</property>
<property name="hexpand">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">never</property>
- <property name="shadow_type">in</property>
+ <property name="hscrollbar-policy">never</property>
+ <property name="vscrollbar-policy">never</property>
+ <property name="shadow-type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
<object class="GtkDrawingArea" id="subtype">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="hexpand">True</property>
</object>
@@ -63,353 +64,283 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ <property name="width">2</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="3dblock">
+ <object class="GtkCheckButton" id="3dlook">
+ <property name="label" translatable="yes" context="sidebartype|3dlook">_3D Look</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="3dscheme">
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <items>
+ <item translatable="yes" context="sidebartype|3dscheme">Simple</item>
+ <item translatable="yes" context="sidebartype|3dscheme">Realistic</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="shapeft">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="grid9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkCheckButton" id="3dlook">
- <property name="label" translatable="yes" context="sidebartype|3dlook">_3D Look</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <accessibility>
- <relation type="label-for" target="3dscheme"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="3dscheme">
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <items>
- <item translatable="yes" context="sidebartype|3dscheme">Simple</item>
- <item translatable="yes" context="sidebartype|3dscheme">Realistic</item>
- </items>
- <accessibility>
- <relation type="labelled-by" target="3dlook"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="shapeft">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebartype|shapeft">Sh_ape</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">shape</property>
- <property name="angle">0.02</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
+ <property name="can-focus">False</property>
+ <property name="halign">end</property>
+ <property name="valign">start</property>
+ <property name="label" translatable="yes" context="sidebartype|shapeft">Sh_ape</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">shape</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="shadow-type">in</property>
<child>
- <object class="GtkScrolledWindow">
+ <object class="GtkTreeView" id="shape">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="vexpand">True</property>
- <property name="shadow_type">in</property>
+ <property name="model">liststore1</property>
+ <property name="headers-visible">False</property>
+ <property name="headers-clickable">False</property>
+ <property name="search-column">0</property>
+ <property name="show-expanders">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection"/>
+ </child>
<child>
- <object class="GtkTreeView" id="shape">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="vexpand">True</property>
- <property name="model">liststore1</property>
- <property name="headers_visible">False</property>
- <property name="headers_clickable">False</property>
- <property name="search_column">0</property>
- <property name="show_expanders">False</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection"/>
- </child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn1">
<child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn1">
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext1"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
</child>
</object>
</child>
</object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="stack">
+ <property name="label" translatable="yes" context="sidebartype|stack">_Stack series</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="valign">start</property>
+ <property name="vexpand">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="linetypeft">
+ <property name="can-focus">False</property>
+ <property name="halign">end</property>
+ <property name="label" translatable="yes" context="sidebartype|linetypeft">_Line type</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">linetype</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">5</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="stackblock">
+ <object class="GtkComboBoxText" id="linetype">
+ <property name="can-focus">False</property>
+ <items>
+ <item translatable="yes" context="sidebartype|linetype">Straight</item>
+ <item translatable="yes" context="sidebartype|linetype">Smooth</item>
+ <item translatable="yes" context="sidebartype|linetype">Stepped</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="properties">
+ <property name="label" translatable="yes" context="sidebartype|properties">Properties...</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="sort">
+ <property name="label" translatable="yes" context="sidebartype|sort">_Sort by X values</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="nolinesft">
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="sidebartype|nolinesft">_Number of lines</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">nolines</property>
+ <property name="ellipsize">end</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="nolines">
+ <property name="can-focus">True</property>
+ <property name="no-show-all">True</property>
+ <property name="activates-default">True</property>
+ <property name="truncate-multiline">True</property>
+ <property name="adjustment">adjustment1</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="cmb_chartType">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
+ <property name="can-focus">False</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="model">liststore2</property>
+ <property name="entry-text-column">0</property>
+ <property name="id-column">1</property>
<child>
- <object class="GtkCheckButton" id="stack">
- <property name="label" translatable="yes" context="sidebartype|stack">_Stack series</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
+ <object class="GtkCellRendererText" id="cellrenderertext9"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="grid6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
- <property name="margin-start">12</property>
- <child>
- <object class="GtkRadioButton" id="ontop">
- <property name="label" translatable="yes" context="sidebartype|ontop">On top</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="percent">
- <property name="label" translatable="yes" context="sidebartype|percent">Percent</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">ontop</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="deep">
- <property name="label" translatable="yes" context="sidebartype|deep">Deep</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">ontop</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
+ <object class="GtkCellRendererPixbuf" id="cellrenderertext6"/>
+ <attributes>
+ <attribute name="pixbuf">2</attribute>
+ </attributes>
</child>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="grid6">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">3</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="grid7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkLabel" id="linetypeft">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebartype|linetypeft">_Line type</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">linetype</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="linetype">
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <items>
- <item translatable="yes" context="sidebartype|linetype">Straight</item>
- <item translatable="yes" context="sidebartype|linetype">Smooth</item>
- <item translatable="yes" context="sidebartype|linetype">Stepped</item>
- </items>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="properties">
- <property name="label" translatable="yes" context="sidebartype|properties">Properties...</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
+ <object class="GtkRadioButton" id="ontop">
+ <property name="label" translatable="yes" context="sidebartype|ontop">On top</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="active">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="sort">
- <property name="label" translatable="yes" context="sidebartype|sort">_Sort by X values</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <object class="GtkRadioButton" id="percent">
+ <property name="label" translatable="yes" context="sidebartype|percent">Percent</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <property name="group">ontop</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="grid8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkLabel" id="nolinesft">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes" context="sidebartype|nolinesft">_Number of lines</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">nolines</property>
- <property name="ellipsize">end</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="nolines">
- <property name="can_focus">True</property>
- <property name="no_show_all">True</property>
- <property name="hexpand">True</property>
- <property name="activates_default">True</property>
- <property name="truncate-multiline">True</property>
- <property name="adjustment">adjustment1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
+ <object class="GtkRadioButton" id="deep">
+ <property name="label" translatable="yes" context="sidebartype|deep">Deep</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <property name="group">ontop</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">4</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="charttypeblock">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkComboBox" id="cmb_chartType">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="valign">center</property>
- <property name="hexpand">True</property>
- <property name="model">liststore2</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext9"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- <child>
- <object class="GtkCellRendererPixbuf" id="cellrenderertext6"/>
- <attributes>
- <attribute name="pixbuf">2</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
diff --git a/chart2/uiconfig/ui/tp_3D_SceneIllumination.ui b/chart2/uiconfig/ui/tp_3D_SceneIllumination.ui
index 2187db5ab092..f67f287f68fc 100644
--- a/chart2/uiconfig/ui/tp_3D_SceneIllumination.ui
+++ b/chart2/uiconfig/ui/tp_3D_SceneIllumination.ui
@@ -276,11 +276,11 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes" context="tp_3D_SceneIllumination|BTN_LIGHTSOURCE_COLOR|tooltip_text">Select a color using the color dialog</property>
+ <property name="tooltip_text" translatable="yes" context="tp_3D_SceneIllumination|BTN_LIGHTSOURCE_COLOR|tooltip_text">Select a color using the Pick a Color dialog</property>
<property name="image">IMG_LIGHTSOURCE_COLOR</property>
<child internal-child="accessible">
<object class="AtkObject" id="BTN_LIGHTSOURCE_COLOR-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="tp_3D_SceneIllumination|extended_tip|BTN_LIGHTSOURCE_COLOR">Select a color using the color dialog.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="tp_3D_SceneIllumination|extended_tip|BTN_LIGHTSOURCE_COLOR">Select a color using the Pick a Color dialog.</property>
</object>
</child>
</object>
@@ -360,11 +360,11 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes" context="tp_3D_SceneIllumination|BTN_AMBIENT_COLOR|tooltip_text">Select a color using the color dialog</property>
+ <property name="tooltip_text" translatable="yes" context="tp_3D_SceneIllumination|BTN_AMBIENT_COLOR|tooltip_text">Select a color using the Pick a Color dialog</property>
<property name="image">IMG_AMBIENT_COLOR</property>
<child internal-child="accessible">
<object class="AtkObject" id="BTN_AMBIENT_COLOR-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="tp_3D_SceneIllumination|extended_tip|BTN_AMBIENT_COLOR">Select a color using the color dialog.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="tp_3D_SceneIllumination|extended_tip|BTN_AMBIENT_COLOR">Select a color using the Pick a color dialog.</property>
</object>
</child>
</object>
diff --git a/chart2/uiconfig/ui/tp_AxisPositions.ui b/chart2/uiconfig/ui/tp_AxisPositions.ui
index 5308a2bc911f..7cff4022b6ac 100644
--- a/chart2/uiconfig/ui/tp_AxisPositions.ui
+++ b/chart2/uiconfig/ui/tp_AxisPositions.ui
@@ -632,7 +632,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
- <property name="xalign">0.5</property>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/chart2/uiconfig/ui/tp_ChartType.ui b/chart2/uiconfig/ui/tp_ChartType.ui
index 600bf3a4af68..68decb08f0d7 100644
--- a/chart2/uiconfig/ui/tp_ChartType.ui
+++ b/chart2/uiconfig/ui/tp_ChartType.ui
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="chart">
<requires lib="gtk+" version="3.20"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">1</property>
<property name="upper">100</property>
<property name="value">1</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
</object>
<object class="GtkTreeStore" id="liststore1">
<columns>
@@ -29,22 +29,22 @@
</object>
<object class="GtkBox" id="tp_ChartType">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="border_width">6</property>
+ <property name="border-width">6</property>
<property name="spacing">12</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="FT_CAPTION_FOR_WIZARD">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="tp_ChartType|FT_CAPTION_FOR_WIZARD">Choose a Chart Type</property>
<property name="xalign">0</property>
<attributes>
@@ -58,37 +58,35 @@
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="column_spacing">12</property>
+ <property name="column-spacing">12</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=3 -->
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="row_spacing">6</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="subtypewin">
- <property name="visible">False</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">never</property>
- <property name="shadow_type">in</property>
+ <property name="hscrollbar-policy">never</property>
+ <property name="vscrollbar-policy">never</property>
+ <property name="shadow-type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<child>
<object class="GtkDrawingArea" id="subtype">
- <property name="visible">False</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="hexpand">True</property>
<child internal-child="accessible">
@@ -102,31 +100,31 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=3 -->
<object class="GtkGrid" id="3dblock">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="row_spacing">3</property>
+ <property name="row-spacing">3</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="grid9">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkCheckButton" id="3dlook">
<property name="label" translatable="yes" context="tp_ChartType|3dlook">_3D Look</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<accessibility>
<relation type="label-for" target="3dscheme"/>
</accessibility>
@@ -137,13 +135,13 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="3dscheme">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<items>
<item translatable="yes" context="tp_ChartType|3dscheme">Simple</item>
@@ -159,48 +157,47 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="shapeft">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="tp_ChartType|shapeft">Sh_ape</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">shape</property>
- <property name="angle">0.02</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">shape</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="shadow_type">in</property>
+ <property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="shape">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="model">liststore1</property>
- <property name="headers_visible">False</property>
- <property name="headers_clickable">False</property>
- <property name="search_column">0</property>
- <property name="show_expanders">False</property>
+ <property name="headers-visible">False</property>
+ <property name="headers-clickable">False</property>
+ <property name="search-column">0</property>
+ <property name="show-expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
@@ -223,29 +220,29 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=5 -->
<object class="GtkGrid" id="stackblock">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">3</property>
<child>
<object class="GtkCheckButton" id="stack">
<property name="label" translatable="yes" context="tp_ChartType|stack">_Stack series</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="stack-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_ChartType|extended_tip|stack">Displays stacked series for Line charts.</property>
@@ -253,25 +250,25 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=3 -->
<object class="GtkGrid" id="grid6">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
+ <property name="row-spacing">3</property>
<child>
<object class="GtkRadioButton" id="ontop">
<property name="label" translatable="yes" context="tp_ChartType|ontop">On top</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="ontop-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_ChartType|extended_tip|ontop">Stack series display values on top of each other.</property>
@@ -279,17 +276,17 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="percent">
<property name="label" translatable="yes" context="tp_ChartType|percent">Percent</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">ontop</property>
<child internal-child="accessible">
<object class="AtkObject" id="percent-atkobject">
@@ -298,52 +295,52 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="deep">
<property name="label" translatable="yes" context="tp_ChartType|deep">Deep</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">ontop</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=3 n-rows=1 -->
<object class="GtkGrid" id="grid7">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkLabel" id="linetypeft">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="tp_ChartType|linetypeft">_Line type</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">linetype</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">linetype</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="linetype">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<items>
<item translatable="yes" context="tp_ChartType|linetype">Straight</item>
<item translatable="yes" context="tp_ChartType|linetype">Smooth</item>
@@ -356,16 +353,16 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="properties">
<property name="label" translatable="yes" context="tp_ChartType|properties">Properties...</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="properties-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_ChartType|extended_tip|properties">Opens a dialog to set the line or curve properties.</property>
@@ -373,23 +370,23 @@
</child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">2</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="sort">
<property name="label" translatable="yes" context="tp_ChartType|sort">_Sort by X values</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="sort-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_ChartType|extended_tip|sort">Connects points by ascending X values, even if the order of values is different, in an XY scatter diagram.</property>
@@ -397,38 +394,38 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="grid8">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkLabel" id="nolinesft">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
<property name="label" translatable="yes" context="tp_ChartType|nolinesft">_Number of lines</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">nolines</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">nolines</property>
<property name="ellipsize">end</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="nolines">
- <property name="can_focus">True</property>
- <property name="no_show_all">True</property>
- <property name="activates_default">True</property>
- <property name="adjustment">adjustment1</property>
+ <property name="can-focus">True</property>
+ <property name="no-show-all">True</property>
+ <property name="activates-default">True</property>
<property name="truncate-multiline">True</property>
+ <property name="adjustment">adjustment1</property>
<child internal-child="accessible">
<object class="AtkObject" id="nolines-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_ChartType|extended_tip|nolines">Set the number of lines for the Column and Line chart type.</property>
@@ -436,45 +433,44 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
- <property name="visible">False</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="vexpand">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="shadow_type">in</property>
+ <property name="hscrollbar-policy">never</property>
+ <property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="charttype">
- <property name="visible">False</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
+ <property name="has-focus">True</property>
<property name="vexpand">True</property>
<property name="model">liststore2</property>
- <property name="headers_visible">False</property>
- <property name="headers_clickable">False</property>
- <property name="search_column">0</property>
- <property name="show_expanders">False</property>
+ <property name="headers-visible">False</property>
+ <property name="headers-clickable">False</property>
+ <property name="search-column">0</property>
+ <property name="show-expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection2"/>
</child>
@@ -507,8 +503,8 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
diff --git a/chart2/uiconfig/ui/tp_DataTable.ui b/chart2/uiconfig/ui/tp_DataTable.ui
new file mode 100644
index 000000000000..ad8bc0fcffc7
--- /dev/null
+++ b/chart2/uiconfig/ui/tp_DataTable.ui
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.2 -->
+<interface domain="chart">
+ <requires lib="gtk+" version="3.20"/>
+ <object class="GtkBox" id="DataTableTabPage">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="border-width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
+ <child>
+ <object class="GtkBox" id="box4">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="margin-start">12</property>
+ <property name="margin-top">6</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="horizontalBorderCB">
+ <property name="label" translatable="yes" context="tp_DataTable|horizontalBorderCB">Show horizontal border</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="verticalBorderCB">
+ <property name="label" translatable="yes" context="tp_DataTable|verticalBorderCB">Show vertical border</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="outlineCB">
+ <property name="label" translatable="yes" context="tp_DataTable|outlineCB">Show outline</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="keysCB">
+ <property name="label" translatable="yes" context="tp_DataTable|keysCB">Show keys</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="dataTablePropertiesLabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes" context="tp_axisLabel|textflowL">Data Table Properties</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/chart2/uiconfig/ui/tp_SeriesToAxis.ui b/chart2/uiconfig/ui/tp_SeriesToAxis.ui
index dd25988f0ea8..d48dd418467a 100644
--- a/chart2/uiconfig/ui/tp_SeriesToAxis.ui
+++ b/chart2/uiconfig/ui/tp_SeriesToAxis.ui
@@ -1,47 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="chart">
<requires lib="gtk+" version="3.20"/>
<object class="GtkAdjustment" id="adjustmentGAP">
<property name="upper">600</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustmentOVERLAP">
<property name="lower">-100</property>
<property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
</object>
<object class="GtkBox" id="TP_OPTIONS">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkFrame" id="frameGrpAxis">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkRadioButton" id="RBT_OPT_AXIS_1">
<property name="label" translatable="yes" context="tp_SeriesToAxis|RBT_OPT_AXIS_1">Primary Y axis</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="RBT_OPT_AXIS_1-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_SeriesToAxis|extended_tip|RBT_OPT_AXIS_1">This option is active as default. All data series are aligned to the primary Y axis.</property>
@@ -58,10 +58,10 @@
<object class="GtkRadioButton" id="RBT_OPT_AXIS_2">
<property name="label" translatable="yes" context="tp_SeriesToAxis|RBT_OPT_AXIS_2">Secondary Y axis</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">RBT_OPT_AXIS_1</property>
<child internal-child="accessible">
<object class="AtkObject" id="RBT_OPT_AXIS_2-atkobject">
@@ -80,7 +80,7 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="tp_SeriesToAxis|label1">Align Data Series to</property>
<property name="xalign">0</property>
<attributes>
@@ -98,56 +98,56 @@
<child>
<object class="GtkFrame" id="frameSettings">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=2 -->
<object class="GtkGrid" id="gridSettings">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkLabel" id="FT_GAP">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="tp_SeriesToAxis|FT_GAP">_Spacing</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">MT_GAP</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">MT_GAP</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="FT_OVERLAP">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="tp_SeriesToAxis|FT_OVERLAP">_Overlap</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">MT_OVERLAP</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">MT_OVERLAP</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="MT_GAP">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="adjustment">adjustmentGAP</property>
+ <property name="can-focus">True</property>
<property name="truncate-multiline">True</property>
+ <property name="adjustment">adjustmentGAP</property>
<child internal-child="accessible">
<object class="AtkObject" id="MT_GAP-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_SeriesToAxis|extended_tip|MT_GAP">Defines the spacing between the columns in percent.</property>
@@ -155,16 +155,16 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="MT_OVERLAP">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="adjustment">adjustmentOVERLAP</property>
+ <property name="can-focus">True</property>
<property name="truncate-multiline">True</property>
+ <property name="adjustment">adjustmentOVERLAP</property>
<child internal-child="accessible">
<object class="AtkObject" id="MT_OVERLAP-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_SeriesToAxis|extended_tip|MT_OVERLAP">Defines the necessary settings for overlapping data series.</property>
@@ -172,8 +172,8 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
</object>
@@ -187,11 +187,11 @@
<object class="GtkCheckButton" id="CB_BARS_SIDE_BY_SIDE">
<property name="label" translatable="yes" context="tp_SeriesToAxis|CB_BARS_SIDE_BY_SIDE">Show _bars side by side</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="CB_BARS_SIDE_BY_SIDE-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_SeriesToAxis|extended_tip|CB_BARS_SIDE_BY_SIDE">The bars from different data series are shown as if they were attached only to one axis.</property>
@@ -208,11 +208,11 @@
<object class="GtkCheckButton" id="CB_CONNECTOR">
<property name="label" translatable="yes" context="tp_SeriesToAxis|CB_CONNECTOR">Connection lines</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="CB_CONNECTOR-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_SeriesToAxis|extended_tip|CB_CONNECTOR">For "stacked" and "percent" column (vertical bar) charts, mark this check box to connect the column layers that belong together with lines.</property>
@@ -230,7 +230,7 @@
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="tp_SeriesToAxis|label2">Settings</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -247,45 +247,45 @@
<child>
<object class="GtkFrame" id="frameFL_PLOT_OPTIONS">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=3 -->
<object class="GtkGrid" id="gridPLOT_OPTIONS">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkLabel" id="FT_MISSING_VALUES">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="tp_SeriesToAxis|FT_MISSING_VALUES">Plot missing values</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="RB_DONT_PAINT">
<property name="label" translatable="yes" context="tp_SeriesToAxis|RB_DONT_PAINT">_Leave gap</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="RB_DONT_PAINT-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_SeriesToAxis|extended_tip|RB_DONT_PAINT">For a missing value, no data will be shown. This is the default for chart types Column, Bar, Line, Net.</property>
@@ -293,18 +293,18 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="RB_ASSUME_ZERO">
<property name="label" translatable="yes" context="tp_SeriesToAxis|RB_ASSUME_ZERO">_Assume zero</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">RB_DONT_PAINT</property>
<child internal-child="accessible">
<object class="AtkObject" id="RB_ASSUME_ZERO-atkobject">
@@ -313,18 +313,18 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="RB_CONTINUE_LINE">
<property name="label" translatable="yes" context="tp_SeriesToAxis|RB_CONTINUE_LINE">_Continue line</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">RB_DONT_PAINT</property>
<child internal-child="accessible">
<object class="AtkObject" id="RB_CONTINUE_LINE-atkobject">
@@ -333,8 +333,8 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
@@ -354,11 +354,11 @@
<object class="GtkCheckButton" id="CB_INCLUDE_HIDDEN_CELLS">
<property name="label" translatable="yes" context="tp_SeriesToAxis|CB_INCLUDE_HIDDEN_CELLS">Include _values from hidden cells</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="CB_INCLUDE_HIDDEN_CELLS-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_SeriesToAxis|extended_tip|CB_INCLUDE_HIDDEN_CELLS">Check to also show values of currently hidden cells within the source cell range.</property>
@@ -376,7 +376,7 @@
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="tp_SeriesToAxis|label3">Plot Options</property>
<property name="xalign">0</property>
<attributes>
@@ -394,24 +394,24 @@
<child>
<object class="GtkFrame" id="frameLegend">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="orientation">vertical</property>
<child>
<object class="GtkCheckButton" id="CB_LEGEND_ENTRY_HIDDEN">
<property name="label" translatable="yes" context="tp_SeriesToAxis|CB_LEGEND_ENTRY_HIDDEN">Hide legend entry</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="CB_LEGEND_ENTRY_HIDDEN-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_SeriesToAxis|extended_tip|CB_LEGEND_ENTRY_HIDDEN">Do not show legend entry for the selected data series or data point.</property>
@@ -429,7 +429,7 @@
<child type="label">
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="tp_SeriesToAxis|label4">Legend Entry</property>
<attributes>
<attribute name="weight" value="bold"/>
diff --git a/chart2/uiconfig/ui/tp_Trendline.ui b/chart2/uiconfig/ui/tp_Trendline.ui
index 5698ed56ae83..9a385c7b925b 100644
--- a/chart2/uiconfig/ui/tp_Trendline.ui
+++ b/chart2/uiconfig/ui/tp_Trendline.ui
@@ -449,7 +449,6 @@
<property name="can-focus">True</property>
<property name="activates-default">True</property>
<property name="truncate-multiline">True</property>
- <property name="caps-lock-warning">False</property>
<property name="adjustment">adjustmentForwardBackward</property>
<property name="digits">2</property>
</object>
@@ -577,7 +576,6 @@
<property name="activates-default">True</property>
<property name="text">0</property>
<property name="truncate-multiline">True</property>
- <property name="caps-lock-warning">False</property>
<property name="adjustment">adjustmentForwardBackward2</property>
<property name="digits">2</property>
<accessibility>
diff --git a/chart2/uiconfig/ui/tp_axisLabel.ui b/chart2/uiconfig/ui/tp_axisLabel.ui
index 15dc755d9e6f..93578ff9b4c6 100644
--- a/chart2/uiconfig/ui/tp_axisLabel.ui
+++ b/chart2/uiconfig/ui/tp_axisLabel.ui
@@ -110,7 +110,7 @@
<property name="group">tile</property>
<child internal-child="accessible">
<object class="AtkObject" id="even-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="tp_axisLabel|extended_tip|even">Stagger numbers on the axes, odd numbers lower than even numbers.</property>
+ <property name="AtkObject::accessible-description" translatable="yes" context="tp_axisLabel|extended_tip|even">Stagger numbers on the axis, odd numbers lower than even numbers.</property>
</object>
</child>
</object>