summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/controller/accessibility/AccStatisticsObject.cxx5
-rw-r--r--chart2/source/controller/accessibility/AccStatisticsObject.hxx5
-rw-r--r--chart2/source/controller/accessibility/AccessibleBase.cxx78
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartElement.cxx17
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartElement.hxx5
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartShape.cxx289
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartShape.hxx104
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartView.cxx53
-rw-r--r--chart2/source/controller/accessibility/AccessibleTextHelper.cxx5
-rw-r--r--chart2/source/controller/accessibility/AccessibleViewForwarder.cxx116
-rw-r--r--chart2/source/controller/accessibility/AccessibleViewForwarder.hxx65
-rw-r--r--chart2/source/controller/accessibility/ChartElementFactory.cxx12
-rw-r--r--chart2/source/controller/accessibility/ChartElementFactory.hxx5
-rw-r--r--chart2/source/controller/accessibility/makefile.mk10
-rw-r--r--chart2/source/controller/chartapiwrapper/AreaWrapper.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/AreaWrapper.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/AxisWrapper.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/AxisWrapper.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx600
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx49
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx138
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/GridWrapper.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/GridWrapper.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/LegendWrapper.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/LegendWrapper.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/ReferenceSizePropertyProvider.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/TitleWrapper.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/TitleWrapper.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedAddInProperty.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx9
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/makefile.mk6
-rw-r--r--chart2/source/controller/dialogs/Bitmaps.hrc5
-rw-r--r--chart2/source/controller/dialogs/Bitmaps.src5
-rw-r--r--chart2/source/controller/dialogs/Bitmaps_HC.hrc5
-rw-r--r--chart2/source/controller/dialogs/Bitmaps_HC.src5
-rw-r--r--chart2/source/controller/dialogs/ChangingResource.cxx5
-rw-r--r--chart2/source/controller/dialogs/ChangingResource.hxx5
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.cxx5
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.hxx5
-rw-r--r--chart2/source/controller/dialogs/ChartTypeTemplateProvider.hxx5
-rw-r--r--chart2/source/controller/dialogs/CommonResources.hrc5
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx76
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.hxx9
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.cxx114
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.hxx16
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx7
-rw-r--r--chart2/source/controller/dialogs/DialogModel.hxx5
-rw-r--r--chart2/source/controller/dialogs/ObjectNameProvider.cxx9
-rw-r--r--chart2/source/controller/dialogs/RangeEdit.cxx5
-rw-r--r--chart2/source/controller/dialogs/RangeSelectionButton.cxx5
-rw-r--r--chart2/source/controller/dialogs/RangeSelectionHelper.cxx5
-rw-r--r--chart2/source/controller/dialogs/RangeSelectionListener.cxx5
-rw-r--r--chart2/source/controller/dialogs/ResourceIds.hrc7
-rw-r--r--chart2/source/controller/dialogs/Strings.src10
-rw-r--r--chart2/source/controller/dialogs/Strings_AdditionalControls.src5
-rw-r--r--chart2/source/controller/dialogs/Strings_ChartTypes.src5
-rw-r--r--chart2/source/controller/dialogs/Strings_Scale.src5
-rw-r--r--chart2/source/controller/dialogs/Strings_Statistic.src5
-rw-r--r--chart2/source/controller/dialogs/TabPages.hrc5
-rw-r--r--chart2/source/controller/dialogs/TextDirectionListBox.cxx5
-rw-r--r--chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx5
-rw-r--r--chart2/source/controller/dialogs/TitleDialogData.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_ChartType.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_ChartType.hrc5
-rw-r--r--chart2/source/controller/dialogs/dlg_ChartType.src5
-rw-r--r--chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard.hrc5
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard.src5
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_DataEditor.cxx57
-rw-r--r--chart2/source/controller/dialogs/dlg_DataEditor.hrc14
-rw-r--r--chart2/source/controller/dialogs/dlg_DataEditor.src13
-rw-r--r--chart2/source/controller/dialogs/dlg_DataSource.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_DataSource.hrc5
-rw-r--r--chart2/source/controller/dialogs/dlg_DataSource.src5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertAxis_Grid.hrc5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertDataLabel.hrc5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertDataLabel.src5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertErrorBars.hrc5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertErrorBars.src5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertLegend.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertLegend.hrc5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertLegend.src5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertTitle.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertTitle.hrc5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertTitle.src5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertTrendline.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertTrendline.hrc5
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertTrendline.src5
-rw-r--r--chart2/source/controller/dialogs/dlg_NumberFormat.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_NumberFormat.hxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx11
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.src5
-rw-r--r--chart2/source/controller/dialogs/dlg_ShapeFont.cxx92
-rw-r--r--chart2/source/controller/dialogs/dlg_ShapeFont.src62
-rw-r--r--chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx93
-rw-r--r--chart2/source/controller/dialogs/dlg_ShapeParagraph.src67
-rw-r--r--chart2/source/controller/dialogs/dlg_View3D.cxx5
-rw-r--r--chart2/source/controller/dialogs/dlg_View3D.hrc5
-rw-r--r--chart2/source/controller/dialogs/dlg_View3D.src5
-rw-r--r--chart2/source/controller/dialogs/hidother.src5
-rw-r--r--chart2/source/controller/dialogs/makefile.mk12
-rw-r--r--chart2/source/controller/dialogs/res_BarGeometry.cxx5
-rw-r--r--chart2/source/controller/dialogs/res_BarGeometry.hxx5
-rw-r--r--chart2/source/controller/dialogs/res_BarGeometry.src5
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx9
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.hxx5
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel_IDs.hrc5
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc5
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx5
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar_IDs.hrc5
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar_tmpl.hrc5
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition.cxx5
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition.hxx5
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition_IDs.hrc5
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc5
-rw-r--r--chart2/source/controller/dialogs/res_SecondaryAxisCheckBoxes_tmpl.hrc5
-rw-r--r--chart2/source/controller/dialogs/res_TextSeparator.cxx5
-rw-r--r--chart2/source/controller/dialogs/res_TextSeparator.hxx5
-rw-r--r--chart2/source/controller/dialogs/res_TextSeparator.src5
-rw-r--r--chart2/source/controller/dialogs/res_Titles.cxx5
-rw-r--r--chart2/source/controller/dialogs/res_Titles.hrc5
-rw-r--r--chart2/source/controller/dialogs/res_Titles.hxx5
-rw-r--r--chart2/source/controller/dialogs/res_Titlesx_tmpl.hrc5
-rw-r--r--chart2/source/controller/dialogs/res_Trendline.cxx5
-rw-r--r--chart2/source/controller/dialogs/res_Trendline.hxx5
-rw-r--r--chart2/source/controller/dialogs/res_Trendline_IDs.hrc5
-rw-r--r--chart2/source/controller/dialogs/res_Trendline_tmpl.hrc5
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneAppearance.hrc5
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneAppearance.src5
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx8
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.hrc5
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.src5
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc5
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.src5
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.cxx9
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.src5
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.src5
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.hrc5
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.src5
-rw-r--r--chart2/source/controller/dialogs/tp_DataLabel.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_DataLabel.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_DataLabel.src5
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.hrc5
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.src5
-rw-r--r--chart2/source/controller/dialogs/tp_DataSourceControls.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_DataSourceControls.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_ErrorBars.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_ErrorBars.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_ErrorBars.src5
-rw-r--r--chart2/source/controller/dialogs/tp_LegendPosition.cxx9
-rw-r--r--chart2/source/controller/dialogs/tp_LegendPosition.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_LegendPosition.src5
-rw-r--r--chart2/source/controller/dialogs/tp_Location.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_Location.hrc5
-rw-r--r--chart2/source/controller/dialogs/tp_Location.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_Location.src5
-rw-r--r--chart2/source/controller/dialogs/tp_PointGeometry.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_PointGeometry.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_PointGeometry.src5
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.hrc5
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.src5
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.hrc5
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.src5
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.src5
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.hrc5
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.src5
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.cxx9
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.src5
-rw-r--r--chart2/source/controller/dialogs/tp_Trendline.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_Trendline.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_Trendline.src5
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hrc5
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.src5
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx28
-rw-r--r--chart2/source/controller/drawinglayer/ViewElementListProvider.cxx5
-rw-r--r--chart2/source/controller/drawinglayer/makefile.mk6
-rw-r--r--chart2/source/controller/inc/AccessibleBase.hxx25
-rw-r--r--chart2/source/controller/inc/AccessibleChartView.hxx23
-rw-r--r--chart2/source/controller/inc/AccessibleTextHelper.hxx5
-rw-r--r--chart2/source/controller/inc/AxisItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/CharacterPropertyItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/ChartDocumentWrapper.hxx5
-rw-r--r--chart2/source/controller/inc/ChartRenderer.hxx5
-rw-r--r--chart2/source/controller/inc/ConfigurationAccess.hxx5
-rw-r--r--chart2/source/controller/inc/DataPointItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/DrawViewWrapper.hxx5
-rwxr-xr-xchart2/source/controller/inc/ErrorBarItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/GraphicPropertyItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/HelpIds.hrc16
-rw-r--r--chart2/source/controller/inc/ItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/ItemPropertyMap.hxx5
-rw-r--r--chart2/source/controller/inc/LegendItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/MenuResIds.hrc41
-rw-r--r--chart2/source/controller/inc/MultipleChartConverters.hxx5
-rw-r--r--chart2/source/controller/inc/MultipleItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/ObjectHierarchy.hxx35
-rw-r--r--chart2/source/controller/inc/ObjectNameProvider.hxx5
-rw-r--r--chart2/source/controller/inc/PositionAndSizeHelper.hxx5
-rwxr-xr-xchart2/source/controller/inc/RangeEdit.hxx5
-rw-r--r--chart2/source/controller/inc/RangeSelectionButton.hxx5
-rwxr-xr-xchart2/source/controller/inc/RangeSelectionHelper.hxx5
-rw-r--r--chart2/source/controller/inc/RangeSelectionListener.hxx5
-rw-r--r--chart2/source/controller/inc/RegressionCurveItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/RegressionEquationItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/SchSlotIds.hxx5
-rw-r--r--chart2/source/controller/inc/SeriesOptionsItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/ShapeController.hrc50
-rw-r--r--chart2/source/controller/inc/StatisticsItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/TabPageNotifiable.hxx5
-rw-r--r--chart2/source/controller/inc/TextDirectionListBox.hxx5
-rw-r--r--chart2/source/controller/inc/TimerTriggeredControllerLock.hxx5
-rw-r--r--chart2/source/controller/inc/TitleDialogData.hxx5
-rw-r--r--chart2/source/controller/inc/TitleItemConverter.hxx5
-rw-r--r--chart2/source/controller/inc/ViewElementListProvider.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_ChartType.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_ChartType_UNO.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_DataEditor.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_DataSource.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_InsertDataLabel.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_InsertErrorBars.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_InsertLegend.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_InsertTitle.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_InsertTrendline.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_ObjectProperties.hxx5
-rw-r--r--chart2/source/controller/inc/dlg_ShapeFont.hxx59
-rw-r--r--chart2/source/controller/inc/dlg_ShapeParagraph.hxx54
-rw-r--r--chart2/source/controller/inc/dlg_View3D.hxx5
-rw-r--r--chart2/source/controller/inc/res_ErrorBar.hxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx20
-rw-r--r--chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx9
-rwxr-xr-xchart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx12
-rw-r--r--chart2/source/controller/itemsetwrapper/ItemConverter.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx9
-rw-r--r--chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/makefile.mk6
-rw-r--r--chart2/source/controller/main/ChartController.cxx109
-rw-r--r--chart2/source/controller/main/ChartController.hxx32
-rw-r--r--chart2/source/controller/main/ChartController_EditData.cxx5
-rw-r--r--chart2/source/controller/main/ChartController_Insert.cxx5
-rw-r--r--chart2/source/controller/main/ChartController_Position.cxx5
-rw-r--r--chart2/source/controller/main/ChartController_Properties.cxx5
-rw-r--r--chart2/source/controller/main/ChartController_TextEdit.cxx65
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx295
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx715
-rw-r--r--chart2/source/controller/main/ChartDropTargetHelper.cxx5
-rw-r--r--chart2/source/controller/main/ChartDropTargetHelper.hxx5
-rw-r--r--chart2/source/controller/main/ChartFrameloader.cxx5
-rw-r--r--chart2/source/controller/main/ChartFrameloader.hxx5
-rw-r--r--chart2/source/controller/main/ChartRenderer.cxx5
-rw-r--r--chart2/source/controller/main/ChartTransferable.cxx88
-rw-r--r--chart2/source/controller/main/ChartTransferable.hxx11
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx5
-rw-r--r--chart2/source/controller/main/ChartWindow.hxx5
-rw-r--r--chart2/source/controller/main/CommandDispatch.cxx5
-rw-r--r--chart2/source/controller/main/CommandDispatch.hxx5
-rw-r--r--chart2/source/controller/main/CommandDispatchContainer.cxx69
-rw-r--r--chart2/source/controller/main/CommandDispatchContainer.hxx49
-rw-r--r--chart2/source/controller/main/ConfigurationAccess.cxx5
-rw-r--r--chart2/source/controller/main/ControllerCommandDispatch.cxx51
-rw-r--r--chart2/source/controller/main/ControllerCommandDispatch.hxx16
-rw-r--r--chart2/source/controller/main/DragMethod_Base.cxx5
-rw-r--r--chart2/source/controller/main/DragMethod_Base.hxx5
-rw-r--r--chart2/source/controller/main/DragMethod_PieSegment.cxx5
-rw-r--r--chart2/source/controller/main/DragMethod_PieSegment.hxx5
-rw-r--r--chart2/source/controller/main/DragMethod_RotateDiagram.cxx5
-rw-r--r--chart2/source/controller/main/DragMethod_RotateDiagram.hxx5
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx674
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.hrc50
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.hxx93
-rw-r--r--chart2/source/controller/main/ElementSelector.cxx72
-rw-r--r--chart2/source/controller/main/ElementSelector.hxx34
-rw-r--r--chart2/source/controller/main/FeatureCommandDispatchBase.cxx114
-rw-r--r--chart2/source/controller/main/FeatureCommandDispatchBase.hxx115
-rw-r--r--chart2/source/controller/main/ImplUndoManager.cxx (renamed from chart2/source/tools/ImplUndoManager.cxx)45
-rw-r--r--chart2/source/controller/main/ImplUndoManager.hxx (renamed from chart2/source/tools/ImplUndoManager.hxx)21
-rw-r--r--chart2/source/controller/main/ObjectHierarchy.cxx264
-rw-r--r--chart2/source/controller/main/PositionAndSizeHelper.cxx5
-rw-r--r--chart2/source/controller/main/SelectionHelper.cxx251
-rw-r--r--chart2/source/controller/main/SelectionHelper.hxx23
-rw-r--r--chart2/source/controller/main/ShapeController.cxx738
-rw-r--r--chart2/source/controller/main/ShapeController.hxx100
-rw-r--r--chart2/source/controller/main/ShapeToolbarController.cxx298
-rw-r--r--chart2/source/controller/main/ShapeToolbarController.hxx103
-rw-r--r--chart2/source/controller/main/StatusBarCommandDispatch.cxx11
-rw-r--r--chart2/source/controller/main/StatusBarCommandDispatch.hxx8
-rw-r--r--chart2/source/controller/main/UndoCommandDispatch.cxx5
-rw-r--r--chart2/source/controller/main/UndoCommandDispatch.hxx5
-rw-r--r--chart2/source/controller/main/UndoGuard.cxx (renamed from chart2/source/tools/UndoGuard.cxx)5
-rw-r--r--chart2/source/controller/main/UndoManager.cxx (renamed from chart2/source/tools/UndoManager.cxx)105
-rw-r--r--chart2/source/controller/main/_serviceregistration_controller.cxx18
-rw-r--r--chart2/source/controller/main/makefile.mk15
-rw-r--r--chart2/source/controller/makefile.mk9
-rw-r--r--chart2/source/controller/menus/ShapeContextMenu.src124
-rw-r--r--chart2/source/controller/menus/ShapeEditContextMenu.src65
-rw-r--r--chart2/source/controller/menus/makefile.mk63
-rw-r--r--chart2/source/inc/AxisHelper.hxx5
-rw-r--r--chart2/source/inc/AxisIndexDefines.hxx5
-rw-r--r--chart2/source/inc/BaseGFXHelper.hxx5
-rw-r--r--chart2/source/inc/CachedDataSequence.hxx5
-rw-r--r--chart2/source/inc/CharacterProperties.hxx5
-rw-r--r--chart2/source/inc/ChartDebugTrace.hxx5
-rw-r--r--chart2/source/inc/ChartModelHelper.hxx19
-rw-r--r--chart2/source/inc/ChartTypeHelper.hxx5
-rw-r--r--chart2/source/inc/ChartViewHelper.hxx5
-rw-r--r--chart2/source/inc/CloneHelper.hxx6
-rw-r--r--chart2/source/inc/ColorPerPointHelper.hxx5
-rw-r--r--chart2/source/inc/CommonConverters.hxx5
-rw-r--r--chart2/source/inc/CommonFunctors.hxx5
-rw-r--r--chart2/source/inc/ConfigColorScheme.hxx5
-rw-r--r--chart2/source/inc/ConfigItemListener.hxx5
-rw-r--r--chart2/source/inc/ContainerHelper.hxx5
-rw-r--r--chart2/source/inc/ControllerLockGuard.hxx5
-rw-r--r--chart2/source/inc/DataSeriesHelper.hxx5
-rw-r--r--chart2/source/inc/DataSource.hxx5
-rw-r--r--chart2/source/inc/DataSourceHelper.hxx18
-rw-r--r--chart2/source/inc/DiagramHelper.hxx13
-rw-r--r--chart2/source/inc/DisposeHelper.hxx5
-rw-r--r--chart2/source/inc/ErrorBar.hxx5
-rw-r--r--chart2/source/inc/EventListenerHelper.hxx5
-rw-r--r--chart2/source/inc/ExplicitCategoriesProvider.hxx68
-rw-r--r--chart2/source/inc/ExponentialRegressionCurveCalculator.hxx5
-rw-r--r--chart2/source/inc/FastPropertyIdRanges.hxx5
-rw-r--r--chart2/source/inc/FillProperties.hxx5
-rw-r--r--chart2/source/inc/FormattedStringHelper.hxx5
-rwxr-xr-xchart2/source/inc/InternalData.hxx109
-rw-r--r--chart2/source/inc/InternalDataProvider.hxx74
-rw-r--r--chart2/source/inc/LabeledDataSequence.hxx5
-rw-r--r--chart2/source/inc/LegendHelper.hxx5
-rw-r--r--chart2/source/inc/LifeTime.hxx5
-rw-r--r--chart2/source/inc/LineProperties.hxx5
-rw-r--r--chart2/source/inc/LinearRegressionCurveCalculator.hxx5
-rw-r--r--chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx5
-rw-r--r--chart2/source/inc/MeanValueRegressionCurveCalculator.hxx5
-rw-r--r--chart2/source/inc/MediaDescriptorHelper.hxx5
-rw-r--r--chart2/source/inc/ModifyListenerCallBack.hxx5
-rw-r--r--chart2/source/inc/ModifyListenerHelper.hxx5
-rw-r--r--chart2/source/inc/MutexContainer.hxx5
-rw-r--r--chart2/source/inc/NameContainer.hxx5
-rw-r--r--chart2/source/inc/NamedFillProperties.hxx5
-rw-r--r--chart2/source/inc/NamedLineProperties.hxx5
-rw-r--r--chart2/source/inc/NamedProperties.hxx5
-rw-r--r--chart2/source/inc/NoWarningThisInCTOR.hxx5
-rw-r--r--chart2/source/inc/OPropertySet.hxx5
-rw-r--r--chart2/source/inc/ObjectIdentifier.hxx37
-rw-r--r--chart2/source/inc/PotentialRegressionCurveCalculator.hxx5
-rw-r--r--chart2/source/inc/PropertyHelper.hxx5
-rw-r--r--chart2/source/inc/RangeHighlighter.hxx5
-rw-r--r--chart2/source/inc/ReferenceSizeProvider.hxx5
-rw-r--r--chart2/source/inc/RegressionCurveCalculator.hxx5
-rw-r--r--chart2/source/inc/RegressionCurveHelper.hxx5
-rw-r--r--chart2/source/inc/RelativePositionHelper.hxx5
-rw-r--r--chart2/source/inc/RelativeSizeHelper.hxx5
-rw-r--r--chart2/source/inc/ResId.hxx5
-rw-r--r--chart2/source/inc/RessourceManager.hxx5
-rw-r--r--chart2/source/inc/Scaling.hxx5
-rw-r--r--chart2/source/inc/SceneProperties.hxx5
-rw-r--r--chart2/source/inc/ServiceMacros.hxx5
-rw-r--r--chart2/source/inc/StackMode.hxx5
-rw-r--r--chart2/source/inc/StatisticsHelper.hxx5
-rw-r--r--chart2/source/inc/Strings.hrc9
-rw-r--r--chart2/source/inc/ThreeDHelper.hxx5
-rw-r--r--chart2/source/inc/TitleHelper.hxx5
-rw-r--r--chart2/source/inc/TrueGuard.hxx5
-rw-r--r--chart2/source/inc/UncachedDataSequence.hxx5
-rw-r--r--chart2/source/inc/UndoGuard.hxx16
-rw-r--r--chart2/source/inc/UndoManager.hxx27
-rw-r--r--chart2/source/inc/UserDefinedProperties.hxx5
-rw-r--r--chart2/source/inc/WeakListenerAdapter.hxx5
-rw-r--r--chart2/source/inc/WrappedDefaultProperty.hxx5
-rw-r--r--chart2/source/inc/WrappedDirectStateProperty.hxx5
-rw-r--r--chart2/source/inc/WrappedIgnoreProperty.hxx5
-rw-r--r--chart2/source/inc/WrappedProperty.hxx5
-rw-r--r--chart2/source/inc/WrappedPropertySet.hxx5
-rw-r--r--chart2/source/inc/XMLRangeHelper.hxx5
-rw-r--r--chart2/source/inc/charttoolsdllapi.hxx52
-rw-r--r--chart2/source/inc/chartview/ChartSfxItemIds.hxx5
-rw-r--r--chart2/source/inc/chartview/DataPointSymbolSupplier.hxx5
-rw-r--r--chart2/source/inc/chartview/DrawModelWrapper.hxx7
-rw-r--r--chart2/source/inc/chartview/ExplicitValueProvider.hxx5
-rw-r--r--chart2/source/inc/chartview/NumberFormatterWrapper.hxx5
-rw-r--r--chart2/source/inc/chartview/chartviewdllapi.hxx52
-rw-r--r--chart2/source/inc/chartview/servicenames_charttypes.hxx5
-rw-r--r--chart2/source/inc/macros.hxx5
-rw-r--r--chart2/source/inc/servicenames.hxx10
-rw-r--r--chart2/source/inc/servicenames_charttypes.hxx5
-rw-r--r--chart2/source/inc/servicenames_coosystems.hxx5
-rw-r--r--chart2/source/inc/servicenames_dlwrapper.hxx5
-rw-r--r--chart2/source/model/filter/XMLFilter.cxx5
-rw-r--r--chart2/source/model/filter/makefile.mk6
-rw-r--r--chart2/source/model/inc/BaseCoordinateSystem.hxx5
-rw-r--r--chart2/source/model/inc/CartesianCoordinateSystem.hxx5
-rw-r--r--chart2/source/model/inc/ChartTypeManager.hxx5
-rw-r--r--chart2/source/model/inc/DataSeries.hxx5
-rw-r--r--chart2/source/model/inc/DataSeriesTree.hxx5
-rw-r--r--chart2/source/model/inc/Diagram.hxx15
-rw-r--r--chart2/source/model/inc/PolarCoordinateSystem.hxx5
-rw-r--r--chart2/source/model/inc/StockBar.hxx5
-rw-r--r--chart2/source/model/inc/XMLFilter.hxx5
-rw-r--r--chart2/source/model/inc/_serviceregistration_charttypes.hxx5
-rw-r--r--chart2/source/model/main/Axis.cxx5
-rw-r--r--chart2/source/model/main/Axis.hxx5
-rw-r--r--chart2/source/model/main/BaseCoordinateSystem.cxx5
-rw-r--r--chart2/source/model/main/CartesianCoordinateSystem.cxx5
-rw-r--r--chart2/source/model/main/ChartData.cxx107
-rw-r--r--chart2/source/model/main/ChartData.hxx105
-rwxr-xr-x[-rw-r--r--]chart2/source/model/main/ChartModel.cxx479
-rw-r--r--chart2/source/model/main/ChartModel.hxx59
-rw-r--r--chart2/source/model/main/ChartModel_Persistence.cxx98
-rw-r--r--chart2/source/model/main/DataPoint.cxx5
-rw-r--r--chart2/source/model/main/DataPoint.hxx5
-rw-r--r--chart2/source/model/main/DataPointProperties.cxx5
-rw-r--r--chart2/source/model/main/DataPointProperties.hxx5
-rw-r--r--chart2/source/model/main/DataSeries.cxx5
-rw-r--r--chart2/source/model/main/DataSeriesProperties.cxx5
-rw-r--r--chart2/source/model/main/DataSeriesProperties.hxx5
-rw-r--r--chart2/source/model/main/Diagram.cxx18
-rw-r--r--chart2/source/model/main/FormattedString.cxx5
-rw-r--r--chart2/source/model/main/FormattedString.hxx5
-rw-r--r--chart2/source/model/main/GridProperties.cxx5
-rw-r--r--chart2/source/model/main/GridProperties.hxx5
-rw-r--r--chart2/source/model/main/ImplChartModel.cxx589
-rw-r--r--chart2/source/model/main/ImplChartModel.hxx253
-rw-r--r--chart2/source/model/main/InternalData.cxx260
-rw-r--r--chart2/source/model/main/InternalData.hxx121
-rw-r--r--chart2/source/model/main/LayoutContainer.cxx5
-rw-r--r--chart2/source/model/main/LayoutContainer.hxx5
-rw-r--r--chart2/source/model/main/Legend.cxx5
-rw-r--r--chart2/source/model/main/Legend.hxx5
-rw-r--r--chart2/source/model/main/PageBackground.cxx5
-rw-r--r--chart2/source/model/main/PageBackground.hxx5
-rw-r--r--chart2/source/model/main/PolarCoordinateSystem.cxx5
-rw-r--r--chart2/source/model/main/StockBar.cxx5
-rw-r--r--chart2/source/model/main/Title.cxx5
-rw-r--r--chart2/source/model/main/Title.hxx5
-rw-r--r--chart2/source/model/main/Wall.cxx5
-rw-r--r--chart2/source/model/main/Wall.hxx5
-rw-r--r--chart2/source/model/main/_serviceregistration_model.cxx5
-rw-r--r--chart2/source/model/main/makefile.mk8
-rw-r--r--chart2/source/model/makefile.mk7
-rw-r--r--chart2/source/model/template/AreaChartType.cxx5
-rw-r--r--chart2/source/model/template/AreaChartType.hxx5
-rw-r--r--chart2/source/model/template/AreaChartTypeTemplate.cxx5
-rw-r--r--chart2/source/model/template/AreaChartTypeTemplate.hxx5
-rw-r--r--chart2/source/model/template/BarChartType.cxx5
-rw-r--r--chart2/source/model/template/BarChartType.hxx5
-rw-r--r--chart2/source/model/template/BarChartTypeTemplate.cxx5
-rw-r--r--chart2/source/model/template/BarChartTypeTemplate.hxx5
-rw-r--r--chart2/source/model/template/BubbleChartType.cxx5
-rw-r--r--chart2/source/model/template/BubbleChartType.hxx5
-rw-r--r--chart2/source/model/template/BubbleChartTypeTemplate.cxx15
-rw-r--r--chart2/source/model/template/BubbleChartTypeTemplate.hxx9
-rw-r--r--chart2/source/model/template/BubbleDataInterpreter.cxx19
-rw-r--r--chart2/source/model/template/BubbleDataInterpreter.hxx5
-rw-r--r--chart2/source/model/template/CandleStickChartType.cxx5
-rw-r--r--chart2/source/model/template/CandleStickChartType.hxx5
-rw-r--r--chart2/source/model/template/ChartType.cxx5
-rw-r--r--chart2/source/model/template/ChartType.hxx5
-rw-r--r--chart2/source/model/template/ChartTypeManager.cxx5
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.cxx44
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.hxx11
-rw-r--r--chart2/source/model/template/ColumnChartType.cxx5
-rw-r--r--chart2/source/model/template/ColumnChartType.hxx5
-rw-r--r--chart2/source/model/template/ColumnLineChartTypeTemplate.cxx5
-rw-r--r--chart2/source/model/template/ColumnLineChartTypeTemplate.hxx5
-rw-r--r--chart2/source/model/template/ColumnLineDataInterpreter.cxx5
-rw-r--r--chart2/source/model/template/ColumnLineDataInterpreter.hxx5
-rw-r--r--chart2/source/model/template/DataInterpreter.cxx41
-rw-r--r--chart2/source/model/template/DataInterpreter.hxx5
-rw-r--r--chart2/source/model/template/FilledNetChartType.cxx5
-rw-r--r--chart2/source/model/template/FilledNetChartType.hxx5
-rw-r--r--chart2/source/model/template/LineChartType.cxx5
-rw-r--r--chart2/source/model/template/LineChartType.hxx5
-rw-r--r--chart2/source/model/template/LineChartTypeTemplate.cxx5
-rw-r--r--chart2/source/model/template/LineChartTypeTemplate.hxx5
-rw-r--r--chart2/source/model/template/NetChartType.cxx5
-rw-r--r--chart2/source/model/template/NetChartType.hxx5
-rw-r--r--chart2/source/model/template/NetChartTypeTemplate.cxx5
-rw-r--r--chart2/source/model/template/NetChartTypeTemplate.hxx5
-rw-r--r--chart2/source/model/template/PieChartType.cxx5
-rw-r--r--chart2/source/model/template/PieChartType.hxx5
-rw-r--r--chart2/source/model/template/PieChartTypeTemplate.cxx5
-rw-r--r--chart2/source/model/template/PieChartTypeTemplate.hxx5
-rw-r--r--chart2/source/model/template/ScatterChartType.cxx5
-rw-r--r--chart2/source/model/template/ScatterChartType.hxx5
-rw-r--r--chart2/source/model/template/ScatterChartTypeTemplate.cxx15
-rw-r--r--chart2/source/model/template/ScatterChartTypeTemplate.hxx9
-rw-r--r--chart2/source/model/template/StockChartTypeTemplate.cxx5
-rw-r--r--chart2/source/model/template/StockChartTypeTemplate.hxx5
-rw-r--r--chart2/source/model/template/StockDataInterpreter.cxx10
-rw-r--r--chart2/source/model/template/StockDataInterpreter.hxx5
-rw-r--r--chart2/source/model/template/XYDataInterpreter.cxx18
-rw-r--r--chart2/source/model/template/XYDataInterpreter.hxx5
-rw-r--r--chart2/source/model/template/_serviceregistration_charttypes.cxx5
-rw-r--r--chart2/source/model/template/makefile.mk6
-rw-r--r--chart2/source/tools/AxisHelper.cxx5
-rw-r--r--chart2/source/tools/BaseGFXHelper.cxx5
-rw-r--r--chart2/source/tools/CachedDataSequence.cxx5
-rw-r--r--chart2/source/tools/CharacterProperties.cxx5
-rw-r--r--chart2/source/tools/ChartDebugTrace.cxx5
-rw-r--r--chart2/source/tools/ChartModelHelper.cxx43
-rw-r--r--chart2/source/tools/ChartTypeHelper.cxx5
-rw-r--r--chart2/source/tools/ChartViewHelper.cxx5
-rw-r--r--chart2/source/tools/ColorPerPointHelper.cxx5
-rw-r--r--chart2/source/tools/CommonConverters.cxx5
-rw-r--r--chart2/source/tools/ConfigColorScheme.cxx5
-rw-r--r--chart2/source/tools/ControllerLockGuard.cxx5
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx5
-rw-r--r--chart2/source/tools/DataSource.cxx5
-rw-r--r--chart2/source/tools/DataSourceHelper.cxx43
-rw-r--r--chart2/source/tools/DiagramHelper.cxx71
-rw-r--r--chart2/source/tools/ErrorBar.cxx5
-rw-r--r--chart2/source/tools/ExplicitCategoriesProvider.cxx372
-rw-r--r--chart2/source/tools/ExponentialRegressionCurveCalculator.cxx5
-rw-r--r--chart2/source/tools/FillProperties.cxx5
-rw-r--r--chart2/source/tools/FormattedStringHelper.cxx5
-rw-r--r--chart2/source/tools/ImplOPropertySet.cxx5
-rw-r--r--chart2/source/tools/ImplOPropertySet.hxx5
-rwxr-xr-xchart2/source/tools/InternalData.cxx530
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx1435
-rw-r--r--chart2/source/tools/LabeledDataSequence.cxx5
-rw-r--r--chart2/source/tools/LegendHelper.cxx5
-rw-r--r--chart2/source/tools/LifeTime.cxx5
-rw-r--r--chart2/source/tools/LineProperties.cxx5
-rw-r--r--chart2/source/tools/LinearRegressionCurveCalculator.cxx5
-rw-r--r--chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx5
-rw-r--r--chart2/source/tools/MeanValueRegressionCurveCalculator.cxx5
-rw-r--r--chart2/source/tools/MediaDescriptorHelper.cxx5
-rw-r--r--chart2/source/tools/ModifyListenerCallBack.cxx5
-rw-r--r--chart2/source/tools/ModifyListenerHelper.cxx5
-rw-r--r--chart2/source/tools/MutexContainer.cxx5
-rw-r--r--chart2/source/tools/NameContainer.cxx5
-rw-r--r--chart2/source/tools/NamedFillProperties.cxx5
-rw-r--r--chart2/source/tools/NamedLineProperties.cxx5
-rw-r--r--chart2/source/tools/NamedProperties.cxx5
-rw-r--r--chart2/source/tools/OPropertySet.cxx5
-rw-r--r--chart2/source/tools/ObjectIdentifier.cxx163
-rw-r--r--chart2/source/tools/PotentialRegressionCurveCalculator.cxx5
-rw-r--r--chart2/source/tools/PropertyHelper.cxx5
-rw-r--r--chart2/source/tools/RangeHighlighter.cxx119
-rw-r--r--chart2/source/tools/ReferenceSizeProvider.cxx5
-rw-r--r--chart2/source/tools/RegressionCalculationHelper.hxx5
-rw-r--r--chart2/source/tools/RegressionCurveCalculator.cxx5
-rw-r--r--chart2/source/tools/RegressionCurveHelper.cxx5
-rw-r--r--chart2/source/tools/RegressionCurveModel.cxx5
-rw-r--r--chart2/source/tools/RegressionCurveModel.hxx5
-rw-r--r--chart2/source/tools/RegressionEquation.cxx5
-rw-r--r--chart2/source/tools/RegressionEquation.hxx5
-rw-r--r--chart2/source/tools/RelativePositionHelper.cxx5
-rw-r--r--chart2/source/tools/RelativeSizeHelper.cxx5
-rw-r--r--chart2/source/tools/ResId.cxx5
-rw-r--r--chart2/source/tools/RessourceManager.cxx5
-rw-r--r--chart2/source/tools/Scaling.cxx5
-rw-r--r--chart2/source/tools/SceneProperties.cxx5
-rw-r--r--chart2/source/tools/StatisticsHelper.cxx5
-rw-r--r--chart2/source/tools/ThreeDHelper.cxx7
-rw-r--r--chart2/source/tools/TitleHelper.cxx5
-rw-r--r--chart2/source/tools/TrueGuard.cxx5
-rw-r--r--chart2/source/tools/UncachedDataSequence.cxx5
-rw-r--r--chart2/source/tools/UserDefinedProperties.cxx5
-rw-r--r--chart2/source/tools/WeakListenerAdapter.cxx5
-rw-r--r--chart2/source/tools/WrappedDefaultProperty.cxx5
-rw-r--r--chart2/source/tools/WrappedDirectStateProperty.cxx5
-rw-r--r--chart2/source/tools/WrappedIgnoreProperty.cxx5
-rw-r--r--chart2/source/tools/WrappedProperty.cxx5
-rw-r--r--chart2/source/tools/WrappedPropertySet.cxx5
-rw-r--r--chart2/source/tools/XMLRangeHelper.cxx5
-rw-r--r--chart2/source/tools/_serviceregistration_tools.cxx5
-rw-r--r--chart2/source/tools/makefile.mk10
-rw-r--r--chart2/source/view/axes/MinimumAndMaximumSupplier.cxx5
-rw-r--r--chart2/source/view/axes/ScaleAutomatism.cxx5
-rw-r--r--chart2/source/view/axes/TickmarkHelper.cxx114
-rw-r--r--chart2/source/view/axes/TickmarkHelper.hxx44
-rw-r--r--chart2/source/view/axes/TickmarkProperties.hxx5
-rw-r--r--chart2/source/view/axes/VAxisBase.cxx56
-rw-r--r--chart2/source/view/axes/VAxisBase.hxx8
-rw-r--r--chart2/source/view/axes/VAxisOrGridBase.cxx5
-rw-r--r--chart2/source/view/axes/VAxisOrGridBase.hxx5
-rw-r--r--chart2/source/view/axes/VAxisProperties.cxx29
-rw-r--r--chart2/source/view/axes/VAxisProperties.hxx19
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx626
-rw-r--r--chart2/source/view/axes/VCartesianAxis.hxx24
-rw-r--r--chart2/source/view/axes/VCartesianCoordinateSystem.cxx15
-rw-r--r--chart2/source/view/axes/VCartesianCoordinateSystem.hxx5
-rw-r--r--chart2/source/view/axes/VCartesianGrid.cxx5
-rw-r--r--chart2/source/view/axes/VCartesianGrid.hxx5
-rw-r--r--chart2/source/view/axes/VCoordinateSystem.cxx15
-rw-r--r--chart2/source/view/axes/VPolarAngleAxis.cxx14
-rw-r--r--chart2/source/view/axes/VPolarAngleAxis.hxx7
-rw-r--r--chart2/source/view/axes/VPolarAxis.cxx5
-rw-r--r--chart2/source/view/axes/VPolarAxis.hxx5
-rw-r--r--chart2/source/view/axes/VPolarCoordinateSystem.cxx5
-rw-r--r--chart2/source/view/axes/VPolarCoordinateSystem.hxx5
-rw-r--r--chart2/source/view/axes/VPolarGrid.cxx7
-rw-r--r--chart2/source/view/axes/VPolarGrid.hxx5
-rw-r--r--chart2/source/view/axes/VPolarRadiusAxis.cxx8
-rw-r--r--chart2/source/view/axes/VPolarRadiusAxis.hxx5
-rw-r--r--chart2/source/view/axes/makefile.mk6
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx24
-rw-r--r--chart2/source/view/charttypes/AreaChart.hxx8
-rw-r--r--chart2/source/view/charttypes/BarChart.cxx5
-rw-r--r--chart2/source/view/charttypes/BarChart.hxx5
-rw-r--r--chart2/source/view/charttypes/BarPositionHelper.cxx5
-rw-r--r--chart2/source/view/charttypes/BarPositionHelper.hxx5
-rw-r--r--chart2/source/view/charttypes/BubbleChart.cxx7
-rw-r--r--chart2/source/view/charttypes/BubbleChart.hxx5
-rw-r--r--chart2/source/view/charttypes/CandleStickChart.cxx7
-rw-r--r--chart2/source/view/charttypes/CandleStickChart.hxx5
-rw-r--r--chart2/source/view/charttypes/CategoryPositionHelper.cxx5
-rw-r--r--chart2/source/view/charttypes/CategoryPositionHelper.hxx5
-rw-r--r--chart2/source/view/charttypes/PieChart.cxx34
-rw-r--r--chart2/source/view/charttypes/PieChart.hxx9
-rw-r--r--chart2/source/view/charttypes/Splines.cxx33
-rw-r--r--chart2/source/view/charttypes/Splines.hxx5
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx38
-rw-r--r--chart2/source/view/charttypes/makefile.mk6
-rw-r--r--chart2/source/view/diagram/VDiagram.cxx7
-rw-r--r--chart2/source/view/diagram/makefile.mk6
-rw-r--r--chart2/source/view/inc/Clipping.hxx5
-rw-r--r--chart2/source/view/inc/LabelAlignment.hxx5
-rw-r--r--chart2/source/view/inc/LabelPositionHelper.hxx5
-rw-r--r--chart2/source/view/inc/LegendEntryProvider.hxx5
-rw-r--r--chart2/source/view/inc/Linear3DTransformation.hxx5
-rw-r--r--chart2/source/view/inc/MinimumAndMaximumSupplier.hxx5
-rw-r--r--chart2/source/view/inc/PlotterBase.hxx5
-rw-r--r--chart2/source/view/inc/PlottingPositionHelper.hxx5
-rw-r--r--chart2/source/view/inc/PolarLabelPositionHelper.hxx5
-rw-r--r--chart2/source/view/inc/PropertyMapper.hxx10
-rw-r--r--chart2/source/view/inc/ScaleAutomatism.hxx5
-rw-r--r--chart2/source/view/inc/ShapeFactory.hxx5
-rw-r--r--chart2/source/view/inc/Stripe.hxx5
-rw-r--r--chart2/source/view/inc/VCoordinateSystem.hxx16
-rw-r--r--chart2/source/view/inc/VDataSeries.hxx5
-rw-r--r--chart2/source/view/inc/VDiagram.hxx5
-rw-r--r--chart2/source/view/inc/VLegendSymbolFactory.hxx5
-rw-r--r--chart2/source/view/inc/VLineProperties.hxx5
-rw-r--r--chart2/source/view/inc/VPolarTransformation.hxx5
-rw-r--r--chart2/source/view/inc/VSeriesPlotter.hxx13
-rw-r--r--chart2/source/view/inc/ViewDefines.hxx5
-rw-r--r--chart2/source/view/main/ChartItemPool.cxx13
-rw-r--r--chart2/source/view/main/ChartItemPool.hxx5
-rw-r--r--chart2/source/view/main/ChartView.cxx141
-rw-r--r--chart2/source/view/main/ChartView.hxx26
-rw-r--r--chart2/source/view/main/Clipping.cxx5
-rw-r--r--chart2/source/view/main/DataPointSymbolSupplier.cxx5
-rw-r--r--chart2/source/view/main/DrawModelWrapper.cxx82
-rw-r--r--chart2/source/view/main/LabelPositionHelper.cxx5
-rw-r--r--chart2/source/view/main/Linear3DTransformation.cxx5
-rw-r--r--chart2/source/view/main/NumberFormatterWrapper.cxx5
-rw-r--r--chart2/source/view/main/PlotterBase.cxx5
-rw-r--r--chart2/source/view/main/PlottingPositionHelper.cxx5
-rw-r--r--chart2/source/view/main/PolarLabelPositionHelper.cxx5
-rw-r--r--chart2/source/view/main/PropertyMapper.cxx13
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx7
-rw-r--r--chart2/source/view/main/Stripe.cxx5
-rw-r--r--chart2/source/view/main/VDataSeries.cxx5
-rw-r--r--chart2/source/view/main/VLegend.cxx5
-rw-r--r--chart2/source/view/main/VLegend.hxx5
-rw-r--r--chart2/source/view/main/VLegendSymbolFactory.cxx5
-rw-r--r--chart2/source/view/main/VLineProperties.cxx5
-rw-r--r--chart2/source/view/main/VPolarTransformation.cxx5
-rw-r--r--chart2/source/view/main/VTitle.cxx5
-rw-r--r--chart2/source/view/main/VTitle.hxx5
-rw-r--r--chart2/source/view/main/_serviceregistration_view.cxx5
-rw-r--r--chart2/source/view/main/makefile.mk6
-rw-r--r--chart2/source/view/makefile.mk7
749 files changed, 9921 insertions, 7656 deletions
diff --git a/chart2/source/controller/accessibility/AccStatisticsObject.cxx b/chart2/source/controller/accessibility/AccStatisticsObject.cxx
index f9ea135242d3..9028973936e0 100644
--- a/chart2/source/controller/accessibility/AccStatisticsObject.cxx
+++ b/chart2/source/controller/accessibility/AccStatisticsObject.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AccStatisticsObject.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/accessibility/AccStatisticsObject.hxx b/chart2/source/controller/accessibility/AccStatisticsObject.hxx
index 4306da3e7576..da09342cd8b0 100644
--- a/chart2/source/controller/accessibility/AccStatisticsObject.hxx
+++ b/chart2/source/controller/accessibility/AccStatisticsObject.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AccStatisticsObject.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 81b85cfacf34..00335eab296e 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AccessibleBase.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,6 +29,7 @@
#include "precompiled_chart2.hxx"
#include "AccessibleBase.hxx"
+#include "AccessibleChartShape.hxx"
#include "ObjectHierarchy.hxx"
#include "ObjectIdentifier.hxx"
#include "chartview/ExplicitValueProvider.hxx"
@@ -42,7 +40,7 @@
#include <com/sun/star/accessibility/AccessibleEventObject.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-
+#include <comphelper/serviceinfohelper.hxx>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <rtl/ustrbuf.hxx>
@@ -51,8 +49,8 @@
#include <rtl/uuid.h>
#include <cppuhelper/queryinterface.hxx>
#include <svl/itemset.hxx>
-#include <svx/unofdesc.hxx>
-#include <svx/outliner.hxx>
+#include <editeng/unofdesc.hxx>
+#include <editeng/outliner.hxx>
#include <svx/svdoutl.hxx>
#include <svx/svdetc.hxx>
#include <svx/unoshape.hxx>
@@ -272,15 +270,15 @@ bool AccessibleBase::ImplUpdateChildren()
{
ObjectHierarchy::tChildContainer aModelChildren(
m_aAccInfo.m_spObjectHierarchy->getChildren( GetId() ));
- ::std::vector< ChildCIDMap::key_type > aAccChildren;
+ ::std::vector< ChildOIDMap::key_type > aAccChildren;
aAccChildren.reserve( aModelChildren.size());
- ::std::transform( m_aChildCIDMap.begin(), m_aChildCIDMap.end(),
+ ::std::transform( m_aChildOIDMap.begin(), m_aChildOIDMap.end(),
::std::back_inserter( aAccChildren ),
- ::std::select1st< ChildCIDMap::value_type >());
+ ::std::select1st< ChildOIDMap::value_type >());
::std::sort( aModelChildren.begin(), aModelChildren.end());
- ::std::vector< OUString > aChildrenToRemove, aChildrenToAdd;
+ ::std::vector< ObjectHierarchy::tOID > aChildrenToRemove, aChildrenToAdd;
::std::set_difference( aModelChildren.begin(), aModelChildren.end(),
aAccChildren.begin(), aAccChildren.end(),
::std::back_inserter( aChildrenToAdd ));
@@ -288,10 +286,10 @@ bool AccessibleBase::ImplUpdateChildren()
aModelChildren.begin(), aModelChildren.end(),
::std::back_inserter( aChildrenToRemove ));
- ::std::vector< OUString >::const_iterator aIt( aChildrenToRemove.begin());
+ ::std::vector< ObjectHierarchy::tOID >::const_iterator aIt( aChildrenToRemove.begin());
for( ; aIt != aChildrenToRemove.end(); ++aIt )
{
- RemoveChildById( *aIt );
+ RemoveChildByOId( *aIt );
}
AccessibleElementInfo aAccInfo( GetInfo());
@@ -299,8 +297,15 @@ bool AccessibleBase::ImplUpdateChildren()
for( aIt = aChildrenToAdd.begin(); aIt != aChildrenToAdd.end(); ++aIt )
{
- aAccInfo.m_aCID = *aIt;
- AddChild( ChartElementFactory::CreateChartElement( aAccInfo ));
+ aAccInfo.m_aOID = *aIt;
+ if ( aIt->isAutoGeneratedObject() )
+ {
+ AddChild( ChartElementFactory::CreateChartElement( aAccInfo ) );
+ }
+ else if ( aIt->isAdditionalShape() )
+ {
+ AddChild( new AccessibleChartShape( aAccInfo, true, false ) );
+ }
}
bResult = true;
}
@@ -319,7 +324,7 @@ void AccessibleBase::AddChild( AccessibleBase * pChild )
Reference< XAccessible > xChild( pChild );
m_aChildList.push_back( xChild );
- m_aChildCIDMap[ pChild->GetId() ] = xChild;
+ m_aChildOIDMap[ pChild->GetId() ] = xChild;
// inform listeners of new child
if( m_bChildrenInitialized )
@@ -338,18 +343,18 @@ void AccessibleBase::AddChild( AccessibleBase * pChild )
/** in this method we imply that the Reference< XAccessible > elements in the
vector are AccessibleBase objects !
*/
-void AccessibleBase::RemoveChildById( const ::rtl::OUString & rId )
+void AccessibleBase::RemoveChildByOId( const ObjectIdentifier& rOId )
{
// /--
ClearableMutexGuard aGuard( GetMutex() );
- ChildCIDMap::iterator aIt( m_aChildCIDMap.find( rId ));
- if( aIt != m_aChildCIDMap.end())
+ ChildOIDMap::iterator aIt( m_aChildOIDMap.find( rOId ));
+ if( aIt != m_aChildOIDMap.end())
{
Reference< XAccessible > xChild( aIt->second );
// remove from map
- m_aChildCIDMap.erase( aIt );
+ m_aChildOIDMap.erase( aIt );
// search child in vector
ChildListVectorType::iterator aVecIter =
@@ -447,7 +452,7 @@ void AccessibleBase::KillAllChildren()
// remove all children
m_aChildList.clear();
- m_aChildCIDMap.clear();
+ m_aChildOIDMap.clear();
aGuard.clear();
// \--
@@ -488,7 +493,7 @@ void AccessibleBase::SetInfo( const AccessibleElementInfo & rNewInfo )
AccessibleUniqueId AccessibleBase::GetId() const
{
- return m_aAccInfo.m_aCID;
+ return m_aAccInfo.m_aOID;
}
// ____________________________________
@@ -665,14 +670,15 @@ Reference< XAccessibleStateSet > SAL_CALL AccessibleBase::getAccessibleStateSet(
{
if( ! m_bStateSetInitialized )
{
- OUString aSelCID;
Reference< view::XSelectionSupplier > xSelSupp( GetInfo().m_xSelectionSupplier );
- if( xSelSupp.is() &&
- ( xSelSupp->getSelection() >>= aSelCID ) &&
- GetId().equals( aSelCID ) )
+ if ( xSelSupp.is() )
{
- AddState( AccessibleStateType::SELECTED );
- AddState( AccessibleStateType::FOCUSED );
+ ObjectIdentifier aOID( xSelSupp->getSelection() );
+ if ( aOID.isValid() && GetId() == aOID )
+ {
+ AddState( AccessibleStateType::SELECTED );
+ AddState( AccessibleStateType::FOCUSED );
+ }
}
m_bStateSetInitialized = true;
}
@@ -755,7 +761,7 @@ awt::Rectangle SAL_CALL AccessibleBase::getBounds()
if( pExplicitValueProvider )
{
Window* pWindow( VCLUnoHelper::GetWindow( m_aAccInfo.m_xWindow ));
- awt::Rectangle aLogicRect( pExplicitValueProvider->getRectangleOfObject( m_aAccInfo.m_aCID ));
+ awt::Rectangle aLogicRect( pExplicitValueProvider->getRectangleOfObject( m_aAccInfo.m_aOID.getObjectCID() ));
if( pWindow )
{
Rectangle aRect( aLogicRect.X, aLogicRect.Y,
@@ -828,10 +834,11 @@ void SAL_CALL AccessibleBase::grabFocus()
{
CheckDisposeState();
- OUString aSelCID;
Reference< view::XSelectionSupplier > xSelSupp( GetInfo().m_xSelectionSupplier );
- if( xSelSupp.is())
- xSelSupp->select( uno::makeAny( GetId()));
+ if ( xSelSupp.is() )
+ {
+ xSelSupp->select( GetId().getAny() );
+ }
}
sal_Int32 SAL_CALL AccessibleBase::getForeground()
@@ -852,9 +859,10 @@ sal_Int32 AccessibleBase::getColor( eColorType eColType )
if( m_bAlwaysTransparent )
return nResult;
- ObjectType eType( ObjectIdentifier::getObjectType( m_aAccInfo.m_aCID ));
+ ObjectIdentifier aOID( m_aAccInfo.m_aOID );
+ ObjectType eType( aOID.getObjectType() );
Reference< beans::XPropertySet > xObjProp;
- OUString aObjectCID = m_aAccInfo.m_aCID;
+ OUString aObjectCID = aOID.getObjectCID();
if( eType == OBJECTTYPE_LEGEND_ENTRY )
{
// for colors get the data series/point properties
@@ -947,7 +955,7 @@ OUString SAL_CALL AccessibleBase::getImplementationName()
sal_Bool SAL_CALL AccessibleBase::supportsService( const OUString& ServiceName )
throw (RuntimeException)
{
- return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+ return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
}
uno::Sequence< OUString > SAL_CALL AccessibleBase::getSupportedServiceNames()
diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.cxx b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
index 2e1a4e074ce3..2361cc62c389 100644
--- a/chart2/source/controller/accessibility/AccessibleChartElement.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartElement.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AccessibleChartElement.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -104,7 +101,7 @@ bool AccessibleChartElement::ImplUpdateChildren()
bool bResult = false;
Reference< chart2::XTitle > xTitle(
ObjectIdentifier::getObjectPropertySet(
- GetInfo().m_aCID, Reference< chart2::XChartDocument >( GetInfo().m_xChartDocument )),
+ GetInfo().m_aOID.getObjectCID(), Reference< chart2::XChartDocument >( GetInfo().m_xChartDocument )),
uno::UNO_QUERY );
m_bHasText = xTitle.is();
@@ -139,7 +136,7 @@ void AccessibleChartElement::InitTextEdit()
{
Reference< lang::XInitialization > xInit( m_xTextHelper, uno::UNO_QUERY_THROW );
Sequence< uno::Any > aArgs( 3 );
- aArgs[0] <<= GetInfo().m_aCID;
+ aArgs[0] <<= GetInfo().m_aOID.getObjectCID();
aArgs[1] <<= Reference< XAccessible >( this );
aArgs[2] <<= Reference< awt::XWindow >( GetInfo().m_xWindow );
xInit->initialize( aArgs );
@@ -227,7 +224,7 @@ OUString SAL_CALL AccessibleChartElement::getAccessibleName()
throw (::com::sun::star::uno::RuntimeException)
{
return ObjectNameProvider::getNameForCID(
- GetInfo().m_aCID, GetInfo().m_xChartDocument );
+ GetInfo().m_aOID.getObjectCID(), GetInfo().m_xChartDocument );
}
// ________ AccessibleChartElement::XAccessibleContext (overloaded) ________
@@ -252,7 +249,7 @@ Reference< awt::XFont > SAL_CALL AccessibleChartElement::getFont()
{
Reference< beans::XMultiPropertySet > xObjProp(
ObjectIdentifier::getObjectPropertySet(
- GetInfo().m_aCID, Reference< chart2::XChartDocument >( GetInfo().m_xChartDocument )), uno::UNO_QUERY );
+ GetInfo().m_aOID.getObjectCID(), Reference< chart2::XChartDocument >( GetInfo().m_xChartDocument )), uno::UNO_QUERY );
awt::FontDescriptor aDescr(
CharacterProperties::createFontDescriptorFromPropertySet( xObjProp ));
xFont = xDevice->getFont( aDescr );
@@ -273,7 +270,7 @@ OUString SAL_CALL AccessibleChartElement::getToolTipText()
CheckDisposeState();
return ObjectNameProvider::getHelpText(
- GetInfo().m_aCID, Reference< chart2::XChartDocument >( GetInfo().m_xChartDocument ));
+ GetInfo().m_aOID.getObjectCID(), Reference< chart2::XChartDocument >( GetInfo().m_xChartDocument ));
}
// ________ XAccessibleComponent ________
@@ -283,7 +280,7 @@ sal_Bool SAL_CALL AccessibleChartElement::containsPoint( const awt::Point& aPoin
return AccessibleBase::containsPoint( aPoint );
}
-Reference< accessibility::XAccessible > SAL_CALL AccessibleChartElement::getAccessibleAtPoint( const awt::Point& aPoint )
+Reference< XAccessible > SAL_CALL AccessibleChartElement::getAccessibleAtPoint( const awt::Point& aPoint )
throw (uno::RuntimeException)
{
return AccessibleBase::getAccessibleAtPoint( aPoint );
diff --git a/chart2/source/controller/accessibility/AccessibleChartElement.hxx b/chart2/source/controller/accessibility/AccessibleChartElement.hxx
index c8052be29556..d74b5d9d11b9 100644
--- a/chart2/source/controller/accessibility/AccessibleChartElement.hxx
+++ b/chart2/source/controller/accessibility/AccessibleChartElement.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AccessibleChartElement.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/accessibility/AccessibleChartShape.cxx b/chart2/source/controller/accessibility/AccessibleChartShape.cxx
new file mode 100644
index 000000000000..bbf6176641da
--- /dev/null
+++ b/chart2/source/controller/accessibility/AccessibleChartShape.cxx
@@ -0,0 +1,289 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "AccessibleChartShape.hxx"
+#include "ObjectHierarchy.hxx"
+#include "ObjectIdentifier.hxx"
+
+#include <toolkit/helper/vclunohelper.hxx>
+#include <svx/ShapeTypeHandler.hxx>
+#include <svx/AccessibleShape.hxx>
+#include <svx/AccessibleShapeInfo.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::RuntimeException;
+
+
+namespace chart
+{
+
+AccessibleChartShape::AccessibleChartShape(
+ const AccessibleElementInfo& rAccInfo,
+ bool bMayHaveChildren, bool bAlwaysTransparent )
+ :impl::AccessibleChartShape_Base( rAccInfo, bMayHaveChildren, bAlwaysTransparent )
+ ,m_pAccShape( NULL )
+{
+ if ( rAccInfo.m_aOID.isAdditionalShape() )
+ {
+ Reference< drawing::XShape > xShape( rAccInfo.m_aOID.getAdditionalShape() );
+ Reference< XAccessible > xParent;
+ if ( rAccInfo.m_pParent )
+ {
+ xParent.set( rAccInfo.m_pParent );
+ }
+ sal_Int32 nIndex = -1;
+ if ( rAccInfo.m_spObjectHierarchy )
+ {
+ nIndex = rAccInfo.m_spObjectHierarchy->getIndexInParent( rAccInfo.m_aOID );
+ }
+ ::accessibility::AccessibleShapeInfo aShapeInfo( xShape, xParent, nIndex );
+
+ m_aShapeTreeInfo.SetSdrView( rAccInfo.m_pSdrView );
+ m_aShapeTreeInfo.SetController( NULL );
+ m_aShapeTreeInfo.SetWindow( VCLUnoHelper::GetWindow( rAccInfo.m_xWindow ) );
+ m_aShapeTreeInfo.SetViewForwarder( rAccInfo.m_pViewForwarder );
+
+ ::accessibility::ShapeTypeHandler& rShapeHandler = ::accessibility::ShapeTypeHandler::Instance();
+ m_pAccShape = rShapeHandler.CreateAccessibleObject( aShapeInfo, m_aShapeTreeInfo );
+ if ( m_pAccShape )
+ {
+ m_pAccShape->acquire();
+ m_pAccShape->Init();
+ }
+ }
+}
+
+AccessibleChartShape::~AccessibleChartShape()
+{
+ OSL_ASSERT( CheckDisposeState( false /* don't throw exceptions */ ) );
+
+ if ( m_pAccShape )
+ {
+ m_pAccShape->dispose();
+ m_pAccShape->release();
+ }
+}
+
+// ________ XServiceInfo ________
+::rtl::OUString AccessibleChartShape::getImplementationName()
+ throw (RuntimeException)
+{
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AccessibleChartShape" ) );
+}
+
+// ________ XAccessibleContext ________
+sal_Int32 AccessibleChartShape::getAccessibleChildCount()
+ throw (RuntimeException)
+{
+ sal_Int32 nCount(0);
+ if ( m_pAccShape )
+ {
+ nCount = m_pAccShape->getAccessibleChildCount();
+ }
+ return nCount;
+}
+
+Reference< XAccessible > AccessibleChartShape::getAccessibleChild( sal_Int32 i )
+ throw (lang::IndexOutOfBoundsException, RuntimeException)
+{
+ Reference< XAccessible > xChild;
+ if ( m_pAccShape )
+ {
+ xChild = m_pAccShape->getAccessibleChild( i );
+ }
+ return xChild;
+}
+
+sal_Int16 AccessibleChartShape::getAccessibleRole()
+ throw (RuntimeException)
+{
+ sal_Int16 nRole(0);
+ if ( m_pAccShape )
+ {
+ nRole = m_pAccShape->getAccessibleRole();
+ }
+ return nRole;
+}
+
+::rtl::OUString AccessibleChartShape::getAccessibleDescription()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ::rtl::OUString aDescription;
+ if ( m_pAccShape )
+ {
+ aDescription = m_pAccShape->getAccessibleDescription();
+ }
+ return aDescription;
+}
+
+::rtl::OUString AccessibleChartShape::getAccessibleName()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ::rtl::OUString aName;
+ if ( m_pAccShape )
+ {
+ aName = m_pAccShape->getAccessibleName();
+ }
+ return aName;
+}
+
+// ________ XAccessibleComponent ________
+sal_Bool AccessibleChartShape::containsPoint( const awt::Point& aPoint )
+ throw (uno::RuntimeException)
+{
+ sal_Bool bReturn = sal_False;
+ if ( m_pAccShape )
+ {
+ bReturn = m_pAccShape->containsPoint( aPoint );
+ }
+ return bReturn;
+}
+
+Reference< XAccessible > AccessibleChartShape::getAccessibleAtPoint( const awt::Point& aPoint )
+ throw (uno::RuntimeException)
+{
+ Reference< XAccessible > xResult;
+ if ( m_pAccShape )
+ {
+ xResult.set( m_pAccShape->getAccessibleAtPoint( aPoint ) );
+ }
+ return xResult;
+}
+
+awt::Rectangle AccessibleChartShape::getBounds()
+ throw (uno::RuntimeException)
+{
+ awt::Rectangle aBounds;
+ if ( m_pAccShape )
+ {
+ aBounds = m_pAccShape->getBounds();
+ }
+ return aBounds;
+}
+
+awt::Point AccessibleChartShape::getLocation()
+ throw (uno::RuntimeException)
+{
+ awt::Point aLocation;
+ if ( m_pAccShape )
+ {
+ aLocation = m_pAccShape->getLocation();
+ }
+ return aLocation;
+}
+
+awt::Point AccessibleChartShape::getLocationOnScreen()
+ throw (uno::RuntimeException)
+{
+ awt::Point aLocation;
+ if ( m_pAccShape )
+ {
+ aLocation = m_pAccShape->getLocationOnScreen();
+ }
+ return aLocation;
+}
+
+awt::Size AccessibleChartShape::getSize()
+ throw (uno::RuntimeException)
+{
+ awt::Size aSize;
+ if ( m_pAccShape )
+ {
+ aSize = m_pAccShape->getSize();
+ }
+ return aSize;
+}
+
+void AccessibleChartShape::grabFocus()
+ throw (uno::RuntimeException)
+{
+ return AccessibleBase::grabFocus();
+}
+
+sal_Int32 AccessibleChartShape::getForeground()
+ throw (uno::RuntimeException)
+{
+ sal_Int32 nColor(0);
+ if ( m_pAccShape )
+ {
+ nColor = m_pAccShape->getForeground();
+ }
+ return nColor;
+}
+
+sal_Int32 AccessibleChartShape::getBackground()
+ throw (uno::RuntimeException)
+{
+ sal_Int32 nColor(0);
+ if ( m_pAccShape )
+ {
+ nColor = m_pAccShape->getBackground();
+ }
+ return nColor;
+}
+
+// ________ XAccessibleExtendedComponent ________
+Reference< awt::XFont > AccessibleChartShape::getFont()
+ throw (uno::RuntimeException)
+{
+ Reference< awt::XFont > xFont;
+ if ( m_pAccShape )
+ {
+ xFont.set( m_pAccShape->getFont() );
+ }
+ return xFont;
+}
+
+::rtl::OUString AccessibleChartShape::getTitledBorderText()
+ throw (uno::RuntimeException)
+{
+ ::rtl::OUString aText;
+ if ( m_pAccShape )
+ {
+ aText = m_pAccShape->getTitledBorderText();
+ }
+ return aText;
+}
+
+::rtl::OUString AccessibleChartShape::getToolTipText()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ::rtl::OUString aText;
+ if ( m_pAccShape )
+ {
+ aText = m_pAccShape->getToolTipText();
+ }
+ return aText;
+}
+
+} // namespace chart
diff --git a/chart2/source/controller/accessibility/AccessibleChartShape.hxx b/chart2/source/controller/accessibility/AccessibleChartShape.hxx
new file mode 100644
index 000000000000..a1236b697a69
--- /dev/null
+++ b/chart2/source/controller/accessibility/AccessibleChartShape.hxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_ACCESSIBLECHARTSHAPE_HXX_
+#define _CHART2_ACCESSIBLECHARTSHAPE_HXX_
+
+#include "AccessibleBase.hxx"
+
+#include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <svx/AccessibleShapeTreeInfo.hxx>
+
+
+namespace accessibility
+{
+class AccessibleShape;
+}
+
+namespace chart
+{
+
+namespace impl
+{
+typedef ::cppu::ImplInheritanceHelper1<
+ AccessibleBase,
+ ::com::sun::star::accessibility::XAccessibleExtendedComponent > AccessibleChartShape_Base;
+}
+
+class AccessibleChartShape :
+ public impl::AccessibleChartShape_Base
+{
+public:
+ AccessibleChartShape( const AccessibleElementInfo& rAccInfo,
+ bool bMayHaveChildren, bool bAlwaysTransparent = false );
+ virtual ~AccessibleChartShape();
+
+ // ________ XServiceInfo ________
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ________ XAccessibleContext ________
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 i )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ________ XAccessibleComponent ________
+ virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground() throw (::com::sun::star::uno::RuntimeException);
+
+ // ________ XAccessibleExtendedComponent ________
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTitledBorderText()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getToolTipText()
+ throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ ::accessibility::AccessibleShape* m_pAccShape;
+ ::accessibility::AccessibleShapeTreeInfo m_aShapeTreeInfo;
+};
+
+} // namespace chart
+
+#endif
diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx
index 8e9c53b78639..4833991ad7cc 100644
--- a/chart2/source/controller/accessibility/AccessibleChartView.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AccessibleChartView.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,6 +36,7 @@
#include "ObjectIdentifier.hxx"
#include "ResId.hxx"
#include "Strings.hrc"
+#include "AccessibleViewForwarder.hxx"
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
@@ -69,19 +67,22 @@ namespace chart
//.............................................................................
AccessibleChartView::AccessibleChartView(
- const Reference<uno::XComponentContext> & xContext ) :
+ const Reference< uno::XComponentContext >& xContext, SdrView* pView ) :
impl::AccessibleChartView_Base(
AccessibleElementInfo(), // empty for now
true, // has children
true // always transparent
),
- m_xContext( xContext )
+ m_xContext( xContext ),
+ m_pSdrView( pView ),
+ m_pViewForwarder( NULL )
{
AddState( AccessibleStateType::OPAQUE );
}
AccessibleChartView::~AccessibleChartView()
{
+ delete m_pViewForwarder;
}
@@ -190,20 +191,6 @@ awt::Point SAL_CALL AccessibleChartView::getLocationOnScreen()
}
//-----------------------------------------------------------------
-// lang::XServiceInfo
-//-----------------------------------------------------------------
-
-APPHELPER_XSERVICEINFO_IMPL( AccessibleChartView, CHART2_ACCESSIBLE_SERVICE_IMPLEMENTATION_NAME )
-
-uno::Sequence< rtl::OUString > AccessibleChartView::getSupportedServiceNames_Static()
-{
- uno::Sequence< rtl::OUString > aSNS( 2 );
- aSNS.getArray()[ 0 ] = C2U("com.sun.star.accessibility.Accessible");
- aSNS.getArray()[ 1 ] = CHART2_ACCESSIBLE_SERVICE_NAME;
- return aSNS;
-}
-
-//-----------------------------------------------------------------
// lang::XInitialization
//-----------------------------------------------------------------
@@ -353,7 +340,7 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments
{
AccessibleElementInfo aAccInfo;
- aAccInfo.m_aCID = C2U("ROOT");
+ aAccInfo.m_aOID = ObjectIdentifier( C2U( "ROOT" ) );
aAccInfo.m_xChartDocument = uno::WeakReference< chart2::XChartDocument >(
uno::Reference< chart2::XChartDocument >( m_xChartModel.get(), uno::UNO_QUERY ));
aAccInfo.m_xSelectionSupplier = m_xSelectionSupplier;
@@ -361,6 +348,14 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments
aAccInfo.m_xWindow = m_xWindow;
aAccInfo.m_pParent = 0;
aAccInfo.m_spObjectHierarchy = m_spObjectHierarchy;
+ aAccInfo.m_pSdrView = m_pSdrView;
+ Window* pWindow = VCLUnoHelper::GetWindow( m_xWindow );
+ if ( m_pViewForwarder )
+ {
+ delete m_pViewForwarder;
+ }
+ m_pViewForwarder = new AccessibleViewForwarder( this, pWindow );
+ aAccInfo.m_pViewForwarder = m_pViewForwarder;
// broadcasts an INVALIDATE_ALL_CHILDREN event globally
SetInfo( aAccInfo );
}
@@ -387,16 +382,16 @@ void SAL_CALL AccessibleChartView::selectionChanged( const lang::EventObject& /*
if( xSelectionSupplier.is() )
{
- rtl::OUString aSelectedObjectCID;
- Any aSelection = xSelectionSupplier->getSelection();
- if(aSelection>>=aSelectedObjectCID)
+ ObjectIdentifier aSelectedOID( xSelectionSupplier->getSelection() );
+ if ( m_aCurrentSelectionOID.isValid() )
+ {
+ NotifyEvent( LOST_SELECTION, m_aCurrentSelectionOID );
+ }
+ if( aSelectedOID.isValid() )
{
- if( m_aCurrentSelectionCID.getLength())
- NotifyEvent( LOST_SELECTION, m_aCurrentSelectionCID );
- if( aSelectedObjectCID.getLength())
- NotifyEvent( GOT_SELECTION, aSelectedObjectCID );
- m_aCurrentSelectionCID = aSelectedObjectCID;
+ NotifyEvent( GOT_SELECTION, aSelectedOID );
}
+ m_aCurrentSelectionOID = aSelectedOID;
}
}
diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
index f6af68da51d0..0ba078e82886 100644
--- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
+++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AccessibleTextHelper.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx b/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
new file mode 100644
index 000000000000..5014198761f8
--- /dev/null
+++ b/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "AccessibleViewForwarder.hxx"
+#include "AccessibleChartView.hxx"
+
+#include <vcl/window.hxx>
+
+using namespace ::com::sun::star;
+
+
+namespace chart
+{
+
+AccessibleViewForwarder::AccessibleViewForwarder( AccessibleChartView* pAccChartView, Window* pWindow )
+ :m_pAccChartView( pAccChartView )
+ ,m_pWindow( pWindow )
+ ,m_aMapMode( MAP_100TH_MM )
+{
+}
+
+AccessibleViewForwarder::~AccessibleViewForwarder()
+{
+}
+
+// ________ IAccessibleViewforwarder ________
+
+BOOL AccessibleViewForwarder::IsValid() const
+{
+ return sal_True;
+}
+
+Rectangle AccessibleViewForwarder::GetVisibleArea() const
+{
+ Rectangle aVisibleArea;
+ if ( m_pWindow )
+ {
+ aVisibleArea.SetPos( Point( 0, 0 ) );
+ aVisibleArea.SetSize( m_pWindow->GetOutputSizePixel() );
+ aVisibleArea = m_pWindow->PixelToLogic( aVisibleArea, m_aMapMode );
+ }
+ return aVisibleArea;
+}
+
+Point AccessibleViewForwarder::LogicToPixel( const Point& rPoint ) const
+{
+ Point aPoint;
+ if ( m_pAccChartView && m_pWindow )
+ {
+ awt::Point aLocation = m_pAccChartView->getLocationOnScreen();
+ Point aTopLeft( aLocation.X, aLocation.Y );
+ aPoint = m_pWindow->LogicToPixel( rPoint, m_aMapMode ) + aTopLeft;
+ }
+ return aPoint;
+}
+
+Size AccessibleViewForwarder::LogicToPixel( const Size& rSize ) const
+{
+ Size aSize;
+ if ( m_pWindow )
+ {
+ aSize = m_pWindow->LogicToPixel( rSize, m_aMapMode );
+ }
+ return aSize;
+}
+
+Point AccessibleViewForwarder::PixelToLogic( const Point& rPoint ) const
+{
+ Point aPoint;
+ if ( m_pAccChartView && m_pWindow )
+ {
+ awt::Point aLocation = m_pAccChartView->getLocationOnScreen();
+ Point aTopLeft( aLocation.X, aLocation.Y );
+ aPoint = m_pWindow->PixelToLogic( rPoint - aTopLeft, m_aMapMode );
+ }
+ return aPoint;
+}
+
+Size AccessibleViewForwarder::PixelToLogic( const Size& rSize ) const
+{
+ Size aSize;
+ if ( m_pWindow )
+ {
+ aSize = m_pWindow->PixelToLogic( rSize, m_aMapMode );
+ }
+ return aSize;
+}
+
+} // namespace chart
diff --git a/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx b/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx
new file mode 100644
index 000000000000..e70aa58b8df7
--- /dev/null
+++ b/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_ACCESSIBLEVIEWFORWARDER_HXX_
+#define _CHART2_ACCESSIBLEVIEWFORWARDER_HXX_
+
+#include <vcl/mapmod.hxx>
+#include <svx/IAccessibleViewForwarder.hxx>
+
+class Window;
+
+namespace chart
+{
+
+class AccessibleChartView;
+
+class AccessibleViewForwarder : public ::accessibility::IAccessibleViewForwarder
+{
+public:
+ AccessibleViewForwarder( AccessibleChartView* pAccChartView, Window* pWindow );
+ virtual ~AccessibleViewForwarder();
+
+ // ________ IAccessibleViewforwarder ________
+ virtual BOOL IsValid() const;
+ virtual Rectangle GetVisibleArea() const;
+ virtual Point LogicToPixel( const Point& rPoint ) const;
+ virtual Size LogicToPixel( const Size& rSize ) const;
+ virtual Point PixelToLogic( const Point& rPoint ) const;
+ virtual Size PixelToLogic( const Size& rSize ) const;
+
+private:
+ AccessibleViewForwarder( AccessibleViewForwarder& );
+ AccessibleViewForwarder& operator=( AccessibleViewForwarder& );
+
+ AccessibleChartView* m_pAccChartView;
+ Window* m_pWindow;
+ MapMode m_aMapMode;
+};
+
+} // namespace chart
+
+#endif
diff --git a/chart2/source/controller/accessibility/ChartElementFactory.cxx b/chart2/source/controller/accessibility/ChartElementFactory.cxx
index 0e0786f1031e..b2599fec0c74 100644
--- a/chart2/source/controller/accessibility/ChartElementFactory.cxx
+++ b/chart2/source/controller/accessibility/ChartElementFactory.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartElementFactory.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,6 @@
#include "ChartElementFactory.hxx"
#include "ObjectIdentifier.hxx"
-
#include "AccessibleChartElement.hxx"
namespace chart
@@ -41,8 +37,8 @@ namespace chart
AccessibleBase* ChartElementFactory::CreateChartElement( const AccessibleElementInfo& rAccInfo )
{
- ObjectType eType(
- ObjectIdentifier::getObjectType( rAccInfo.m_aCID ));
+ ObjectIdentifier aOID( rAccInfo.m_aOID );
+ ObjectType eType( aOID.getObjectType() );
switch( eType )
{
@@ -75,6 +71,8 @@ AccessibleBase* ChartElementFactory::CreateChartElement( const AccessibleElement
return new AccessibleChartElement( rAccInfo, true, false );
case OBJECTTYPE_UNKNOWN:
break;
+ default:
+ break;
}
return 0;
diff --git a/chart2/source/controller/accessibility/ChartElementFactory.hxx b/chart2/source/controller/accessibility/ChartElementFactory.hxx
index d86e8cf297c5..399ba93c1b55 100644
--- a/chart2/source/controller/accessibility/ChartElementFactory.hxx
+++ b/chart2/source/controller/accessibility/ChartElementFactory.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartElementFactory.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/accessibility/makefile.mk b/chart2/source/controller/accessibility/makefile.mk
index 0d17ab8140e6..44c816d90d0e 100644
--- a/chart2/source/controller/accessibility/makefile.mk
+++ b/chart2/source/controller/accessibility/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.3 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -48,7 +44,9 @@ SLOFILES= $(SLO)$/AccessibleChartView.obj \
$(SLO)$/ChartElementFactory.obj \
$(SLO)$/AccessibleBase.obj \
$(SLO)$/AccessibleChartElement.obj \
- $(SLO)$/AccessibleTextHelper.obj
+ $(SLO)$/AccessibleChartShape.obj \
+ $(SLO)$/AccessibleTextHelper.obj \
+ $(SLO)$/AccessibleViewForwarder.obj
# --- Targets -----------------------------------------------------------------
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
index de6a2ed33838..2e1636b4406b 100644
--- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AreaWrapper.cxx,v $
- * $Revision: 1.5.16.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx
index 58ddba960cfe..ec888d6f8f8d 100644
--- a/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AreaWrapper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
index 7fd921e761dc..7ac8cec0ad62 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AxisWrapper.cxx,v $
- * $Revision: 1.11.8.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx
index b7708dcf2ac2..86bd52367bbe 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AxisWrapper.hxx,v $
- * $Revision: 1.6.8.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index 3d930f72f0af..79f5dccc918a 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Chart2ModelContact.cxx,v $
- * $Revision: 1.4.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
index 0cc8a16bafff..dea25ddd50e4 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Chart2ModelContact.hxx,v $
- * $Revision: 1.3.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index 8cbb0c5af80c..253699f4595c 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartDataWrapper.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -64,59 +61,18 @@
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+using ::rtl::OUString;
using ::osl::MutexGuard;
+using ::com::sun::star::chart::XComplexDescriptionAccess;
+using ::com::sun::star::chart::XChartData;
+using ::com::sun::star::chart::XChartDataArray;
namespace
{
static const ::rtl::OUString lcl_aServiceName(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.ChartData" ));
-struct lcl_DataSequenceToDoubleSeq : public ::std::unary_function<
- uno::Reference< chart2::data::XDataSequence >,
- uno::Sequence< double > >
-{
- uno::Sequence< double > operator() ( const uno::Reference< chart2::data::XDataSequence > & xSeq )
- {
- uno::Reference< chart2::data::XNumericalDataSequence > xNumSeq( xSeq, uno::UNO_QUERY );
- if( xNumSeq.is())
- {
- return xNumSeq->getNumericalData();
- }
- else if( xSeq.is())
- {
- uno::Sequence< uno::Any > aValues = xSeq->getData();
- uno::Sequence< double > aResult( aValues.getLength());
- const sal_Int32 nLength = aValues.getLength();
- for( sal_Int32 i = 0; i < nLength; ++i )
- {
- if( ! ( aValues[ i ] >>= aResult[ i ]) )
- {
- aResult[ i ] = DBL_MIN;
- }
- double& rValue = aResult[ i ];
- if( ::rtl::math::isNan( rValue ) )
- rValue = DBL_MIN;
- }
- return aResult;
- }
- return uno::Sequence< double >();
- }
-};
-
-void lcl_AddSequences( uno::Reference< chart2::data::XLabeledDataSequence > xLSeq,
- ::std::vector< uno::Reference< chart2::data::XDataSequence > > & rOutSeqVector,
- ::std::vector< ::rtl::OUString > & rOutLabelVector )
-{
- if( xLSeq.is() )
- {
- uno::Reference< chart2::data::XDataSequence > xSeq( xLSeq->getValues() );
- rOutSeqVector.push_back( xSeq );
-
- ::rtl::OUString aLabel( ::chart::DataSeriesHelper::getLabelForLabeledDataSequence( xLSeq ) );
- rOutLabelVector.push_back( aLabel );
- }
-}
-
uno::Sequence< uno::Sequence< double > > lcl_getNANInsteadDBL_MIN( const uno::Sequence< uno::Sequence< double > >& rData )
{
uno::Sequence< uno::Sequence< double > > aRet;
@@ -166,11 +122,197 @@ namespace chart
namespace wrapper
{
+//--------------------------------------------------------------------------------------
+
+struct lcl_Operator
+{
+ lcl_Operator()
+ {
+ }
+ virtual ~lcl_Operator()
+ {
+ }
+ virtual void apply( const Reference< XComplexDescriptionAccess >& xDataAccess ) = 0;
+
+ virtual bool setsCategories( bool /*bDataInColumns*/ )
+ {
+ return false;
+ }
+};
+
+//--------------------------------------------------------------------------
+
+struct lcl_AllOperator : public lcl_Operator
+{
+ lcl_AllOperator( const Reference< XChartData >& xDataToApply )
+ : lcl_Operator()
+ , m_xDataToApply( xDataToApply )
+ {
+ }
+
+ virtual bool setsCategories( bool /*bDataInColumns*/ )
+ {
+ return true;
+ }
+
+ virtual void apply( const Reference< XComplexDescriptionAccess >& xDataAccess )
+ {
+ if( !xDataAccess.is() )
+ return;
+
+ Reference< XComplexDescriptionAccess > xNewComplex( m_xDataToApply, uno::UNO_QUERY );
+ if( xNewComplex.is() )
+ {
+ xDataAccess->setData( xNewComplex->getData() );
+ xDataAccess->setComplexRowDescriptions( xNewComplex->getComplexRowDescriptions() );
+ xDataAccess->setComplexColumnDescriptions( xNewComplex->getComplexColumnDescriptions() );
+ }
+ else
+ {
+ Reference< XChartDataArray > xNew( m_xDataToApply, uno::UNO_QUERY );
+ if( xNew.is() )
+ {
+ xDataAccess->setData( xNew->getData() );
+ xDataAccess->setRowDescriptions( xNew->getRowDescriptions() );
+ xDataAccess->setColumnDescriptions( xNew->getColumnDescriptions() );
+ }
+ }
+ }
+
+ Reference< XChartData > m_xDataToApply;
+};
+
+//--------------------------------------------------------------------------
+
+struct lcl_DataOperator : public lcl_Operator
+{
+ lcl_DataOperator( const Sequence< Sequence< double > >& rData )
+ : lcl_Operator()
+ , m_rData( rData )
+ {
+ }
+
+ virtual void apply( const Reference< XComplexDescriptionAccess >& xDataAccess )
+ {
+ if( xDataAccess.is() )
+ xDataAccess->setData( lcl_getNANInsteadDBL_MIN( m_rData ) );
+ }
+
+ const Sequence< Sequence< double > >& m_rData;
+};
+
+//--------------------------------------------------------------------------
+
+struct lcl_RowDescriptionsOperator : public lcl_Operator
+{
+ lcl_RowDescriptionsOperator( const Sequence< OUString >& rRowDescriptions )
+ : lcl_Operator()
+ , m_rRowDescriptions( rRowDescriptions )
+ {
+ }
+
+ virtual bool setsCategories( bool bDataInColumns )
+ {
+ return bDataInColumns;
+ }
+
+ virtual void apply( const Reference< XComplexDescriptionAccess >& xDataAccess )
+ {
+ if( xDataAccess.is() )
+ xDataAccess->setRowDescriptions( m_rRowDescriptions );
+ }
+
+ const Sequence< OUString >& m_rRowDescriptions;
+};
+
+//--------------------------------------------------------------------------
+
+struct lcl_ComplexRowDescriptionsOperator : public lcl_Operator
+{
+ lcl_ComplexRowDescriptionsOperator( const Sequence< Sequence< OUString > >& rComplexRowDescriptions )
+ : lcl_Operator()
+ , m_rComplexRowDescriptions( rComplexRowDescriptions )
+ {
+ }
+
+ virtual bool setsCategories( bool bDataInColumns )
+ {
+ return !bDataInColumns;
+ }
+
+ virtual void apply( const Reference< XComplexDescriptionAccess >& xDataAccess )
+ {
+ if( xDataAccess.is() )
+ xDataAccess->setComplexRowDescriptions( m_rComplexRowDescriptions );
+ }
+
+ const Sequence< Sequence< OUString > >& m_rComplexRowDescriptions;
+};
+
+//--------------------------------------------------------------------------
+
+struct lcl_ColumnDescriptionsOperator : public lcl_Operator
+{
+ lcl_ColumnDescriptionsOperator( const Sequence< OUString >& rColumnDescriptions )
+ : lcl_Operator()
+ , m_rColumnDescriptions( rColumnDescriptions )
+ {
+ }
+
+ virtual bool setsCategories( bool bDataInColumns )
+ {
+ return !bDataInColumns;
+ }
+
+ virtual void apply( const Reference< XComplexDescriptionAccess >& xDataAccess )
+ {
+ if( xDataAccess.is() )
+ xDataAccess->setColumnDescriptions( m_rColumnDescriptions );
+ }
+
+ const Sequence< OUString >& m_rColumnDescriptions;
+};
+
+//--------------------------------------------------------------------------
+
+struct lcl_ComplexColumnDescriptionsOperator : public lcl_Operator
+{
+ lcl_ComplexColumnDescriptionsOperator( const Sequence< Sequence< OUString > >& rComplexColumnDescriptions )
+ : lcl_Operator()
+ , m_rComplexColumnDescriptions( rComplexColumnDescriptions )
+ {
+ }
+
+ virtual bool setsCategories( bool bDataInColumns )
+ {
+ return !bDataInColumns;
+ }
+
+ virtual void apply( const Reference< XComplexDescriptionAccess >& xDataAccess )
+ {
+ if( xDataAccess.is() )
+ xDataAccess->setComplexColumnDescriptions( m_rComplexColumnDescriptions );
+ }
+
+ const Sequence< Sequence< OUString > >& m_rComplexColumnDescriptions;
+};
+
+//--------------------------------------------------------------------------
+
ChartDataWrapper::ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) :
m_spChart2ModelContact( spChart2ModelContact ),
m_aEventListenerContainer( m_aMutex )
{
- refreshData();
+ initDataAccess();
+}
+
+ChartDataWrapper::ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
+ const Reference< XChartData >& xNewData ) :
+ m_spChart2ModelContact( spChart2ModelContact ),
+ m_aEventListenerContainer( m_aMutex )
+{
+ lcl_AllOperator aOperator( xNewData );
+ applyData( aOperator );
}
ChartDataWrapper::~ChartDataWrapper()
@@ -182,87 +324,80 @@ ChartDataWrapper::~ChartDataWrapper()
// m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
}
-// ____ XChartDataArray ____
-uno::Sequence< uno::Sequence< double > > SAL_CALL ChartDataWrapper::getData()
+// ____ XChartDataArray (read)____
+Sequence< Sequence< double > > SAL_CALL ChartDataWrapper::getData()
throw (uno::RuntimeException)
{
- // until we have a data change notification mechanism we always have to
- // update the data here
- refreshData();
- // /--
- MutexGuard aGuard( GetMutex());
- return m_aData;
- // \--
+ initDataAccess();
+ if( m_xDataAccess.is() )
+ return lcl_getDBL_MINInsteadNAN( m_xDataAccess->getData() );
+ return Sequence< Sequence< double > >();
}
-
-void SAL_CALL ChartDataWrapper::setData(
- const uno::Sequence< uno::Sequence< double > >& aData )
+Sequence< OUString > SAL_CALL ChartDataWrapper::getRowDescriptions()
throw (uno::RuntimeException)
{
- refreshData();
- {
- // /--
- MutexGuard aGuard( GetMutex());
- m_aData = aData;
- // \--
- }
- applyData( true, false, false );
+ initDataAccess();
+ if( m_xDataAccess.is() )
+ return m_xDataAccess->getRowDescriptions();
+ return Sequence< OUString >();
}
-
-uno::Sequence< ::rtl::OUString > SAL_CALL ChartDataWrapper::getRowDescriptions()
+Sequence< OUString > SAL_CALL ChartDataWrapper::getColumnDescriptions()
throw (uno::RuntimeException)
{
- // until we have a data change notification mechanism we always have to
- // update the data here
- refreshData();
-
- // /--
- MutexGuard aGuard( GetMutex());
- return m_aRowDescriptions;
- // \--
+ initDataAccess();
+ if( m_xDataAccess.is() )
+ return m_xDataAccess->getColumnDescriptions();
+ return Sequence< OUString > ();
+}
+// ____ XComplexDescriptionAccess (read) ____
+Sequence< Sequence< OUString > > SAL_CALL ChartDataWrapper::getComplexRowDescriptions() throw (uno::RuntimeException)
+{
+ initDataAccess();
+ if( m_xDataAccess.is() )
+ return m_xDataAccess->getComplexRowDescriptions();
+ return Sequence< Sequence< OUString > >();
+}
+Sequence< Sequence< OUString > > SAL_CALL ChartDataWrapper::getComplexColumnDescriptions() throw (uno::RuntimeException)
+{
+ initDataAccess();
+ if( m_xDataAccess.is() )
+ return m_xDataAccess->getComplexColumnDescriptions();
+ return Sequence< Sequence< OUString > >();
}
-void SAL_CALL ChartDataWrapper::setRowDescriptions(
- const uno::Sequence< ::rtl::OUString >& aRowDescriptions )
+// ____ XChartDataArray (write)____
+void SAL_CALL ChartDataWrapper::setData( const Sequence< Sequence< double > >& rData )
throw (uno::RuntimeException)
{
- refreshData();
- {
- // /--
- MutexGuard aGuard( GetMutex());
- m_aRowDescriptions = aRowDescriptions;
- // \--
- }
- applyData( false, true, false );
+ lcl_DataOperator aOperator( rData );
+ applyData( aOperator );
}
-
-uno::Sequence<
- ::rtl::OUString > SAL_CALL ChartDataWrapper::getColumnDescriptions()
+void SAL_CALL ChartDataWrapper::setRowDescriptions( const Sequence< OUString >& rRowDescriptions )
throw (uno::RuntimeException)
{
- // until we have a data change notification mechanism we always have to
- // update the data here
- refreshData();
- // /--
- MutexGuard aGuard( GetMutex());
- return m_aColumnDescriptions;
- // \--
+ lcl_RowDescriptionsOperator aOperator( rRowDescriptions );
+ applyData( aOperator );
}
-
-void SAL_CALL ChartDataWrapper::setColumnDescriptions(
- const uno::Sequence< ::rtl::OUString >& aColumnDescriptions )
+void SAL_CALL ChartDataWrapper::setColumnDescriptions( const Sequence< OUString >& rColumnDescriptions )
throw (uno::RuntimeException)
{
- refreshData();
- {
- // /--
- MutexGuard aGuard( GetMutex());
- m_aColumnDescriptions = aColumnDescriptions;
- // \--
- }
- applyData( false, false, true );
+ lcl_ColumnDescriptionsOperator aOperator( rColumnDescriptions );
+ applyData( aOperator );
+}
+
+// ____ XComplexDescriptionAccess (write) ____
+void SAL_CALL ChartDataWrapper::setComplexRowDescriptions( const Sequence< Sequence< ::rtl::OUString > >& rRowDescriptions ) throw (uno::RuntimeException)
+{
+ lcl_ComplexRowDescriptionsOperator aOperator( rRowDescriptions );
+ applyData( aOperator );
+}
+void SAL_CALL ChartDataWrapper::setComplexColumnDescriptions( const Sequence< Sequence< ::rtl::OUString > >& rColumnDescriptions ) throw (uno::RuntimeException)
+{
+ lcl_ComplexColumnDescriptionsOperator aOperator( rColumnDescriptions );
+ applyData( aOperator );
}
+//--------------------------------------------------------------------------------------
// ____ XChartData (base of XChartDataArray) ____
void SAL_CALL ChartDataWrapper::addChartDataChangeEventListener(
@@ -300,13 +435,7 @@ void SAL_CALL ChartDataWrapper::dispose()
throw (uno::RuntimeException)
{
m_aEventListenerContainer.disposeAndClear( lang::EventObject( static_cast< ::cppu::OWeakObject* >( this )));
-
- // /--
- MutexGuard aGuard( GetMutex());
- m_aData.realloc( 0 );
- m_aColumnDescriptions.realloc( 0 );
- m_aRowDescriptions.realloc( 0 );
- // \--
+ m_xDataAccess=0;
}
void SAL_CALL ChartDataWrapper::addEventListener(
@@ -357,160 +486,39 @@ void ChartDataWrapper::fireChartDataChangeEvent(
}
}
-void ChartDataWrapper::refreshData()
+// --------------------------------------------------------------------------------
+
+void ChartDataWrapper::switchToInternalDataProvider()
+{
+ //create an internal data provider that is connected to the model
+ Reference< chart2::XChartDocument > xChartDoc( m_spChart2ModelContact->getChart2Document() );
+ if( xChartDoc.is() )
+ xChartDoc->createInternalDataProvider( true /*bCloneExistingData*/ );
+ initDataAccess();
+}
+
+void ChartDataWrapper::initDataAccess()
{
- //todo mutex...
Reference< chart2::XChartDocument > xChartDoc( m_spChart2ModelContact->getChart2Document() );
if( !xChartDoc.is() )
return;
- if( xChartDoc->hasInternalDataProvider())
- {
- try {
- uno::Reference< ::com::sun::star::chart::XChartDataArray > xInternalData( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
- m_aColumnDescriptions = xInternalData->getColumnDescriptions();
- m_aRowDescriptions = xInternalData->getRowDescriptions();
- m_aData = lcl_getDBL_MINInsteadNAN( xInternalData->getData() );
- }
- catch( const uno::Exception & ex ) {
- ASSERT_EXCEPTION( ex );
- }
- }
+ if( xChartDoc->hasInternalDataProvider() )
+ m_xDataAccess = Reference< XComplexDescriptionAccess >( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
else
{
- uno::Reference< chart2::XDiagram > xDia(
- xChartDoc->getFirstDiagram() );
- if( ! xDia.is())
- return;
-
- // get information about the segmentation of the assumed "rectangular" data
- // range
- ::rtl::OUString aRangeString;
- bool bUseColumns = true;
- bool bFirstCellAsLabel = true;
- bool bHasCategories = true;
- uno::Sequence< sal_Int32 > aSequenceMapping;
-
- DataSourceHelper::detectRangeSegmentation(
- uno::Reference< frame::XModel >( xChartDoc, uno::UNO_QUERY ),
- aRangeString, aSequenceMapping, bUseColumns, bFirstCellAsLabel, bHasCategories );
-
-
- // get data values from data series
- // --------------------------------
- uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aLabeledSequences;
- uno::Reference< chart2::data::XDataSource > xRectangularDataSource(
- DataSourceHelper::pressUsedDataIntoRectangularFormat( xChartDoc, false /*bWithCategories*/ ) );
- if( xRectangularDataSource.is() )
- {
- aLabeledSequences = xRectangularDataSource->getDataSequences();
- }
-
- ::std::vector< uno::Reference< chart2::data::XDataSequence > > aSequenceVector;
- ::std::vector< ::rtl::OUString > aLabelVector;
- for( sal_Int32 nN=0; nN<aLabeledSequences.getLength(); nN++ )
- lcl_AddSequences( aLabeledSequences[nN], aSequenceVector, aLabelVector );
-
- if( aSequenceMapping.getLength() )
- {
- //aSequenceVector and aLabelVector contain changed positions; resort them to the original position
- ::std::vector< uno::Reference< chart2::data::XDataSequence > > aBackSortedSequences;
- ::std::vector< ::rtl::OUString > aBackSortedLabels;
-
- std::map< sal_Int32, sal_Int32 > aReverseMap;
- {
- sal_Int32 nNewIndex, nOldIndex;
- for( sal_Int32 nS=0; nS <aSequenceMapping.getLength(); nS++ )
- {
- nOldIndex = aSequenceMapping[nS];
- nNewIndex = nS;
- if( bHasCategories )
- nNewIndex--;
- if( nOldIndex >= 0 && nNewIndex >= 0 )
- aReverseMap[nOldIndex] = nNewIndex;
- }
- }
-
- std::map< sal_Int32, sal_Int32 >::iterator aMapIt = aReverseMap.begin();
- std::map< sal_Int32, sal_Int32 >::const_iterator aMapEnd = aReverseMap.end();
-
- for( ; aMapIt != aMapEnd; ++aMapIt )
- {
- size_t nNewIndex = static_cast< size_t >( aMapIt->second );
- if( nNewIndex < aSequenceVector.size() )
- aBackSortedSequences.push_back( aSequenceVector[nNewIndex] );
- if( nNewIndex < aLabelVector.size() )
- aBackSortedLabels.push_back( aLabelVector[nNewIndex] );
- }
-
- // note: assign( beg, end ) doesn't work on solaris
- aSequenceVector.clear();
- aSequenceVector.insert(
- aSequenceVector.begin(), aBackSortedSequences.begin(), aBackSortedSequences.end() );
- aLabelVector.clear();
- aLabelVector.insert(
- aLabelVector.begin(), aBackSortedLabels.begin(), aBackSortedLabels.end() );
- }
-
- if( bUseColumns )
- {
- const sal_Int32 nInnerSize = aSequenceVector.size();
- if( nInnerSize > 0 && aSequenceVector[0].is() )
- {
- // take the length of the first data series also as length for all
- // other series
- const sal_Int32 nOuterSize = aSequenceVector[0]->getData().getLength();
-
- m_aData.realloc( nOuterSize );
- for( sal_Int32 nOuter=0; nOuter<nOuterSize; ++nOuter )
- m_aData[nOuter].realloc( nInnerSize );
-
- for( sal_Int32 nInner=0; nInner<nInnerSize; ++nInner )
- {
- uno::Sequence< double > aValues = uno::Sequence< double > (
- lcl_DataSequenceToDoubleSeq() (aSequenceVector[nInner] ));
- sal_Int32 nMax = ::std::min( nOuterSize, aValues.getLength());
- for( sal_Int32 nOuter=0; nOuter<nMax; ++nOuter )
- m_aData[nOuter][nInner] = aValues[nOuter];
- }
- }
- }
- else
- {
- m_aData.realloc( static_cast< sal_Int32 >( aSequenceVector.size()));
- ::std::transform( aSequenceVector.begin(), aSequenceVector.end(),
- m_aData.getArray(),
- lcl_DataSequenceToDoubleSeq() );
- }
-
- // labels (values already filled during parsing of data values)
- if( bUseColumns )
- m_aColumnDescriptions = ::chart::ContainerHelper::ContainerToSequence( aLabelVector );
- else
- m_aRowDescriptions = ::chart::ContainerHelper::ContainerToSequence( aLabelVector );
-
- // get row-/column descriptions
- // ----------------------------
- // categories
- uno::Sequence< ::rtl::OUString > & rSequence =
- bUseColumns ? m_aRowDescriptions : m_aColumnDescriptions;
- rSequence = DiagramHelper::generateAutomaticCategories( xChartDoc );
+ //create a separate "internal data provider" that is not connected to the model
+ m_xDataAccess = Reference< XComplexDescriptionAccess >( ChartModelHelper::createInternalDataProvider(
+ xChartDoc, false /*bConnectToModel*/ ), uno::UNO_QUERY_THROW );
}
}
-void ChartDataWrapper::applyData( bool bSetValues, bool bSetRowDescriptions, bool bSetColumnDescriptions )
+void ChartDataWrapper::applyData( lcl_Operator& rDataOperator )
{
+ //bool bSetValues, bool bSetRowDescriptions, bool bSetColumnDescriptions
Reference< chart2::XChartDocument > xChartDoc( m_spChart2ModelContact->getChart2Document() );
if( !xChartDoc.is() )
return;
- // /-- locked controllers
- ControllerLockGuard aCtrlLockGuard( uno::Reference< frame::XModel >( xChartDoc, uno::UNO_QUERY ));
- // should do nothing if we already have an internal data provider
- xChartDoc->createInternalDataProvider( sal_True /* bCloneExistingData */ );
-
- uno::Reference< chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider());
- uno::Reference< XChartDataArray > xDocDataArray( xDataProvider, uno::UNO_QUERY );
-
// remember some diagram properties to reset later
sal_Bool bStacked = sal_False;
sal_Bool bPercent = sal_False;
@@ -536,71 +544,24 @@ void ChartDataWrapper::applyData( bool bSetValues, bool bSetRowDescriptions, boo
uno::Reference< frame::XModel >( xChartDoc, uno::UNO_QUERY ),
aRangeString, aSequenceMapping, bUseColumns, bFirstCellAsLabel, bHasCategories );
- if( !bFirstCellAsLabel )
- {
- if( bSetRowDescriptions && !bUseColumns )
- bFirstCellAsLabel = true;
- else if( bSetColumnDescriptions && bUseColumns )
- bFirstCellAsLabel = true;
- }
- if( !bHasCategories )
- {
- if( bSetColumnDescriptions && bUseColumns )
- bHasCategories = true;
- else if( bSetRowDescriptions && !bUseColumns )
- bHasCategories = true;
- }
+ if( !bHasCategories && rDataOperator.setsCategories( bUseColumns ) )
+ bHasCategories = true;
- aRangeString = C2U("all");
uno::Sequence< beans::PropertyValue > aArguments( DataSourceHelper::createArguments(
aRangeString, aSequenceMapping, bUseColumns, bFirstCellAsLabel, bHasCategories ) );
- // create and attach new data source
- uno::Reference< chart2::data::XDataSource > xSource;
- if( xDocDataArray.is() )
- {
- // we have an internal data provider that supports the XChartDataArray
- // interface
- if( bSetValues )
- xDocDataArray->setData( lcl_getNANInsteadDBL_MIN( m_aData ) );
- if( bSetRowDescriptions )
- xDocDataArray->setRowDescriptions( m_aRowDescriptions );
- if( bSetColumnDescriptions )
- xDocDataArray->setColumnDescriptions( m_aColumnDescriptions );
-
- xSource.set( xDataProvider->createDataSource( aArguments ));
- }
- else
- {
- uno::Reference< chart2::data::XDataReceiver > xReceiver( xChartDoc, uno::UNO_QUERY );
- OSL_ASSERT( xChartDoc.is());
- OSL_ASSERT( xReceiver.is());
- if( ! (xChartDoc.is() && xReceiver.is()))
- return;
- // create a data provider containing the new data
- uno::Reference< chart2::data::XDataProvider > xTempDataProvider(
- ChartModelHelper::createInternalDataProvider() );
- if( ! xTempDataProvider.is())
- throw uno::RuntimeException( C2U("Couldn't create temporary data provider"),
- static_cast< ::cppu::OWeakObject * >( this ));
+ // /-- locked controllers
+ ControllerLockGuard aCtrlLockGuard( uno::Reference< frame::XModel >( xChartDoc, uno::UNO_QUERY ));
- uno::Reference< ::com::sun::star::chart::XChartDataArray > xDataArray( xTempDataProvider, uno::UNO_QUERY );
- OSL_ASSERT( xDataArray.is());
- if( xDataArray.is())
- {
- if( bSetValues )
- xDataArray->setData( lcl_getNANInsteadDBL_MIN( m_aData ) );
- if( bSetRowDescriptions )
- xDataArray->setRowDescriptions( m_aRowDescriptions );
- if( bSetColumnDescriptions )
- xDataArray->setColumnDescriptions( m_aColumnDescriptions );
-
- // removes existing data provider and attaches the new one
- xReceiver->attachDataProvider( xTempDataProvider );
- xSource.set( xTempDataProvider->createDataSource( aArguments));
- }
- }
+ // create and attach new data source
+ switchToInternalDataProvider();
+ rDataOperator.apply(m_xDataAccess);
+ uno::Reference< chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() );
+ OSL_ASSERT( xDataProvider.is() );
+ if( !xDataProvider.is() )
+ return;
+ uno::Reference< chart2::data::XDataSource > xSource( xDataProvider->createDataSource( aArguments ) );
// determine a template
uno::Reference< lang::XMultiServiceFactory > xFact( xChartDoc->getChartTypeManager(), uno::UNO_QUERY );
@@ -624,8 +585,7 @@ void ChartDataWrapper::applyData( bool bSetValues, bool bSetRowDescriptions, boo
// argument detection works with internal knowledge of the
// ArrayDataProvider
OSL_ASSERT( xDia.is());
- xTemplate->changeDiagramData(
- xDia, xSource, aArguments );
+ xTemplate->changeDiagramData( xDia, xSource, aArguments );
}
//correct stacking mode
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx
index e63b64397f58..d56397953d79 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartDataWrapper.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,7 +31,7 @@
#include "MutexContainer.hxx"
#include <cppuhelper/implbase4.hxx>
#include <cppuhelper/interfacecontainer.hxx>
-#include <com/sun/star/chart/XChartDataArray.hpp>
+#include <com/sun/star/chart/XComplexDescriptionAccess.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
@@ -48,23 +45,40 @@ namespace wrapper
{
class Chart2ModelContact;
+struct lcl_Operator;
class ChartDataWrapper : public MutexContainer, public
::cppu::WeakImplHelper4<
- com::sun::star::chart::XChartDataArray,
+ com::sun::star::chart::XComplexDescriptionAccess,
com::sun::star::lang::XServiceInfo,
com::sun::star::lang::XEventListener,
com::sun::star::lang::XComponent >
{
public:
ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
+ ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact
+ , const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartData >& xNewData );
virtual ~ChartDataWrapper();
/// XServiceInfo declarations
APPHELPER_XSERVICEINFO_DECL()
protected:
- // ____ XChartDataArray ____
+ // ____ XComplexDescriptionAccess ____
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > > SAL_CALL
+ getComplexRowDescriptions() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setComplexRowDescriptions(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > >& aRowDescriptions )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > > SAL_CALL
+ getComplexColumnDescriptions() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setComplexColumnDescriptions(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > >& aColumnDescriptions )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XChartDataArray (base of XComplexDescriptionAccess) ____
virtual ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Sequence<
double > > SAL_CALL getData()
@@ -115,20 +129,17 @@ protected:
void fireChartDataChangeEvent( ::com::sun::star::chart::ChartDataChangeEvent& aEvent );
-private:
- ::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
- ::cppu::OInterfaceContainerHelper m_aEventListenerContainer;
-
- ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Sequence< double > > m_aData;
- ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aColumnDescriptions;
- ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aRowDescriptions;
+private: //methods
+ void switchToInternalDataProvider();
+ void initDataAccess();
+ void applyData( lcl_Operator& rDataOperator );
- /// re-reads the data from the model
- void refreshData();
+private: //member
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart::XComplexDescriptionAccess > m_xDataAccess;
- /// applies changed data to model
- void applyData( bool bSetValues, bool bSetRowDescriptions, bool bSetColumnDescriptions );
+ ::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
+ ::cppu::OInterfaceContainerHelper m_aEventListenerContainer;
};
} // namespace wrapper
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 397527f3ea9d..67f537c49b98 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartDocumentWrapper.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -57,10 +54,11 @@
#include "WrappedAddInProperty.hxx"
#include "WrappedIgnoreProperty.hxx"
#include "ChartRenderer.hxx"
+#include "UndoManager.hxx"
#include <com/sun/star/chart2/XTitled.hpp>
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
-#include <com/sun/star/chart/XChartDataArray.hpp>
+#include <com/sun/star/chart/XComplexDescriptionAccess.hpp>
#include <comphelper/InlineContainer.hxx>
// header for function SvxShapeCollection_NewInstance
#include <svx/unoshcol.hxx>
@@ -79,6 +77,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart;
+using ::com::sun::star::chart::XComplexDescriptionAccess;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -832,7 +831,7 @@ void SAL_CALL ChartDocumentWrapper::setDiagram( const Reference< XDiagram >& xDi
Reference< XChartData > SAL_CALL ChartDocumentWrapper::getData()
throw (uno::RuntimeException)
{
- if( ! m_xChartData.is())
+ if( !m_xChartData.is() )
{
m_xChartData.set( new ChartDataWrapper( m_spChart2ModelContact ) );
}
@@ -841,128 +840,15 @@ Reference< XChartData > SAL_CALL ChartDocumentWrapper::getData()
return m_xChartData;
}
-void SAL_CALL ChartDocumentWrapper::attachData( const Reference< XChartData >& xData )
+void SAL_CALL ChartDocumentWrapper::attachData( const Reference< XChartData >& xNewData )
throw (uno::RuntimeException)
{
- if( !xData.is())
- return;
-
- Reference< chart2::XChartDocument > xChartDoc( m_spChart2ModelContact->getChart2Document() );
- if( !xChartDoc.is() )
- return;
-
- uno::Reference< chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider());
- uno::Reference< XChartDataArray > xDocDataArray( xDataProvider, uno::UNO_QUERY );
- uno::Reference< XChartDataArray > xDataArray( xData, uno::UNO_QUERY );
- OSL_ASSERT( xDataArray.is());
- if( ! xDataArray.is() ||
- xDocDataArray == xDataArray )
+ if( !xNewData.is() )
return;
- // remember some diagram properties to reset later
- ChartDataRowSource eSeriesSource = ChartDataRowSource_ROWS;
- sal_Bool bStacked = sal_False;
- sal_Bool bPercent = sal_False;
- sal_Bool bDeep = sal_False;
- Reference< beans::XPropertySet > xDiaProp( getDiagram(), uno::UNO_QUERY );
- if( xDiaProp.is())
- {
- xDiaProp->getPropertyValue( C2U("DataRowSource")) >>= eSeriesSource;
- xDiaProp->getPropertyValue( C2U("Stacked")) >>= bStacked;
- xDiaProp->getPropertyValue( C2U("Percent")) >>= bPercent;
- xDiaProp->getPropertyValue( C2U("Deep")) >>= bDeep;
- }
-
- // create and attach new data source
- uno::Reference< chart2::data::XDataSource > xSource;
- Sequence< beans::PropertyValue > aArguments( 4 );
- aArguments[0] = beans::PropertyValue(
- C2U("CellRangeRepresentation"), -1, uno::makeAny( C2U("all") ),
- beans::PropertyState_DIRECT_VALUE );
- aArguments[1] = beans::PropertyValue(
- C2U("DataRowSource"), -1, uno::makeAny( eSeriesSource ),
- beans::PropertyState_DIRECT_VALUE );
- aArguments[2] = beans::PropertyValue(
- C2U("FirstCellAsLabel"), -1, uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE );
- aArguments[3] = beans::PropertyValue(
- C2U("HasCategories"), -1, uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE );
-
// /-- locked controllers
- ControllerLockGuard aCtrlLockGuard( Reference< frame::XModel >( xChartDoc, uno::UNO_QUERY ));
- if( xDocDataArray.is())
- {
- // we have an internal data provider that supports the XChartDataArray
- // interface
- xDocDataArray->setData( xDataArray->getData());
- xDocDataArray->setRowDescriptions( xDataArray->getRowDescriptions());
- xDocDataArray->setColumnDescriptions( xDataArray->getColumnDescriptions());
-
- xSource.set( xDataProvider->createDataSource( aArguments ));
- }
- else
- {
- uno::Reference< chart2::data::XDataReceiver > xReceiver( xChartDoc, uno::UNO_QUERY );
- OSL_ASSERT( xChartDoc.is());
- OSL_ASSERT( xReceiver.is());
- OSL_ASSERT( xDataArray.is());
- if( ! (xChartDoc.is() &&
- xReceiver.is()))
- return;
-
- // create a data provider containing the new data
- Reference< chart2::data::XDataProvider > xTempDataProvider(
- ChartModelHelper::createInternalDataProvider( xDataArray ));
-
- if( ! xTempDataProvider.is())
- throw uno::RuntimeException( C2U("Couldn't create temporary data provider"),
- static_cast< ::cppu::OWeakObject * >( this ));
-
- // removes existing data provider and attaches the new one
- xReceiver->attachDataProvider( xTempDataProvider );
- xSource.set( xTempDataProvider->createDataSource( aArguments));
- }
-
- // determine a template
- Reference< lang::XMultiServiceFactory > xFact( xChartDoc->getChartTypeManager(), uno::UNO_QUERY );
- Reference< chart2::XDiagram > xDia( xChartDoc->getFirstDiagram());
- DiagramHelper::tTemplateWithServiceName aTemplateAndService =
- DiagramHelper::getTemplateForDiagram( xDia, xFact );
- OUString aServiceName( aTemplateAndService.second );
- Reference< chart2::XChartTypeTemplate > xTemplate = aTemplateAndService.first;
-
- // (fall-back)
- if( ! xTemplate.is())
- {
- if( aServiceName.getLength() == 0 )
- aServiceName = C2U("com.sun.star.chart2.template.Column");
- xTemplate.set( xFact->createInstance( aServiceName ), uno::UNO_QUERY );
- }
- OSL_ASSERT( xTemplate.is());
-
- if( xTemplate.is() && xSource.is())
- {
- // argument detection works with internal knowledge of the
- // ArrayDataProvider
- OSL_ASSERT( xDia.is());
- xTemplate->changeDiagramData(
- xDia, xSource, aArguments );
- }
-
- // should do nothing if we already have an internal data provider
- xChartDoc->createInternalDataProvider( sal_True /* bCloneExistingData */ );
-
- //correct stacking mode
- if( bStacked || bPercent || bDeep )
- {
- StackMode eStackMode = StackMode_Y_STACKED;
- if( bDeep )
- eStackMode = StackMode_Z_STACKED;
- else if( bPercent )
- eStackMode = StackMode_Y_STACKED_PERCENT;
- DiagramHelper::setStackMode( xDia, eStackMode );
- }
-
- m_xChartData = xData;
+ ControllerLockGuard aCtrlLockGuard( Reference< frame::XModel >( m_spChart2ModelContact->getChart2Document(), uno::UNO_QUERY ));
+ m_xChartData.set( new ChartDataWrapper( m_spChart2ModelContact, xNewData ) );
// \-- locked controllers
}
@@ -1492,6 +1378,12 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance(
xResult.set( m_xChartView );
bServiceFound = true;
}
+ else if ( aServiceSpecifier.equals( CHART_UNDOMANAGER_SERVICE_NAME ) )
+ {
+ Reference< chart2::XUndoManager > xUndoManager( new UndoManager() );
+ xResult.set( xUndoManager );
+ bServiceFound = true;
+ }
else
{
// try to create a shape
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index ce417155dc4f..f099eaa8499a 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSeriesPointWrapper.cxx,v $
- * $Revision: 1.15.44.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx
index 0e3b87605b77..b7246306959c 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSeriesPointWrapper.hxx,v $
- * $Revision: 1.7.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 4a02d9aa99e5..b1db5981f6b3 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DiagramWrapper.cxx,v $
- * $Revision: 1.17.32.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx
index b69a856a557f..96689eec2aac 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DiagramWrapper.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
index 7aebd872f870..ff36c4cebcc7 100644
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: GridWrapper.cxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.hxx b/chart2/source/controller/chartapiwrapper/GridWrapper.hxx
index 6bbe84f052ab..c731b6c22666 100644
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: GridWrapper.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
index e6b63308b01d..5d4f3e718ff9 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LegendWrapper.cxx,v $
- * $Revision: 1.9.16.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx
index 85483ec6c59c..94434a387d4e 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LegendWrapper.hxx,v $
- * $Revision: 1.5.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
index f545e54f872b..fdfc7c094aaf 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MinMaxLineWrapper.cxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
index 411c97e71a5e..449a1f550860 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MinMaxLineWrapper.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/ReferenceSizePropertyProvider.hxx b/chart2/source/controller/chartapiwrapper/ReferenceSizePropertyProvider.hxx
index c9199bcadaff..085128cddeeb 100644
--- a/chart2/source/controller/chartapiwrapper/ReferenceSizePropertyProvider.hxx
+++ b/chart2/source/controller/chartapiwrapper/ReferenceSizePropertyProvider.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ReferenceSizePropertyProvider.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index a84dbc0cfc4d..ec972f8b21ba 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TitleWrapper.cxx,v $
- * $Revision: 1.8.44.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
index 3e0db1ed1e42..fba346702d2a 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TitleWrapper.hxx,v $
- * $Revision: 1.6.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index e2a74834d249..338131c4f973 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: UpDownBarWrapper.cxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
index ce83ece0a4bf..5b028a6acc66 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: UpDownBarWrapper.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
index efda626e5fd6..a43bc610fc0c 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WallFloorWrapper.cxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx
index 1e975bbb1ab0..44cb241281e3 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WallFloorWrapper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx
index 1f4aa3c96d47..8315a22d8ab4 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedAddInProperty.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.hxx
index 01cdd148c136..e807873c82dc 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedAddInProperty.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
index dfba4f0cf5ab..15ae48bc22dd 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedAutomaticPositionProperties.cxx,v $
- * $Revision: 1.1.2.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx
index edb9127fcd31..1211f76c8f1f 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedAutomaticPositionProperties.hxx,v $
- * $Revision: 1.1.2.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
index 9164e42f5eeb..0c4a98263a04 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedAxisAndGridExistenceProperties.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx
index 0c094a3de39c..a02e19d2a67c 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedAxisAndGridExistenceProperties.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx
index 94f1c58fe27a..5fca42c2b3ad 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedCharacterHeightProperty.cxx,v $
- * $Revision: 1.5.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx
index 4ee8e0bf89e7..34329d6d3a52 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedCharacterHeightProperty.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
index 5b48f320db39..bc91136590cb 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedDataCaptionProperties.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx
index 1dbd3b8bbaa6..f805d7e87fa0 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedDataCaptionProperties.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx
index 7c4df1455ad4..a5dc9b23feed 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedGapwidthProperty.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx
index 85e333577206..1ec7180d5455 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedGapwidthProperty.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
index 00101ef10f34..7a8d1554df7d 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedNumberFormatProperty.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx
index 4d1b9b867840..51e9b253150b 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedNumberFormatProperty.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
index ffbaac3a5eb0..b0fc030d0fbf 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedScaleProperty.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx
index e03bf050f72f..4d29bc009777 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedScaleProperty.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
index 5a22ae7f184f..5e11a3012cf3 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedScaleTextProperties.cxx,v $
- * $Revision: 1.1.2.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx
index 433a91254bcc..0094e30f7def 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedScaleTextProperties.hxx,v $
- * $Revision: 1.1.2.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
index e5f45408217e..68d408ea7147 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedSceneProperty.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx
index 520524e7c4d3..23a186de6406 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedSceneProperty.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx
index 2cf5a5406dad..6124e2baf506 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedSeriesAreaOrLineProperty.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx
index 8212e6c75938..6045802f4a5d 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedSeriesAreaOrLineProperty.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
index 370d58eb6302..02ab979163bb 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedSeriesOrDiagramProperty.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
index abe16ce64a65..16ddb1137d4a 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedSplineProperties.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx
index 364a74747dfe..877d9cbe9a51 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedSplineProperties.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index 226bfd14bf4d..fef3e1c10b05 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedStatisticProperties.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx
index 5e20f65a189d..973f0fef8ec8 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedStatisticProperties.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
index 0b68ec120231..3ecb23ce84d2 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedStockProperties.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx
index 622eeaf901f5..3693b521b7dc 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedStockProperties.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 59bba9b5973d..ea0b8361ae45 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedSymbolProperties.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -46,12 +43,12 @@
#include <com/sun/star/graphic/XGraphicProvider.hpp>
// for UNO_NAME_GRAPHOBJ_URLPREFIX
-#include <svx/unoprnms.hxx>
+#include <editeng/unoprnms.hxx>
// for Graphic
#include <vcl/graph.hxx>
// for GraphicObject
-#include <goodies/grfmgr.hxx>
+#include <svtools/grfmgr.hxx>
#include <vcl/outdev.hxx>
#include <comphelper/processfactory.hxx>
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx
index 165832ab8664..5a175623e441 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedSymbolProperties.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx
index 07532a4ecf22..a5d5afe6debc 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedTextRotationProperty.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx
index 54fbf38e53d7..ba0bf8919919 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedTextRotationProperty.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/chartapiwrapper/makefile.mk b/chart2/source/controller/chartapiwrapper/makefile.mk
index 402b5870292c..0af72c700a41 100644
--- a/chart2/source/controller/chartapiwrapper/makefile.mk
+++ b/chart2/source/controller/chartapiwrapper/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.4.44.3 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/Bitmaps.hrc b/chart2/source/controller/dialogs/Bitmaps.hrc
index d3aa3ebbff2f..6349a121ff28 100644
--- a/chart2/source/controller/dialogs/Bitmaps.hrc
+++ b/chart2/source/controller/dialogs/Bitmaps.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Bitmaps.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/Bitmaps.src b/chart2/source/controller/dialogs/Bitmaps.src
index 67d8588897d8..3945090217e0 100644
--- a/chart2/source/controller/dialogs/Bitmaps.src
+++ b/chart2/source/controller/dialogs/Bitmaps.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Bitmaps.src,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/Bitmaps_HC.hrc b/chart2/source/controller/dialogs/Bitmaps_HC.hrc
index 71a181b92559..16bffd0cf86d 100644
--- a/chart2/source/controller/dialogs/Bitmaps_HC.hrc
+++ b/chart2/source/controller/dialogs/Bitmaps_HC.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Bitmaps_HC.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/Bitmaps_HC.src b/chart2/source/controller/dialogs/Bitmaps_HC.src
index a82893273ae2..738c133483e1 100644
--- a/chart2/source/controller/dialogs/Bitmaps_HC.src
+++ b/chart2/source/controller/dialogs/Bitmaps_HC.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Bitmaps_HC.src,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/ChangingResource.cxx b/chart2/source/controller/dialogs/ChangingResource.cxx
index a668cc1b41b8..e7461325e3be 100644
--- a/chart2/source/controller/dialogs/ChangingResource.cxx
+++ b/chart2/source/controller/dialogs/ChangingResource.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChangingResource.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/ChangingResource.hxx b/chart2/source/controller/dialogs/ChangingResource.hxx
index 24b24a5095ad..df69358b00b7 100644
--- a/chart2/source/controller/dialogs/ChangingResource.hxx
+++ b/chart2/source/controller/dialogs/ChangingResource.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChangingResource.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index fa51d17a03d8..5e8bd7336b86 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartTypeDialogController.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
index cdbda807813f..56ffb93e4a60 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartTypeDialogController.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/ChartTypeTemplateProvider.hxx b/chart2/source/controller/dialogs/ChartTypeTemplateProvider.hxx
index 58d3f0a2242c..6462d4897945 100644
--- a/chart2/source/controller/dialogs/ChartTypeTemplateProvider.hxx
+++ b/chart2/source/controller/dialogs/ChartTypeTemplateProvider.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartTypeTemplateProvider.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/CommonResources.hrc b/chart2/source/controller/dialogs/CommonResources.hrc
index e95c57139bff..8a3ae8f9f63c 100644
--- a/chart2/source/controller/dialogs/CommonResources.hrc
+++ b/chart2/source/controller/dialogs/CommonResources.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CommonResources.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index bab952cf317b..67930fc6f7a7 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataBrowser.cxx,v $
- * $Revision: 1.9.8.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -48,6 +45,8 @@
#include "DataSeriesHelper.hxx"
#include "DiagramHelper.hxx"
#include "ChartModelHelper.hxx"
+#include "CommonConverters.hxx"
+#include "macros.hxx"
#include "chartview/NumberFormatterWrapper.hxx"
#include "servicenames_charttypes.hxx"
#include "ResId.hxx"
@@ -190,6 +189,8 @@ public:
sal_Int32 GetStartColumn() const;
sal_Int32 GetEndColumn() const;
+ static sal_Int32 GetRelativeAppFontXPosForNameField();
+
void Show();
/** call this before destroying the class. This notifies the listeners to
@@ -265,23 +266,30 @@ void SeriesHeader::SetColor( const Color & rCol )
m_spColorBar->SetControlBackground( rCol );
}
+const sal_Int32 nSymbolHeight = 10;
+const sal_Int32 nSymbolDistance = 2;
+
+sal_Int32 SeriesHeader::GetRelativeAppFontXPosForNameField()
+{
+ return nSymbolHeight + nSymbolDistance;
+}
+
void SeriesHeader::SetPos( const Point & rPos )
{
m_aPos = rPos;
// chart type symbol
- sal_Int32 nHeight = 10;
Point aPos( rPos );
- aPos.setY( aPos.getY() + 2 );
- Size aSize( nHeight, nHeight );
+ aPos.setY( aPos.getY() + nSymbolDistance );
+ Size aSize( nSymbolHeight, nSymbolHeight );
m_spSymbol->SetPosPixel( m_pDevice->LogicToPixel( aPos, MAP_APPFONT ));
m_spSymbol->SetSizePixel( m_pDevice->LogicToPixel( aSize, MAP_APPFONT ));
- aPos.setY( aPos.getY() - 2 );
+ aPos.setY( aPos.getY() - nSymbolDistance );
// series name edit field
- aPos.setX( aPos.getX() + nHeight + 2 );
- aSize.setWidth( m_nWidth - nHeight - 2 );
- nHeight = 12;
+ aPos.setX( aPos.getX() + nSymbolHeight + nSymbolDistance );
+ aSize.setWidth( m_nWidth - nSymbolHeight - nSymbolDistance );
+ sal_Int32 nHeight = 12;
aSize.setHeight( nHeight );
m_spSeriesName->SetPosPixel( m_pDevice->LogicToPixel( aPos, MAP_APPFONT ));
m_spSeriesName->SetSizePixel( m_pDevice->LogicToPixel( aSize, MAP_APPFONT ));
@@ -556,25 +564,14 @@ bool DataBrowser::MaySwapColumns() const
return (static_cast< sal_uInt32 >( nColIndex ) < (m_aSeriesHeaders.size() - 1));
}
+ sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders );
return ! IsReadOnly()
- && ( GetCurColumnId() > 1 )
- && ( GetCurColumnId() < ColCount() - 1 );
+ && ( nColIdx > 0 )
+ && ( nColIdx < ColCount()-2 )
+ && m_apDataBrowserModel.get()
+ && !m_apDataBrowserModel->isCategoriesColumn( nColIdx );
}
-// bool DataBrowser::MaySortRow() const
-// {
-// // not implemented
-// return false;
-// // return ! IsReadOnly() && ( GetCurRow() >= 0 );
-// }
-
-// bool DataBrowser::MaySortColumn() const
-// {
-// // not implemented
-// return false;
-// // return ! IsReadOnly() && ( GetCurColumnId() > 1 );
-// }
-
void DataBrowser::clearHeaders()
{
::std::for_each( m_aSeriesHeaders.begin(), m_aSeriesHeaders.end(), impl::applyChangesFunctor());
@@ -604,9 +601,10 @@ void DataBrowser::RenewTable()
InsertHandleColumn( static_cast< sal_uInt16 >(
GetDataWindow().LogicToPixel( Size( 42, 0 )).getWidth() ));
- const sal_Int32 nDefaultColumnWidth = 94;
-
- sal_Int32 nColumnWidth( GetDataWindow().LogicToPixel( Size( nDefaultColumnWidth, 0 )).getWidth());
+ OUString aDefaultSeriesName( ::chart::SchResId::getResString( STR_COLUMN_LABEL ));
+ replaceParamterInString( aDefaultSeriesName, C2U("%COLUMNNUMBER"), OUString::valueOf( sal_Int32(24) ) );
+ sal_Int32 nColumnWidth = GetDataWindow().GetTextWidth( aDefaultSeriesName )
+ + GetDataWindow().LogicToPixel( Point( 4 + impl::SeriesHeader::GetRelativeAppFontXPosForNameField(), 0 ), MAP_APPFONT ).X();
sal_Int32 nColumnCount = m_apDataBrowserModel->getColumnCount();
// nRowCount is a member of a base class
sal_Int32 nRowCountLocal = m_apDataBrowserModel->getMaxRowCount();
@@ -885,6 +883,22 @@ void DataBrowser::InsertColumn()
}
}
+void DataBrowser::InsertTextColumn()
+{
+ sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders );
+
+ if( nColIdx >= 0 &&
+ m_apDataBrowserModel.get())
+ {
+ // save changes made to edit-field
+ if( IsModified() )
+ SaveModified();
+
+ m_apDataBrowserModel->insertComplexCategoryLevel( nColIdx );
+ RenewTable();
+ }
+}
+
void DataBrowser::RemoveColumn()
{
sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders );
@@ -897,7 +911,7 @@ void DataBrowser::RemoveColumn()
SaveModified();
m_bDataValid = true;
- m_apDataBrowserModel->removeDataSeries( nColIdx );
+ m_apDataBrowserModel->removeDataSeriesOrComplexCategoryLevel( nColIdx );
RenewTable();
}
}
diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx
index a4147af84fcb..3583db2770c0 100644
--- a/chart2/source/controller/dialogs/DataBrowser.hxx
+++ b/chart2/source/controller/dialogs/DataBrowser.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataBrowser.hxx,v $
- * $Revision: 1.6.8.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -124,12 +121,10 @@ public:
bool MaySwapRows() const;
bool MaySwapColumns() const;
-// bool MaySortRow() const;
-// bool MaySortColumn() const;
-
// mutators mutating data
void InsertRow();
void InsertColumn();
+ void InsertTextColumn();
void RemoveRow();
void RemoveColumn();
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index 1db67c6721af..c0b865536686 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataBrowserModel.cxx,v $
- * $Revision: 1.6.16.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,6 +40,7 @@
#include "ContainerHelper.hxx"
#include "ChartTypeHelper.hxx"
#include "chartview/ExplicitValueProvider.hxx"
+#include "ExplicitCategoriesProvider.hxx"
#include <com/sun/star/container/XIndexReplace.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
@@ -54,6 +52,7 @@
#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 <rtl/math.hxx>
@@ -325,6 +324,9 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
m_apDialogModel->getDataProvider(), uno::UNO_QUERY );
if( xDataProvider.is())
{
+ if( isCategoriesColumn(nAfterColumnIndex) )
+ nAfterColumnIndex = getCategoryColumnCount()-1;
+
sal_Int32 nStartCol = 0;
Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( m_xChartDocument ));
Reference< chart2::XChartType > xChartType;
@@ -356,7 +358,7 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
{
sal_Int32 nOffset = 0;
if( xDiagram.is() && lcl_ShowCategories( xDiagram ))
- ++nOffset;
+ nOffset=getCategoryColumnCount();
// get shared sequences of current series
Reference< chart2::XDataSeriesContainer > xSeriesCnt( xChartType, uno::UNO_QUERY );
lcl_tSharedSeqVec aSharedSequences;
@@ -426,7 +428,31 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
}
}
-void DataBrowserModel::removeDataSeries( sal_Int32 nAtColumnIndex )
+void DataBrowserModel::insertComplexCategoryLevel( sal_Int32 nAfterColumnIndex )
+{
+ //create a new text column for complex categories
+
+ OSL_ASSERT( m_apDialogModel.get());
+ Reference< chart2::XInternalDataProvider > xDataProvider( m_apDialogModel->getDataProvider(), uno::UNO_QUERY );
+ if( xDataProvider.is() )
+ {
+ if( !isCategoriesColumn(nAfterColumnIndex) )
+ nAfterColumnIndex = getCategoryColumnCount()-1;
+
+ if(nAfterColumnIndex<0)
+ {
+ OSL_ENSURE( false, "wrong index for category level insertion" );
+ return;
+ }
+
+ m_apDialogModel->startControllerLockTimer();
+ ControllerLockGuard aLockedControllers( Reference< frame::XModel >( m_xChartDocument, uno::UNO_QUERY ) );
+ xDataProvider->insertComplexCategoryLevel( nAfterColumnIndex+1 );
+ updateFromModel();
+ }
+}
+
+void DataBrowserModel::removeDataSeriesOrComplexCategoryLevel( sal_Int32 nAtColumnIndex )
{
OSL_ASSERT( m_apDialogModel.get());
if( static_cast< tDataColumnVector::size_type >( nAtColumnIndex ) < m_aColumns.size())
@@ -477,6 +503,20 @@ void DataBrowserModel::removeDataSeries( sal_Int32 nAtColumnIndex )
}
updateFromModel();
}
+ else
+ {
+ //delete a category column if there is more than one level (in case of a single column we do not get here)
+ OSL_ENSURE(nAtColumnIndex>0, "wrong index for categories deletion" );
+
+ Reference< chart2::XInternalDataProvider > xDataProvider( m_apDialogModel->getDataProvider(), uno::UNO_QUERY );
+ if( xDataProvider.is() )
+ {
+ m_apDialogModel->startControllerLockTimer();
+ ControllerLockGuard aLockedControllers( Reference< frame::XModel >( m_xChartDocument, uno::UNO_QUERY ) );
+ xDataProvider->deleteComplexCategoryLevel( nAtColumnIndex );
+ updateFromModel();
+ }
+ }
}
}
@@ -617,6 +657,8 @@ bool DataBrowserModel::setCellAny( sal_Int32 nAtColumn, sal_Int32 nAtRow, const
bResult = true;
try
{
+ ControllerLockGuard aLockedControllers( Reference< frame::XModel >( m_xChartDocument, uno::UNO_QUERY ) );
+
// label
if( nAtRow == -1 )
{
@@ -630,6 +672,12 @@ bool DataBrowserModel::setCellAny( sal_Int32 nAtColumn, sal_Int32 nAtRow, const
m_aColumns[ nIndex ].m_xLabeledDataSequence->getValues(), uno::UNO_QUERY_THROW );
xIndexReplace->replaceByIndex( nAtRow, rValue );
}
+
+ m_apDialogModel->startControllerLockTimer();
+ //notify change directly to the model (this is necessary here as sequences for complex categories not known directly to the chart model so they do not notify their changes) (for complex categories see issue #i82971#)
+ Reference< util::XModifiable > xModifiable( m_xChartDocument, uno::UNO_QUERY );
+ if( xModifiable.is() )
+ xModifiable->setModified(true);
}
catch( const uno::Exception & ex )
{
@@ -686,11 +734,26 @@ OUString DataBrowserModel::getRoleOfColumn( sal_Int32 nColumnIndex ) const
return OUString();
}
-Reference< chart2::data::XLabeledDataSequence >
- DataBrowserModel::getCategories() const throw()
+bool DataBrowserModel::isCategoriesColumn( sal_Int32 nColumnIndex ) const
{
- OSL_ASSERT( m_apDialogModel.get());
- return m_apDialogModel->getCategories();
+ bool bIsCategories = false;
+ if( nColumnIndex>=0 && nColumnIndex<static_cast< sal_Int32 >(m_aColumns.size()) )
+ bIsCategories = !m_aColumns[ nColumnIndex ].m_xDataSeries.is();
+ return bIsCategories;
+}
+
+sal_Int32 DataBrowserModel::getCategoryColumnCount()
+{
+ sal_Int32 nLastTextColumnIndex = -1;
+ tDataColumnVector::const_iterator aIt = m_aColumns.begin();
+ for( ; aIt != m_aColumns.end(); ++aIt )
+ {
+ if( !aIt->m_xDataSeries.is() )
+ nLastTextColumnIndex++;
+ else
+ break;
+ }
+ return nLastTextColumnIndex+1;
}
const DataBrowserModel::tDataHeaderVector& DataBrowserModel::getDataHeaders() const
@@ -720,16 +783,27 @@ void DataBrowserModel::updateFromModel()
sal_Int32 nHeaderEnd = 0;
if( lcl_ShowCategories( xDiagram ))
{
- Reference< chart2::data::XLabeledDataSequence > xCategories( this->getCategories());
- tDataColumn aCategories;
- aCategories.m_xLabeledDataSequence.set( xCategories );
- if( lcl_ShowCategoriesAsDataLabel( xDiagram ))
- aCategories.m_aUIRoleName = DialogModel::GetRoleDataLabel();
- else
- aCategories.m_aUIRoleName = lcl_getUIRoleName( xCategories );
- aCategories.m_eCellType = TEXT;
- m_aColumns.push_back( aCategories );
- ++nHeaderStart;
+ Reference< frame::XModel > xChartModel( m_xChartDocument, uno::UNO_QUERY );
+ ExplicitCategoriesProvider aExplicitCategoriesProvider( ChartModelHelper::getFirstCoordinateSystem(xChartModel), xChartModel );
+
+ const Sequence< Reference< chart2::data::XLabeledDataSequence> >& rSplitCategoriesList( aExplicitCategoriesProvider.getSplitCategoriesList() );
+ sal_Int32 nLevelCount = rSplitCategoriesList.getLength();
+ for( sal_Int32 nL = 0; nL<nLevelCount; nL++ )
+ {
+ Reference< chart2::data::XLabeledDataSequence > xCategories( rSplitCategoriesList[nL] );
+ if( !xCategories.is() )
+ continue;
+
+ tDataColumn aCategories;
+ aCategories.m_xLabeledDataSequence.set( xCategories );
+ if( lcl_ShowCategoriesAsDataLabel( xDiagram ))
+ aCategories.m_aUIRoleName = DialogModel::GetRoleDataLabel();
+ else
+ aCategories.m_aUIRoleName = lcl_getUIRoleName( xCategories );
+ aCategories.m_eCellType = TEXT;
+ m_aColumns.push_back( aCategories );
+ ++nHeaderStart;
+ }
}
Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY );
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.hxx b/chart2/source/controller/dialogs/DataBrowserModel.hxx
index 95a3e4b2f0fa..a4378972f70f 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.hxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataBrowserModel.hxx,v $
- * $Revision: 1.7.16.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -63,10 +60,14 @@ public:
*/
void insertDataSeries( sal_Int32 nAfterColumnIndex );
+ /** Inserts a new text column for complex categories.
+ */
+ void insertComplexCategoryLevel( sal_Int32 nAfterColumnIndex );
+
/** Removes a data series to which the data column with index nAtColumnIndex
belongs.
*/
- void removeDataSeries( sal_Int32 nAtColumnIndex );
+ void removeDataSeriesOrComplexCategoryLevel( sal_Int32 nAtColumnIndex );
/** Swaps the series to which the data column with index nFirstIndex belongs
with the next series (which starts at an index >= nFirstIndex + 1)
@@ -100,6 +101,7 @@ public:
// returns the UI string of the corresponding role
::rtl::OUString getRoleOfColumn( sal_Int32 nColumnIndex ) const;
+ bool isCategoriesColumn( sal_Int32 nColumnIndex ) const;
struct tDataHeader
{
@@ -156,9 +158,7 @@ private:
sal_Int32 & rInOutSequenceIndex,
sal_Int32 & rInOutHeaderEnd );
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XLabeledDataSequence >
- getCategories() const throw();
+ sal_Int32 getCategoryColumnCount();
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > m_xChartDocument;
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 69e693911c22..f104045727bb 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DialogModel.cxx,v $
- * $Revision: 1.7.16.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -830,8 +827,6 @@ void DialogModel::applyInterpretedData(
DialogModel::setCategories(rNewData.Categories);
}
-
- OSL_ASSERT( ! rNewData.UnusedData.hasElements());
}
sal_Int32 DialogModel::countSeries() const
diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx
index 744262cbbd1f..dcca6c716b8d 100644
--- a/chart2/source/controller/dialogs/DialogModel.hxx
+++ b/chart2/source/controller/dialogs/DialogModel.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DialogModel.hxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index fbbbca7fd826..0836ab9ca93a 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ObjectNameProvider.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -49,8 +46,6 @@
#include <tools/debug.hxx>
#include <tools/string.hxx>
-// #include <unotools/syslocale.hxx>
-
#include <com/sun/star/chart2/XTitle.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
@@ -200,7 +195,7 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal
replaceParamterInString( aCategory
, C2U("%CATEGORYVALUE")
- , ExplicitCategoriesProvider::getCategoryByIndex( xCooSys, nPointIndex )
+ , ExplicitCategoriesProvider::getCategoryByIndex( xCooSys, xChartModel, nPointIndex )
);
aRet = aCategory;
diff --git a/chart2/source/controller/dialogs/RangeEdit.cxx b/chart2/source/controller/dialogs/RangeEdit.cxx
index 9d17ea541aff..55888156b1b1 100644
--- a/chart2/source/controller/dialogs/RangeEdit.cxx
+++ b/chart2/source/controller/dialogs/RangeEdit.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RangeEdit.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/RangeSelectionButton.cxx b/chart2/source/controller/dialogs/RangeSelectionButton.cxx
index 9e0749e91bb3..9b94d7e1752b 100644
--- a/chart2/source/controller/dialogs/RangeSelectionButton.cxx
+++ b/chart2/source/controller/dialogs/RangeSelectionButton.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RangeSelectionButton.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/RangeSelectionHelper.cxx b/chart2/source/controller/dialogs/RangeSelectionHelper.cxx
index 88f93413ce67..ccb4979420d1 100644
--- a/chart2/source/controller/dialogs/RangeSelectionHelper.cxx
+++ b/chart2/source/controller/dialogs/RangeSelectionHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RangeSelectionHelper.cxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/RangeSelectionListener.cxx b/chart2/source/controller/dialogs/RangeSelectionListener.cxx
index 397124581280..a2bb0b7602d6 100644
--- a/chart2/source/controller/dialogs/RangeSelectionListener.cxx
+++ b/chart2/source/controller/dialogs/RangeSelectionListener.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RangeSelectionListener.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/ResourceIds.hrc b/chart2/source/controller/dialogs/ResourceIds.hrc
index 8674aba240da..2ab544c77ab1 100644
--- a/chart2/source/controller/dialogs/ResourceIds.hrc
+++ b/chart2/source/controller/dialogs/ResourceIds.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ResourceIds.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,6 +48,8 @@
#define DLG_SPLINE_PROPERTIES 904
#define DLG_DATA_TRENDLINE 841
#define DLG_DATA_YERRORBAR 842
+#define DLG_SHAPE_FONT 921
+#define DLG_SHAPE_PARAGRAPH 922
//-----------------------------------------------------------------------------
//TabPage Ids:
diff --git a/chart2/source/controller/dialogs/Strings.src b/chart2/source/controller/dialogs/Strings.src
index b7ef643e3ff3..4b4cec65426e 100644
--- a/chart2/source/controller/dialogs/Strings.src
+++ b/chart2/source/controller/dialogs/Strings.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Strings.src,v $
- * $Revision: 1.12.72.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -351,6 +348,11 @@ String STR_OBJECT_DIAGRAM_FLOOR
Text [ en-US ] = "Chart Floor" ;
};
+String STR_OBJECT_SHAPE
+{
+ Text [ en-US ] = "Drawing Object" ;
+};
+
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
diff --git a/chart2/source/controller/dialogs/Strings_AdditionalControls.src b/chart2/source/controller/dialogs/Strings_AdditionalControls.src
index 0da80dd482d2..f233ddaa7c20 100644
--- a/chart2/source/controller/dialogs/Strings_AdditionalControls.src
+++ b/chart2/source/controller/dialogs/Strings_AdditionalControls.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Strings_AdditionalControls.src,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/Strings_ChartTypes.src b/chart2/source/controller/dialogs/Strings_ChartTypes.src
index f2731b2971c2..6c7fc5a752aa 100644
--- a/chart2/source/controller/dialogs/Strings_ChartTypes.src
+++ b/chart2/source/controller/dialogs/Strings_ChartTypes.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Strings_ChartTypes.src,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/Strings_Scale.src b/chart2/source/controller/dialogs/Strings_Scale.src
index b1234548b43d..e7a3d6c2b1cf 100644
--- a/chart2/source/controller/dialogs/Strings_Scale.src
+++ b/chart2/source/controller/dialogs/Strings_Scale.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Strings_Scale.src,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/Strings_Statistic.src b/chart2/source/controller/dialogs/Strings_Statistic.src
index 9f6572c6ae82..f2dc4235f783 100644
--- a/chart2/source/controller/dialogs/Strings_Statistic.src
+++ b/chart2/source/controller/dialogs/Strings_Statistic.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Strings_Statistic.src,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/TabPages.hrc b/chart2/source/controller/dialogs/TabPages.hrc
index 8c92c062ad14..ba9a330b250e 100644
--- a/chart2/source/controller/dialogs/TabPages.hrc
+++ b/chart2/source/controller/dialogs/TabPages.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TabPages.hrc,v $
- * $Revision: 1.7.20.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/TextDirectionListBox.cxx b/chart2/source/controller/dialogs/TextDirectionListBox.cxx
index f049f77ee312..23a1b4e806bd 100644
--- a/chart2/source/controller/dialogs/TextDirectionListBox.cxx
+++ b/chart2/source/controller/dialogs/TextDirectionListBox.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TextDirectionListBox.cxx,v $
- * $Revision: 1.1.2.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx b/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
index 54d520eef94d..f1af209697cc 100644
--- a/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
+++ b/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TimerTriggeredControllerLock.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx b/chart2/source/controller/dialogs/TitleDialogData.cxx
index 4f5418df04cc..8846b310cde4 100644
--- a/chart2/source/controller/dialogs/TitleDialogData.cxx
+++ b/chart2/source/controller/dialogs/TitleDialogData.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TitleDialogData.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx
index 74e112132d87..f446c52ac0de 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_ChartType.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.hrc b/chart2/source/controller/dialogs/dlg_ChartType.hrc
index 2c7af5c390ab..0b5c20dae05c 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType.hrc
+++ b/chart2/source/controller/dialogs/dlg_ChartType.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_ChartType.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.src b/chart2/source/controller/dialogs/dlg_ChartType.src
index 819462716bb6..5523ad8956db 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType.src
+++ b/chart2/source/controller/dialogs/dlg_ChartType.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_ChartType.src,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
index 4cbc53bf453f..aa9db2cdbbe4 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_ChartType_UNO.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index 3c38eb4288a3..5b82e57f7044 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_CreationWizard.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.hrc b/chart2/source/controller/dialogs/dlg_CreationWizard.hrc
index 832a49329765..48fa33484be8 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.hrc
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_CreationWizard.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.src b/chart2/source/controller/dialogs/dlg_CreationWizard.src
index 88caf15874c5..90fe0e2993ed 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.src
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_CreationWizard.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index c28e0265d983..f9c25f94f7f3 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_CreationWizard_UNO.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index d433aaff4cb3..f1d441921a6a 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_DataEditor.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -147,34 +144,22 @@ IMPL_LINK( DataEditor, ToolboxHdl, void *, EMPTYARG )
break;
case TBI_DATA_INSERT_COL:
m_apBrwData->InsertColumn();
-// ImplAdjustHeaderControls( true /* bRefreshFromModel */ );
+ break;
+ case TBI_DATA_INSERT_TEXT_COL:
+ m_apBrwData->InsertTextColumn();
break;
case TBI_DATA_DELETE_ROW:
m_apBrwData->RemoveRow();
break;
case TBI_DATA_DELETE_COL:
m_apBrwData->RemoveColumn();
-// ImplAdjustHeaderControls( true /* bRefreshFromModel */ );
break;
case TBI_DATA_SWAP_COL :
m_apBrwData->SwapColumn ();
-// ImplAdjustHeaderControls( true /* bRefreshFromModel */ );
break;
case TBI_DATA_SWAP_ROW :
m_apBrwData->SwapRow ();
break;
-// case TBI_DATA_SORT_COL :
-// m_apBrwData->QuickSortCol();
-// break;
-// case TBI_DATA_SORT_ROW :
-// m_apBrwData->QuickSortRow();
-// break;
-// case TBI_DATA_SORT_TABLE_COL :
-// m_apBrwData->QuickSortTableCols ();
-// break;
-// case TBI_DATA_SORT_TABLE_ROW :
-// m_apBrwData->QuickSortTableRows ();
-// break;
}
return 0;
@@ -186,27 +171,16 @@ IMPL_LINK( DataEditor, BrowserCursorMovedHdl, void *, EMPTYARG )
if( m_bReadOnly )
return 0;
- if( m_apBrwData->IsEnableItem() )
- {
- m_aTbxData.EnableItem( TBI_DATA_INSERT_ROW, m_apBrwData->MayInsertRow() );
- m_aTbxData.EnableItem( TBI_DATA_INSERT_COL, m_apBrwData->MayInsertColumn() );
- m_aTbxData.EnableItem( TBI_DATA_DELETE_ROW, m_apBrwData->MayDeleteRow() );
- m_aTbxData.EnableItem( TBI_DATA_DELETE_COL, m_apBrwData->MayDeleteColumn() );
+ bool bIsDataValid = m_apBrwData->IsEnableItem();
- m_aTbxData.EnableItem( TBI_DATA_SWAP_COL, m_apBrwData->MaySwapColumns() );
- m_aTbxData.EnableItem( TBI_DATA_SWAP_ROW, m_apBrwData->MaySwapRows() );
- }
- else
- {
- m_aTbxData.EnableItem( TBI_DATA_INSERT_ROW, FALSE );
- m_aTbxData.EnableItem( TBI_DATA_INSERT_COL, FALSE );
- m_aTbxData.EnableItem( TBI_DATA_SWAP_COL, FALSE );
- m_aTbxData.EnableItem( TBI_DATA_SWAP_ROW, FALSE );
- }
-// m_aTbxData.EnableItem( TBI_DATA_SORT_COL, m_apBrwData->MaySortColumn() );
-// m_aTbxData.EnableItem( TBI_DATA_SORT_ROW, m_apBrwData->MaySortRow() );
-// m_aTbxData.EnableItem( TBI_DATA_SORT_TABLE_COL, m_apBrwData->MaySortColumn() );
-// m_aTbxData.EnableItem( TBI_DATA_SORT_TABLE_ROW, m_apBrwData->MaySortRow() );
+ m_aTbxData.EnableItem( TBI_DATA_INSERT_ROW, bIsDataValid && m_apBrwData->MayInsertRow() );
+ m_aTbxData.EnableItem( TBI_DATA_INSERT_COL, bIsDataValid && m_apBrwData->MayInsertColumn() );
+ m_aTbxData.EnableItem( TBI_DATA_INSERT_TEXT_COL, bIsDataValid && m_apBrwData->MayInsertColumn() );
+ m_aTbxData.EnableItem( TBI_DATA_DELETE_ROW, m_apBrwData->MayDeleteRow() );
+ m_aTbxData.EnableItem( TBI_DATA_DELETE_COL, m_apBrwData->MayDeleteColumn() );
+
+ m_aTbxData.EnableItem( TBI_DATA_SWAP_COL, bIsDataValid && m_apBrwData->MaySwapColumns() );
+ m_aTbxData.EnableItem( TBI_DATA_SWAP_ROW, bIsDataValid && m_apBrwData->MaySwapRows() );
return 0;
}
@@ -219,14 +193,11 @@ void DataEditor::SetReadOnly( bool bReadOnly )
{
m_aTbxData.EnableItem( TBI_DATA_INSERT_ROW, FALSE );
m_aTbxData.EnableItem( TBI_DATA_INSERT_COL, FALSE );
+ m_aTbxData.EnableItem( TBI_DATA_INSERT_TEXT_COL, FALSE );
m_aTbxData.EnableItem( TBI_DATA_DELETE_ROW, FALSE );
m_aTbxData.EnableItem( TBI_DATA_DELETE_COL, FALSE );
m_aTbxData.EnableItem( TBI_DATA_SWAP_COL, FALSE );
m_aTbxData.EnableItem( TBI_DATA_SWAP_ROW, FALSE );
-// m_aTbxData.EnableItem( TBI_DATA_SORT_COL, FALSE );
-// m_aTbxData.EnableItem( TBI_DATA_SORT_ROW, FALSE );
-// m_aTbxData.EnableItem( TBI_DATA_SORT_TABLE_ROW, FALSE );
-// m_aTbxData.EnableItem( TBI_DATA_SORT_TABLE_COL, FALSE );
}
m_apBrwData->SetReadOnly( m_bReadOnly );
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.hrc b/chart2/source/controller/dialogs/dlg_DataEditor.hrc
index 4ce4433fe7fd..d2675c5bb29e 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.hrc
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_DataEditor.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,19 +33,14 @@
#define CTL_DATA 1
// images for toolbox image list
+//the numbers correspond to the icon names: default_images\chart2\res\dataeditor_icon_xy
#define TBI_DATA_INSERT_ROW 1
#define TBI_DATA_INSERT_COL 2
#define TBI_DATA_DELETE_ROW 3
#define TBI_DATA_DELETE_COL 4
#define TBI_DATA_SWAP_COL 5
#define TBI_DATA_SWAP_ROW 6
-#define TBI_DATA_TRANSFER 7
-
-// #define TBI_DATA_SORT_ROW 7
-// #define TBI_DATA_SORT_COL 8
-// #define TBI_DATA_SORT_TABLE_ROW 9
-// #define TBI_DATA_SORT_TABLE_COL 10
-// #define TBI_DATA_TRANSFER 11
+#define TBI_DATA_INSERT_TEXT_COL 7
// image lists (normal and high-contrast) for toolbox
#define IL_DIAGRAM_DATA 1
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.src b/chart2/source/controller/dialogs/dlg_DataEditor.src
index 116757475bbb..dadd1ac3098d 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.src
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_DataEditor.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -83,6 +80,12 @@ ModalDialog DLG_DIAGRAM_DATA
};
ToolBoxItem
{
+ HelpID = HID_SCH_TBI_DATA_INSERT_TEXT_COL ;
+ Identifier = TBI_DATA_INSERT_TEXT_COL ;
+ Text [ en-US ] = "Insert Text Column" ;
+ };
+ ToolBoxItem
+ {
HelpID = HID_SCH_TBI_DATA_DELETE_ROW ;
Identifier = TBI_DATA_DELETE_ROW ;
Text [ en-US ] = "Delete Row" ;
@@ -121,11 +124,11 @@ ModalDialog DLG_DIAGRAM_DATA
{ \
TBI_DATA_INSERT_ROW; \
TBI_DATA_INSERT_COL; \
+ TBI_DATA_INSERT_TEXT_COL; \
TBI_DATA_DELETE_ROW; \
TBI_DATA_DELETE_COL; \
TBI_DATA_SWAP_COL; \
TBI_DATA_SWAP_ROW; \
- TBI_DATA_TRANSFER; \
}; \
IdCount = { 7; }
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx
index 1aa7db1f0f17..9469293ae1c5 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_DataSource.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.hrc b/chart2/source/controller/dialogs/dlg_DataSource.hrc
index c1386c706a08..b8c5ff96bb33 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.hrc
+++ b/chart2/source/controller/dialogs/dlg_DataSource.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_DataSource.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.src b/chart2/source/controller/dialogs/dlg_DataSource.src
index ecf87eb49f35..08427a4e271b 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.src
+++ b/chart2/source/controller/dialogs/dlg_DataSource.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_DataSource.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
index 859465e3fd0d..e97f15898064 100644
--- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertAxis_Grid.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.hrc b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.hrc
index 083e2593717e..d069e893116c 100644
--- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.hrc
+++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertAxis_Grid.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src
index 55643f40a54c..11eec47d0996 100644
--- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src
+++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertAxis_Grid.src,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx b/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx
index d7eb3357e6e8..2105b0bb2c87 100644
--- a/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertDataLabel.cxx,v $
- * $Revision: 1.10.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertDataLabel.hrc b/chart2/source/controller/dialogs/dlg_InsertDataLabel.hrc
index a6ac7c164c73..92f67309d6fc 100644
--- a/chart2/source/controller/dialogs/dlg_InsertDataLabel.hrc
+++ b/chart2/source/controller/dialogs/dlg_InsertDataLabel.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertDataLabel.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertDataLabel.src b/chart2/source/controller/dialogs/dlg_InsertDataLabel.src
index 091628a2c73e..8f8a64485778 100644
--- a/chart2/source/controller/dialogs/dlg_InsertDataLabel.src
+++ b/chart2/source/controller/dialogs/dlg_InsertDataLabel.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertDataLabel.src,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
index 535b07a7df38..9c4438b6f1ca 100644
--- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertErrorBars.cxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.hrc b/chart2/source/controller/dialogs/dlg_InsertErrorBars.hrc
index c545ad60edfd..2adeccb29d80 100644
--- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.hrc
+++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertErrorBars.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.src b/chart2/source/controller/dialogs/dlg_InsertErrorBars.src
index b83103ee54ae..08230207b007 100644
--- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.src
+++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertErrorBars.src,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertLegend.cxx b/chart2/source/controller/dialogs/dlg_InsertLegend.cxx
index 036ad921679d..e722ede09c5a 100644
--- a/chart2/source/controller/dialogs/dlg_InsertLegend.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertLegend.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertLegend.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertLegend.hrc b/chart2/source/controller/dialogs/dlg_InsertLegend.hrc
index 723b1c0d3fda..2adeccb29d80 100644
--- a/chart2/source/controller/dialogs/dlg_InsertLegend.hrc
+++ b/chart2/source/controller/dialogs/dlg_InsertLegend.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertLegend.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertLegend.src b/chart2/source/controller/dialogs/dlg_InsertLegend.src
index 263c37a1df33..9e957b4b203b 100644
--- a/chart2/source/controller/dialogs/dlg_InsertLegend.src
+++ b/chart2/source/controller/dialogs/dlg_InsertLegend.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertLegend.src,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertTitle.cxx b/chart2/source/controller/dialogs/dlg_InsertTitle.cxx
index 22fddfe29afb..bd98774c57a8 100644
--- a/chart2/source/controller/dialogs/dlg_InsertTitle.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertTitle.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertTitle.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertTitle.hrc b/chart2/source/controller/dialogs/dlg_InsertTitle.hrc
index effbc246ca9f..fc46db129b5b 100644
--- a/chart2/source/controller/dialogs/dlg_InsertTitle.hrc
+++ b/chart2/source/controller/dialogs/dlg_InsertTitle.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertTitle.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertTitle.src b/chart2/source/controller/dialogs/dlg_InsertTitle.src
index 626d0b7ec481..f84ff2c6acd7 100644
--- a/chart2/source/controller/dialogs/dlg_InsertTitle.src
+++ b/chart2/source/controller/dialogs/dlg_InsertTitle.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertTitle.src,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertTrendline.cxx b/chart2/source/controller/dialogs/dlg_InsertTrendline.cxx
index 042baa292f65..58b29b4bdfe3 100644
--- a/chart2/source/controller/dialogs/dlg_InsertTrendline.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertTrendline.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertTrendline.cxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertTrendline.hrc b/chart2/source/controller/dialogs/dlg_InsertTrendline.hrc
index cb9de59a5cbb..2adeccb29d80 100644
--- a/chart2/source/controller/dialogs/dlg_InsertTrendline.hrc
+++ b/chart2/source/controller/dialogs/dlg_InsertTrendline.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertTrendline.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_InsertTrendline.src b/chart2/source/controller/dialogs/dlg_InsertTrendline.src
index 002e769a1037..54c490d4a2d1 100644
--- a/chart2/source/controller/dialogs/dlg_InsertTrendline.src
+++ b/chart2/source/controller/dialogs/dlg_InsertTrendline.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertTrendline.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
index 184214d3c5b0..bf0dedfbc6e8 100644
--- a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
+++ b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_NumberFormat.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.hxx b/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
index 5f42cc468771..96cfb23c1f95 100644
--- a/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
+++ b/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_NumberFormat.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index ec8a0eaaa784..2a41d35313e8 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_ObjectProperties.cxx,v $
- * $Revision: 1.23.42.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -76,7 +73,7 @@
#include <svx/svxgrahicitem.hxx>
#include <svx/dialogs.hrc>
-#include <svx/flstitem.hxx>
+#include <editeng/flstitem.hxx>
#include <svx/tabline.hxx>
#include <svx/flagsdef.hxx>
@@ -207,7 +204,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
ScaleData aScale( xCrossingMainAxis->getScaleData() );
m_bIsCrossingAxisIsCategoryAxis = ( chart2::AxisType::CATEGORY == aScale.AxisType );
if( m_bIsCrossingAxisIsCategoryAxis )
- m_aCategories = DiagramHelper::generateAutomaticCategories( Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY) );
+ m_aCategories = DiagramHelper::getExplicitSimpleCategories( Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY) );
}
}
}
@@ -491,6 +488,8 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
SchAlignmentTabPage::CreateWithoutRotation can be deleted. */
AddTabPage(TP_ALIGNMENT, String(SchResId(STR_PAGE_ALIGNMENT)), SchAlignmentTabPage::CreateWithoutRotation, NULL);
break;
+ default:
+ break;
}
// used to find out if user left the dialog with OK. When OK is pressed but
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.src b/chart2/source/controller/dialogs/dlg_ObjectProperties.src
index 487a5d59271c..9eae934ce6df 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.src
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_ObjectProperties.src,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx
new file mode 100644
index 000000000000..280a1adecba2
--- /dev/null
+++ b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "dlg_ShapeFont.hxx"
+#include "ViewElementListProvider.hxx"
+#include "ResId.hxx"
+#include "ResourceIds.hrc"
+
+#include <svl/intitem.hxx>
+#include <sfx2/objsh.hxx>
+#include <svx/dialogs.hrc>
+#include <svx/flagsdef.hxx>
+#include <editeng/flstitem.hxx>
+
+using ::com::sun::star::uno::Reference;
+using namespace ::com::sun::star;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+ShapeFontDialog::ShapeFontDialog( Window* pParent, const SfxItemSet* pAttr,
+ const ViewElementListProvider* pViewElementListProvider )
+ :SfxTabDialog( pParent, SchResId( DLG_SHAPE_FONT ), pAttr )
+ ,m_pViewElementListProvider( pViewElementListProvider )
+{
+ FreeResource();
+
+ AddTabPage( RID_SVXPAGE_CHAR_NAME );
+ AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
+ AddTabPage( RID_SVXPAGE_CHAR_POSITION );
+}
+
+ShapeFontDialog::~ShapeFontDialog()
+{
+}
+
+void ShapeFontDialog::PageCreated( USHORT nId, SfxTabPage& rPage )
+{
+ SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
+ switch ( nId )
+ {
+ case RID_SVXPAGE_CHAR_NAME:
+ {
+ aSet.Put( SvxFontListItem( m_pViewElementListProvider->getFontList(), SID_ATTR_CHAR_FONTLIST ) );
+ rPage.PageCreated( aSet );
+ }
+ break;
+ case RID_SVXPAGE_CHAR_EFFECTS:
+ {
+ aSet.Put( SfxUInt16Item( SID_DISABLE_CTL, DISABLE_CASEMAP ) );
+ rPage.PageCreated( aSet );
+ }
+ break;
+ default:
+ {
+ }
+ break;
+ }
+}
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
diff --git a/chart2/source/controller/dialogs/dlg_ShapeFont.src b/chart2/source/controller/dialogs/dlg_ShapeFont.src
new file mode 100644
index 000000000000..2065bd940988
--- /dev/null
+++ b/chart2/source/controller/dialogs/dlg_ShapeFont.src
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "ResourceIds.hrc"
+#include <svx/dialogs.hrc>
+
+TabDialog DLG_SHAPE_FONT
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 289 , 176 ) ;
+ Text [ en-US ] = "Character" ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ TabControl 1
+ {
+ OutputSize = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 3 ) ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_CHAR_NAME ;
+ Text [ en-US ] = "Font";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_CHAR_EFFECTS ;
+ Text [ en-US ] = "Font Effects";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_CHAR_POSITION ;
+ Text [ en-US ] = "Font Position";
+ };
+ };
+ };
+};
diff --git a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
new file mode 100644
index 000000000000..2f0173fc8408
--- /dev/null
+++ b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "dlg_ShapeParagraph.hxx"
+#include "ResId.hxx"
+#include "ResourceIds.hrc"
+
+#include <svl/cjkoptions.hxx>
+#include <svl/intitem.hxx>
+#include <svx/dialogs.hrc>
+#include <svx/flagsdef.hxx>
+
+using ::com::sun::star::uno::Reference;
+using namespace ::com::sun::star;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+ShapeParagraphDialog::ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr )
+ :SfxTabDialog( pParent, SchResId( DLG_SHAPE_PARAGRAPH ), pAttr )
+{
+ FreeResource();
+
+ SvtCJKOptions aCJKOptions;
+
+ AddTabPage( RID_SVXPAGE_STD_PARAGRAPH );
+ AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );
+ if ( aCJKOptions.IsAsianTypographyEnabled() )
+ {
+ AddTabPage( RID_SVXPAGE_PARA_ASIAN );
+ }
+ else
+ {
+ RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
+ }
+ AddTabPage( RID_SVXPAGE_TABULATOR );
+}
+
+ShapeParagraphDialog::~ShapeParagraphDialog()
+{
+}
+
+void ShapeParagraphDialog::PageCreated( USHORT nId, SfxTabPage& rPage )
+{
+ SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
+ switch ( nId )
+ {
+ case RID_SVXPAGE_TABULATOR:
+ {
+ aSet.Put( SfxUInt16Item( SID_SVXTABULATORTABPAGE_CONTROLFLAGS,
+ ( TABTYPE_ALL &~TABTYPE_LEFT ) | ( TABFILL_ALL &~TABFILL_NONE ) ) );
+ rPage.PageCreated( aSet );
+ }
+ break;
+ default:
+ {
+ }
+ break;
+ }
+}
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
diff --git a/chart2/source/controller/dialogs/dlg_ShapeParagraph.src b/chart2/source/controller/dialogs/dlg_ShapeParagraph.src
new file mode 100644
index 000000000000..ff74fc1eef80
--- /dev/null
+++ b/chart2/source/controller/dialogs/dlg_ShapeParagraph.src
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "ResourceIds.hrc"
+#include <svx/dialogs.hrc>
+
+TabDialog DLG_SHAPE_PARAGRAPH
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 289 , 176 ) ;
+ Text [ en-US ] = "Paragraph" ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ TabControl 1
+ {
+ OutputSize = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 3 ) ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_STD_PARAGRAPH ;
+ Text [ en-US ] = "Indents & Spacing";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_ALIGN_PARAGRAPH ;
+ Text [ en-US ] = "Alignment";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_PARA_ASIAN ;
+ Text [ en-US ] = "Asian Typography";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_TABULATOR ;
+ Text [ en-US ] = "Tab";
+ };
+ };
+ };
+};
diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx
index 75a7917ad3dc..26a726ac5156 100644
--- a/chart2/source/controller/dialogs/dlg_View3D.cxx
+++ b/chart2/source/controller/dialogs/dlg_View3D.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_View3D.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_View3D.hrc b/chart2/source/controller/dialogs/dlg_View3D.hrc
index d91d075dd2c7..59564a97b8b8 100644
--- a/chart2/source/controller/dialogs/dlg_View3D.hrc
+++ b/chart2/source/controller/dialogs/dlg_View3D.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_View3D.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/dlg_View3D.src b/chart2/source/controller/dialogs/dlg_View3D.src
index 96bff67ad945..5b1802ecfb3d 100644
--- a/chart2/source/controller/dialogs/dlg_View3D.src
+++ b/chart2/source/controller/dialogs/dlg_View3D.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_View3D.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/hidother.src b/chart2/source/controller/dialogs/hidother.src
index 4f409d14094b..4b006f0f1f93 100644
--- a/chart2/source/controller/dialogs/hidother.src
+++ b/chart2/source/controller/dialogs/hidother.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hidother.src,v $
- * $Revision: 1.7.56.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/makefile.mk b/chart2/source/controller/dialogs/makefile.mk
index 6b64f2cae8db..d22f5c83b081 100644
--- a/chart2/source/controller/dialogs/makefile.mk
+++ b/chart2/source/controller/dialogs/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.19.72.1 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -102,6 +98,8 @@ SLOFILES= \
$(SLO)$/dlg_ChartType_UNO.obj \
$(SLO)$/dlg_ChartType.obj \
$(SLO)$/dlg_NumberFormat.obj \
+ $(SLO)$/dlg_ShapeFont.obj \
+ $(SLO)$/dlg_ShapeParagraph.obj \
$(SLO)$/RangeSelectionButton.obj \
$(SLO)$/RangeSelectionHelper.obj \
$(SLO)$/RangeSelectionListener.obj \
@@ -154,7 +152,9 @@ SRC1FILES= \
dlg_InsertErrorBars.src \
dlg_InsertTitle.src \
dlg_ChartType.src \
- dlg_CreationWizard.src
+ dlg_CreationWizard.src \
+ dlg_ShapeFont.src \
+ dlg_ShapeParagraph.src
SRS1NAME=$(TARGET)
diff --git a/chart2/source/controller/dialogs/res_BarGeometry.cxx b/chart2/source/controller/dialogs/res_BarGeometry.cxx
index a98ce3833e56..f2c31fe461a9 100644
--- a/chart2/source/controller/dialogs/res_BarGeometry.cxx
+++ b/chart2/source/controller/dialogs/res_BarGeometry.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_BarGeometry.cxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_BarGeometry.hxx b/chart2/source/controller/dialogs/res_BarGeometry.hxx
index 8bf2d81259a3..db2f71e2f178 100644
--- a/chart2/source/controller/dialogs/res_BarGeometry.hxx
+++ b/chart2/source/controller/dialogs/res_BarGeometry.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_BarGeometry.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_BarGeometry.src b/chart2/source/controller/dialogs/res_BarGeometry.src
index a36087b2039d..ea481070132d 100644
--- a/chart2/source/controller/dialogs/res_BarGeometry.src
+++ b/chart2/source/controller/dialogs/res_BarGeometry.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_BarGeometry.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index 44fd27f7d09a..25d279eaad37 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_DataLabel.cxx,v $
- * $Revision: 1.5.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -49,8 +46,8 @@
#include <svl/stritem.hxx>
//SfxIntegerListItem
#include <svl/ilstitem.hxx>
-#include <svx/eeitem.hxx>
-#include <svx/frmdiritem.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/frmdiritem.hxx>
// header for define RET_OK
#include <vcl/msgbox.hxx>
diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx b/chart2/source/controller/dialogs/res_DataLabel.hxx
index 9d887f7fbc33..ef34e004bb07 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.hxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_DataLabel.hxx,v $
- * $Revision: 1.5.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_DataLabel_IDs.hrc b/chart2/source/controller/dialogs/res_DataLabel_IDs.hrc
index 31112bdc3340..5251841a2d9b 100644
--- a/chart2/source/controller/dialogs/res_DataLabel_IDs.hrc
+++ b/chart2/source/controller/dialogs/res_DataLabel_IDs.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_DataLabel_IDs.hrc,v $
- * $Revision: 1.5.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc b/chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc
index bc21882dd841..9501368f537e 100644
--- a/chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc
+++ b/chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_DataLabel_tmpl.hrc,v $
- * $Revision: 1.11.20.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index 1f17fe39a9c0..75457a5e7cad 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_ErrorBar.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_ErrorBar_IDs.hrc b/chart2/source/controller/dialogs/res_ErrorBar_IDs.hrc
index 8bac3e9c9e87..bab1051208f4 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar_IDs.hrc
+++ b/chart2/source/controller/dialogs/res_ErrorBar_IDs.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_ErrorBar_IDs.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_ErrorBar_tmpl.hrc b/chart2/source/controller/dialogs/res_ErrorBar_tmpl.hrc
index 6372f3000571..0f4cf70e30c7 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar_tmpl.hrc
+++ b/chart2/source/controller/dialogs/res_ErrorBar_tmpl.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_ErrorBar_tmpl.hrc,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 4bbe7344c78d..c9206a5428df 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_LegendPosition.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.hxx b/chart2/source/controller/dialogs/res_LegendPosition.hxx
index 81d30eb7b294..ee0ac5a7601c 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.hxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_LegendPosition.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_LegendPosition_IDs.hrc b/chart2/source/controller/dialogs/res_LegendPosition_IDs.hrc
index a6ebfed27028..4dd46e0c9df7 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition_IDs.hrc
+++ b/chart2/source/controller/dialogs/res_LegendPosition_IDs.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_LegendPosition_IDs.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc b/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc
index b0f056763f55..4218b322a948 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc
+++ b/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_LegendPosition_tmpl.hrc,v $
- * $Revision: 1.7.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_SecondaryAxisCheckBoxes_tmpl.hrc b/chart2/source/controller/dialogs/res_SecondaryAxisCheckBoxes_tmpl.hrc
index 9d7d0e23fd02..7e9609e20763 100644
--- a/chart2/source/controller/dialogs/res_SecondaryAxisCheckBoxes_tmpl.hrc
+++ b/chart2/source/controller/dialogs/res_SecondaryAxisCheckBoxes_tmpl.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_SecondaryAxisCheckBoxes_tmpl.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_TextSeparator.cxx b/chart2/source/controller/dialogs/res_TextSeparator.cxx
index 298499ed39d9..45efd2f5e5b3 100644
--- a/chart2/source/controller/dialogs/res_TextSeparator.cxx
+++ b/chart2/source/controller/dialogs/res_TextSeparator.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_TextSeparator.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_TextSeparator.hxx b/chart2/source/controller/dialogs/res_TextSeparator.hxx
index fb8365206fb5..4895a442fa0b 100644
--- a/chart2/source/controller/dialogs/res_TextSeparator.hxx
+++ b/chart2/source/controller/dialogs/res_TextSeparator.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_TextSeparator.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_TextSeparator.src b/chart2/source/controller/dialogs/res_TextSeparator.src
index b3616f225a3f..c0b95ea23c7d 100644
--- a/chart2/source/controller/dialogs/res_TextSeparator.src
+++ b/chart2/source/controller/dialogs/res_TextSeparator.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_TextSeparator.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_Titles.cxx b/chart2/source/controller/dialogs/res_Titles.cxx
index 1ac0e4338b72..225c8fe8748b 100644
--- a/chart2/source/controller/dialogs/res_Titles.cxx
+++ b/chart2/source/controller/dialogs/res_Titles.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_Titles.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_Titles.hrc b/chart2/source/controller/dialogs/res_Titles.hrc
index 7bc3f83685bb..c66aac02014c 100644
--- a/chart2/source/controller/dialogs/res_Titles.hrc
+++ b/chart2/source/controller/dialogs/res_Titles.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_Titles.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_Titles.hxx b/chart2/source/controller/dialogs/res_Titles.hxx
index 63771b821ca1..c79550dd7be1 100644
--- a/chart2/source/controller/dialogs/res_Titles.hxx
+++ b/chart2/source/controller/dialogs/res_Titles.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_Titles.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_Titlesx_tmpl.hrc b/chart2/source/controller/dialogs/res_Titlesx_tmpl.hrc
index 8e305cd95c21..c64c71d78c21 100644
--- a/chart2/source/controller/dialogs/res_Titlesx_tmpl.hrc
+++ b/chart2/source/controller/dialogs/res_Titlesx_tmpl.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_Titlesx_tmpl.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx
index b53df44463a6..a395d32c2efa 100644
--- a/chart2/source/controller/dialogs/res_Trendline.cxx
+++ b/chart2/source/controller/dialogs/res_Trendline.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_Trendline.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_Trendline.hxx b/chart2/source/controller/dialogs/res_Trendline.hxx
index 181341f5c55e..248a677edd21 100644
--- a/chart2/source/controller/dialogs/res_Trendline.hxx
+++ b/chart2/source/controller/dialogs/res_Trendline.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_Trendline.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_Trendline_IDs.hrc b/chart2/source/controller/dialogs/res_Trendline_IDs.hrc
index 4bb318bfa7ee..0e857742af4e 100644
--- a/chart2/source/controller/dialogs/res_Trendline_IDs.hrc
+++ b/chart2/source/controller/dialogs/res_Trendline_IDs.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_Trendline_IDs.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/res_Trendline_tmpl.hrc b/chart2/source/controller/dialogs/res_Trendline_tmpl.hrc
index 45fc55435594..734384e200d8 100644
--- a/chart2/source/controller/dialogs/res_Trendline_tmpl.hrc
+++ b/chart2/source/controller/dialogs/res_Trendline_tmpl.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_Trendline_tmpl.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
index 61911a23dc3d..6b3b63495126 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_3D_SceneAppearance.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hrc b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hrc
index 7c2344768f46..e01be1c35072 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hrc
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_3D_SceneAppearance.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
index 72ef5f99a500..252c5c21669b 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_3D_SceneAppearance.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.src b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.src
index b42db4745425..df202410109d 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.src
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_3D_SceneAppearance.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
index dbed68f2417b..39175695a48b 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
@@ -2,14 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_3D_SceneGeometry.cxx,v $
- *
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,7 +38,7 @@
#include "ChartTypeHelper.hxx"
#include "ThreeDHelper.hxx"
#include <rtl/math.hxx>
-#include <svx/unoprnms.hxx>
+#include <editeng/unoprnms.hxx>
#include <com/sun/star/drawing/ProjectionMode.hpp>
//.............................................................................
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hrc b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hrc
index 5f1892de2885..e84bc84012e9 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hrc
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_3D_SceneGeometry.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
index 2b56f9fcc490..95aeb7f6a02a 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_3D_SceneGeometry.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.src b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.src
index 76b2005e4963..329eb25e0e51 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.src
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_3D_SceneGeometry.src,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index fc01dc881fc3..25b379481b7e 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_3D_SceneIllumination.cxx,v $
- * $Revision: 1.4.68.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc
index cf8d6f562371..e2d031955867 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_3D_SceneIllumination.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
index 64607a4cad63..8c104187797e 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_3D_SceneIllumination.hxx,v $
- * $Revision: 1.3.68.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.src b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.src
index d2919b9078ca..57f15a1894d7 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.src
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_3D_SceneIllumination.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index a7407b4781ee..3dcaa3092e57 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_AxisLabel.cxx,v $
- * $Revision: 1.10.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,8 +39,8 @@
// header for SfxInt32Item
#include <svl/intitem.hxx>
-#include <svx/eeitem.hxx>
-#include <svx/frmdiritem.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/frmdiritem.hxx>
//.............................................................................
namespace chart
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
index 1e0aa8e578f0..6043b16001ac 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_AxisLabel.hxx,v $
- * $Revision: 1.8.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.src b/chart2/source/controller/dialogs/tp_AxisLabel.src
index 090ef525de8f..bcba1926c242 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.src
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_AxisLabel.src,v $
- * $Revision: 1.10.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index 0b10204c54bc..ab4e36ff1f84 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_AxisPositions.cxx,v $
- * $Revision: 1.1.4.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.hxx b/chart2/source/controller/dialogs/tp_AxisPositions.hxx
index 913f1a08a2f9..0784a7854c5e 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_AxisPositions.hxx,v $
- * $Revision: 1.1.4.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.src b/chart2/source/controller/dialogs/tp_AxisPositions.src
index 1628c1afaa3f..8ce1ba39056a 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.src
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_AxisPositions.src,v $
- * $Revision: 1.1.4.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index d5f8d5d22adb..f4b314de8a40 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_ChartType.cxx,v $
- * $Revision: 1.8.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_ChartType.hrc b/chart2/source/controller/dialogs/tp_ChartType.hrc
index 073c2547f09a..dc017f836dc7 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.hrc
+++ b/chart2/source/controller/dialogs/tp_ChartType.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_ChartType.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx
index 878c845eb84c..233d9ee910c6 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.hxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_ChartType.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_ChartType.src b/chart2/source/controller/dialogs/tp_ChartType.src
index ee8df4cad389..a9bb2a039f3c 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.src
+++ b/chart2/source/controller/dialogs/tp_ChartType.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_ChartType.src,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_DataLabel.cxx b/chart2/source/controller/dialogs/tp_DataLabel.cxx
index 2da9778a4db8..909c263ba83b 100644
--- a/chart2/source/controller/dialogs/tp_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_DataLabel.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_DataLabel.cxx,v $
- * $Revision: 1.9.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_DataLabel.hxx b/chart2/source/controller/dialogs/tp_DataLabel.hxx
index 9e5bd968154d..25bdf977ef0e 100644
--- a/chart2/source/controller/dialogs/tp_DataLabel.hxx
+++ b/chart2/source/controller/dialogs/tp_DataLabel.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_DataLabel.hxx,v $
- * $Revision: 1.5.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_DataLabel.src b/chart2/source/controller/dialogs/tp_DataLabel.src
index 32f5835295f7..615e81c2c550 100644
--- a/chart2/source/controller/dialogs/tp_DataLabel.src
+++ b/chart2/source/controller/dialogs/tp_DataLabel.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_DataLabel.src,v $
- * $Revision: 1.4.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index ff858c5bfdf5..10f0421d4013 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_DataSource.cxx,v $
- * $Revision: 1.5.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hrc b/chart2/source/controller/dialogs/tp_DataSource.hrc
index 53509379b1c5..cf8147d5f775 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hrc
+++ b/chart2/source/controller/dialogs/tp_DataSource.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_DataSource.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx
index 6c42f1cb98e2..44ffa2b3cdf2 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_DataSource.hxx,v $
- * $Revision: 1.4.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_DataSource.src b/chart2/source/controller/dialogs/tp_DataSource.src
index 4d404b37f8b2..3e1f8a51c68a 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.src
+++ b/chart2/source/controller/dialogs/tp_DataSource.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_DataSource.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_DataSourceControls.cxx b/chart2/source/controller/dialogs/tp_DataSourceControls.cxx
index be123acacd33..b6f7ad680591 100644
--- a/chart2/source/controller/dialogs/tp_DataSourceControls.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSourceControls.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_DataSourceControls.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_DataSourceControls.hxx b/chart2/source/controller/dialogs/tp_DataSourceControls.hxx
index 6e9aaac27b67..c1ebf512911c 100644
--- a/chart2/source/controller/dialogs/tp_DataSourceControls.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSourceControls.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_DataSourceControls.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.cxx b/chart2/source/controller/dialogs/tp_ErrorBars.cxx
index 4153259e8a9f..395c956372ea 100644
--- a/chart2/source/controller/dialogs/tp_ErrorBars.cxx
+++ b/chart2/source/controller/dialogs/tp_ErrorBars.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_ErrorBars.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.hxx b/chart2/source/controller/dialogs/tp_ErrorBars.hxx
index 29f6b2cc10c4..f6d6779d34a9 100644
--- a/chart2/source/controller/dialogs/tp_ErrorBars.hxx
+++ b/chart2/source/controller/dialogs/tp_ErrorBars.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_ErrorBars.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.src b/chart2/source/controller/dialogs/tp_ErrorBars.src
index 6c3c250957ae..03748914255f 100644
--- a/chart2/source/controller/dialogs/tp_ErrorBars.src
+++ b/chart2/source/controller/dialogs/tp_ErrorBars.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_ErrorBars.src,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
index c2c0ad7e28c4..e3d23366a820 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_LegendPosition.cxx,v $
- * $Revision: 1.8.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,8 +34,8 @@
#include "chartview/ChartSfxItemIds.hxx"
#include "NoWarningThisInCTOR.hxx"
#include <svx/chrtitem.hxx>
-#include <svx/eeitem.hxx>
-#include <svx/frmdiritem.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/frmdiritem.hxx>
//.............................................................................
namespace chart
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.hxx b/chart2/source/controller/dialogs/tp_LegendPosition.hxx
index b4dcbea9f168..4c0e7ce545d7 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.hxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_LegendPosition.hxx,v $
- * $Revision: 1.5.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.src b/chart2/source/controller/dialogs/tp_LegendPosition.src
index ac1323bc5ebc..d910a5143293 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.src
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_LegendPosition.src,v $
- * $Revision: 1.6.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Location.cxx b/chart2/source/controller/dialogs/tp_Location.cxx
index cce4cd520b12..a8a4d1317be8 100644
--- a/chart2/source/controller/dialogs/tp_Location.cxx
+++ b/chart2/source/controller/dialogs/tp_Location.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Location.cxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Location.hrc b/chart2/source/controller/dialogs/tp_Location.hrc
index 995bcc6f9db7..419daa68721f 100644
--- a/chart2/source/controller/dialogs/tp_Location.hrc
+++ b/chart2/source/controller/dialogs/tp_Location.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Location.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Location.hxx b/chart2/source/controller/dialogs/tp_Location.hxx
index 8b472d2a6c92..4b5b2c24727d 100644
--- a/chart2/source/controller/dialogs/tp_Location.hxx
+++ b/chart2/source/controller/dialogs/tp_Location.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Location.hxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Location.src b/chart2/source/controller/dialogs/tp_Location.src
index 586040b11f6e..6a921103f2e4 100644
--- a/chart2/source/controller/dialogs/tp_Location.src
+++ b/chart2/source/controller/dialogs/tp_Location.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Location.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
index d5dcad1eb02d..661bae6ac326 100644
--- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_PointGeometry.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.hxx b/chart2/source/controller/dialogs/tp_PointGeometry.hxx
index 2cb30427ba44..d26ce62732eb 100644
--- a/chart2/source/controller/dialogs/tp_PointGeometry.hxx
+++ b/chart2/source/controller/dialogs/tp_PointGeometry.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_PointGeometry.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.src b/chart2/source/controller/dialogs/tp_PointGeometry.src
index ae08189b1f7d..54c591c0865d 100644
--- a/chart2/source/controller/dialogs/tp_PointGeometry.src
+++ b/chart2/source/controller/dialogs/tp_PointGeometry.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_PointGeometry.src,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
index 1681962eb5fe..9a193c028e05 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_PolarOptions.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.hrc b/chart2/source/controller/dialogs/tp_PolarOptions.hrc
index 680c9d126211..b60e50fa654e 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.hrc
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_PolarOptions.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.hxx b/chart2/source/controller/dialogs/tp_PolarOptions.hxx
index 02a5ec5ba25b..1465790c34bd 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.hxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_PolarOptions.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.src b/chart2/source/controller/dialogs/tp_PolarOptions.src
index 273c5f59dd5d..237fa027b55f 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.src
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_PolarOptions.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 8ba4d61a8057..f1e4a1e5ff64 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_RangeChooser.cxx,v $
- * $Revision: 1.5.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hrc b/chart2/source/controller/dialogs/tp_RangeChooser.hrc
index 7e39e7041013..d7b593fc4f45 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hrc
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_RangeChooser.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
index bb508da8d9a1..9a2b05628fa2 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_RangeChooser.hxx,v $
- * $Revision: 1.5.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.src b/chart2/source/controller/dialogs/tp_RangeChooser.src
index 7c88184f4559..de07c9763b7d 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.src
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_RangeChooser.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index dc2c1f156bcb..34fc0702bafe 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Scale.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx
index 2b0684854c48..8d0e02186c38 100644
--- a/chart2/source/controller/dialogs/tp_Scale.hxx
+++ b/chart2/source/controller/dialogs/tp_Scale.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Scale.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Scale.src b/chart2/source/controller/dialogs/tp_Scale.src
index 258c92b56aaa..b53adeaa512f 100644
--- a/chart2/source/controller/dialogs/tp_Scale.src
+++ b/chart2/source/controller/dialogs/tp_Scale.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Scale.src,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
index a5247e47ad1e..fbe2f4bf1907 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_SeriesToAxis.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.hrc b/chart2/source/controller/dialogs/tp_SeriesToAxis.hrc
index 2a39c313ca3c..814a148a2ef5 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.hrc
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ,v $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
index 10fcae66c1e3..63caf2885910 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_SeriesToAxis.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.src b/chart2/source/controller/dialogs/tp_SeriesToAxis.src
index 0686e45f25b3..bc434be7ef07 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.src
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_SeriesToAxis.src,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
index d04f43c7031b..5b1d5647dc6c 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_TitleRotation.cxx,v $
- * $Revision: 1.11.72.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,8 +33,8 @@
#include "TabPages.hrc"
#include "chartview/ChartSfxItemIds.hxx"
#include "HelpIds.hrc"
-#include <svx/eeitem.hxx>
-#include <svx/frmdiritem.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/frmdiritem.hxx>
// header for class SfxInt32Item
#include <svl/intitem.hxx>
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.hxx b/chart2/source/controller/dialogs/tp_TitleRotation.hxx
index fb208196480f..e02b0f29078d 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.hxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_TitleRotation.hxx,v $
- * $Revision: 1.9.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.src b/chart2/source/controller/dialogs/tp_TitleRotation.src
index 8d516c13fb0a..2ac0355d39af 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.src
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_TitleRotation.src,v $
- * $Revision: 1.10.72.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Trendline.cxx b/chart2/source/controller/dialogs/tp_Trendline.cxx
index a4f9056208c2..31b35b24a5b4 100644
--- a/chart2/source/controller/dialogs/tp_Trendline.cxx
+++ b/chart2/source/controller/dialogs/tp_Trendline.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Trendline.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Trendline.hxx b/chart2/source/controller/dialogs/tp_Trendline.hxx
index 3c2be000e293..f1c6eb5609fd 100644
--- a/chart2/source/controller/dialogs/tp_Trendline.hxx
+++ b/chart2/source/controller/dialogs/tp_Trendline.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Trendline.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Trendline.src b/chart2/source/controller/dialogs/tp_Trendline.src
index 2e7e8ec78c05..efa11d3e2d67 100644
--- a/chart2/source/controller/dialogs/tp_Trendline.src
+++ b/chart2/source/controller/dialogs/tp_Trendline.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Trendline.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
index 67957ae94a16..8c97de81dd5d 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Wizard_TitlesAndObjects.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hrc b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hrc
index 96721982bfc5..44c340139782 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hrc
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Wizard_TitlesAndObjects.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
index 517fe301039c..d6bb869c2f6d 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Wizard_TitlesAndObjects.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.src b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.src
index c8f9a5e49030..a17f5655e751 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.src
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tp_Wizard_TitlesAndObjects.src,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index fa285f98d991..fbcca6a26bde 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DrawViewWrapper.cxx,v $
- * $Revision: 1.20.6.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,6 +31,8 @@
#include "chartview/DrawModelWrapper.hxx"
#include "ConfigurationAccess.hxx"
+#include <unotools/lingucfg.hxx>
+#include <editeng/langitem.hxx>
// header for class SdrPage
#include <svx/svdpage.hxx>
//header for class SdrPageView
@@ -46,7 +45,7 @@
#include <svx/svdoutl.hxx>
// header for class SvxForbiddenCharactersTable
-#include <svx/forbiddencharacterstable.hxx>
+#include <editeng/forbiddencharacterstable.hxx>
#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
@@ -54,6 +53,7 @@
// header for class SvxShape
#include <svx/unoshape.hxx>
+#include <editeng/fhgtitem.hxx>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
@@ -165,6 +165,24 @@ DrawViewWrapper::DrawViewWrapper( SdrModel* pSdrModel, OutputDevice* pOut, bool
SetPagePaintingAllowed(bPaintPageForEditMode);
+ // #i12587# support for shapes in chart
+ SdrOutliner* pOutliner = getOutliner();
+ SfxItemPool* pOutlinerPool = ( pOutliner ? pOutliner->GetEditTextObjectPool() : NULL );
+ if ( pOutlinerPool )
+ {
+ SvtLinguConfig aLinguConfig;
+ SvtLinguOptions aLinguOptions;
+ if ( 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 ) );
+ }
+
+ // set font height without changing SdrEngineDefaults
+ pOutlinerPool->SetPoolDefaultItem( SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT ) ); // 12pt
+ }
+
ReInit();
}
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index c1ba3ed3ed6c..755058050a2d 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ViewElementListProvider.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/drawinglayer/makefile.mk b/chart2/source/controller/drawinglayer/makefile.mk
index 0293bb4b460b..ab0645e61b10 100644
--- a/chart2/source/controller/drawinglayer/makefile.mk
+++ b/chart2/source/controller/drawinglayer/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.4 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/AccessibleBase.hxx b/chart2/source/controller/inc/AccessibleBase.hxx
index c7101385da0d..ea52a29c614b 100644
--- a/chart2/source/controller/inc/AccessibleBase.hxx
+++ b/chart2/source/controller/inc/AccessibleBase.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AccessibleBase.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,6 +27,8 @@
#ifndef _CHART2_ACCESSIBLEBASE_HXX_
#define _CHART2_ACCESSIBLEBASE_HXX_
+#include "ObjectIdentifier.hxx"
+
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
@@ -53,6 +52,12 @@
class SfxItemSet;
class SdrObject;
+class SdrView;
+
+namespace accessibility
+{
+class IAccessibleViewForwarder;
+}
namespace chart
{
@@ -60,11 +65,11 @@ namespace chart
class AccessibleBase;
class ObjectHierarchy;
-typedef rtl::OUString AccessibleUniqueId;
+typedef ObjectIdentifier AccessibleUniqueId;
struct AccessibleElementInfo
{
- AccessibleUniqueId m_aCID;
+ AccessibleUniqueId m_aOID;
::com::sun::star::uno::WeakReference<
::com::sun::star::chart2::XChartDocument > m_xChartDocument;
@@ -78,6 +83,8 @@ struct AccessibleElementInfo
::boost::shared_ptr< ObjectHierarchy > m_spObjectHierarchy;
AccessibleBase * m_pParent;
+ SdrView* m_pSdrView;
+ ::accessibility::IAccessibleViewForwarder* m_pViewForwarder;
};
@@ -176,7 +183,7 @@ protected:
greater than the index of the removed element get an index one less than
before.
*/
- void RemoveChildById( const ::rtl::OUString & rId );
+ void RemoveChildByOId( const ObjectIdentifier& rOId );
/** Retrieve the pixel coordinates of logical coordinates (0,0) of the
current logic coordinate system. This can be used for
@@ -328,14 +335,14 @@ private:
/** type of the hash containing a vector index for every AccessibleUniqueId
of the object in the child list
*/
- typedef ::std::map< ::rtl::OUString, tAccessible > ChildCIDMap;
+ typedef ::std::map< ObjectIdentifier, tAccessible > ChildOIDMap;
bool m_bIsDisposed;
const bool m_bMayHaveChildren;
bool m_bChildrenInitialized;
ChildListVectorType m_aChildList;
- ChildCIDMap m_aChildCIDMap;
+ ChildOIDMap m_aChildOIDMap;
::comphelper::AccessibleEventNotifier::TClientId m_nEventNotifierId;
diff --git a/chart2/source/controller/inc/AccessibleChartView.hxx b/chart2/source/controller/inc/AccessibleChartView.hxx
index 22d5f7a41252..2cc46825a5aa 100644
--- a/chart2/source/controller/inc/AccessibleChartView.hxx
+++ b/chart2/source/controller/inc/AccessibleChartView.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AccessibleChartView.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -47,13 +44,17 @@
#include <boost/shared_ptr.hpp>
+namespace accessibility
+{
+class IAccessibleViewForwarder;
+}
+
//.............................................................................
namespace chart
{
//.............................................................................
class ExplicitValueProvider;
-class ObjectHierarchy;
namespace impl
{
@@ -70,14 +71,9 @@ class AccessibleChartView :
public:
AccessibleChartView(
const ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XComponentContext > & xContext );
+ ::com::sun::star::uno::XComponentContext >& xContext, SdrView* pView );
virtual ~AccessibleChartView();
- // ____ lang::XServiceInfo ____
- APPHELPER_XSERVICEINFO_DECL()
- APPHELPER_SERVICE_FACTORY_HELPER( AccessibleChartView )
-
-protected:
// ____ WeakComponentHelper (called from XComponent::dispose()) ____
virtual void SAL_CALL disposing();
@@ -115,6 +111,7 @@ protected:
virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen() throw (::com::sun::star::uno::RuntimeException);
+protected:
// ________ AccessibleChartElement ________
virtual ::com::sun::star::awt::Point GetUpperLeftOnScreen() const;
@@ -144,7 +141,9 @@ private: // members
::com::sun::star::accessibility::XAccessible > m_xParent;
::boost::shared_ptr< ObjectHierarchy > m_spObjectHierarchy;
- AccessibleUniqueId m_aCurrentSelectionCID;
+ AccessibleUniqueId m_aCurrentSelectionOID;
+ SdrView* m_pSdrView;
+ ::accessibility::IAccessibleViewForwarder* m_pViewForwarder;
//no default constructor
AccessibleChartView();
diff --git a/chart2/source/controller/inc/AccessibleTextHelper.hxx b/chart2/source/controller/inc/AccessibleTextHelper.hxx
index e4ee4506e2bc..66ef9338dc09 100644
--- a/chart2/source/controller/inc/AccessibleTextHelper.hxx
+++ b/chart2/source/controller/inc/AccessibleTextHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AccessibleTextHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx b/chart2/source/controller/inc/AxisItemConverter.hxx
index f4205bf4aeed..7c8f83452963 100644
--- a/chart2/source/controller/inc/AxisItemConverter.hxx
+++ b/chart2/source/controller/inc/AxisItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AxisItemConverter.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
index 8b184f5492f2..d2590c37759c 100644
--- a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
+++ b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CharacterPropertyItemConverter.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/ChartDocumentWrapper.hxx b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
index 603bf9982744..f06c502dfd6c 100644
--- a/chart2/source/controller/inc/ChartDocumentWrapper.hxx
+++ b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartDocumentWrapper.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/ChartRenderer.hxx b/chart2/source/controller/inc/ChartRenderer.hxx
index 0a2ec2cde87c..c602a6ec6630 100644
--- a/chart2/source/controller/inc/ChartRenderer.hxx
+++ b/chart2/source/controller/inc/ChartRenderer.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartRenderer.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/ConfigurationAccess.hxx b/chart2/source/controller/inc/ConfigurationAccess.hxx
index 02bdb7da8082..0cc8180b3dd2 100644
--- a/chart2/source/controller/inc/ConfigurationAccess.hxx
+++ b/chart2/source/controller/inc/ConfigurationAccess.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ConfigurationAccess.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx b/chart2/source/controller/inc/DataPointItemConverter.hxx
index 4eec81bd20b5..d738cf8f6245 100644
--- a/chart2/source/controller/inc/DataPointItemConverter.hxx
+++ b/chart2/source/controller/inc/DataPointItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataPointItemConverter.hxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/DrawViewWrapper.hxx b/chart2/source/controller/inc/DrawViewWrapper.hxx
index 3709145db281..1dbdf6a85a53 100644
--- a/chart2/source/controller/inc/DrawViewWrapper.hxx
+++ b/chart2/source/controller/inc/DrawViewWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DrawViewWrapper.hxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/ErrorBarItemConverter.hxx b/chart2/source/controller/inc/ErrorBarItemConverter.hxx
index 9f78b89fdb5f..9dffde68cd5b 100755
--- a/chart2/source/controller/inc/ErrorBarItemConverter.hxx
+++ b/chart2/source/controller/inc/ErrorBarItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ErrorBarItemConverter.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
index f2dde8aa7b8f..c10e1d4e5b86 100644
--- a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
+++ b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: GraphicPropertyItemConverter.hxx,v $
- * $Revision: 1.7.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/HelpIds.hrc b/chart2/source/controller/inc/HelpIds.hrc
index 89010d2bc8b5..1052b7ea962f 100644
--- a/chart2/source/controller/inc/HelpIds.hrc
+++ b/chart2/source/controller/inc/HelpIds.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: HelpIds.hrc,v $
- * $Revision: 1.8.56.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,6 +29,7 @@
#include <svl/solar.hrc>
//next is 120
+//free: 20, 21, 22, 30, 31, 32, 33
//see old chart: schhids.h
@@ -64,21 +62,13 @@
//#define HID_SCH_CT_INDICATE2 (HID_SCH_START + 18)
//#define HID_SCH_CT_REGRESS2 (HID_SCH_START + 19)
-//#define HID_SCH_TBI_EDIT_CANCEL (HID_SCH_START + 20)
-//#define HID_SCH_TBI_EDIT_ACCEPT (HID_SCH_START + 21)
-#define HID_SCH_TBI_DATA_TRANSFER (HID_SCH_START + 22)
#define HID_SCH_TBI_DATA_INSERT_ROW (HID_SCH_START + 23)
#define HID_SCH_TBI_DATA_INSERT_COL (HID_SCH_START + 24)
#define HID_SCH_TBI_DATA_DELETE_ROW (HID_SCH_START + 25)
#define HID_SCH_TBI_DATA_DELETE_COL (HID_SCH_START + 26)
#define HID_SCH_TBI_DATA_SWAP_COL (HID_SCH_START + 27)
#define HID_SCH_TBI_DATA_SWAP_ROW (HID_SCH_START + 28)
-//#define HID_SCH_TBI_DATA_SORT_ROW (HID_SCH_START + 29)
-//#define HID_SCH_TBI_DATA_SORT_COL (HID_SCH_START + 30)
-//#define HID_SCH_TBI_DATA_SORT_TABLE_ROW (HID_SCH_START + 31)
-//#define HID_SCH_TBI_DATA_SORT_TABLE_COL (HID_SCH_START + 32)
-
-// #define HID_SCH_TBX_EDIT (HID_SCH_START + 33)
+#define HID_SCH_TBI_DATA_INSERT_TEXT_COL (HID_SCH_START + 29)
#define HID_SCH_TBX_DATA (HID_SCH_START + 34)
#define HID_SCH_ALIGNMENT_CTR_DIAL (HID_SCH_START + 35)
diff --git a/chart2/source/controller/inc/ItemConverter.hxx b/chart2/source/controller/inc/ItemConverter.hxx
index 52d98132ea82..2f52e45f070c 100644
--- a/chart2/source/controller/inc/ItemConverter.hxx
+++ b/chart2/source/controller/inc/ItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ItemConverter.hxx,v $
- * $Revision: 1.10.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/ItemPropertyMap.hxx b/chart2/source/controller/inc/ItemPropertyMap.hxx
index 63d4b2ca7f87..809df66156e2 100644
--- a/chart2/source/controller/inc/ItemPropertyMap.hxx
+++ b/chart2/source/controller/inc/ItemPropertyMap.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ItemPropertyMap.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/LegendItemConverter.hxx b/chart2/source/controller/inc/LegendItemConverter.hxx
index 3655ea5e6300..b1b0bcdeea75 100644
--- a/chart2/source/controller/inc/LegendItemConverter.hxx
+++ b/chart2/source/controller/inc/LegendItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LegendItemConverter.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/MenuResIds.hrc b/chart2/source/controller/inc/MenuResIds.hrc
new file mode 100644
index 000000000000..38a09ad35ded
--- /dev/null
+++ b/chart2/source/controller/inc/MenuResIds.hrc
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_MENURESIDS_HRC
+#define CHART_MENURESIDS_HRC
+
+#ifndef _SOLAR_HRC
+#include <svl/solar.hrc>
+#endif
+
+//-----------------------------------------------------------------------------
+// context menus
+
+#define RID_CONTEXTMENU_SHAPE (RID_APP_START + 1)
+#define RID_CONTEXTMENU_SHAPEEDIT (RID_APP_START + 2)
+
+// CHART_MENURESIDS_HRC
+#endif
diff --git a/chart2/source/controller/inc/MultipleChartConverters.hxx b/chart2/source/controller/inc/MultipleChartConverters.hxx
index 5921ec9a35f7..9b0555ec82e1 100644
--- a/chart2/source/controller/inc/MultipleChartConverters.hxx
+++ b/chart2/source/controller/inc/MultipleChartConverters.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MultipleChartConverters.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/MultipleItemConverter.hxx b/chart2/source/controller/inc/MultipleItemConverter.hxx
index 40c8a6b9b7da..32c48ca8e7db 100644
--- a/chart2/source/controller/inc/MultipleItemConverter.hxx
+++ b/chart2/source/controller/inc/MultipleItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MultipleItemConverter.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/ObjectHierarchy.hxx b/chart2/source/controller/inc/ObjectHierarchy.hxx
index 3281181c5be7..857b576fe6ef 100644
--- a/chart2/source/controller/inc/ObjectHierarchy.hxx
+++ b/chart2/source/controller/inc/ObjectHierarchy.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ObjectHierarchy.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,6 +27,8 @@
#ifndef CHART2_OBJECTHIERARCHY_HXX
#define CHART2_OBJECTHIERARCHY_HXX
+#include "ObjectIdentifier.hxx"
+
#include <rtl/ustring.hxx>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/awt/KeyEvent.hpp>
@@ -50,8 +49,8 @@ class ImplObjectHierarchy;
class ObjectHierarchy
{
public:
- typedef ::rtl::OUString tCID;
- typedef ::std::vector< tCID > tChildContainer;
+ typedef ObjectIdentifier tOID;
+ typedef ::std::vector< tOID > tChildContainer;
/** @param bFlattenDiagram
If <TRUE/>, the content of the diaram (data series, wall, floor,
@@ -66,20 +65,20 @@ public:
bool bOrderingForElementSelector = false );
~ObjectHierarchy();
- static tCID getRootNodeCID();
- static bool isRootNode( const tCID & rCID );
+ static tOID getRootNodeOID();
+ static bool isRootNode( const tOID& rOID );
- /// equal to getChildren( getRootNodeCID())
+ /// equal to getChildren( getRootNodeOID())
tChildContainer getTopLevelChildren() const;
- bool hasChildren( const tCID & rParent ) const;
- tChildContainer getChildren( const tCID & rParent ) const;
+ bool hasChildren( const tOID& rParent ) const;
+ tChildContainer getChildren( const tOID& rParent ) const;
- tChildContainer getSiblings( const tCID & rNode ) const;
+ tChildContainer getSiblings( const tOID& rNode ) const;
/// The result is empty, if the node cannot be found in the tree
- tCID getParent( const tCID & rNode ) const;
+ tOID getParent( const tOID& rNode ) const;
/// @returns -1, if no parent can be determined
- sal_Int32 getIndexInParent( const tCID & rNode ) const;
+ sal_Int32 getIndexInParent( const tOID& rNode ) const;
private:
@@ -89,16 +88,16 @@ private:
class ObjectKeyNavigation
{
public:
- explicit ObjectKeyNavigation( const ObjectHierarchy::tCID & rCurrentCID,
+ explicit ObjectKeyNavigation( const ObjectHierarchy::tOID & rCurrentOID,
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > & xChartDocument,
ExplicitValueProvider * pExplicitValueProvider = 0 );
bool handleKeyEvent( const ::com::sun::star::awt::KeyEvent & rEvent );
- ObjectHierarchy::tCID getCurrentSelection() const;
+ ObjectHierarchy::tOID getCurrentSelection() const;
private:
- void setCurrentSelection( const ObjectHierarchy::tCID & rCID );
+ void setCurrentSelection( const ObjectHierarchy::tOID& rOID );
bool first();
bool last();
bool next();
@@ -108,7 +107,7 @@ private:
bool veryFirst();
bool veryLast();
- ObjectHierarchy::tCID m_aCurrentCID;
+ ObjectHierarchy::tOID m_aCurrentOID;
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > m_xChartDocument;
ExplicitValueProvider * m_pExplicitValueProvider;
diff --git a/chart2/source/controller/inc/ObjectNameProvider.hxx b/chart2/source/controller/inc/ObjectNameProvider.hxx
index 529f253fc20a..02ecc8f229c8 100644
--- a/chart2/source/controller/inc/ObjectNameProvider.hxx
+++ b/chart2/source/controller/inc/ObjectNameProvider.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ObjectNameProvider.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/PositionAndSizeHelper.hxx b/chart2/source/controller/inc/PositionAndSizeHelper.hxx
index 180ad047a0f3..43392e7a8235 100644
--- a/chart2/source/controller/inc/PositionAndSizeHelper.hxx
+++ b/chart2/source/controller/inc/PositionAndSizeHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PositionAndSizeHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/RangeEdit.hxx b/chart2/source/controller/inc/RangeEdit.hxx
index 20dd02bcf1e9..cacba52decb5 100755
--- a/chart2/source/controller/inc/RangeEdit.hxx
+++ b/chart2/source/controller/inc/RangeEdit.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RangeEdit.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/RangeSelectionButton.hxx b/chart2/source/controller/inc/RangeSelectionButton.hxx
index 9befd85cf0af..4aedf9012489 100644
--- a/chart2/source/controller/inc/RangeSelectionButton.hxx
+++ b/chart2/source/controller/inc/RangeSelectionButton.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RangeSelectionButton.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/RangeSelectionHelper.hxx b/chart2/source/controller/inc/RangeSelectionHelper.hxx
index ec280b0da2e8..cb9e067bd8e2 100755
--- a/chart2/source/controller/inc/RangeSelectionHelper.hxx
+++ b/chart2/source/controller/inc/RangeSelectionHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RangeSelectionHelper.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/RangeSelectionListener.hxx b/chart2/source/controller/inc/RangeSelectionListener.hxx
index 55d0965e9d99..3e470c0116f0 100644
--- a/chart2/source/controller/inc/RangeSelectionListener.hxx
+++ b/chart2/source/controller/inc/RangeSelectionListener.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RangeSelectionListener.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/RegressionCurveItemConverter.hxx b/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
index f613d9bdb57a..ab2d29cb5e0d 100644
--- a/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
+++ b/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionCurveItemConverter.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
index 09e9d1960da4..5fe5313c8d4a 100644
--- a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
+++ b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionEquationItemConverter.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/SchSlotIds.hxx b/chart2/source/controller/inc/SchSlotIds.hxx
index f65b2f9badcb..601e64100bbf 100644
--- a/chart2/source/controller/inc/SchSlotIds.hxx
+++ b/chart2/source/controller/inc/SchSlotIds.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SchSlotIds.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
index 0f4a9869fcc9..207a6ab7f0ee 100644
--- a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
+++ b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SeriesOptionsItemConverter.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/ShapeController.hrc b/chart2/source/controller/inc/ShapeController.hrc
new file mode 100644
index 000000000000..6c7b43526d22
--- /dev/null
+++ b/chart2/source/controller/inc/ShapeController.hrc
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_SHAPECONTROLLER_HRC
+#define CHART_SHAPECONTROLLER_HRC
+
+//-----------------------------------------------------------------------------
+//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_ARRANGE_ROW 7
+#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_CUT 12
+#define COMMAND_ID_COPY 13
+#define COMMAND_ID_PASTE 14
+#define COMMAND_ID_FONT_DIALOG 15
+#define COMMAND_ID_PARAGRAPH_DIALOG 16
+
+// CHART_SHAPECONTROLLER_HRC
+#endif
diff --git a/chart2/source/controller/inc/StatisticsItemConverter.hxx b/chart2/source/controller/inc/StatisticsItemConverter.hxx
index 440a008e7568..cb4227185093 100644
--- a/chart2/source/controller/inc/StatisticsItemConverter.hxx
+++ b/chart2/source/controller/inc/StatisticsItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StatisticsItemConverter.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/TabPageNotifiable.hxx b/chart2/source/controller/inc/TabPageNotifiable.hxx
index 2107b4c2ca78..41e41dbde308 100644
--- a/chart2/source/controller/inc/TabPageNotifiable.hxx
+++ b/chart2/source/controller/inc/TabPageNotifiable.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TabPageNotifiable.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/TextDirectionListBox.hxx b/chart2/source/controller/inc/TextDirectionListBox.hxx
index fdd44069c5c0..626724289187 100644
--- a/chart2/source/controller/inc/TextDirectionListBox.hxx
+++ b/chart2/source/controller/inc/TextDirectionListBox.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TextDirectionListBox.hxx,v $
- * $Revision: 1.1.2.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
index d738bb408cf1..768cca0fe8c6 100644
--- a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
+++ b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TimerTriggeredControllerLock.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/TitleDialogData.hxx b/chart2/source/controller/inc/TitleDialogData.hxx
index 45eec951ce65..fadcdad4aab3 100644
--- a/chart2/source/controller/inc/TitleDialogData.hxx
+++ b/chart2/source/controller/inc/TitleDialogData.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TitleDialogData.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/TitleItemConverter.hxx b/chart2/source/controller/inc/TitleItemConverter.hxx
index 92f828a0dc13..535e36226a12 100644
--- a/chart2/source/controller/inc/TitleItemConverter.hxx
+++ b/chart2/source/controller/inc/TitleItemConverter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TitleItemConverter.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/ViewElementListProvider.hxx b/chart2/source/controller/inc/ViewElementListProvider.hxx
index 6558e8c3aba1..61a68d6f8b4c 100644
--- a/chart2/source/controller/inc/ViewElementListProvider.hxx
+++ b/chart2/source/controller/inc/ViewElementListProvider.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ViewElementListProvider.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_ChartType.hxx b/chart2/source/controller/inc/dlg_ChartType.hxx
index 1a567936fd79..4144531ed77e 100644
--- a/chart2/source/controller/inc/dlg_ChartType.hxx
+++ b/chart2/source/controller/inc/dlg_ChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_ChartType.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
index d19b01d2e2d6..c8abda3cb19a 100644
--- a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
+++ b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_ChartType_UNO.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_CreationWizard.hxx b/chart2/source/controller/inc/dlg_CreationWizard.hxx
index 27a4a5efb9d7..e70976ad1a4c 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_CreationWizard.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
index 5b92f3cb9670..9f546f1a72d6 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_CreationWizard_UNO.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx
index cd82c4a7f46d..e5cd252df69d 100644
--- a/chart2/source/controller/inc/dlg_DataEditor.hxx
+++ b/chart2/source/controller/inc/dlg_DataEditor.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_DataEditor.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx
index 331136607e75..f94c95b33370 100644
--- a/chart2/source/controller/inc/dlg_DataSource.hxx
+++ b/chart2/source/controller/inc/dlg_DataSource.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_DataSource.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
index 4a322df598e5..5ed06d365fa2 100644
--- a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
+++ b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertAxis_Grid.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_InsertDataLabel.hxx b/chart2/source/controller/inc/dlg_InsertDataLabel.hxx
index d5e19b6de40c..a22333b5bdc8 100644
--- a/chart2/source/controller/inc/dlg_InsertDataLabel.hxx
+++ b/chart2/source/controller/inc/dlg_InsertDataLabel.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertDataLabel.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_InsertErrorBars.hxx b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
index f463fc1e854f..3554337d9deb 100644
--- a/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
+++ b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertErrorBars.hxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_InsertLegend.hxx b/chart2/source/controller/inc/dlg_InsertLegend.hxx
index 3b8a0e8724a6..8ab7f285b5a9 100644
--- a/chart2/source/controller/inc/dlg_InsertLegend.hxx
+++ b/chart2/source/controller/inc/dlg_InsertLegend.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertLegend.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_InsertTitle.hxx b/chart2/source/controller/inc/dlg_InsertTitle.hxx
index 9accd10a7a6e..41eeac7a1055 100644
--- a/chart2/source/controller/inc/dlg_InsertTitle.hxx
+++ b/chart2/source/controller/inc/dlg_InsertTitle.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertTitle.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_InsertTrendline.hxx b/chart2/source/controller/inc/dlg_InsertTrendline.hxx
index 44f660373b41..34819f6e0e16 100644
--- a/chart2/source/controller/inc/dlg_InsertTrendline.hxx
+++ b/chart2/source/controller/inc/dlg_InsertTrendline.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_InsertTrendline.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_ObjectProperties.hxx b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
index 39a738563c50..8ceabdbe33b7 100644
--- a/chart2/source/controller/inc/dlg_ObjectProperties.hxx
+++ b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_ObjectProperties.hxx,v $
- * $Revision: 1.11.42.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/dlg_ShapeFont.hxx b/chart2/source/controller/inc/dlg_ShapeFont.hxx
new file mode 100644
index 000000000000..ec1b6553bd64
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_ShapeFont.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_DLG_SHAPEFONT_HXX
+#define CHART2_DLG_SHAPEFONT_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class ViewElementListProvider;
+
+/** dialog for font properties of shapes
+ */
+class ShapeFontDialog : public SfxTabDialog
+{
+public:
+ ShapeFontDialog( Window* pParent, const SfxItemSet* pAttr,
+ const ViewElementListProvider* pViewElementListProvider );
+ virtual ~ShapeFontDialog();
+
+private:
+ virtual void PageCreated( USHORT nId, SfxTabPage& rPage );
+
+ const ViewElementListProvider* m_pViewElementListProvider;
+};
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
+
+// CHART2_DLG_SHAPEFONT_HXX
+#endif
diff --git a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
new file mode 100644
index 000000000000..2bc57bfcffc2
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_DLG_SHAPEPARAGRAPH_HXX
+#define CHART2_DLG_SHAPEPARAGRAPH_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+/** dialog for paragraph properties of shapes
+ */
+class ShapeParagraphDialog : public SfxTabDialog
+{
+public:
+ ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr );
+ virtual ~ShapeParagraphDialog();
+
+private:
+ virtual void PageCreated( USHORT nId, SfxTabPage& rPage );
+};
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
+
+// CHART2_DLG_SHAPEPARAGRAPH_HXX
+#endif
diff --git a/chart2/source/controller/inc/dlg_View3D.hxx b/chart2/source/controller/inc/dlg_View3D.hxx
index c10390e45c05..91b16d3512d8 100644
--- a/chart2/source/controller/inc/dlg_View3D.hxx
+++ b/chart2/source/controller/inc/dlg_View3D.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlg_View3D.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
index a37ed80cbd30..36bceaffce9f 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: res_ErrorBar.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index 07cc3191b906..8cf07aabad08 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AxisItemConverter.cxx,v $
- * $Revision: 1.14.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
index ee83459d4429..3382ae1ff085 100644
--- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CharacterPropertyItemConverter.cxx,v $
- * $Revision: 1.14.56.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,13 +32,14 @@
#include "macros.hxx"
#include "ItemPropertyMap.hxx"
#include "RelativeSizeHelper.hxx"
-#include <svx/eeitem.hxx>
-#include <svx/udlnitem.hxx>
-#include <svx/fontitem.hxx>
-#include <svx/crsditem.hxx>
-#include <svx/postitem.hxx>
-#include <svx/wghtitem.hxx>
-#include <svx/fhgtitem.hxx>
+#include <editeng/memberids.hrc>
+#include <editeng/eeitem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/crsditem.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/fhgtitem.hxx>
#include <svl/stritem.hxx>
#include <com/sun/star/beans/XPropertyState.hpp>
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index c27fa016d00d..14590b6f6f9c 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataPointItemConverter.cxx,v $
- * $Revision: 1.19.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -50,10 +47,10 @@
// header for class XFillColorItem
#include <svx/xflclit.hxx>
#include <svl/intitem.hxx>
-#include <svx/sizeitem.hxx>
+#include <editeng/sizeitem.hxx>
// header for class SfxStringItem
#include <svl/stritem.hxx>
-#include <svx/brshitem.hxx>
+#include <editeng/brshitem.hxx>
//SfxIntegerListItem
#include <svl/ilstitem.hxx>
#define _SVSTDARR_ULONGS
diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
index 7b05b72bb53f..0e2e6cdd4644 100755
--- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ErrorBarItemConverter.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
index 1c7273f44c89..c732dfe80ede 100644
--- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: GraphicPropertyItemConverter.cxx,v $
- * $Revision: 1.13.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,10 +33,7 @@
#include "ItemPropertyMap.hxx"
#include "PropertyHelper.hxx"
#include "CommonConverters.hxx"
-
-// #ifndef _SFXINTITEM_HXX
-// #include <svl/intitem.hxx>
-// #endif
+#include <editeng/memberids.hrc>
#include <svx/xflclit.hxx>
#include <svx/xlnclit.hxx>
#include <svx/xflbmtit.hxx>
@@ -51,7 +45,7 @@
#include <svx/xflgrit.hxx>
#include <svx/xfltrit.hxx>
#include <svx/xlntrit.hxx>
-#include <svx/eeitem.hxx>
+#include <editeng/eeitem.hxx>
// for SfxBoolItem
#include <svl/eitem.hxx>
// for XFillGradientStepCountItem
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index 04b35f275618..5ee167260974 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ItemConverter.cxx,v $
- * $Revision: 1.15.24.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
index 4e9311029c46..3af6d9342f33 100644
--- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LegendItemConverter.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
index 4b626e1be839..e111eb314360 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MultipleChartConverters.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx
index 4748adff879f..e24be80bb429 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MultipleItemConverter.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
index 69209884fbdb..2fee8702e6d8 100644
--- a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionCurveItemConverter.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
index 439aa84c0073..6035f21696a9 100644
--- a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionEquationItemConverter.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
index dbefb0e7f025..b3c4b7ea19f7 100644
--- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
+++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SchWhichPairs.hxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,7 +32,7 @@
#endif
#include <svx/xdef.hxx>
#include <svx/svddef.hxx>
-#include <svx/eeitem.hxx>
+#include <editeng/eeitem.hxx>
#include "chartview/ChartSfxItemIds.hxx"
@@ -136,7 +133,7 @@ const USHORT nDataLabelWhichPairs[] =
#define CHART_POINT_WHICHPAIRS \
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, /* 3994 - 4037 svx/eeitem.hxx */ \
+ EE_ITEMS_START, EE_ITEMS_END, /* 3994 - 4037 editeng/eeitem.hxx */ \
SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING, \
SCHATTR_DATADESCR_START, SCHATTR_DATADESCR_END, /* 1 - 2 sch/schattr.hxx*/ \
SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO, /* 10585 - 10585 svx/svxids.hrc */ \
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index d74eff927bc4..b1931d63cfbb 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SeriesOptionsItemConverter.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
index acaf493836bc..f2df5c96dd71 100644
--- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StatisticsItemConverter.cxx,v $
- * $Revision: 1.22 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
index a94c1f07909f..f745dd37e9c3 100644
--- a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TitleItemConverter.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/itemsetwrapper/makefile.mk b/chart2/source/controller/itemsetwrapper/makefile.mk
index 0ab981bba643..8f12443c13f6 100644
--- a/chart2/source/controller/itemsetwrapper/makefile.mk
+++ b/chart2/source/controller/itemsetwrapper/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.10 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index bda0108c8ce8..4c0c7dc38ae3 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartController.cxx,v $
- * $Revision: 1.30.16.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -53,6 +50,10 @@
#include "dlg_CreationWizard.hxx"
#include "dlg_ChartType.hxx"
//#include "svx/ActionDescriptionProvider.hxx"
+#include "AccessibleChartView.hxx"
+#include "DrawCommandDispatch.hxx"
+#include "ShapeController.hxx"
+#include "UndoManager.hxx"
#include <comphelper/InlineContainer.hxx>
@@ -100,6 +101,7 @@ namespace chart
//.............................................................................
using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Reference;
@@ -127,7 +129,8 @@ ChartController::ChartController(uno::Reference<uno::XComponentContext> const &
, m_bWaitingForMouseUp(false)
, m_bConnectingToView(false)
, m_xUndoManager( 0 )
- , m_aDispatchContainer( m_xCC )
+ , m_aDispatchContainer( m_xCC, this )
+ , m_eDrawMode( CHARTDRAW_SELECT )
{
DBG_CTOR(ChartController,NULL);
// m_aDispatchContainer.setUndoManager( m_xUndoManager );
@@ -441,6 +444,11 @@ APPHELPER_XSERVICEINFO_IMPL(ChartController,CHART_CONTROLLER_SERVICE_IMPLEMENTAT
//@todo: createElement should become unnecessary, remove when #i79198# is fixed
xLayoutManager->createElement( C2U( "private:resource/toolbar/toolbar" ) );
xLayoutManager->requestElement( C2U( "private:resource/toolbar/toolbar" ) );
+
+ // #i12587# support for shapes in chart
+ xLayoutManager->createElement( C2U( "private:resource/toolbar/drawbar" ) );
+ xLayoutManager->requestElement( C2U( "private:resource/toolbar/drawbar" ) );
+
xLayoutManager->requestElement( C2U( "private:resource/statusbar/statusbar" ) );
xLayoutManager->unlock();
@@ -562,13 +570,27 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
// set new model at dispatchers
m_aDispatchContainer.setModel( aNewModelRef->getModel());
- ControllerCommandDispatch * pDispatch = new ControllerCommandDispatch( m_xCC, this );
+ ControllerCommandDispatch * pDispatch = new ControllerCommandDispatch( m_xCC, this, &m_aDispatchContainer );
pDispatch->initialize();
// the dispatch container will return "this" for all commands returned by
// impl_getAvailableCommands(). That means, for those commands dispatch()
// is called here at the ChartController.
- m_aDispatchContainer.setFallbackDispatch( pDispatch, impl_getAvailableCommands() );
+ m_aDispatchContainer.setChartDispatch( pDispatch, impl_getAvailableCommands() );
+
+ DrawCommandDispatch* pDrawDispatch = new DrawCommandDispatch( m_xCC, this );
+ if ( pDrawDispatch )
+ {
+ pDrawDispatch->initialize();
+ m_aDispatchContainer.setDrawCommandDispatch( pDrawDispatch );
+ }
+
+ ShapeController* pShapeController = new ShapeController( m_xCC, this );
+ if ( pShapeController )
+ {
+ pShapeController->initialize();
+ m_aDispatchContainer.setShapeController( pShapeController );
+ }
#ifdef TEST_ENABLE_MODIFY_LISTENER
uno::Reference< util::XModifyBroadcaster > xMBroadcaster( aNewModelRef->getModel(),uno::UNO_QUERY );
@@ -1064,7 +1086,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand )
void SAL_CALL ChartController
::dispatch( const util::URL& rURL
- , const uno::Sequence< beans::PropertyValue >& /* rArgs */ )
+ , const uno::Sequence< beans::PropertyValue >& rArgs )
throw (uno::RuntimeException)
{
//@todo avoid OString (see Mathias mail on bug #104387#)
@@ -1164,7 +1186,16 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand )
else if( aCommand.equals("FormatSelection") )
this->executeDispatch_ObjectProperties();
else if( aCommand.equals("TransformDialog"))
- this->executeDispatch_PositionAndSize();
+ {
+ if ( isShapeContext() )
+ {
+ this->impl_ShapeControllerDispatch( rURL, rArgs );
+ }
+ else
+ {
+ this->executeDispatch_PositionAndSize();
+ }
+ }
else if( lcl_isFormatObjectCommand(aCommand) )
this->executeDispatch_FormatObject(rURL.Path);
//more format
@@ -1174,10 +1205,28 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand )
this->executeDispatch_ChartType();
else if( aCommand.equals("View3D"))
this->executeDispatch_View3D();
- else if( aCommand.equals("Forward"))
- this->executeDispatch_MoveSeries( sal_True );
- else if( aCommand.equals("Backward"))
- this->executeDispatch_MoveSeries( sal_False );
+ else if ( aCommand.equals( "Forward" ) )
+ {
+ if ( isShapeContext() )
+ {
+ this->impl_ShapeControllerDispatch( rURL, rArgs );
+ }
+ else
+ {
+ this->executeDispatch_MoveSeries( sal_True );
+ }
+ }
+ else if ( aCommand.equals( "Backward" ) )
+ {
+ if ( isShapeContext() )
+ {
+ this->impl_ShapeControllerDispatch( rURL, rArgs );
+ }
+ else
+ {
+ this->executeDispatch_MoveSeries( sal_False );
+ }
+ }
else if( aCommand.equals("NewArrangement"))
this->executeDispatch_NewArrangement();
else if( aCommand.equals("ToggleLegend"))
@@ -1393,6 +1442,20 @@ void SAL_CALL ChartController::modified( const lang::EventObject& /* aEvent */ )
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
+IMPL_LINK( ChartController, NotifyUndoActionHdl, SdrUndoAction*, pUndoAction )
+{
+ ::rtl::OUString aObjectCID = m_aSelection.getSelectedCID();
+ if ( aObjectCID.getLength() == 0 )
+ {
+ UndoManager* pUndoManager = UndoManager::getImplementation( m_xUndoManager );
+ if ( pUndoManager )
+ {
+ pUndoManager->addShapeUndoAction( pUndoAction );
+ }
+ }
+ return 0L;
+}
+
DrawModelWrapper* ChartController::GetDrawModelWrapper()
{
if( !m_pDrawModelWrapper.get() )
@@ -1400,16 +1463,26 @@ DrawModelWrapper* ChartController::GetDrawModelWrapper()
ExplicitValueProvider* pProvider = ExplicitValueProvider::getExplicitValueProvider( m_xChartView );
if( pProvider )
m_pDrawModelWrapper = pProvider->getDrawModelWrapper();
+ if ( m_pDrawModelWrapper.get() )
+ {
+ m_pDrawModelWrapper->getSdrModel().SetNotifyUndoActionHdl( LINK( this, ChartController, NotifyUndoActionHdl ) );
+ }
}
return m_pDrawModelWrapper.get();
}
-uno::Reference< accessibility::XAccessible > ChartController::CreateAccessible()
+DrawViewWrapper* ChartController::GetDrawViewWrapper()
{
- uno::Reference< accessibility::XAccessible > xResult(
- m_xCC->getServiceManager()->createInstanceWithContext(
- CHART2_ACCESSIBLE_SERVICE_NAME, m_xCC ), uno::UNO_QUERY );
+ if ( !m_pDrawViewWrapper )
+ {
+ impl_createDrawViewController();
+ }
+ return m_pDrawViewWrapper;
+}
+uno::Reference< XAccessible > ChartController::CreateAccessible()
+{
+ uno::Reference< XAccessible > xResult = new AccessibleChartView( m_xCC, GetDrawViewWrapper() );
impl_initializeAccessible( uno::Reference< lang::XInitialization >( xResult, uno::UNO_QUERY ) );
return xResult;
}
@@ -1441,7 +1514,7 @@ void ChartController::impl_initializeAccessible( const uno::Reference< lang::XIn
uno::Reference<frame::XModel> xModel(m_aModel->getModel());
aArguments[1]=uno::makeAny(xModel);
aArguments[2]=uno::makeAny(m_xChartView);
- uno::Reference< accessibility::XAccessible > xParent;
+ uno::Reference< XAccessible > xParent;
if( m_pChartWindow )
{
Window* pParentWin( m_pChartWindow->GetAccessibleParentWindow());
diff --git a/chart2/source/controller/main/ChartController.hxx b/chart2/source/controller/main/ChartController.hxx
index edf94fb7aae8..8deffe47396f 100644
--- a/chart2/source/controller/main/ChartController.hxx
+++ b/chart2/source/controller/main/ChartController.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartController.hxx,v $
- * $Revision: 1.12.44.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -60,6 +57,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/util/XModeChangeListener.hpp>
+#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XLayoutManagerListener.hpp>
@@ -91,6 +89,8 @@ namespace chart
{
//.............................................................................
+enum ChartDrawMode { CHARTDRAW_INSERT, CHARTDRAW_SELECT };
+
class WindowController
{
public:
@@ -158,6 +158,9 @@ class ChartController : public ::cppu::WeakImplHelper12 <
>
, public WindowController
{
+ friend class DrawCommandDispatch;
+ friend class ShapeController;
+
public:
//no default constructor
ChartController(::com::sun::star::uno::Reference<
@@ -466,6 +469,13 @@ public:
static bool isObjectDeleteable( const ::com::sun::star::uno::Any& rSelection );
+ void setDrawMode( ChartDrawMode eMode ) { m_eDrawMode = eMode; }
+ ChartDrawMode getDrawMode() const { return m_eDrawMode; }
+
+ bool isShapeContext() const;
+
+ DECL_LINK( NotifyUndoActionHdl, SdrUndoAction* );
+
public:
//-----------------------------------------------------------------
//-----------------------------------------------------------------
@@ -480,6 +490,7 @@ public:
private:
DrawModelWrapper* GetDrawModelWrapper();
+ DrawViewWrapper* GetDrawViewWrapper();
private:
class TheModelRef;
@@ -580,6 +591,8 @@ private:
::com::sun::star::frame::XLayoutManagerEventBroadcaster >
m_xLayoutManagerEventBroadcaster;
+ ChartDrawMode m_eDrawMode;
+
private:
//private methods
@@ -640,11 +653,11 @@ private:
void executeDispatch_DeleteMinorGrid();
void SAL_CALL executeDispatch_InsertSpecialCharacter();
- void SAL_CALL executeDispatch_EditText();
+ void SAL_CALL executeDispatch_EditText( const Point* pMousePixel = NULL );
void SAL_CALL executeDispatch_SourceData();
void SAL_CALL executeDispatch_MoveSeries( sal_Bool bForward );
- void StartTextEdit();
+ void StartTextEdit( const Point* pMousePixel = NULL );
bool EndTextEdit();
void SAL_CALL executeDispatch_View3D();
@@ -662,9 +675,12 @@ private:
void executeDispatch_ToggleLegend();
void executeDispatch_ToggleGridHorizontal();
+ void impl_ShapeControllerDispatch( const ::com::sun::star::util::URL& rURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs );
+
//
DECL_LINK( DoubleClickWaitingHdl, void* );
- void execute_DoubleClick();
+ void execute_DoubleClick( const Point* pMousePixel = NULL );
void startDoubleClickWaiting();
void stopDoubleClickWaiting();
@@ -704,6 +720,8 @@ private:
void impl_PasteGraphic( ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > & xGraphic,
const ::Point & aPosition );
+ void impl_PasteShapes( SdrModel* pModel );
+ void impl_PasteStringAsTextShape( const ::rtl::OUString& rString, const ::com::sun::star::awt::Point& rPosition );
void impl_SetMousePointer( const MouseEvent & rEvent );
void impl_ClearSelection();
diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx
index 976276660e8a..5b6d9c1a60b7 100644
--- a/chart2/source/controller/main/ChartController_EditData.cxx
+++ b/chart2/source/controller/main/ChartController_EditData.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartController_EditData.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index 45213a4473dc..13b0174a7d02 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartController_Insert.cxx,v $
- * $Revision: 1.16.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index 4cbb6db76bd4..6c988ebf22d5 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartController_Position.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 754e66ec7d17..3c5a0b135622 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartController_Properties.cxx,v $
- * $Revision: 1.33.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 855357ce701b..4df362ee80d2 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartController_TextEdit.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -55,7 +52,7 @@
#include <vos/mutex.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <svl/stritem.hxx>
-#include <svx/fontitem.hxx>
+#include <editeng/fontitem.hxx>
//.............................................................................
namespace chart
@@ -67,15 +64,15 @@ using namespace ::com::sun::star;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void SAL_CALL ChartController::executeDispatch_EditText()
+void SAL_CALL ChartController::executeDispatch_EditText( const Point* pMousePixel )
{
- this->StartTextEdit();
+ this->StartTextEdit( pMousePixel );
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void ChartController::StartTextEdit()
+void ChartController::StartTextEdit( const Point* pMousePixel )
{
//the first marked object will be edited
@@ -114,6 +111,18 @@ void ChartController::StartTextEdit()
*/
m_pDrawViewWrapper->SetEditMode();
+ // #i12587# support for shapes in chart
+ if ( pMousePixel )
+ {
+ OutlinerView* pOutlinerView = m_pDrawViewWrapper->GetTextEditOutlinerView();
+ if ( pOutlinerView )
+ {
+ MouseEvent aEditEvt( *pMousePixel, 1, MOUSE_SYNTHETIC, MOUSE_LEFT, 0 );
+ pOutlinerView->MouseButtonDown( aEditEvt );
+ pOutlinerView->MouseButtonUp( aEditEvt );
+ }
+ }
+
//we invalidate the outliner region because the outliner has some
//paint problems (some characters are painted twice a little bit shifted)
m_pChartWindow->Invalidate( m_pDrawViewWrapper->GetMarkedObjBoundRect() );
@@ -142,22 +151,38 @@ bool ChartController::EndTextEdit()
String aString = pOutliner->GetText(
pOutliner->GetParagraph( 0 ),
pOutliner->GetParagraphCount() );
- uno::Reference< beans::XPropertySet > xPropSet =
- ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() );
-
- // lock controllers till end of block
- ControllerLockGuard aCLGuard( m_aModel->getModel());
- //Paragraph* pPara =
- TitleHelper::setCompleteString( aString, uno::Reference<
- ::com::sun::star::chart2::XTitle >::query( xPropSet ), m_xCC );
- try
+ ::rtl::OUString aObjectCID = m_aSelection.getSelectedCID();
+ if ( aObjectCID.getLength() > 0 )
{
- m_xUndoManager->postAction( C2U("Edit Text") );
+ uno::Reference< beans::XPropertySet > xPropSet =
+ ObjectIdentifier::getObjectPropertySet( aObjectCID, getModel() );
+
+ // lock controllers till end of block
+ ControllerLockGuard aCLGuard( m_aModel->getModel());
+
+ TitleHelper::setCompleteString( aString, uno::Reference<
+ ::com::sun::star::chart2::XTitle >::query( xPropSet ), m_xCC );
+
+ try
+ {
+ m_xUndoManager->postAction( C2U("Edit Text") );
+ }
+ catch( uno::RuntimeException& e)
+ {
+ ASSERT_EXCEPTION( e );
+ }
}
- catch( uno::RuntimeException& e)
+ else
{
- ASSERT_EXCEPTION( e );
+ try
+ {
+ m_xUndoManager->cancelAction();
+ }
+ catch ( uno::RuntimeException& e )
+ {
+ ASSERT_EXCEPTION( e );
+ }
}
}
return true;
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 8dca62d93ee1..352a7e1279cc 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartController_Tools.cxx,v $
- * $Revision: 1.9.36.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,6 +48,7 @@
#include "LegendHelper.hxx"
#include "AxisHelper.hxx"
#include "RegressionCurveHelper.hxx"
+#include "ShapeController.hxx"
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
@@ -62,8 +60,6 @@
#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
-// #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
-
#include <svx/ActionDescriptionProvider.hxx>
// for TransferableDataHelper/TransferableHelper
#include <svtools/transfer.hxx>
@@ -80,8 +76,17 @@
// for SolarMutex
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
+#include <svx/dialmgr.hxx>
+#include <svx/dialogs.hrc>
// for OutlinerView
-#include <svx/outliner.hxx>
+#include <editeng/outliner.hxx>
+#include <svx/svditer.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/svdundo.hxx>
+#include <svx/unoapi.hxx>
+#include <svx/unopage.hxx>
+
+#include <boost/scoped_ptr.hpp>
using namespace ::com::sun::star;
@@ -187,50 +192,6 @@ bool lcl_deleteDataCurve(
} // anonymous namespace
-namespace
-{
-void lcl_InsertStringAsTextShapeIntoDrawPage(
- const Reference< lang::XMultiServiceFactory > & xShapeFactory,
- const Reference< drawing::XDrawPage > & xDrawPage,
- OUString & rString,
- const awt::Point & aPosition )
-{
- OSL_ASSERT( xShapeFactory.is() && xDrawPage.is());
- if( ! (xShapeFactory.is() && xDrawPage.is()))
- return;
-
- try
- {
- Reference< drawing::XShape > xTextShape(
- xShapeFactory->createInstance( C2U("com.sun.star.drawing.TextShape")), uno::UNO_QUERY_THROW );
- xDrawPage->add( xTextShape );
-
- Reference< text::XTextRange > xRange( xTextShape, uno::UNO_QUERY_THROW );
- xRange->setString( rString );
-
- float fCharHeight = 10.0;
- Reference< beans::XPropertySet > xProperties( xTextShape, uno::UNO_QUERY_THROW );
- xProperties->setPropertyValue( C2U("TextAutoGrowHeight"), uno::makeAny( true ));
- xProperties->setPropertyValue( C2U("TextAutoGrowWidth"), uno::makeAny( true ));
- xProperties->setPropertyValue( C2U("CharHeight"), uno::makeAny( fCharHeight ));
- xProperties->setPropertyValue( C2U("CharHeightAsian"), uno::makeAny( fCharHeight ));
- xProperties->setPropertyValue( C2U("CharHeightComplex"), uno::makeAny( fCharHeight ));
- xProperties->setPropertyValue( C2U("TextVerticalAdjust"), uno::makeAny( drawing::TextVerticalAdjust_CENTER ));
- xProperties->setPropertyValue( C2U("TextHorizontalAdjust"), uno::makeAny( drawing::TextHorizontalAdjust_CENTER ));
- xProperties->setPropertyValue( C2U("CharFontName"), uno::makeAny( C2U( "Albany" )));
-
- awt::Point aAdaptedPos( aPosition );
- aAdaptedPos.Y -= (xTextShape->getSize().Height / 2);
- aAdaptedPos.X -= (xTextShape->getSize().Width / 2);
- xTextShape->setPosition( aAdaptedPos );
- }
- catch( const uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- }
-}
-
-} // anonymous namespace
namespace chart
{
@@ -337,22 +298,21 @@ void ChartController::executeDispatch_Paste()
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( m_pChartWindow ));
if( aDataHelper.GetTransferable().is())
{
-// if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ))
-// {
-// SotStorageStreamRef xStm;
-// if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_DRAWING, xStm ))
-// {
-// xStm->Seek( 0 );
-// uno::Reference< io::XInputStream > xInputStream( new utl::OInputStreamWrapper( *xStm ));
-// SdrModel * pModel = new SdrModel();
-// DrawModelWrapper * pDrawModelWrapper( this->GetDrawModelWrapper());
-// if( SvxDrawingLayerImport( pModel, xInputStream ))
-// lcl_CopyShapesToChart( *pModel, m_pDrawModelWrapper->getSdrModel());
-// delete pModel;
-// }
-// }
-// else
- if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ))
+ if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) )
+ {
+ SotStorageStreamRef xStm;
+ if ( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_DRAWING, xStm ) )
+ {
+ xStm->Seek( 0 );
+ Reference< io::XInputStream > xInputStream( new utl::OInputStreamWrapper( *xStm ) );
+ ::boost::scoped_ptr< SdrModel > spModel( new SdrModel() );
+ if ( SvxDrawingLayerImport( spModel.get(), xInputStream ) )
+ {
+ impl_PasteShapes( spModel.get() );
+ }
+ }
+ }
+ else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) )
{
// graphic exchange format (graphic manager bitmap format?)
SotStorageStreamRef xStm;
@@ -385,14 +345,7 @@ void ChartController::executeDispatch_Paste()
pOutlinerView->InsertText( aString );
else
{
- awt::Point aTextPos;
- awt::Size aPageSize( ChartModelHelper::getPageSize( m_aModel->getModel()));
- aTextPos.X = (aPageSize.Width / 2);
- aTextPos.Y = (aPageSize.Height / 2);
- lcl_InsertStringAsTextShapeIntoDrawPage(
- m_pDrawModelWrapper->getShapeFactory(),
- m_pDrawModelWrapper->getMainDrawPage(),
- aString, aTextPos );
+ impl_PasteStringAsTextShape( aString, awt::Point( 0, 0 ) );
}
}
}
@@ -444,7 +397,6 @@ void ChartController::impl_PasteGraphic(
uno::Reference< beans::XPropertySet > xGraphicProp( xGraphic, uno::UNO_QUERY );
awt::Size aGraphicSize( 1000, 1000 );
- awt::Point aShapePos( 100,100 );
// first try size in 100th mm, then pixel size
if( ! ( xGraphicProp->getPropertyValue( C2U("Size100thMM")) >>= aGraphicSize ) &&
( ( xGraphicProp->getPropertyValue( C2U("SizePixel")) >>= aGraphicSize ) && m_pChartWindow ))
@@ -454,41 +406,158 @@ void ChartController::impl_PasteGraphic(
aGraphicSize.Height = aVCLSize.getHeight();
}
xGraphicShape->setSize( aGraphicSize );
-
- awt::Size aPageSize( ChartModelHelper::getPageSize( m_aModel->getModel()));
- aShapePos.X = (aPageSize.Width / 2) - (aGraphicSize.Width / 2);
- aShapePos.Y = (aPageSize.Height / 2) - (aGraphicSize.Height / 2);
- xGraphicShape->setPosition( aShapePos );
+ xGraphicShape->setPosition( awt::Point( 0, 0 ) );
}
}
-void ChartController::executeDispatch_Copy()
+void ChartController::impl_PasteShapes( SdrModel* pModel )
{
+ DrawModelWrapper* pDrawModelWrapper( this->GetDrawModelWrapper() );
+ if ( pDrawModelWrapper && m_pDrawViewWrapper )
+ {
+ Reference< drawing::XDrawPage > xDestPage( pDrawModelWrapper->getMainDrawPage() );
+ SdrPage* pDestPage = GetSdrPageFromXDrawPage( xDestPage );
+ if ( pDestPage )
+ {
+ Reference< drawing::XShape > xSelShape;
+ m_pDrawViewWrapper->BegUndo( SVX_RESSTR( RID_SVX_3D_UNDO_EXCHANGE_PASTE ) );
+ sal_uInt16 nCount = pModel->GetPageCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ {
+ const SdrPage* pPage = pModel->GetPage( i );
+ SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
+ while ( aIter.IsMore() )
+ {
+ SdrObject* pObj = aIter.Next();
+ SdrObject* pNewObj = ( pObj ? pObj->Clone() : NULL );
+ if ( pNewObj )
+ {
+ pNewObj->SetModel( &pDrawModelWrapper->getSdrModel() );
+ pNewObj->SetPage( pDestPage );
+
+ // set position
+ Reference< drawing::XShape > xShape( pNewObj->getUnoShape(), uno::UNO_QUERY );
+ if ( xShape.is() )
+ {
+ xShape->setPosition( awt::Point( 0, 0 ) );
+ }
- Reference< datatransfer::XTransferable > xTransferable;
+ pDestPage->InsertObject( pNewObj );
+ m_pDrawViewWrapper->AddUndo( new SdrUndoInsertObj( *pNewObj ) );
+ xSelShape = xShape;
+ }
+ }
+ }
+
+ Reference< util::XModifiable > xModifiable( m_aModel->getModel(), uno::UNO_QUERY );
+ if ( xModifiable.is() )
+ {
+ xModifiable->setModified( true );
+ }
+
+ // select last inserted shape
+ m_aSelection.setSelection( xSelShape );
+ m_aSelection.applySelection( m_pDrawViewWrapper );
+
+ m_pDrawViewWrapper->EndUndo();
+ }
+ }
+}
+void ChartController::impl_PasteStringAsTextShape( const OUString& rString, const awt::Point& rPosition )
+{
+ DrawModelWrapper* pDrawModelWrapper( this->GetDrawModelWrapper() );
+ if ( pDrawModelWrapper && m_pDrawViewWrapper )
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex());
- SdrObject * pSelectedObj = 0;
- if( m_pDrawViewWrapper && m_pDrawModelWrapper )
- {
- if( m_aSelection.getSelectedCID().getLength() )
- pSelectedObj = m_pDrawModelWrapper->getNamedSdrObject( m_aSelection.getSelectedCID() );
- else
- pSelectedObj = DrawViewWrapper::getSdrObject( m_aSelection.getSelectedAdditionalShape() );
+ const Reference< lang::XMultiServiceFactory >& xShapeFactory( pDrawModelWrapper->getShapeFactory() );
+ const Reference< drawing::XDrawPage >& xDrawPage( pDrawModelWrapper->getMainDrawPage() );
+ OSL_ASSERT( xShapeFactory.is() && xDrawPage.is() );
- if( pSelectedObj )
+ if ( xShapeFactory.is() && xDrawPage.is() )
+ {
+ try
+ {
+ Reference< drawing::XShape > xTextShape(
+ xShapeFactory->createInstance( C2U( "com.sun.star.drawing.TextShape" ) ), uno::UNO_QUERY_THROW );
+ xDrawPage->add( xTextShape );
+
+ Reference< text::XTextRange > xRange( xTextShape, uno::UNO_QUERY_THROW );
+ xRange->setString( rString );
+
+ float fCharHeight = 10.0;
+ Reference< beans::XPropertySet > xProperties( xTextShape, uno::UNO_QUERY_THROW );
+ xProperties->setPropertyValue( C2U( "TextAutoGrowHeight" ), uno::makeAny( true ) );
+ xProperties->setPropertyValue( C2U( "TextAutoGrowWidth" ), uno::makeAny( true ) );
+ xProperties->setPropertyValue( C2U( "CharHeight" ), uno::makeAny( fCharHeight ) );
+ xProperties->setPropertyValue( C2U( "CharHeightAsian" ), uno::makeAny( fCharHeight ) );
+ xProperties->setPropertyValue( C2U( "CharHeightComplex" ), uno::makeAny( fCharHeight ) );
+ xProperties->setPropertyValue( C2U( "TextVerticalAdjust" ), uno::makeAny( drawing::TextVerticalAdjust_CENTER ) );
+ xProperties->setPropertyValue( C2U( "TextHorizontalAdjust" ), uno::makeAny( drawing::TextHorizontalAdjust_CENTER ) );
+ xProperties->setPropertyValue( C2U( "CharFontName" ), uno::makeAny( C2U( "Albany" ) ) );
+
+ xTextShape->setPosition( rPosition );
+
+ m_aSelection.setSelection( xTextShape );
+ m_aSelection.applySelection( m_pDrawViewWrapper );
+
+ SdrObject* pObj = DrawViewWrapper::getSdrObject( xTextShape );
+ if ( pObj )
+ {
+ m_pDrawViewWrapper->BegUndo( SVX_RESSTR( RID_SVX_3D_UNDO_EXCHANGE_PASTE ) );
+ m_pDrawViewWrapper->AddUndo( new SdrUndoInsertObj( *pObj ) );
+ m_pDrawViewWrapper->EndUndo();
+ }
+ }
+ catch ( const uno::Exception& ex )
{
- xTransferable = Reference< datatransfer::XTransferable >( new ChartTransferable(
- & m_pDrawModelWrapper->getSdrModel(), pSelectedObj ));
+ ASSERT_EXCEPTION( ex );
}
}
}
- if( xTransferable.is() )
+}
+
+void ChartController::executeDispatch_Copy()
+{
+ if ( m_pDrawViewWrapper )
{
- Reference< datatransfer::clipboard::XClipboard > xClipboard( TransferableHelper::GetSystemClipboard());
- if( xClipboard.is())
- xClipboard->setContents( xTransferable, Reference< datatransfer::clipboard::XClipboardOwner >() );
+ OutlinerView* pOutlinerView = m_pDrawViewWrapper->GetTextEditOutlinerView();
+ if ( pOutlinerView )
+ {
+ pOutlinerView->Copy();
+ }
+ else
+ {
+ Reference< datatransfer::XTransferable > xTransferable;
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SdrObject* pSelectedObj = 0;
+ if ( m_pDrawModelWrapper )
+ {
+ ObjectIdentifier aSelOID( m_aSelection.getSelectedOID() );
+ if ( aSelOID.isAutoGeneratedObject() )
+ {
+ pSelectedObj = m_pDrawModelWrapper->getNamedSdrObject( aSelOID.getObjectCID() );
+ }
+ else if ( aSelOID.isAdditionalShape() )
+ {
+ pSelectedObj = DrawViewWrapper::getSdrObject( aSelOID.getAdditionalShape() );
+ }
+ if ( pSelectedObj )
+ {
+ xTransferable = Reference< datatransfer::XTransferable >( new ChartTransferable(
+ &m_pDrawModelWrapper->getSdrModel(), pSelectedObj, aSelOID.isAdditionalShape() ) );
+ }
+ }
+ }
+ if ( xTransferable.is() )
+ {
+ Reference< datatransfer::clipboard::XClipboard > xClipboard( TransferableHelper::GetSystemClipboard() );
+ if ( xClipboard.is() )
+ {
+ xClipboard->setContents( xTransferable, Reference< datatransfer::clipboard::XClipboardOwner >() );
+ }
+ }
+ }
}
}
@@ -501,9 +570,10 @@ void ChartController::executeDispatch_Cut()
//static
bool ChartController::isObjectDeleteable( const uno::Any& rSelection )
{
- OUString aSelObjCID;
- if( (rSelection >>= aSelObjCID) && aSelObjCID.getLength() > 0 )
+ ObjectIdentifier aSelOID( rSelection );
+ if ( aSelOID.isAutoGeneratedObject() )
{
+ OUString aSelObjCID( aSelOID.getObjectCID() );
ObjectType aObjectType(ObjectIdentifier::getObjectType( aSelObjCID ));
if( (OBJECTTYPE_TITLE == aObjectType) || (OBJECTTYPE_LEGEND == aObjectType)
|| (OBJECTTYPE_DATA_SERIES == aObjectType) )
@@ -516,6 +586,22 @@ bool ChartController::isObjectDeleteable( const uno::Any& rSelection )
if( (OBJECTTYPE_DATA_LABELS == aObjectType) || (OBJECTTYPE_DATA_LABEL == aObjectType) )
return true;
}
+ else if ( aSelOID.isAdditionalShape() )
+ {
+ return true;
+ }
+
+ return false;
+}
+
+bool ChartController::isShapeContext() const
+{
+ if ( m_aSelection.isAdditionalShapeSelected() ||
+ ( m_pDrawViewWrapper && m_pDrawViewWrapper->AreObjectsMarked() &&
+ ( m_pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_TEXT ) ) )
+ {
+ return true;
+ }
return false;
}
@@ -782,4 +868,13 @@ void ChartController::executeDispatch_ToggleGridHorizontal()
}
}
+void ChartController::impl_ShapeControllerDispatch( const util::URL& rURL, const Sequence< beans::PropertyValue >& rArgs )
+{
+ Reference< frame::XDispatch > xDispatch( m_aDispatchContainer.getShapeController() );
+ if ( xDispatch.is() )
+ {
+ xDispatch->dispatch( rURL, rArgs );
+ }
+}
+
} // namespace chart
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 951bb127f117..7822c8c1cc21 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartController_Window.cxx,v $
- * $Revision: 1.31.24.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -58,6 +55,8 @@
#include "AxisHelper.hxx"
#include "LegendHelper.hxx"
#include "servicenames_charttypes.hxx"
+#include "MenuResIds.hrc"
+#include "DrawCommandDispatch.hxx"
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/chart2/RelativeSize.hpp>
@@ -626,7 +625,10 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt )
if( pDrawViewWrapper->IsTextEdit() )
{
- if( pDrawViewWrapper->IsTextEditHit( aMPos, HITPIX) )
+ SdrViewEvent aVEvt;
+ if ( pDrawViewWrapper->IsTextEditHit( aMPos, HITPIX ) ||
+ // #i12587# support for shapes in chart
+ ( rMEvt.IsRight() && pDrawViewWrapper->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt ) == SDRHIT_MARKEDOBJECT ) )
{
pDrawViewWrapper->MouseButtonDown(rMEvt,m_pChartWindow);
return;
@@ -655,6 +657,39 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt )
//only change selection if no selection handles are hit
if( !pHitSelectionHdl )
{
+ // #i12587# support for shapes in chart
+ if ( m_eDrawMode == CHARTDRAW_INSERT &&
+ ( !pDrawViewWrapper->IsMarkedHit( aMPos ) || !m_aSelection.isDragableObjectSelected() ) )
+ {
+ if ( m_aSelection.hasSelection() )
+ {
+ m_aSelection.clearSelection();
+ }
+ if ( !pDrawViewWrapper->IsAction() )
+ {
+ if ( pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_CAPTION )
+ {
+ Size aCaptionSize( 2268, 1134 );
+ pDrawViewWrapper->BegCreateCaptionObj( aMPos, aCaptionSize );
+ }
+ else
+ {
+ pDrawViewWrapper->BegCreateObj( aMPos);
+ }
+ SdrObject* pObj = pDrawViewWrapper->GetCreateObj();
+ DrawCommandDispatch* pDrawCommandDispatch = m_aDispatchContainer.getDrawCommandDispatch();
+ if ( pObj && m_pDrawModelWrapper && pDrawCommandDispatch )
+ {
+ SfxItemSet aSet( m_pDrawModelWrapper->GetItemPool() );
+ pDrawCommandDispatch->setAttributes( pObj );
+ pDrawCommandDispatch->setLineEnds( aSet );
+ pObj->SetMergedItemSet( aSet );
+ }
+ }
+ impl_SetMousePointer( rMEvt );
+ return;
+ }
+
m_aSelection.adaptSelectionToNewPos( aMPos, pDrawViewWrapper
, rMEvt.IsRight(), m_bWaitingForDoubleClick );
@@ -757,7 +792,38 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
return;
}
- if(pDrawViewWrapper->IsDragObj())
+ // #i12587# support for shapes in chart
+ if ( m_eDrawMode == CHARTDRAW_INSERT && pDrawViewWrapper->IsCreateObj() )
+ {
+ pDrawViewWrapper->EndCreateObj( SDRCREATE_FORCEEND );
+ if ( pDrawViewWrapper->AreObjectsMarked() )
+ {
+ if ( pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_TEXT )
+ {
+ executeDispatch_EditText();
+ }
+ else
+ {
+ SdrObject* pObj = pDrawViewWrapper->getSelectedObject();
+ if ( pObj )
+ {
+ uno::Reference< drawing::XShape > xShape( pObj->getUnoShape(), uno::UNO_QUERY );
+ if ( xShape.is() )
+ {
+ m_aSelection.setSelection( xShape );
+ m_aSelection.applySelection( pDrawViewWrapper );
+ }
+ }
+ }
+ }
+ else
+ {
+ m_aSelection.adaptSelectionToNewPos( aMPos, pDrawViewWrapper, rMEvt.IsRight(), m_bWaitingForDoubleClick );
+ m_aSelection.applySelection( pDrawViewWrapper );
+ setDrawMode( CHARTDRAW_SELECT );
+ }
+ }
+ else if ( pDrawViewWrapper->IsDragObj() )
{
bool bDraggingDone = false;
SdrDragMethod* pDragMethod = pDrawViewWrapper->SdrView::GetDragMethod();
@@ -842,7 +908,11 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
m_aSelection.resetPossibleSelectionAfterSingleClickWasEnsured();
}
else if( isDoubleClick(rMEvt) )
- execute_DoubleClick();
+ {
+ // #i12587# support for shapes in chart
+ Point aMousePixel = rMEvt.GetPosPixel();
+ execute_DoubleClick( &aMousePixel );
+ }
//@todo ForcePointer(&rMEvt);
pWindow->ReleaseMouse();
@@ -857,13 +927,39 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
impl_notifySelectionChangeListeners();
}
-void ChartController::execute_DoubleClick()
+void ChartController::execute_DoubleClick( const Point* pMousePixel )
{
- ObjectType eObjectType = ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() );
- if( OBJECTTYPE_TITLE==eObjectType )
- executeDispatch_EditText();
+ bool bEditText = false;
+ if ( m_aSelection.hasSelection() )
+ {
+ ::rtl::OUString aCID( m_aSelection.getSelectedCID() );
+ if ( aCID.getLength() )
+ {
+ ObjectType eObjectType = ObjectIdentifier::getObjectType( aCID );
+ if ( OBJECTTYPE_TITLE == eObjectType )
+ {
+ bEditText = true;
+ }
+ }
+ else
+ {
+ // #i12587# support for shapes in chart
+ SdrObject* pObj = DrawViewWrapper::getSdrObject( m_aSelection.getSelectedAdditionalShape() );
+ if ( pObj && pObj->ISA( SdrTextObj ) )
+ {
+ bEditText = true;
+ }
+ }
+ }
+
+ if ( bEditText )
+ {
+ executeDispatch_EditText( pMousePixel );
+ }
else
+ {
executeDispatch_ObjectProperties();
+ }
}
void ChartController::execute_Resize()
@@ -910,272 +1006,288 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
if( m_aSelection.isSelectionDifferentFromBeforeMouseDown() )
impl_notifySelectionChangeListeners();
- // todo: the context menu should be specified by an xml file in uiconfig
- uno::Reference< awt::XPopupMenu > xPopupMenu(
- m_xCC->getServiceManager()->createInstanceWithContext(
- C2U("com.sun.star.awt.PopupMenu"), m_xCC ), uno::UNO_QUERY );
- uno::Reference< awt::XMenuExtended > xMenuEx( xPopupMenu, uno::UNO_QUERY );
- if( xPopupMenu.is() && xMenuEx.is())
+ if ( isShapeContext() )
+ {
+ // #i12587# support for shapes in chart
+ PopupMenu aContextMenu( SchResId( m_pDrawViewWrapper->IsTextEdit() ?
+ RID_CONTEXTMENU_SHAPEEDIT : RID_CONTEXTMENU_SHAPE ) );
+ ::svt::ContextMenuHelper aContextMenuHelper( m_xFrame );
+ Point aPos( rCEvt.GetMousePosPixel() );
+ if( !rCEvt.IsMouseEvent() )
+ {
+ aPos = m_pChartWindow->GetPointerState().maPos;
+ }
+ aContextMenuHelper.completeAndExecute( aPos, aContextMenu );
+ }
+ else
{
- sal_Int16 nUniqueId = 1;
- ObjectType eObjectType = ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() );
- Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram( m_aModel->getModel() );
+ // todo: the context menu should be specified by an xml file in uiconfig
+ uno::Reference< awt::XPopupMenu > xPopupMenu(
+ m_xCC->getServiceManager()->createInstanceWithContext(
+ C2U("com.sun.star.awt.PopupMenu"), m_xCC ), uno::UNO_QUERY );
+ uno::Reference< awt::XMenuExtended > xMenuEx( xPopupMenu, uno::UNO_QUERY );
+ if( xPopupMenu.is() && xMenuEx.is())
+ {
+ sal_Int16 nUniqueId = 1;
+ ObjectType eObjectType = ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() );
+ Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram( m_aModel->getModel() );
- OUString aFormatCommand( lcl_getFormatCommandForObjectCID( m_aSelection.getSelectedCID() ) );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, aFormatCommand );
+ OUString aFormatCommand( lcl_getFormatCommandForObjectCID( m_aSelection.getSelectedCID() ) );
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, aFormatCommand );
- //some commands for dataseries and points:
- //-----
- if( OBJECTTYPE_DATA_SERIES == eObjectType || OBJECTTYPE_DATA_POINT == eObjectType )
- {
- bool bIsPoint = ( OBJECTTYPE_DATA_POINT == eObjectType );
- uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
- 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, true );
- bool bHasDataLabelsAtSeries = DataSeriesHelper::hasDataLabelsAtSeries( xSeries );
- bool bHasDataLabelsAtPoints = DataSeriesHelper::hasDataLabelsAtPoints( xSeries );
- bool bHasDataLabelAtPoint = false;
- sal_Int32 nPointIndex = -1;
- if( bIsPoint )
+ //some commands for dataseries and points:
+ //-----
+ if( OBJECTTYPE_DATA_SERIES == eObjectType || OBJECTTYPE_DATA_POINT == eObjectType )
{
- nPointIndex = ObjectIdentifier::getIndexFromParticleOrCID( m_aSelection.getSelectedCID() );
- bHasDataLabelAtPoint = DataSeriesHelper::hasDataLabelAtPoint( xSeries, nPointIndex );
- }
- bool bSelectedPointIsFormatted = false;
- bool bHasFormattedDataPointsOtherThanSelected = false;
+ bool bIsPoint = ( OBJECTTYPE_DATA_POINT == eObjectType );
+ uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
+ 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, true );
+ 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;
- Reference< beans::XPropertySet > xSeriesProperties( xSeries, uno::UNO_QUERY );
- if( xSeriesProperties.is() )
- {
- uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeriesProperties->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList )
+ Reference< beans::XPropertySet > xSeriesProperties( xSeries, uno::UNO_QUERY );
+ if( xSeriesProperties.is() )
{
- if( aAttributedDataPointIndexList.hasElements() )
+ uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
+ if( xSeriesProperties->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList )
{
- if( bIsPoint )
+ if( aAttributedDataPointIndexList.hasElements() )
{
- ::std::vector< sal_Int32 > aIndices( ContainerHelper::SequenceToVector( aAttributedDataPointIndexList ) );
- ::std::vector< sal_Int32 >::iterator aIt = ::std::find( aIndices.begin(), aIndices.end(), nPointIndex );
- if( aIt != aIndices.end())
- bSelectedPointIsFormatted = true;
+ if( bIsPoint )
+ {
+ ::std::vector< sal_Int32 > aIndices( ContainerHelper::SequenceToVector( aAttributedDataPointIndexList ) );
+ ::std::vector< sal_Int32 >::iterator aIt = ::std::find( aIndices.begin(), aIndices.end(), nPointIndex );
+ if( aIt != aIndices.end())
+ bSelectedPointIsFormatted = true;
+ else
+ bHasFormattedDataPointsOtherThanSelected = true;
+ }
else
bHasFormattedDataPointsOtherThanSelected = true;
}
- else
- bHasFormattedDataPointsOtherThanSelected = true;
}
}
- }
-
- //const sal_Int32 nIdBeforeFormat = nUniqueId;
- if( bIsPoint )
- {
- if( bHasDataLabelAtPoint )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatDataLabel") );
- if( !bHasDataLabelAtPoint )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertDataLabel") );
- else
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteDataLabel") );
- if( bSelectedPointIsFormatted )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:ResetDataPoint"));
-
- xPopupMenu->insertSeparator( -1 );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatDataSeries") );
- }
+ //const sal_Int32 nIdBeforeFormat = nUniqueId;
+ if( bIsPoint )
+ {
+ if( bHasDataLabelAtPoint )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatDataLabel") );
+ if( !bHasDataLabelAtPoint )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertDataLabel") );
+ else
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteDataLabel") );
+ if( bSelectedPointIsFormatted )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:ResetDataPoint"));
+
+ xPopupMenu->insertSeparator( -1 );
+
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatDataSeries") );
+ }
- Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeOfSeries( xDiagram, xSeries ) );
- if( xChartType->getChartType().equals(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) )
- {
- try
+ Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeOfSeries( xDiagram, xSeries ) );
+ if( xChartType->getChartType().equals(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) )
{
- Reference< beans::XPropertySet > xChartTypeProp( xChartType, uno::UNO_QUERY );
- if( xChartTypeProp.is() )
+ try
{
- bool bJapaneseStyle = false;
- xChartTypeProp->getPropertyValue( C2U( "Japanese" ) ) >>= bJapaneseStyle;
-
- if( bJapaneseStyle )
+ Reference< beans::XPropertySet > xChartTypeProp( xChartType, uno::UNO_QUERY );
+ if( xChartTypeProp.is() )
{
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatStockLoss") );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatStockGain") );
+ bool bJapaneseStyle = false;
+ xChartTypeProp->getPropertyValue( C2U( "Japanese" ) ) >>= bJapaneseStyle;
+
+ if( bJapaneseStyle )
+ {
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatStockLoss") );
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatStockGain") );
+ }
}
}
+ catch( const uno::Exception & ex )
+ {
+ ASSERT_EXCEPTION( ex );
+ }
}
- catch( const uno::Exception & ex )
+
+ if( bHasDataLabelsAtSeries )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatDataLabels") );
+ if( xTrendline.is() )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatTrendline") );
+ if( bHasEquation )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatTrendlineEquation") );
+ if( xMeanValue.is() )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatMeanValue") );
+ if( bHasYErrorBars )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatYErrorBars") );
+
+ //if( nIdBeforeFormat != nUniqueId )
+ xPopupMenu->insertSeparator( -1 );
+
+ //const sal_Int32 nIdBeforeInsert = nUniqueId;
+
+ if( !bHasDataLabelsAtSeries )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertDataLabels") );
+ if( !xTrendline.is() )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTrendline") );
+ else if( !bHasEquation )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTrendlineEquation") );
+ if( !xMeanValue.is() )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertMeanValue") );
+ if( !bHasYErrorBars )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertYErrorBars") );
+
+ //if( nIdBeforeInsert != nUniqueId )
+ // xPopupMenu->insertSeparator( -1 );
+
+ //const sal_Int32 nIdBeforeDelete = nUniqueId;
+
+ if( bHasDataLabelsAtSeries || ( bHasDataLabelsAtPoints && bHasFormattedDataPointsOtherThanSelected ) )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteDataLabels") );
+ if( xTrendline.is() )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteTrendline") );
+ if( bHasEquation )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteTrendlineEquation") );
+ if( xMeanValue.is() )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteMeanValue") );
+ if( bHasYErrorBars )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteYErrorBars") );
+
+ if( bHasFormattedDataPointsOtherThanSelected )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:ResetAllDataPoints"));
+
+ //if( nIdBeforeDelete != nUniqueId )
+ xPopupMenu->insertSeparator( -1 );
+
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId, C2U(".uno:ArrangeRow"));
+ uno::Reference< awt::XPopupMenu > xArrangePopupMenu(
+ m_xCC->getServiceManager()->createInstanceWithContext(
+ C2U("com.sun.star.awt.PopupMenu"), m_xCC ), uno::UNO_QUERY );
+ uno::Reference< awt::XMenuExtended > xArrangeMenuEx( xArrangePopupMenu, uno::UNO_QUERY );
+ if( xArrangePopupMenu.is() && xArrangeMenuEx.is())
{
- ASSERT_EXCEPTION( ex );
+ sal_Int16 nSubId = nUniqueId + 1;
+ lcl_insertMenuCommand( xArrangePopupMenu, xArrangeMenuEx, nSubId++, C2U(".uno:Forward") );
+ lcl_insertMenuCommand( xArrangePopupMenu, xArrangeMenuEx, nSubId, C2U(".uno:Backward") );
+ xPopupMenu->setPopupMenu( nUniqueId, xArrangePopupMenu );
+ nUniqueId = nSubId;
}
+ ++nUniqueId;
}
-
- if( bHasDataLabelsAtSeries )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatDataLabels") );
- if( xTrendline.is() )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatTrendline") );
- if( bHasEquation )
+ else if( OBJECTTYPE_DATA_CURVE == eObjectType )
+ {
lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatTrendlineEquation") );
- if( xMeanValue.is() )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatMeanValue") );
- if( bHasYErrorBars )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatYErrorBars") );
-
- //if( nIdBeforeFormat != nUniqueId )
- xPopupMenu->insertSeparator( -1 );
-
- //const sal_Int32 nIdBeforeInsert = nUniqueId;
-
- if( !bHasDataLabelsAtSeries )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertDataLabels") );
- if( !xTrendline.is() )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTrendline") );
- else if( !bHasEquation )
lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTrendlineEquation") );
- if( !xMeanValue.is() )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertMeanValue") );
- if( !bHasYErrorBars )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertYErrorBars") );
-
- //if( nIdBeforeInsert != nUniqueId )
- // xPopupMenu->insertSeparator( -1 );
-
- //const sal_Int32 nIdBeforeDelete = nUniqueId;
-
- if( bHasDataLabelsAtSeries || ( bHasDataLabelsAtPoints && bHasFormattedDataPointsOtherThanSelected ) )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteDataLabels") );
- if( xTrendline.is() )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteTrendline") );
- if( bHasEquation )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTrendlineEquationAndR2") );
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertR2Value") );
lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteTrendlineEquation") );
- if( xMeanValue.is() )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteMeanValue") );
- if( bHasYErrorBars )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteYErrorBars") );
-
- if( bHasFormattedDataPointsOtherThanSelected )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:ResetAllDataPoints"));
-
- //if( nIdBeforeDelete != nUniqueId )
- xPopupMenu->insertSeparator( -1 );
-
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId, C2U(".uno:ArrangeRow"));
- uno::Reference< awt::XPopupMenu > xArrangePopupMenu(
- m_xCC->getServiceManager()->createInstanceWithContext(
- C2U("com.sun.star.awt.PopupMenu"), m_xCC ), uno::UNO_QUERY );
- uno::Reference< awt::XMenuExtended > xArrangeMenuEx( xArrangePopupMenu, uno::UNO_QUERY );
- if( xArrangePopupMenu.is() && xArrangeMenuEx.is())
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteR2Value") );
+ }
+ else if( OBJECTTYPE_DATA_CURVE_EQUATION == eObjectType )
{
- sal_Int16 nSubId = nUniqueId + 1;
- lcl_insertMenuCommand( xArrangePopupMenu, xArrangeMenuEx, nSubId++, C2U(".uno:Forward") );
- lcl_insertMenuCommand( xArrangePopupMenu, xArrangeMenuEx, nSubId, C2U(".uno:Backward") );
- xPopupMenu->setPopupMenu( nUniqueId, xArrangePopupMenu );
- nUniqueId = nSubId;
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertR2Value") );
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteR2Value") );
}
- ++nUniqueId;
- }
- else if( OBJECTTYPE_DATA_CURVE == eObjectType )
- {
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatTrendlineEquation") );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTrendlineEquation") );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTrendlineEquationAndR2") );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertR2Value") );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteTrendlineEquation") );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteR2Value") );
- }
- else if( OBJECTTYPE_DATA_CURVE_EQUATION == eObjectType )
- {
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertR2Value") );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteR2Value") );
- }
- //some commands for axes: and grids
- //-----
- else if( OBJECTTYPE_AXIS == eObjectType || OBJECTTYPE_GRID == eObjectType || OBJECTTYPE_SUBGRID == eObjectType )
- {
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
- if( xAxis.is() && xDiagram.is() )
+ //some commands for axes: and grids
+ //-----
+ else if( OBJECTTYPE_AXIS == eObjectType || OBJECTTYPE_GRID == eObjectType || OBJECTTYPE_SUBGRID == eObjectType )
{
- 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() ).getLength()>0;
-
- if( OBJECTTYPE_AXIS != eObjectType && bIsAxisVisible )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatAxis") );
- if( OBJECTTYPE_GRID != eObjectType && bIsMajorGridVisible && !bIsSecondaryAxis )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatMajorGrid") );
- if( OBJECTTYPE_SUBGRID != eObjectType && bIsMinorGridVisible && !bIsSecondaryAxis )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatMinorGrid") );
-
- xPopupMenu->insertSeparator( -1 );
-
- if( OBJECTTYPE_AXIS != eObjectType && !bIsAxisVisible )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertAxis") );
- if( OBJECTTYPE_GRID != eObjectType && !bIsMajorGridVisible && !bIsSecondaryAxis )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertMajorGrid") );
- if( OBJECTTYPE_SUBGRID != eObjectType && !bIsMinorGridVisible && !bIsSecondaryAxis )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertMinorGrid") );
- if( !bHasTitle )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertAxisTitle") );
-
- if( bIsAxisVisible )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteAxis") );
- if( bIsMajorGridVisible && !bIsSecondaryAxis )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteMajorGrid") );
- if( bIsMinorGridVisible && !bIsSecondaryAxis )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteMinorGrid") );
+ Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
+ 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() ).getLength()>0;
+
+ if( OBJECTTYPE_AXIS != eObjectType && bIsAxisVisible )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatAxis") );
+ if( OBJECTTYPE_GRID != eObjectType && bIsMajorGridVisible && !bIsSecondaryAxis )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatMajorGrid") );
+ if( OBJECTTYPE_SUBGRID != eObjectType && bIsMinorGridVisible && !bIsSecondaryAxis )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatMinorGrid") );
+
+ xPopupMenu->insertSeparator( -1 );
+
+ if( OBJECTTYPE_AXIS != eObjectType && !bIsAxisVisible )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertAxis") );
+ if( OBJECTTYPE_GRID != eObjectType && !bIsMajorGridVisible && !bIsSecondaryAxis )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertMajorGrid") );
+ if( OBJECTTYPE_SUBGRID != eObjectType && !bIsMinorGridVisible && !bIsSecondaryAxis )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertMinorGrid") );
+ if( !bHasTitle )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertAxisTitle") );
+
+ if( bIsAxisVisible )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteAxis") );
+ if( bIsMajorGridVisible && !bIsSecondaryAxis )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteMajorGrid") );
+ if( bIsMinorGridVisible && !bIsSecondaryAxis )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteMinorGrid") );
+ }
}
- }
- if( OBJECTTYPE_DATA_STOCK_LOSS == eObjectType )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatStockGain") );
- else if( OBJECTTYPE_DATA_STOCK_GAIN == eObjectType )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatStockLoss") );
+ if( OBJECTTYPE_DATA_STOCK_LOSS == eObjectType )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatStockGain") );
+ else if( OBJECTTYPE_DATA_STOCK_GAIN == eObjectType )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatStockLoss") );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:TransformDialog"));
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:TransformDialog"));
- if( OBJECTTYPE_PAGE == eObjectType || OBJECTTYPE_DIAGRAM == eObjectType
- || OBJECTTYPE_DIAGRAM_WALL == eObjectType
- || OBJECTTYPE_DIAGRAM_FLOOR == eObjectType
- || OBJECTTYPE_UNKNOWN == eObjectType )
- {
- if( OBJECTTYPE_UNKNOWN != eObjectType )
- xPopupMenu->insertSeparator( -1 );
- bool bHasLegend = LegendHelper::hasLegend( xDiagram );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTitles") );
- if( !bHasLegend )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertLegend") );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertRemoveAxes") );
- if( bHasLegend )
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteLegend") );
+ if( OBJECTTYPE_PAGE == eObjectType || OBJECTTYPE_DIAGRAM == eObjectType
+ || OBJECTTYPE_DIAGRAM_WALL == eObjectType
+ || OBJECTTYPE_DIAGRAM_FLOOR == eObjectType
+ || OBJECTTYPE_UNKNOWN == eObjectType )
+ {
+ if( OBJECTTYPE_UNKNOWN != eObjectType )
+ xPopupMenu->insertSeparator( -1 );
+ bool bHasLegend = LegendHelper::hasLegend( xDiagram );
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTitles") );
+ if( !bHasLegend )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertLegend") );
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertRemoveAxes") );
+ if( bHasLegend )
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteLegend") );
+ }
+ //-----
+
+ xPopupMenu->insertSeparator( -1 );
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DiagramType"));
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DataRanges"));
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DiagramData"));
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:View3D"));
+ xPopupMenu->insertSeparator( -1 );
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:Cut"));
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:Copy"));
+ lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:Paste"));
+
+ ::svt::ContextMenuHelper aContextMenuHelper( m_xFrame );
+ Point aPos( rCEvt.GetMousePosPixel() );
+ if( !rCEvt.IsMouseEvent() )
+ aPos = m_pChartWindow->GetPointerState().maPos;
+ aContextMenuHelper.completeAndExecute( aPos, xPopupMenu );
}
- //-----
-
- xPopupMenu->insertSeparator( -1 );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DiagramType"));
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DataRanges"));
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DiagramData"));
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:View3D"));
- xPopupMenu->insertSeparator( -1 );
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:Cut"));
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:Copy"));
- lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:Paste"));
-
- ::svt::ContextMenuHelper aContextMenuHelper( m_xFrame );
- Point aPos( rCEvt.GetMousePosPixel() );
- if( !rCEvt.IsMouseEvent() )
- aPos = m_pChartWindow->GetPointerState().maPos;
- aContextMenuHelper.completeAndExecute( aPos, xPopupMenu );
}
}
else if( ( rCEvt.GetCommand() == COMMAND_STARTEXTTEXTINPUT ) ||
@@ -1238,17 +1350,21 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
{
// Natvigation (Tab/F3/Home/End)
uno::Reference< XChartDocument > xChartDoc( m_aModel->getModel(), uno::UNO_QUERY );
- ObjectKeyNavigation aObjNav( m_aSelection.getSelectedCID(), xChartDoc, ExplicitValueProvider::getExplicitValueProvider( m_xChartView ));
+ ObjectKeyNavigation aObjNav( m_aSelection.getSelectedOID(), xChartDoc, ExplicitValueProvider::getExplicitValueProvider( m_xChartView ));
awt::KeyEvent aKeyEvent( ::svt::AcceleratorExecute::st_VCLKey2AWTKey( aKeyCode ));
bReturn = aObjNav.handleKeyEvent( aKeyEvent );
if( bReturn )
{
- ::rtl::OUString aNewCID = aObjNav.getCurrentSelection();
+ ObjectIdentifier aNewOID = aObjNav.getCurrentSelection();
uno::Any aNewSelection;
- if( aNewCID.getLength()>0 && !ObjectHierarchy::isRootNode( aNewCID ))
- aNewSelection <<= aNewCID;
- if( m_eDragMode == SDRDRAG_ROTATE && !SelectionHelper::isRotateableObject( aNewCID, m_aModel->getModel() ) )
+ if ( aNewOID.isValid() && !ObjectHierarchy::isRootNode( aNewOID ) )
+ {
+ aNewSelection = aNewOID.getAny();
+ }
+ if ( m_eDragMode == SDRDRAG_ROTATE && !SelectionHelper::isRotateableObject( aNewOID.getObjectCID(), m_aModel->getModel() ) )
+ {
m_eDragMode = SDRDRAG_MOVE;
+ }
bReturn = select( aNewSelection );
}
}
@@ -1501,24 +1617,64 @@ bool ChartController::requestQuickHelp(
::select( const uno::Any& rSelection )
throw( lang::IllegalArgumentException )
{
- rtl::OUString aNewCID;
- if( rSelection.hasValue() &&
- ! (rSelection >>= aNewCID))
- return sal_False;
+ bool bSuccess = false;
+ if ( rSelection.hasValue() )
+ {
+ const uno::Type& rType = rSelection.getValueType();
+ if ( rType == ::getCppuType( static_cast< const ::rtl::OUString* >( 0 ) ) )
+ {
+ ::rtl::OUString aNewCID;
+ if ( ( rSelection >>= aNewCID ) && m_aSelection.setSelection( aNewCID ) )
+ {
+ bSuccess = true;
+ }
+ }
+ else if ( rType == ::getCppuType( static_cast< const uno::Reference< drawing::XShape >* >( 0 ) ) )
+ {
+ uno::Reference< drawing::XShape > xShape;
+ if ( ( rSelection >>= xShape ) && m_aSelection.setSelection( xShape ) )
+ {
+ bSuccess = true;
+ }
+ }
+ }
+ else
+ {
+ if ( m_aSelection.hasSelection() )
+ {
+ m_aSelection.clearSelection();
+ bSuccess = true;
+ }
+ }
- if( m_aSelection.setSelection( aNewCID ) )
+ if ( bSuccess )
{
this->impl_selectObjectAndNotiy();
return sal_True;
}
+
return sal_False;
}
uno::Any SAL_CALL ChartController
::getSelection() throw(uno::RuntimeException)
{
- return uno::makeAny(m_aSelection.getSelectedCID());
+ uno::Any aReturn;
+ if ( m_aSelection.hasSelection() )
+ {
+ ::rtl::OUString aCID( m_aSelection.getSelectedCID() );
+ if ( aCID.getLength() )
+ {
+ aReturn = uno::makeAny( aCID );
+ }
+ else
+ {
+ // #i12587# support for shapes in chart
+ aReturn = uno::makeAny( m_aSelection.getSelectedAdditionalShape() );
+ }
+ }
+ return aReturn;
}
void SAL_CALL ChartController
@@ -1704,7 +1860,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
sal_uInt16 nModifier = rEvent.GetModifier();
BOOL bLeftDown = rEvent.IsLeft();
- if( m_pDrawViewWrapper->IsTextEdit() )
+ if ( m_pDrawViewWrapper->IsTextEdit() )
{
if( m_pDrawViewWrapper->IsTextEditHit( aMousePos, HITPIX) )
{
@@ -1729,7 +1885,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
aMousePos, pWindow, nModifier, bLeftDown );
bool bForceArrowPointer = false;
- ::rtl::OUString aObjectCID = m_aSelection.getSelectedCID();
+ ObjectIdentifier aOID( m_aSelection.getSelectedOID() );
switch( aPointer.GetStyle())
{
@@ -1745,7 +1901,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
bForceArrowPointer = true;
break;
case POINTER_MOVE:
- if( ! ObjectIdentifier::isDragableObject( aObjectCID ))
+ if ( !aOID.isDragableObject() )
bForceArrowPointer = true;
break;
case POINTER_MOVEPOINT:
@@ -1765,6 +1921,55 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
}
else
{
+ // #i12587# support for shapes in chart
+ if ( m_eDrawMode == CHARTDRAW_INSERT &&
+ ( !m_pDrawViewWrapper->IsMarkedHit( aMousePos ) || !m_aSelection.isDragableObjectSelected() ) )
+ {
+ PointerStyle ePointerStyle = POINTER_DRAW_RECT;
+ SdrObjKind eKind = static_cast< SdrObjKind >( m_pDrawViewWrapper->GetCurrentObjIdentifier() );
+ switch ( eKind )
+ {
+ case OBJ_LINE:
+ {
+ ePointerStyle = POINTER_DRAW_LINE;
+ }
+ break;
+ case OBJ_RECT:
+ case OBJ_CUSTOMSHAPE:
+ {
+ ePointerStyle = POINTER_DRAW_RECT;
+ }
+ break;
+ case OBJ_CIRC:
+ {
+ ePointerStyle = POINTER_DRAW_ELLIPSE;
+ }
+ break;
+ case OBJ_FREELINE:
+ {
+ ePointerStyle = POINTER_DRAW_POLYGON;
+ }
+ break;
+ case OBJ_TEXT:
+ {
+ ePointerStyle = POINTER_DRAW_TEXT;
+ }
+ break;
+ case OBJ_CAPTION:
+ {
+ ePointerStyle = POINTER_DRAW_CAPTION;
+ }
+ break;
+ default:
+ {
+ ePointerStyle = POINTER_DRAW_RECT;
+ }
+ break;
+ }
+ pWindow->SetPointer( Pointer( ePointerStyle ) );
+ return;
+ }
+
::rtl::OUString aHitObjectCID(
SelectionHelper::getHitObjectCID(
aMousePos, *m_pDrawViewWrapper, true /*bGetDiagramInsteadOf_Wall*/ ));
diff --git a/chart2/source/controller/main/ChartDropTargetHelper.cxx b/chart2/source/controller/main/ChartDropTargetHelper.cxx
index 0a73a1734ac1..8749ca1bc062 100644
--- a/chart2/source/controller/main/ChartDropTargetHelper.cxx
+++ b/chart2/source/controller/main/ChartDropTargetHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartDropTargetHelper.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/ChartDropTargetHelper.hxx b/chart2/source/controller/main/ChartDropTargetHelper.hxx
index 35ab584d88a8..2de9c0c72663 100644
--- a/chart2/source/controller/main/ChartDropTargetHelper.hxx
+++ b/chart2/source/controller/main/ChartDropTargetHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartDropTargetHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx
index 675c2f3ccd31..cab3816d5033 100644
--- a/chart2/source/controller/main/ChartFrameloader.cxx
+++ b/chart2/source/controller/main/ChartFrameloader.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartFrameloader.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/ChartFrameloader.hxx b/chart2/source/controller/main/ChartFrameloader.hxx
index b2e559e7b279..8b6e1e0a3225 100644
--- a/chart2/source/controller/main/ChartFrameloader.hxx
+++ b/chart2/source/controller/main/ChartFrameloader.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartFrameloader.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/ChartRenderer.cxx b/chart2/source/controller/main/ChartRenderer.cxx
index 60d13981c00f..3419f7a53bec 100644
--- a/chart2/source/controller/main/ChartRenderer.cxx
+++ b/chart2/source/controller/main/ChartRenderer.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartRenderer.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/ChartTransferable.cxx b/chart2/source/controller/main/ChartTransferable.cxx
index b1caca405dda..80041d4c3818 100644
--- a/chart2/source/controller/main/ChartTransferable.cxx
+++ b/chart2/source/controller/main/ChartTransferable.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartTransferable.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,12 +30,21 @@
#include "ChartTransferable.hxx"
+#include <unotools/streamwrap.hxx>
#include <vcl/graph.hxx>
+#include <svl/itempool.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <svx/svditer.hxx>
#include <svx/svdmodel.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/unomodel.hxx>
// header for class SdrView
#include <svx/svdview.hxx>
+#define CHARTTRANSFER_OBJECTTYPE_DRAWMODEL 1
+
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
@@ -48,7 +54,9 @@ using ::rtl::OUString;
namespace chart
{
-ChartTransferable::ChartTransferable( SdrModel * pDrawModel, SdrObject * pSelectedObj )
+ChartTransferable::ChartTransferable( SdrModel* pDrawModel, SdrObject* pSelectedObj, bool bDrawing )
+ :m_pMarkedObjModel( NULL )
+ ,m_bDrawing( bDrawing )
{
SdrExchangeView * pExchgView( new SdrView( pDrawModel ));
SdrPageView* pPv = pExchgView->ShowSdrPage( pDrawModel->GetPage( 0 ));
@@ -58,6 +66,10 @@ ChartTransferable::ChartTransferable( SdrModel * pDrawModel, SdrObject * pSelect
pExchgView->MarkAllObj( pPv );
Graphic aGraphic( pExchgView->GetMarkedObjMetaFile( TRUE ));
m_xMetaFileGraphic.set( aGraphic.GetXGraphic());
+ if ( m_bDrawing )
+ {
+ m_pMarkedObjModel = ( pExchgView ? pExchgView->GetAllMarkedModel() : NULL );
+ }
delete pExchgView;
}
@@ -66,6 +78,10 @@ ChartTransferable::~ChartTransferable()
void ChartTransferable::AddSupportedFormats()
{
+ if ( m_bDrawing )
+ {
+ AddFormat( SOT_FORMATSTR_ID_DRAWING );
+ }
AddFormat( SOT_FORMAT_GDIMETAFILE );
AddFormat( SOT_FORMAT_BITMAP );
}
@@ -77,7 +93,11 @@ sal_Bool ChartTransferable::GetData( const ::com::sun::star::datatransfer::DataF
if( HasFormat( nFormat ))
{
- if( nFormat == FORMAT_GDIMETAFILE )
+ if ( nFormat == SOT_FORMATSTR_ID_DRAWING )
+ {
+ bResult = SetObject( m_pMarkedObjModel, CHARTTRANSFER_OBJECTTYPE_DRAWMODEL, rFlavor );
+ }
+ else if ( nFormat == FORMAT_GDIMETAFILE )
{
Graphic aGraphic( m_xMetaFileGraphic );
bResult = SetGDIMetaFile( aGraphic.GetGDIMetaFile(), rFlavor );
@@ -92,5 +112,61 @@ sal_Bool ChartTransferable::GetData( const ::com::sun::star::datatransfer::DataF
return bResult;
}
+sal_Bool ChartTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId,
+ const datatransfer::DataFlavor& /* rFlavor */ )
+{
+ // called from SetObject, put data into stream
+
+ sal_Bool bRet = sal_False;
+ switch ( nUserObjectId )
+ {
+ case CHARTTRANSFER_OBJECTTYPE_DRAWMODEL:
+ {
+ SdrModel* pMarkedObjModel = reinterpret_cast< SdrModel* >( pUserObject );
+ if ( pMarkedObjModel )
+ {
+ rxOStm->SetBufferSize( 0xff00 );
+
+ // #108584#
+ // 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 = static_cast< const SvxFontHeightItem& >(
+ rItemPool.GetDefaultItem( EE_CHAR_FONTHEIGHT ) );
+ sal_uInt16 nCount = pMarkedObjModel->GetPageCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ {
+ const SdrPage* pPage = pMarkedObjModel->GetPage( i );
+ SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
+ while ( aIter.IsMore() )
+ {
+ SdrObject* pObj = aIter.Next();
+ const SvxFontHeightItem& rItem = static_cast< const SvxFontHeightItem& >(
+ pObj->GetMergedItem( EE_CHAR_FONTHEIGHT ) );
+ if ( rItem.GetHeight() == rDefaultFontHeight.GetHeight() )
+ {
+ pObj->SetMergedItem( rDefaultFontHeight );
+ }
+ }
+ }
+
+ Reference< io::XOutputStream > xDocOut( new utl::OOutputStreamWrapper( *rxOStm ) );
+ if ( SvxDrawingLayerExport( pMarkedObjModel, xDocOut ) )
+ {
+ rxOStm->Commit();
+ }
+
+ bRet = ( rxOStm->GetError() == ERRCODE_NONE );
+ }
+ }
+ break;
+ default:
+ {
+ DBG_ERROR( "ChartTransferable::WriteObject: unknown object id" );
+ }
+ break;
+ }
+ return bRet;
+}
} // namespace chart
diff --git a/chart2/source/controller/main/ChartTransferable.hxx b/chart2/source/controller/main/ChartTransferable.hxx
index 114ec38896f8..401f43c6d1ae 100644
--- a/chart2/source/controller/main/ChartTransferable.hxx
+++ b/chart2/source/controller/main/ChartTransferable.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartTransferable.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -47,7 +44,7 @@ namespace chart
class ChartTransferable : public TransferableHelper
{
public:
- explicit ChartTransferable( SdrModel * pDrawModel, SdrObject * pSelectedObj );
+ explicit ChartTransferable( SdrModel* pDrawModel, SdrObject* pSelectedObj, bool bDrawing = false );
virtual ~ChartTransferable();
protected:
@@ -55,9 +52,13 @@ protected:
// implementation of TransferableHelper methods
virtual void AddSupportedFormats();
virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual sal_Bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId,
+ const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
private:
::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > m_xMetaFileGraphic;
+ SdrModel* m_pMarkedObjModel;
+ bool m_bDrawing;
};
} // namespace chart
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index 10b999df8f43..240b615cf0f6 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartWindow.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/ChartWindow.hxx b/chart2/source/controller/main/ChartWindow.hxx
index 543c0b13ffdc..2325d6be7803 100644
--- a/chart2/source/controller/main/ChartWindow.hxx
+++ b/chart2/source/controller/main/ChartWindow.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartWindow.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/CommandDispatch.cxx b/chart2/source/controller/main/CommandDispatch.cxx
index 992204c37b96..bd040fce8fff 100644
--- a/chart2/source/controller/main/CommandDispatch.cxx
+++ b/chart2/source/controller/main/CommandDispatch.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CommandDispatch.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/CommandDispatch.hxx b/chart2/source/controller/main/CommandDispatch.hxx
index 85a137769268..08140786ac4e 100644
--- a/chart2/source/controller/main/CommandDispatch.hxx
+++ b/chart2/source/controller/main/CommandDispatch.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CommandDispatch.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx
index 72e8dcf5ed8e..3761d0c33ce0 100644
--- a/chart2/source/controller/main/CommandDispatchContainer.cxx
+++ b/chart2/source/controller/main/CommandDispatchContainer.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CommandDispatchContainer.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,6 +33,9 @@
#include "StatusBarCommandDispatch.hxx"
#include "DisposeHelper.hxx"
#include "macros.hxx"
+#include "ChartController.hxx"
+#include "DrawCommandDispatch.hxx"
+#include "ShapeController.hxx"
#include <comphelper/InlineContainer.hxx>
@@ -51,8 +51,11 @@ namespace chart
{
CommandDispatchContainer::CommandDispatchContainer(
- const Reference< uno::XComponentContext > & xContext ) :
- m_xContext( xContext )
+ const Reference< uno::XComponentContext > & xContext, ChartController* pController )
+ :m_xContext( xContext )
+ ,m_pChartController( pController )
+ ,m_pDrawCommandDispatch( NULL )
+ ,m_pShapeController( NULL )
{
m_aContainerDocumentCommands =
::comphelper::MakeSet< OUString >
@@ -78,21 +81,20 @@ void CommandDispatchContainer::setModel(
// m_xUndoManager = xUndoManager;
// }
-void CommandDispatchContainer::setFallbackDispatch(
- const Reference< frame::XDispatch > xFallbackDispatch,
- const ::std::set< OUString > & rFallbackCommands )
+void CommandDispatchContainer::setChartDispatch(
+ const Reference< frame::XDispatch > xChartDispatch,
+ const ::std::set< OUString > & rChartCommands )
{
- OSL_ENSURE(xFallbackDispatch.is(),"Invalid fall back dispatcher!");
- m_xFallbackDispatcher.set( xFallbackDispatch );
- m_aFallbackCommands = rFallbackCommands;
- m_aToBeDisposedDispatches.push_back( m_xFallbackDispatcher );
+ OSL_ENSURE(xChartDispatch.is(),"Invalid fall back dispatcher!");
+ m_xChartDispatcher.set( xChartDispatch );
+ m_aChartCommands = rChartCommands;
+ m_aToBeDisposedDispatches.push_back( m_xChartDispatcher );
}
Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL(
const util::URL & rURL )
{
Reference< frame::XDispatch > xResult;
-
tDispatchMap::const_iterator aIt( m_aCachedDispatches.find( rURL.Complete ));
if( aIt != m_aCachedDispatches.end())
{
@@ -130,10 +132,24 @@ Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL(
// ToDo: can those dispatches be cached?
m_aCachedDispatches[ rURL.Complete ].set( xResult );
}
- else if( m_xFallbackDispatcher.is() &&
- (m_aFallbackCommands.find( rURL.Path ) != m_aFallbackCommands.end()) )
+ else if( m_xChartDispatcher.is() &&
+ (m_aChartCommands.find( rURL.Path ) != m_aChartCommands.end()) )
+ {
+ xResult.set( m_xChartDispatcher );
+ m_aCachedDispatches[ rURL.Complete ].set( xResult );
+ }
+ // #i12587# support for shapes in chart
+ // Note, that the chart dispatcher must be queried first, because
+ // the chart dispatcher is the default dispatcher for all context
+ // sensitive commands.
+ else if ( m_pDrawCommandDispatch && m_pDrawCommandDispatch->isFeatureSupported( rURL.Complete ) )
+ {
+ xResult.set( m_pDrawCommandDispatch );
+ m_aCachedDispatches[ rURL.Complete ].set( xResult );
+ }
+ else if ( m_pShapeController && m_pShapeController->isFeatureSupported( rURL.Complete ) )
{
- xResult.set( m_xFallbackDispatcher );
+ xResult.set( m_pShapeController );
m_aCachedDispatches[ rURL.Complete ].set( xResult );
}
}
@@ -160,8 +176,11 @@ void CommandDispatchContainer::DisposeAndClear()
m_aCachedDispatches.clear();
DisposeHelper::DisposeAllElements( m_aToBeDisposedDispatches );
m_aToBeDisposedDispatches.clear();
- m_xFallbackDispatcher.clear();
- m_aFallbackCommands.clear();
+ m_xChartDispatcher.clear();
+ m_aChartCommands.clear();
+ m_pChartController = NULL;
+ m_pDrawCommandDispatch = NULL;
+ m_pShapeController = NULL;
}
Reference< frame::XDispatch > CommandDispatchContainer::getContainerDispatchForURL(
@@ -182,4 +201,16 @@ Reference< frame::XDispatch > CommandDispatchContainer::getContainerDispatchForU
return xResult;
}
+void CommandDispatchContainer::setDrawCommandDispatch( DrawCommandDispatch* pDispatch )
+{
+ m_pDrawCommandDispatch = pDispatch;
+ m_aToBeDisposedDispatches.push_back( Reference< frame::XDispatch >( pDispatch ) );
+}
+
+void CommandDispatchContainer::setShapeController( ShapeController* pController )
+{
+ m_pShapeController = pController;
+ m_aToBeDisposedDispatches.push_back( Reference< frame::XDispatch >( pController ) );
+}
+
} // namespace chart
diff --git a/chart2/source/controller/main/CommandDispatchContainer.hxx b/chart2/source/controller/main/CommandDispatchContainer.hxx
index 90b9c94cc5d5..2cee65405ef4 100644
--- a/chart2/source/controller/main/CommandDispatchContainer.hxx
+++ b/chart2/source/controller/main/CommandDispatchContainer.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CommandDispatchContainer.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -44,6 +41,10 @@
namespace chart
{
+class ChartController;
+class DrawCommandDispatch;
+class ShapeController;
+
/** @HTML
Helper class for implementing the <code>XDispatchProvider</code> interface
@@ -56,9 +57,9 @@ namespace chart
<li>Check if the command is handled by this class, e.g. Undo. If so,
return a corresponding <code>XDispatch</code> implementation, and cache
this implementation for later use</li>
- <li>Otherwise send the command to the fallback dispatch provider, if it
+ <li>Otherwise send the command to the chart dispatch provider, if it
can handle this dispatch (determined by the list of commands given in
- <code>setFallbackDispatch()</code>).</li>
+ <code>setChartDispatch()</code>).</li>
</ul>
<p>The <code>XDispatch</code>Provider is designed to return different
@@ -68,17 +69,18 @@ namespace chart
<p>As most commands need much information of the controller and are
implemented there, the controller handles most of the commands itself (it
also implements <code>XDispatch</code>). Therefore it is set here as
- fallback dispatch.</p>
+ chart dispatch.</p>
*/
class CommandDispatchContainer
{
public:
- // note: the fallback dispatcher should be removed when all commands are
- // handled by other dispatchers. (Fallback is currently the controller
+ // note: the chart dispatcher should be removed when all commands are
+ // handled by other dispatchers. (Chart is currently the controller
// itself)
explicit CommandDispatchContainer(
const ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XComponentContext > & xContext );
+ ::com::sun::star::uno::XComponentContext > & xContext,
+ ChartController* pController );
void setModel(
const ::com::sun::star::uno::Reference<
@@ -87,18 +89,18 @@ public:
// const ::com::sun::star::uno::Reference<
// ::com::sun::star::chart2::XUndoManager > & xUndoManager );
- /** Set a fallback dispatcher that is used for all commands contained in
- rFallbackCommands
+ /** Set a chart dispatcher that is used for all commands contained in
+ rChartCommands
*/
- void setFallbackDispatch(
+ void setChartDispatch(
const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XDispatch > xFallbackDispatch,
- const ::std::set< ::rtl::OUString > & rFallbackCommands );
+ ::com::sun::star::frame::XDispatch > xChartDispatch,
+ const ::std::set< ::rtl::OUString > & rChartCommands );
/** Returns the dispatch that is able to do the command given in rURL, if
implemented here. If the URL is not implemented here, it should be
- checked whether the command is one of the commands given as fallback via
- the setFallbackDispatch() method. If so, call the fallback dispatch.
+ checked whether the command is one of the commands given via
+ the setChartDispatch() method. If so, call the chart dispatch.
<p>If all this fails, return an empty dispatch.</p>
*/
@@ -119,6 +121,11 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > & xChartController,
const ::com::sun::star::util::URL & rURL );
+ void setDrawCommandDispatch( DrawCommandDispatch* pDispatch );
+ DrawCommandDispatch* getDrawCommandDispatch() { return m_pDrawCommandDispatch; }
+ void setShapeController( ShapeController* pController );
+ ShapeController* getShapeController() { return m_pShapeController; }
+
private:
typedef
::std::map< ::rtl::OUString,
@@ -136,10 +143,14 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel;
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XUndoManager > m_xUndoManager;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xFallbackDispatcher;
- ::std::set< ::rtl::OUString > m_aFallbackCommands;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xChartDispatcher;
+ ::std::set< ::rtl::OUString > m_aChartCommands;
::std::set< ::rtl::OUString > m_aContainerDocumentCommands;
+
+ ChartController* m_pChartController;
+ DrawCommandDispatch* m_pDrawCommandDispatch;
+ ShapeController* m_pShapeController;
};
} // namespace chart
diff --git a/chart2/source/controller/main/ConfigurationAccess.cxx b/chart2/source/controller/main/ConfigurationAccess.cxx
index 65cebdbc13d3..bf0bc6e14eec 100644
--- a/chart2/source/controller/main/ConfigurationAccess.cxx
+++ b/chart2/source/controller/main/ConfigurationAccess.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ConfigurationAccess.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index d7e0514dee08..2652aadfdb32 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ControllerCommandDispatch.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -45,6 +42,7 @@
#include "RegressionCurveHelper.hxx"
#include "DataSeriesHelper.hxx"
#include "StatisticsHelper.hxx"
+#include "ShapeController.hxx"
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/frame/XStorable.hpp>
@@ -181,22 +179,22 @@ void ControllerState::update(
Reference< view::XSelectionSupplier > xSelectionSupplier(
xController, uno::UNO_QUERY );
- OUString aSelObjCID;
-
// Update ControllerState variables.
if( xSelectionSupplier.is())
{
uno::Any aSelObj( xSelectionSupplier->getSelection() );
+ ObjectIdentifier aSelOID( aSelObj );
+ OUString aSelObjCID( aSelOID.getObjectCID() );
- bHasSelectedObject = ((aSelObj >>= aSelObjCID) && aSelObjCID.getLength() > 0);
+ bHasSelectedObject = aSelOID.isValid();
ObjectType aObjectType(ObjectIdentifier::getObjectType( aSelObjCID ));
- bIsPositionableObject = (OBJECTTYPE_DATA_POINT != aObjectType) && ObjectIdentifier::isDragableObject( aSelObjCID );
+ bIsPositionableObject = (OBJECTTYPE_DATA_POINT != aObjectType) && aSelOID.isDragableObject();
bIsTextObject = OBJECTTYPE_TITLE == aObjectType;
uno::Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( xModel ));
- bIsFormateableObjectSelected = bHasSelectedObject;
+ bIsFormateableObjectSelected = bHasSelectedObject && aSelOID.isAutoGeneratedObject();
if( OBJECTTYPE_DIAGRAM==aObjectType || OBJECTTYPE_DIAGRAM_WALL==aObjectType || OBJECTTYPE_DIAGRAM_FLOOR==aObjectType )
bIsFormateableObjectSelected = DiagramHelper::isSupportingFloorAndWall( xDiagram );
@@ -460,13 +458,15 @@ DBG_NAME(ControllerCommandDispatch)
ControllerCommandDispatch::ControllerCommandDispatch(
const Reference< uno::XComponentContext > & xContext,
- const Reference< frame::XController > & xController ) :
+ ChartController* pController, CommandDispatchContainer* pContainer ) :
impl::ControllerCommandDispatch_Base( xContext ),
- m_xController( xController ),
- m_xSelectionSupplier( xController, uno::UNO_QUERY ),
- m_xDispatch( xController, uno::UNO_QUERY ),
+ m_pChartController( pController ),
+ m_xController( Reference< frame::XController >( pController ) ),
+ m_xSelectionSupplier( Reference< view::XSelectionSupplier >( pController ) ),
+ m_xDispatch( Reference< frame::XDispatch >( pController ) ),
m_apModelState( new impl::ModelState() ),
- m_apControllerState( new impl::ControllerState() )
+ m_apControllerState( new impl::ControllerState() ),
+ m_pDispatchContainer( pContainer )
{
DBG_CTOR(ControllerCommandDispatch,NULL);
}
@@ -526,6 +526,8 @@ void ControllerCommandDispatch::updateCommandAvailability()
// @todo: determine correctly
bool bHasSuitableClipboardContent = true;
+ bool bShapeContext = ( m_pChartController ? m_pChartController->isShapeContext() : false );
+
// edit commands
m_aCommandAvailability[ C2U(".uno:Cut")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsDeleteableObjectSelected;
m_aCommandAvailability[ C2U(".uno:Copy")] = bControllerStateIsValid && m_apControllerState->bHasSelectedObject;
@@ -543,7 +545,8 @@ void ControllerCommandDispatch::updateCommandAvailability()
m_aCommandAvailability[ C2U(".uno:DefaultColors")] = bIsWritable;
m_aCommandAvailability[ C2U(".uno:BarWidth")] = bIsWritable;
m_aCommandAvailability[ C2U(".uno:NumberOfLines")] = bIsWritable;
- m_aCommandAvailability[ C2U(".uno:ArrangeRow")] = m_apControllerState->bMayMoveSeriesForward || m_apControllerState->bMayMoveSeriesBackward;
+ m_aCommandAvailability[ C2U(".uno:ArrangeRow")] =
+ bShapeContext || ( bIsWritable && bControllerStateIsValid && ( m_apControllerState->bMayMoveSeriesForward || m_apControllerState->bMayMoveSeriesBackward ) );
// insert objects
m_aCommandAvailability[ C2U(".uno:InsertTitles")] = m_aCommandAvailability[ C2U(".uno:InsertMenuTitles")] = bIsWritable;
@@ -577,6 +580,7 @@ void ControllerCommandDispatch::updateCommandAvailability()
m_aCommandAvailability[ C2U(".uno:Legend")] = bIsWritable && m_apModelState->bHasLegend;
m_aCommandAvailability[ C2U(".uno:DiagramWall")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasWall;
m_aCommandAvailability[ C2U(".uno:DiagramArea")] = bIsWritable;
+
m_aCommandAvailability[ C2U(".uno:TransformDialog")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bHasSelectedObject && m_apControllerState->bIsPositionableObject;
// 3d commands
@@ -626,8 +630,10 @@ void ControllerCommandDispatch::updateCommandAvailability()
m_aCommandAvailability[ C2U(".uno:DiagramGridAll")] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyGrid();
// series arrangement
- m_aCommandAvailability[ C2U(".uno:Forward")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayMoveSeriesForward;
- m_aCommandAvailability[ C2U(".uno:Backward")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayMoveSeriesBackward;
+ m_aCommandAvailability[ C2U(".uno:Forward")] = ( bShapeContext ? isShapeControllerCommandAvailable( C2U( ".uno:Forward" ) ) :
+ ( bIsWritable && bControllerStateIsValid && m_apControllerState->bMayMoveSeriesForward ) );
+ m_aCommandAvailability[ C2U(".uno:Backward")] = ( bShapeContext ? isShapeControllerCommandAvailable( C2U( ".uno:Backward" ) ) :
+ ( bIsWritable && bControllerStateIsValid && m_apControllerState->bMayMoveSeriesBackward ) );
m_aCommandAvailability[ C2U(".uno:InsertDataLabels")] = bIsWritable;
m_aCommandAvailability[ C2U(".uno:InsertDataLabel")] = bIsWritable;
@@ -670,6 +676,17 @@ bool ControllerCommandDispatch::commandAvailable( const OUString & rCommand )
return false;
}
+bool ControllerCommandDispatch::isShapeControllerCommandAvailable( const ::rtl::OUString& rCommand )
+{
+ ShapeController* pShapeController = ( m_pDispatchContainer ? m_pDispatchContainer->getShapeController() : NULL );
+ if ( pShapeController )
+ {
+ FeatureState aState( pShapeController->getState( rCommand ) );
+ return aState.bEnabled;
+ }
+ return false;
+}
+
void ControllerCommandDispatch::fireStatusEvent(
const OUString & rURL,
const Reference< frame::XStatusListener > & xSingleListener /* = 0 */ )
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.hxx b/chart2/source/controller/main/ControllerCommandDispatch.hxx
index 16dc12b89c9b..08d57a0d6cbf 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.hxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ControllerCommandDispatch.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,6 +38,9 @@
namespace chart
{
+class ChartController;
+class CommandDispatchContainer;
+
namespace impl
{
struct ModelState;
@@ -67,8 +67,7 @@ public:
explicit ControllerCommandDispatch(
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext > & xContext,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XController > & xController );
+ ChartController* pController, CommandDispatchContainer* pContainer );
virtual ~ControllerCommandDispatch();
// late initialisation, especially for adding as listener
@@ -112,6 +111,9 @@ private:
bool commandAvailable( const ::rtl::OUString & rCommand );
void updateCommandAvailability();
+ bool isShapeControllerCommandAvailable( const ::rtl::OUString& rCommand );
+
+ ChartController* m_pChartController;
::com::sun::star::uno::Reference<
::com::sun::star::frame::XController > m_xController;
::com::sun::star::uno::Reference<
@@ -124,6 +126,8 @@ private:
mutable ::std::map< ::rtl::OUString, bool > m_aCommandAvailability;
mutable ::std::map< ::rtl::OUString, ::com::sun::star::uno::Any > m_aCommandArguments;
+
+ CommandDispatchContainer* m_pDispatchContainer;
};
} // namespace chart
diff --git a/chart2/source/controller/main/DragMethod_Base.cxx b/chart2/source/controller/main/DragMethod_Base.cxx
index a21e46216c45..11ba7b7b8016 100644
--- a/chart2/source/controller/main/DragMethod_Base.cxx
+++ b/chart2/source/controller/main/DragMethod_Base.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DragMethod_Base.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/DragMethod_Base.hxx b/chart2/source/controller/main/DragMethod_Base.hxx
index 63d88936beca..dfd5cfa20255 100644
--- a/chart2/source/controller/main/DragMethod_Base.hxx
+++ b/chart2/source/controller/main/DragMethod_Base.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DragMethod_Base.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx
index 43bc637e3ef6..5074147fa9e2 100644
--- a/chart2/source/controller/main/DragMethod_PieSegment.cxx
+++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DragMethod_PieSegment.cxx,v $
- * $Revision: 1.4.68.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/DragMethod_PieSegment.hxx b/chart2/source/controller/main/DragMethod_PieSegment.hxx
index 947ee57896b1..f63af9be3cc4 100644
--- a/chart2/source/controller/main/DragMethod_PieSegment.hxx
+++ b/chart2/source/controller/main/DragMethod_PieSegment.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DragMethod_PieSegment.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
index a949dc2436c6..944b44dd25bf 100644
--- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
+++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DragMethod_RotateDiagram.cxx,v $
- * $Revision: 1.6.60.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.hxx b/chart2/source/controller/main/DragMethod_RotateDiagram.hxx
index a29b65ceabba..b16e12fe5359 100644
--- a/chart2/source/controller/main/DragMethod_RotateDiagram.hxx
+++ b/chart2/source/controller/main/DragMethod_RotateDiagram.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DragMethod_RotateDiagram.hxx,v $
- * $Revision: 1.5.60.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
new file mode 100644
index 000000000000..aa28028c4861
--- /dev/null
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -0,0 +1,674 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "DrawCommandDispatch.hxx"
+#include "DrawCommandDispatch.hrc"
+#include "ChartController.hxx"
+#include "DrawViewWrapper.hxx"
+#include "chartview/DrawModelWrapper.hxx"
+#include "macros.hxx"
+
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+#include <svl/itempool.hxx>
+#include <editeng/adjitem.hxx>
+#include <svx/dialogs.hrc>
+#include <svx/dialmgr.hxx>
+#include <svx/fmmodel.hxx>
+#include <svx/gallery.hxx>
+#include <svx/svdoashp.hxx>
+#include <svx/svdocapt.hxx>
+#include <svx/svdopath.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/unoapi.hxx>
+#include <svx/xlnedit.hxx>
+#include <svx/xlnedwit.hxx>
+#include <svx/xlnwtit.hxx>
+#include <svx/xtable.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+
+#include <boost/bind.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::frame;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+
+
+//.............................................................................
+namespace
+{
+//.............................................................................
+
+ // comparing two PropertyValue instances
+ struct PropertyValueCompare : public ::std::binary_function< beans::PropertyValue, ::rtl::OUString, bool >
+ {
+ bool operator() ( const beans::PropertyValue& rPropValue, const ::rtl::OUString& rName ) const
+ {
+ return rPropValue.Name.equals( rName );
+ }
+ bool operator() ( const ::rtl::OUString& rName, const beans::PropertyValue& rPropValue ) const
+ {
+ return rName.equals( rPropValue.Name );
+ }
+ };
+
+//.............................................................................
+} // anonymous namespace
+//.............................................................................
+
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+DrawCommandDispatch::DrawCommandDispatch( const Reference< uno::XComponentContext >& rxContext,
+ ChartController* pController )
+ :FeatureCommandDispatchBase( rxContext )
+ ,m_pChartController( pController )
+{
+}
+
+DrawCommandDispatch::~DrawCommandDispatch()
+{
+}
+
+void DrawCommandDispatch::initialize()
+{
+ FeatureCommandDispatchBase::initialize();
+}
+
+bool DrawCommandDispatch::isFeatureSupported( const ::rtl::OUString& rCommandURL )
+{
+ sal_uInt16 nFeatureId = 0;
+ ::rtl::OUString aBaseCommand;
+ ::rtl::OUString aCustomShapeType;
+ return parseCommandURL( rCommandURL, &nFeatureId, &aBaseCommand, &aCustomShapeType );
+}
+
+::basegfx::B2DPolyPolygon getPolygon( sal_uInt16 nResId, SdrModel& rModel )
+{
+ ::basegfx::B2DPolyPolygon aReturn;
+ XLineEndList* pLineEndList = rModel.GetLineEndList();
+ if ( pLineEndList )
+ {
+ String aName( SVX_RES( nResId ) );
+ long nCount = pLineEndList->Count();
+ for ( long nIndex = 0; nIndex < nCount; ++nIndex )
+ {
+ XLineEndEntry* pEntry = pLineEndList->GetLineEnd( nIndex );
+ if ( pEntry->GetName() == aName )
+ {
+ aReturn = pEntry->GetLineEnd();
+ break;
+ }
+ }
+ }
+ return aReturn;
+}
+
+void DrawCommandDispatch::setAttributes( SdrObject* pObj )
+{
+ if ( m_pChartController )
+ {
+ DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pDrawModelWrapper && pDrawViewWrapper && pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_CUSTOMSHAPE )
+ {
+ sal_Bool bAttributesAppliedFromGallery = sal_False;
+ if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT ) )
+ {
+ ::std::vector< ::rtl::OUString > aObjList;
+ if ( GalleryExplorer::FillObjListTitle( GALLERY_THEME_POWERPOINT, aObjList ) )
+ {
+ for ( sal_uInt16 i = 0; i < aObjList.size(); ++i )
+ {
+ if ( aObjList[ i ].equalsIgnoreAsciiCase( m_aCustomShapeType ) )
+ {
+ FmFormModel aModel;
+ SfxItemPool& rPool = aModel.GetItemPool();
+ rPool.FreezeIdRanges();
+ if ( GalleryExplorer::GetSdrObj( GALLERY_THEME_POWERPOINT, i, &aModel ) )
+ {
+ const SdrObject* pSourceObj = aModel.GetPage( 0 )->GetObj( 0 );
+ if ( pSourceObj )
+ {
+ const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
+ SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj
+ SDRATTR_START, SDRATTR_SHADOW_LAST,
+ SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
+ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+ // Graphic Attributes
+ SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST,
+ // 3d Properties
+ SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
+ // CustomShape properties
+ SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
+ // range from SdrTextObj
+ EE_ITEMS_START, EE_ITEMS_END,
+ // end
+ 0, 0);
+ aDest.Set( rSource );
+ pObj->SetMergedItemSet( aDest );
+ sal_Int32 nAngle = pSourceObj->GetRotateAngle();
+ if ( nAngle )
+ {
+ double a = nAngle * F_PI18000;
+ pObj->NbcRotate( pObj->GetSnapRect().Center(), nAngle, sin( a ), cos( a ) );
+ }
+ bAttributesAppliedFromGallery = sal_True;
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ if ( !bAttributesAppliedFromGallery )
+ {
+ pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, 0 ) );
+ pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
+ pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
+ pObj->SetMergedItem( SdrTextAutoGrowHeightItem( sal_False ) );
+ ( dynamic_cast< SdrObjCustomShape* >( pObj ) )->MergeDefaultAttributes( &m_aCustomShapeType );
+ }
+ }
+ }
+}
+
+void DrawCommandDispatch::setLineEnds( SfxItemSet& rAttr )
+{
+ if ( m_nFeatureId == COMMAND_ID_LINE_ARROW_END && m_pChartController )
+ {
+ DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pDrawModelWrapper && pDrawViewWrapper )
+ {
+ ::basegfx::B2DPolyPolygon aArrow( getPolygon( RID_SVXSTR_ARROW, pDrawModelWrapper->getSdrModel() ) );
+ if ( !aArrow.count() )
+ {
+ ::basegfx::B2DPolygon aNewArrow;
+ aNewArrow.append( ::basegfx::B2DPoint( 10.0, 0.0 ) );
+ aNewArrow.append( ::basegfx::B2DPoint( 0.0, 30.0) );
+ aNewArrow.append( ::basegfx::B2DPoint( 20.0, 30.0 ) );
+ aNewArrow.setClosed( true );
+ aArrow.append( aNewArrow );
+ }
+
+ SfxItemSet aSet( pDrawViewWrapper->GetModel()->GetItemPool() );
+ pDrawViewWrapper->GetAttributes( aSet );
+
+ long nWidth = 300; // (1/100th mm)
+ if ( aSet.GetItemState( XATTR_LINEWIDTH ) != SFX_ITEM_DONTCARE )
+ {
+ long nValue = ( ( const XLineWidthItem& ) aSet.Get( XATTR_LINEWIDTH ) ).GetValue();
+ if ( nValue > 0 )
+ {
+ nWidth = nValue * 3;
+ }
+ }
+
+ rAttr.Put( XLineEndItem( SVX_RESSTR( RID_SVXSTR_ARROW ), aArrow ) );
+ rAttr.Put( XLineEndWidthItem( nWidth ) );
+ }
+ }
+}
+
+// WeakComponentImplHelperBase
+void DrawCommandDispatch::disposing()
+{
+}
+
+// XEventListener
+void DrawCommandDispatch::disposing( const lang::EventObject& /* Source */ )
+ throw (uno::RuntimeException)
+{
+}
+
+FeatureState DrawCommandDispatch::getState( const ::rtl::OUString& rCommand )
+{
+ FeatureState aReturn;
+ aReturn.bEnabled = false;
+ aReturn.aState <<= false;
+
+ sal_uInt16 nFeatureId = 0;
+ ::rtl::OUString aBaseCommand;
+ ::rtl::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:
+ {
+ aReturn.bEnabled = true;
+ aReturn.aState <<= false;
+ }
+ break;
+ default:
+ {
+ aReturn.bEnabled = false;
+ aReturn.aState <<= false;
+ }
+ break;
+ }
+ }
+
+ return aReturn;
+}
+
+void DrawCommandDispatch::execute( const ::rtl::OUString& rCommand, const Sequence< beans::PropertyValue>& rArgs )
+{
+ (void)rArgs;
+
+ ChartDrawMode eDrawMode = CHARTDRAW_SELECT;
+ SdrObjKind eKind = OBJ_NONE;
+ bool bCreate = false;
+
+ sal_uInt16 nFeatureId = 0;
+ ::rtl::OUString aBaseCommand;
+ ::rtl::OUString aCustomShapeType;
+ if ( parseCommandURL( rCommand, &nFeatureId, &aBaseCommand, &aCustomShapeType ) )
+ {
+ m_nFeatureId = nFeatureId;
+ m_aCustomShapeType = aCustomShapeType;
+
+ switch ( nFeatureId )
+ {
+ case COMMAND_ID_OBJECT_SELECT:
+ {
+ eDrawMode = CHARTDRAW_SELECT;
+ eKind = OBJ_NONE;
+ }
+ break;
+ case COMMAND_ID_DRAW_LINE:
+ case COMMAND_ID_LINE_ARROW_END:
+ {
+ eDrawMode = CHARTDRAW_INSERT;
+ eKind = OBJ_LINE;
+ }
+ break;
+ case COMMAND_ID_DRAW_RECT:
+ {
+ eDrawMode = CHARTDRAW_INSERT;
+ eKind = OBJ_RECT;
+ }
+ break;
+ case COMMAND_ID_DRAW_ELLIPSE:
+ {
+ eDrawMode = CHARTDRAW_INSERT;
+ eKind = OBJ_CIRC;
+ }
+ break;
+ case COMMAND_ID_DRAW_FREELINE_NOFILL:
+ {
+ eDrawMode = CHARTDRAW_INSERT;
+ eKind = OBJ_FREELINE;
+ }
+ break;
+ case COMMAND_ID_DRAW_TEXT:
+ {
+ eDrawMode = CHARTDRAW_INSERT;
+ eKind = OBJ_TEXT;
+ bCreate = true;
+ }
+ break;
+ case COMMAND_ID_DRAW_CAPTION:
+ {
+ eDrawMode = CHARTDRAW_INSERT;
+ eKind = OBJ_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:
+ {
+ eDrawMode = CHARTDRAW_INSERT;
+ eKind = OBJ_CUSTOMSHAPE;
+ }
+ break;
+ default:
+ {
+ eDrawMode = CHARTDRAW_SELECT;
+ eKind = OBJ_NONE;
+ }
+ break;
+ }
+
+ if ( m_pChartController )
+ {
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pDrawViewWrapper )
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ m_pChartController->setDrawMode( eDrawMode );
+ setInsertObj( sal::static_int_cast< USHORT >( eKind ) );
+ if ( bCreate )
+ {
+ pDrawViewWrapper->SetCreateMode();
+ }
+
+ const ::rtl::OUString sKeyModifier( C2U( "KeyModifier" ) );
+ const beans::PropertyValue* pIter = rArgs.getConstArray();
+ const beans::PropertyValue* pEnd = pIter + rArgs.getLength();
+ const beans::PropertyValue* pKeyModifier = ::std::find_if(
+ pIter, pEnd, ::std::bind2nd( PropertyValueCompare(), boost::cref( sKeyModifier ) ) );
+ sal_Int16 nKeyModifier = 0;
+ if ( pKeyModifier && ( pKeyModifier->Value >>= nKeyModifier ) && nKeyModifier == KEY_MOD1 )
+ {
+ if ( eDrawMode == CHARTDRAW_INSERT )
+ {
+ SdrObject* pObj = createDefaultObject( nFeatureId );
+ if ( pObj )
+ {
+ SdrPageView* pPageView = pDrawViewWrapper->GetSdrPageView();
+ pDrawViewWrapper->InsertObjectAtView( pObj, *pPageView );
+ Reference< drawing::XShape > xShape( pObj->getUnoShape(), uno::UNO_QUERY );
+ if ( xShape.is() )
+ {
+ m_pChartController->m_aSelection.setSelection( xShape );
+ m_pChartController->m_aSelection.applySelection( pDrawViewWrapper );
+ }
+ if ( nFeatureId == SID_DRAW_TEXT )
+ {
+ m_pChartController->StartTextEdit();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+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 );
+}
+
+void DrawCommandDispatch::setInsertObj( USHORT eObj )
+{
+ DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL );
+ if ( pDrawViewWrapper )
+ {
+ pDrawViewWrapper->SetCurrentObj( eObj /*, Inventor */);
+ }
+}
+
+SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
+{
+ SdrObject* pObj = NULL;
+ DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL );
+ DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : NULL );
+
+ if ( pDrawViewWrapper && pDrawModelWrapper )
+ {
+ Reference< drawing::XDrawPage > xDrawPage( pDrawModelWrapper->getMainDrawPage() );
+ SdrPage* pPage = GetSdrPageFromXDrawPage( xDrawPage );
+ if ( pPage )
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ pObj = SdrObjFactory::MakeNewObject( pDrawViewWrapper->GetCurrentObjInventor(),
+ pDrawViewWrapper->GetCurrentObjIdentifier(), pPage );
+ if ( pObj )
+ {
+ long nDefaultObjectSizeWidth = 4000;
+ long nDefaultObjectSizeHeight = 2500;
+ Size aObjectSize( nDefaultObjectSizeWidth, nDefaultObjectSizeHeight );
+ Rectangle aPageRect( Rectangle( Point( 0, 0 ), pPage->GetSize() ) );
+ Point aObjectPos = aPageRect.Center();
+ aObjectPos.X() -= aObjectSize.Width() / 2;
+ aObjectPos.Y() -= aObjectSize.Height() / 2;
+ Rectangle aRect( aObjectPos, aObjectSize );
+
+ switch ( nID )
+ {
+ case COMMAND_ID_DRAW_LINE:
+ case COMMAND_ID_LINE_ARROW_END:
+ {
+ if ( pObj->ISA( SdrPathObj ) )
+ {
+ Point aStart = aRect.TopLeft();
+ Point aEnd = aRect.BottomRight();
+ sal_Int32 nYMiddle( ( aRect.Top() + aRect.Bottom() ) / 2 );
+ basegfx::B2DPolygon aPoly;
+ aPoly.append( basegfx::B2DPoint( aStart.X(), nYMiddle ) );
+ aPoly.append( basegfx::B2DPoint( aEnd.X(), nYMiddle ) );
+ ( dynamic_cast< SdrPathObj* >( pObj ) )->SetPathPoly( basegfx::B2DPolyPolygon( aPoly ) );
+ SfxItemSet aSet( pDrawModelWrapper->GetItemPool() );
+ setLineEnds( aSet );
+ pObj->SetMergedItemSet( aSet );
+ }
+ }
+ break;
+ case COMMAND_ID_DRAW_FREELINE_NOFILL:
+ {
+ if ( pObj->ISA( SdrPathObj ) )
+ {
+ basegfx::B2DPolygon aInnerPoly;
+ aInnerPoly.append( basegfx::B2DPoint( aRect.Left(), aRect.Bottom() ) );
+ aInnerPoly.appendBezierSegment(
+ basegfx::B2DPoint( aRect.Left(), aRect.Top() ),
+ basegfx::B2DPoint( aRect.Center().X(), aRect.Top() ),
+ basegfx::B2DPoint( aRect.Center().X(), aRect.Center().Y() ) );
+ aInnerPoly.appendBezierSegment(
+ basegfx::B2DPoint( aRect.Center().X(), aRect.Bottom() ),
+ basegfx::B2DPoint( aRect.Right(), aRect.Bottom() ),
+ basegfx::B2DPoint( aRect.Right(), aRect.Top() ) );
+ basegfx::B2DPolyPolygon aPoly;
+ aPoly.append( aInnerPoly );
+ ( dynamic_cast< SdrPathObj* >( pObj ) )->SetPathPoly( aPoly );
+ }
+ }
+ break;
+ case COMMAND_ID_DRAW_TEXT:
+ case COMMAND_ID_DRAW_TEXT_VERTICAL:
+ {
+ if ( pObj->ISA( SdrTextObj ) )
+ {
+ SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
+ if ( pTextObj )
+ {
+ pTextObj->SetLogicRect( aRect );
+ BOOL bVertical = ( nID == SID_DRAW_TEXT_VERTICAL );
+ pTextObj->SetVerticalWriting( bVertical );
+ if ( bVertical )
+ {
+ SfxItemSet aSet( pDrawModelWrapper->GetItemPool() );
+ aSet.Put( SdrTextAutoGrowWidthItem( TRUE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
+ aSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_TOP ) );
+ aSet.Put( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_RIGHT ) );
+ pTextObj->SetMergedItemSet( aSet );
+ }
+ }
+ }
+ }
+ break;
+ case COMMAND_ID_DRAW_CAPTION:
+ case COMMAND_ID_DRAW_CAPTION_VERTICAL:
+ {
+ if ( pObj->ISA( SdrCaptionObj ) )
+ {
+ sal_Bool bIsVertical( SID_DRAW_CAPTION_VERTICAL == nID );
+ SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
+ if ( pTextObj )
+ {
+ pTextObj->SetVerticalWriting( bIsVertical );
+ }
+ if ( bIsVertical )
+ {
+ SfxItemSet aSet( pObj->GetMergedItemSet() );
+ aSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
+ aSet.Put( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_RIGHT ) );
+ pObj->SetMergedItemSet( aSet );
+ }
+ SdrCaptionObj* pCaptionObj = dynamic_cast< SdrCaptionObj* >( pObj );
+ if ( pCaptionObj )
+ {
+ pCaptionObj->SetLogicRect( aRect );
+ pCaptionObj->SetTailPos(
+ aRect.TopLeft() - Point( aRect.GetWidth() / 2, aRect.GetHeight() / 2 ) );
+ }
+ }
+ }
+ break;
+ default:
+ {
+ pObj->SetLogicRect( aRect );
+ SfxItemSet aSet( pDrawModelWrapper->GetItemPool() );
+ setAttributes( pObj );
+ pObj->SetMergedItemSet( aSet );
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ return pObj;
+}
+
+bool DrawCommandDispatch::parseCommandURL( const ::rtl::OUString& rCommandURL, sal_uInt16* pnFeatureId,
+ ::rtl::OUString* pBaseCommand, ::rtl::OUString* pCustomShapeType )
+{
+ bool bFound = true;
+ sal_uInt16 nFeatureId = 0;
+ ::rtl::OUString aBaseCommand;
+ ::rtl::OUString aType;
+
+ sal_Int32 nIndex = 1;
+ ::rtl::OUString aToken = rCommandURL.getToken( 0, '.', nIndex );
+ if ( nIndex == -1 || !aToken.getLength() )
+ {
+ aBaseCommand = rCommandURL;
+ SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( aBaseCommand );
+ if ( aIter != m_aSupportedFeatures.end() )
+ {
+ nFeatureId = aIter->second.nFeatureId;
+
+ switch ( nFeatureId )
+ {
+ case COMMAND_ID_DRAWTBX_CS_BASIC:
+ {
+ aType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "diamond" ) );
+ }
+ break;
+ case COMMAND_ID_DRAWTBX_CS_SYMBOL:
+ {
+ aType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "smiley" ) );
+ }
+ break;
+ case COMMAND_ID_DRAWTBX_CS_ARROW:
+ {
+ aType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "left-right-arrow" ) );
+ }
+ break;
+ case COMMAND_ID_DRAWTBX_CS_FLOWCHART:
+ {
+ aType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "flowchart-internal-storage" ) );
+ }
+ break;
+ case COMMAND_ID_DRAWTBX_CS_CALLOUT:
+ {
+ aType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "round-rectangular-callout" ) );
+ }
+ break;
+ case COMMAND_ID_DRAWTBX_CS_STAR:
+ {
+ aType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "star5" ) );
+ }
+ break;
+ default:
+ {
+ }
+ break;
+ }
+ }
+ else
+ {
+ bFound = false;
+ }
+ }
+ else
+ {
+ aBaseCommand = rCommandURL.copy( 0, nIndex - 1 );
+ SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( aBaseCommand );
+ if ( aIter != m_aSupportedFeatures.end() )
+ {
+ nFeatureId = aIter->second.nFeatureId;
+ aType = rCommandURL.getToken( 0, '.', nIndex );
+ }
+ else
+ {
+ bFound = false;
+ }
+ }
+
+ *pnFeatureId = nFeatureId;
+ *pBaseCommand = aBaseCommand;
+ *pCustomShapeType = aType;
+
+ return bFound;
+}
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
diff --git a/chart2/source/controller/main/DrawCommandDispatch.hrc b/chart2/source/controller/main/DrawCommandDispatch.hrc
new file mode 100644
index 000000000000..4e31fafaaf63
--- /dev/null
+++ b/chart2/source/controller/main/DrawCommandDispatch.hrc
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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
+
+// CHART_DRAWCOMMANDDISPATCH_HRC
+#endif
diff --git a/chart2/source/controller/main/DrawCommandDispatch.hxx b/chart2/source/controller/main/DrawCommandDispatch.hxx
new file mode 100644
index 000000000000..38c886e29abb
--- /dev/null
+++ b/chart2/source/controller/main/DrawCommandDispatch.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_DRAWCOMMANDDISPATCH_HXX
+#define CHART2_DRAWCOMMANDDISPATCH_HXX
+
+#include "FeatureCommandDispatchBase.hxx"
+
+#include <tools/solar.h>
+
+class SfxItemSet;
+class SdrObject;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class ChartController;
+
+/** This is a CommandDispatch implementation for drawing objects.
+ */
+class DrawCommandDispatch: public FeatureCommandDispatchBase
+{
+public:
+ DrawCommandDispatch( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& rxContext, ChartController* pController );
+ virtual ~DrawCommandDispatch();
+
+ // late initialisation, especially for adding as listener
+ virtual void initialize();
+
+ virtual bool isFeatureSupported( const ::rtl::OUString& rCommandURL );
+
+ void setAttributes( SdrObject* pObj );
+ void setLineEnds( SfxItemSet& rAttr );
+
+protected:
+ // WeakComponentImplHelperBase
+ virtual void SAL_CALL disposing();
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // state of a feature
+ virtual FeatureState getState( const ::rtl::OUString& rCommand );
+
+ // execute a feature
+ virtual void execute( const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs );
+
+ // all the features which should be handled by this class
+ virtual void describeSupportedFeatures();
+
+private:
+ void setInsertObj( USHORT eObj );
+ SdrObject* createDefaultObject( const sal_uInt16 nID );
+
+ bool parseCommandURL( const ::rtl::OUString& rCommandURL, sal_uInt16* pnFeatureId, ::rtl::OUString* pBaseCommand, ::rtl::OUString* pCustomShapeType );
+
+ ChartController* m_pChartController;
+ ::rtl::OUString m_aCustomShapeType;
+};
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
+
+// CHART2_DRAWCOMMANDDISPATCH_HXX
+#endif
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index a79a256e3e4f..3b41fd1b6b66 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ElementSelector.cxx,v $
- * $Revision: 1.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,6 +34,9 @@
#include "ObjectHierarchy.hxx"
#include "servicenames.hxx"
#include <chartview/ExplicitValueProvider.hxx>
+#include "DrawViewWrapper.hxx"
+#include "ResId.hxx"
+#include "Strings.hrc"
#include <toolkit/helper/vclunohelper.hxx>
#include <vos/mutex.hxx>
@@ -74,20 +74,21 @@ SelectorListBox::~SelectorListBox()
{
}
-void lcl_addObjectsToList( const ObjectHierarchy& rHierarchy, const ObjectHierarchy::tCID & rParent, std::vector< ListBoxEntryData >& rEntries
+void lcl_addObjectsToList( const ObjectHierarchy& rHierarchy, const ObjectHierarchy::tOID & rParent, std::vector< ListBoxEntryData >& rEntries
, const sal_Int32 nHierarchyDepth, const Reference< chart2::XChartDocument >& xChartDoc )
{
ObjectHierarchy::tChildContainer aChildren( rHierarchy.getChildren(rParent) );
ObjectHierarchy::tChildContainer::const_iterator aIt( aChildren.begin());
while( aIt != aChildren.end() )
{
- ::rtl::OUString aCID = *aIt;
+ ObjectHierarchy::tOID aOID = *aIt;
+ ::rtl::OUString aCID = aOID.getObjectCID();
ListBoxEntryData aEntry;
- aEntry.CID = aCID;
+ aEntry.OID = aOID;
aEntry.UIName += ObjectNameProvider::getNameForCID( aCID, xChartDoc );
aEntry.nHierarchyDepth = nHierarchyDepth;
rEntries.push_back(aEntry);
- lcl_addObjectsToList( rHierarchy, aCID, rEntries, nHierarchyDepth+1, xChartDoc );
+ lcl_addObjectsToList( rHierarchy, aOID, rEntries, nHierarchyDepth+1, xChartDoc );
++aIt;
}
}
@@ -106,14 +107,18 @@ void SelectorListBox::UpdateChartElementsListAndSelection()
if( xChartController.is() )
{
Reference< view::XSelectionSupplier > xSelectionSupplier( xChartController, uno::UNO_QUERY);
+ ObjectHierarchy::tOID aSelectedOID;
rtl::OUString aSelectedCID;
if( xSelectionSupplier.is() )
- xSelectionSupplier->getSelection() >>= aSelectedCID;
+ {
+ aSelectedOID = ObjectIdentifier( xSelectionSupplier->getSelection() );
+ aSelectedCID = aSelectedOID.getObjectCID();
+ }
Reference< chart2::XChartDocument > xChartDoc( xChartController->getModel(), uno::UNO_QUERY );
- ObjectType eType( ObjectIdentifier::getObjectType( aSelectedCID ));
+ ObjectType eType( aSelectedOID.getObjectType() );
bool bAddSelectionToList = false;
- if( eType == OBJECTTYPE_DATA_POINT || eType == OBJECTTYPE_DATA_LABEL )
+ if ( eType == OBJECTTYPE_DATA_POINT || eType == OBJECTTYPE_DATA_LABEL || eType == OBJECTTYPE_SHAPE )
bAddSelectionToList = true;
Reference< uno::XInterface > xChartView;
@@ -122,27 +127,39 @@ void SelectorListBox::UpdateChartElementsListAndSelection()
xChartView = xFact->createInstance( CHART_VIEW_SERVICE_NAME );
ExplicitValueProvider* pExplicitValueProvider = 0;//ExplicitValueProvider::getExplicitValueProvider(xChartView); dies erzeugt alle sichtbaren datenpinkte, das ist zu viel
ObjectHierarchy aHierarchy( xChartDoc, pExplicitValueProvider, true /*bFlattenDiagram*/, true /*bOrderingForElementSelector*/ );
- lcl_addObjectsToList( aHierarchy, aHierarchy.getRootNodeCID(), m_aEntries, 0, xChartDoc );
+ lcl_addObjectsToList( aHierarchy, aHierarchy.getRootNodeOID(), m_aEntries, 0, xChartDoc );
std::vector< ListBoxEntryData >::iterator aIt( m_aEntries.begin() );
if( bAddSelectionToList )
{
- rtl::OUString aSeriesCID = ObjectIdentifier::createClassifiedIdentifierForParticle( ObjectIdentifier::getSeriesParticleFromCID( aSelectedCID ) );
- for( aIt = m_aEntries.begin(); aIt != m_aEntries.end(); ++aIt )
+ if ( aSelectedOID.isAutoGeneratedObject() )
{
- if( aIt->CID.match( aSeriesCID ) )
+ rtl::OUString aSeriesCID = ObjectIdentifier::createClassifiedIdentifierForParticle( ObjectIdentifier::getSeriesParticleFromCID( aSelectedCID ) );
+ for( aIt = m_aEntries.begin(); aIt != m_aEntries.end(); ++aIt )
{
- ListBoxEntryData aEntry;
- aEntry.UIName = ObjectNameProvider::getNameForCID( aSelectedCID, xChartDoc );
- aEntry.CID = aSelectedCID;
- ++aIt;
- if( aIt != m_aEntries.end() )
- m_aEntries.insert(aIt, aEntry);
- else
- m_aEntries.push_back( aEntry );
- break;
+ if( aIt->OID.getObjectCID().match( aSeriesCID ) )
+ {
+ ListBoxEntryData aEntry;
+ aEntry.UIName = ObjectNameProvider::getNameForCID( aSelectedCID, xChartDoc );
+ aEntry.OID = aSelectedOID;
+ ++aIt;
+ if( aIt != m_aEntries.end() )
+ m_aEntries.insert(aIt, aEntry);
+ else
+ m_aEntries.push_back( aEntry );
+ break;
+ }
}
}
+ else if ( aSelectedOID.isAdditionalShape() )
+ {
+ ListBoxEntryData aEntry;
+ SdrObject* pSelectedObj = DrawViewWrapper::getSdrObject( aSelectedOID.getAdditionalShape() );
+ ::rtl::OUString aName( pSelectedObj ? pSelectedObj->GetName() : String() );
+ aEntry.UIName = ( aName.getLength() > 0 ? aName : ::rtl::OUString( String( SchResId( STR_OBJECT_SHAPE ) ) ) );
+ aEntry.OID = aSelectedOID;
+ m_aEntries.push_back( aEntry );
+ }
}
USHORT nEntryPosToSelect = 0; bool bSelectionFound = false;
@@ -150,7 +167,7 @@ void SelectorListBox::UpdateChartElementsListAndSelection()
for( USHORT nN=0; aIt != m_aEntries.end(); ++aIt, ++nN )
{
InsertEntry( aIt->UIName );
- if( !bSelectionFound && aSelectedCID.equals( aIt->CID ) )
+ if ( !bSelectionFound && aSelectedOID == aIt->OID )
{
nEntryPosToSelect = nN;
bSelectionFound = true;
@@ -191,11 +208,10 @@ void SelectorListBox::Select()
USHORT nPos = GetSelectEntryPos();
if( nPos < m_aEntries.size() )
{
- rtl::OUString aCID = m_aEntries[nPos].CID;
- uno::Any aASelection( uno::makeAny(aCID) );
+ ObjectHierarchy::tOID aOID = m_aEntries[nPos].OID;
Reference< view::XSelectionSupplier > xSelectionSupplier( m_xChartController.get(), uno::UNO_QUERY );
if( xSelectionSupplier.is() )
- xSelectionSupplier->select(aASelection);
+ xSelectionSupplier->select( aOID.getAny() );
}
ReleaseFocus_Impl();
}
diff --git a/chart2/source/controller/main/ElementSelector.hxx b/chart2/source/controller/main/ElementSelector.hxx
index 3992745c9f02..d85415d614e2 100644
--- a/chart2/source/controller/main/ElementSelector.hxx
+++ b/chart2/source/controller/main/ElementSelector.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ElementSelector.hxx,v $
- * $Revision: 1.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,6 +28,7 @@
#define _CHART_ELEMENTSELECTOR_HXX
#include "ServiceMacros.hxx"
+#include "ObjectHierarchy.hxx"
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase1.hxx>
#include <svtools/toolboxcontroller.hxx>
@@ -48,7 +46,7 @@ namespace chart
struct ListBoxEntryData
{
rtl::OUString UIName;
- rtl::OUString CID;
+ ObjectHierarchy::tOID OID;
sal_Int32 nHierarchyDepth;
ListBoxEntryData() : nHierarchyDepth(0)
@@ -97,22 +95,22 @@ public:
APPHELPER_XSERVICEINFO_DECL()
APPHELPER_SERVICE_FACTORY_HELPER(ElementSelectorToolbarController)
- // XInterface
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL acquire() throw ();
- virtual void SAL_CALL release() throw ();
-
- // XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
- // XStatusListener
- virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
- // XToolbarController
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException);
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
+ // XToolbarController
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException);
private:
//no default constructor
- ElementSelectorToolbarController(){}
-
+ ElementSelectorToolbarController(){}
+
private:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xCC;
::std::auto_ptr< SelectorListBox > m_apSelectorListBox;
diff --git a/chart2/source/controller/main/FeatureCommandDispatchBase.cxx b/chart2/source/controller/main/FeatureCommandDispatchBase.cxx
new file mode 100644
index 000000000000..39b4e1d4a171
--- /dev/null
+++ b/chart2/source/controller/main/FeatureCommandDispatchBase.cxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "FeatureCommandDispatchBase.hxx"
+
+using namespace ::com::sun::star;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+
+namespace chart
+{
+
+FeatureCommandDispatchBase::FeatureCommandDispatchBase( const Reference< uno::XComponentContext >& rxContext )
+ :CommandDispatch( rxContext )
+ ,m_nFeatureId( 0 )
+{
+}
+
+FeatureCommandDispatchBase::~FeatureCommandDispatchBase()
+{
+}
+
+void FeatureCommandDispatchBase::initialize()
+{
+ CommandDispatch::initialize();
+ fillSupportedFeatures();
+}
+
+bool FeatureCommandDispatchBase::isFeatureSupported( const ::rtl::OUString& rCommandURL )
+{
+ SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( rCommandURL );
+ if ( aIter != m_aSupportedFeatures.end() )
+ {
+ return true;
+ }
+ return false;
+}
+
+void FeatureCommandDispatchBase::fireStatusEvent( const ::rtl::OUString& rURL,
+ const Reference< frame::XStatusListener >& xSingleListener /* = 0 */ )
+{
+ if ( rURL.getLength() == 0 )
+ {
+ SupportedFeatures::const_iterator aEnd( m_aSupportedFeatures.end() );
+ for ( SupportedFeatures::const_iterator aIter( m_aSupportedFeatures.begin() ); aIter != aEnd; ++aIter )
+ {
+ FeatureState aFeatureState( getState( aIter->first ) );
+ fireStatusEventForURL( aIter->first, aFeatureState.aState, aFeatureState.bEnabled, xSingleListener );
+ }
+ }
+ else
+ {
+ FeatureState aFeatureState( getState( rURL ) );
+ fireStatusEventForURL( rURL, aFeatureState.aState, aFeatureState.bEnabled, xSingleListener );
+ }
+}
+
+// XDispatch
+void FeatureCommandDispatchBase::dispatch( const util::URL& URL,
+ const Sequence< beans::PropertyValue >& Arguments )
+ throw (uno::RuntimeException)
+{
+ ::rtl::OUString aCommand( URL.Complete );
+ if ( getState( aCommand ).bEnabled )
+ {
+ execute( aCommand, Arguments );
+ }
+}
+
+void FeatureCommandDispatchBase::implDescribeSupportedFeature( const sal_Char* pAsciiCommandURL,
+ sal_uInt16 nId, sal_Int16 nGroup )
+{
+ ControllerFeature aFeature;
+ aFeature.Command = ::rtl::OUString::createFromAscii( pAsciiCommandURL );
+ aFeature.nFeatureId = nId;
+ aFeature.GroupId = nGroup;
+
+ m_aSupportedFeatures[ aFeature.Command ] = aFeature;
+}
+
+void FeatureCommandDispatchBase::fillSupportedFeatures()
+{
+ describeSupportedFeatures();
+}
+
+} // namespace chart
diff --git a/chart2/source/controller/main/FeatureCommandDispatchBase.hxx b/chart2/source/controller/main/FeatureCommandDispatchBase.hxx
new file mode 100644
index 000000000000..b3e2a568d3b9
--- /dev/null
+++ b/chart2/source/controller/main/FeatureCommandDispatchBase.hxx
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_FEATURECOMMANDDISPATCHBASE_HXX
+#define CHART2_FEATURECOMMANDDISPATCHBASE_HXX
+
+#include "CommandDispatch.hxx"
+
+#include <com/sun/star/frame/CommandGroup.hpp>
+#include <com/sun/star/frame/DispatchInformation.hpp>
+#include <com/sun/star/util/URL.hpp>
+
+namespace chart
+{
+
+struct ControllerFeature: public ::com::sun::star::frame::DispatchInformation
+{
+ sal_uInt16 nFeatureId;
+};
+
+typedef ::std::map< ::rtl::OUString,
+ ControllerFeature,
+ ::std::less< ::rtl::OUString > > SupportedFeatures;
+
+struct FeatureState
+{
+ bool bEnabled;
+ ::com::sun::star::uno::Any aState;
+
+ FeatureState() : bEnabled( false ) { }
+};
+
+/** This is a base class for CommandDispatch implementations with feature support.
+ */
+class FeatureCommandDispatchBase: public CommandDispatch
+{
+public:
+ FeatureCommandDispatchBase( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& rxContext );
+ virtual ~FeatureCommandDispatchBase();
+
+ // late initialisation, especially for adding as listener
+ virtual void initialize();
+
+ virtual bool isFeatureSupported( const ::rtl::OUString& rCommandURL );
+
+protected:
+ // XDispatch
+ virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& URL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Arguments )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void fireStatusEvent( const ::rtl::OUString& rURL,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xSingleListener );
+
+ // state of a feature
+ virtual FeatureState getState( const ::rtl::OUString& rCommand ) = 0;
+
+ // execute a feature
+ virtual void execute( const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs ) = 0;
+
+ // all the features which should be handled by this class
+ virtual void describeSupportedFeatures() = 0;
+
+ /** describes a feature supported by the controller
+
+ Must not be called outside <member>describeSupportedFeatures</member>.
+
+ @param pAsciiCommandURL
+ the URL of the feature command
+ @param nId
+ the id of the feature. Later references to this feature usually happen by id, not by
+ URL.
+ @param nGroup
+ the command group of the feature. This is important for configuring the controller UI
+ by the user, see also <type scope="com::sun::star::frame">CommandGroup</type>.
+ */
+ void implDescribeSupportedFeature( const sal_Char* pAsciiCommandURL, sal_uInt16 nId,
+ sal_Int16 nGroup = ::com::sun::star::frame::CommandGroup::INTERNAL );
+
+ mutable SupportedFeatures m_aSupportedFeatures;
+
+ sal_uInt16 m_nFeatureId;
+
+private:
+ void fillSupportedFeatures();
+};
+
+} // namespace chart
+
+// CHART2_FEATURECOMMANDDISPATCHBASE_HXX
+#endif
diff --git a/chart2/source/tools/ImplUndoManager.cxx b/chart2/source/controller/main/ImplUndoManager.cxx
index e6c87ae16f9e..57e8e7315334 100644
--- a/chart2/source/tools/ImplUndoManager.cxx
+++ b/chart2/source/controller/main/ImplUndoManager.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ImplUndoManager.cxx,v $
- * $Revision: 1.7.16.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,7 +36,7 @@
#include "DataSourceHelper.hxx"
#include "ChartModelHelper.hxx"
-#include <com/sun/star/chart/XChartDataArray.hpp>
+#include <com/sun/star/chart/XComplexDescriptionAccess.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XInternalDataProvider.hpp>
#include <com/sun/star/chart2/XTitled.hpp>
@@ -55,7 +52,7 @@ using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::rtl::OUString;
-using ::com::sun::star::chart::XChartDataArray;
+using ::com::sun::star::chart::XComplexDescriptionAccess;
namespace chart
{
@@ -72,13 +69,13 @@ void ImplApplyDataToModel(
// copy data from stored internal data provider
if( xDoc.is() && xDoc->hasInternalDataProvider())
{
- Reference< XChartDataArray > xCurrentData( xDoc->getDataProvider(), uno::UNO_QUERY );
- Reference< XChartDataArray > xSavedData( xData, uno::UNO_QUERY );
+ Reference< XComplexDescriptionAccess > xCurrentData( xDoc->getDataProvider(), uno::UNO_QUERY );
+ Reference< XComplexDescriptionAccess > xSavedData( xData, uno::UNO_QUERY );
if( xCurrentData.is() && xSavedData.is())
{
xCurrentData->setData( xSavedData->getData());
- xCurrentData->setRowDescriptions( xSavedData->getRowDescriptions());
- xCurrentData->setColumnDescriptions( xSavedData->getColumnDescriptions());
+ xCurrentData->setComplexRowDescriptions( xSavedData->getComplexRowDescriptions());
+ xCurrentData->setComplexColumnDescriptions( xSavedData->getComplexColumnDescriptions());
}
}
}
@@ -110,7 +107,10 @@ UndoElement::~UndoElement()
void UndoElement::initialize( const Reference< frame::XModel > & xModel )
{
- m_xModel.set( UndoElement::cloneModel( xModel ));
+ if ( xModel.is() )
+ {
+ m_xModel.set( UndoElement::cloneModel( xModel ) );
+ }
}
void UndoElement::dispose()
@@ -356,6 +356,29 @@ UndoElement * UndoElementWithSelection::createFromModel(
return new UndoElementWithSelection( getActionString(), xModel );
}
+// ----------------------------------------
+
+ShapeUndoElement::ShapeUndoElement( const OUString& rActionString, SdrUndoAction* pAction )
+ :UndoElement( rActionString, Reference< frame::XModel >() )
+ ,m_pAction( pAction )
+{
+}
+
+ShapeUndoElement::ShapeUndoElement( const ShapeUndoElement& rOther )
+ :UndoElement( rOther )
+ ,m_pAction( rOther.m_pAction )
+{
+}
+
+ShapeUndoElement::~ShapeUndoElement()
+{
+}
+
+SdrUndoAction* ShapeUndoElement::getSdrUndoAction()
+{
+ return m_pAction;
+}
+
// ========================================
UndoStack::UndoStack() :
diff --git a/chart2/source/tools/ImplUndoManager.hxx b/chart2/source/controller/main/ImplUndoManager.hxx
index 35a90becbcf2..4dde0bc65719 100644
--- a/chart2/source/tools/ImplUndoManager.hxx
+++ b/chart2/source/controller/main/ImplUndoManager.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ImplUndoManager.hxx,v $
- * $Revision: 1.5.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,6 +38,9 @@
#include <utility>
#include <deque>
+
+class SdrUndoAction;
+
namespace com { namespace sun { namespace star {
namespace chart2 {
class XInternalDataProvider;
@@ -149,6 +149,19 @@ private:
::com::sun::star::uno::Any m_aSelection;
};
+class ShapeUndoElement : public UndoElement
+{
+public:
+ ShapeUndoElement( const ::rtl::OUString& rActionString, SdrUndoAction* pAction );
+ ShapeUndoElement( const ShapeUndoElement& rOther );
+ virtual ~ShapeUndoElement();
+
+ SdrUndoAction* getSdrUndoAction();
+
+private:
+ SdrUndoAction* m_pAction;
+};
+
/** Note that all models that are put into this container are at some point
disposed of inside this class. (At least in the destructor). That means
the models retrieved here should never be used, but instead their content
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index 5912847e4bfe..0fefa3d52310 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ObjectHierarchy.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,6 +40,7 @@
#include "ChartTypeHelper.hxx"
#include "DataSeriesHelper.hxx"
#include "LegendHelper.hxx"
+#include "chartview/DrawModelWrapper.hxx"
#include <map>
#include <algorithm>
@@ -66,24 +64,25 @@ using ::rtl::OUString;
namespace
{
-struct lcl_ObjectToCID : public ::std::unary_function< Reference< uno::XInterface >, OUString >
+
+struct lcl_ObjectToOID : public ::std::unary_function< Reference< uno::XInterface >, ::chart::ObjectIdentifier >
{
- explicit lcl_ObjectToCID( const Reference< chart2::XChartDocument > & xChartDoc ) :
+ explicit lcl_ObjectToOID( const Reference< chart2::XChartDocument > & xChartDoc ) :
m_xModel( xChartDoc, uno::UNO_QUERY )
{}
- OUString operator() ( const Reference< uno::XInterface > & xObj )
+ ::chart::ObjectIdentifier operator() ( const Reference< uno::XInterface > & xObj )
{
- return ::chart::ObjectIdentifier::createClassifiedIdentifierForObject( xObj, m_xModel );
+ return ::chart::ObjectIdentifier( ::chart::ObjectIdentifier::createClassifiedIdentifierForObject( xObj, m_xModel ) );
}
private:
Reference< frame::XModel > m_xModel;
};
-void lcl_getChildCIDs(
- ::chart::ObjectHierarchy::tChildContainer & rOutChildren,
- const Reference< container::XIndexAccess > & xShapes )
+void lcl_getChildOIDs(
+ ::chart::ObjectHierarchy::tChildContainer& rOutChildren,
+ const Reference< container::XIndexAccess >& xShapes )
{
if( xShapes.is())
{
@@ -101,11 +100,11 @@ void lcl_getChildCIDs(
aName.getLength() > 0 &&
::chart::ObjectIdentifier::isCID( aName ))
{
- rOutChildren.push_back( aName );
+ rOutChildren.push_back( ::chart::ObjectIdentifier( aName ) );
}
Reference< container::XIndexAccess > xNewShapes( xShapeProp, uno::UNO_QUERY );
if( xNewShapes.is())
- lcl_getChildCIDs( rOutChildren, xNewShapes );
+ lcl_getChildOIDs( rOutChildren, xNewShapes );
}
}
}
@@ -119,31 +118,31 @@ void lcl_addAxisTitle( const Reference< XAxis >& xAxis, ::chart::ObjectHierarchy
Reference< XTitle > xAxisTitle( xAxisTitled->getTitleObject());
if( xAxisTitle.is())
rContainer.push_back(
- ::chart::ObjectIdentifier::createClassifiedIdentifierForObject( xAxisTitle, xChartModel ));
+ ::chart::ObjectIdentifier( ::chart::ObjectIdentifier::createClassifiedIdentifierForObject( xAxisTitle, xChartModel ) ) );
}
}
} // anonymous namespace
-
namespace chart
{
namespace impl
{
+
class ImplObjectHierarchy
{
public:
explicit ImplObjectHierarchy(
- const Reference< XChartDocument > & xChartDocument,
- ExplicitValueProvider * pExplicitValueProvider,
+ const Reference< XChartDocument >& xChartDocument,
+ ExplicitValueProvider* pExplicitValueProvider,
bool bFlattenDiagram, bool bOrderingForElementSelector );
- bool hasChildren( const OUString & rParent );
- ObjectHierarchy::tChildContainer getChildren( const OUString & rParent );
- ObjectHierarchy::tChildContainer getSiblings( const OUString & rNode );
+ bool hasChildren( const ObjectHierarchy::tOID& rParent );
+ ObjectHierarchy::tChildContainer getChildren( const ObjectHierarchy::tOID& rParent );
+ ObjectHierarchy::tChildContainer getSiblings( const ObjectHierarchy::tOID& rNode );
- ObjectHierarchy::tCID getParent( const ObjectHierarchy::tCID & rCID );
+ ObjectHierarchy::tOID getParent( const ObjectHierarchy::tOID& rOID );
private:
void createTree( const Reference< XChartDocument > & xChartDocument );
@@ -152,9 +151,9 @@ private:
const Reference< XChartDocument > & xChartDoc,
const Reference< XDiagram > & xDiagram );
void createDiagramTree(
- ObjectHierarchy::tChildContainer & rContainer,
- const Reference< XChartDocument > & xChartDoc,
- const Reference< XDiagram > & xDiagram );
+ ObjectHierarchy::tChildContainer& rContainer,
+ const Reference< XChartDocument >& xChartDoc,
+ const Reference< XDiagram >& xDiagram );
void createDataSeriesTree(
ObjectHierarchy::tChildContainer & rOutDiagramSubContainer,
const Reference< XDiagram > & xDiagram );
@@ -165,22 +164,23 @@ private:
ObjectHierarchy::tChildContainer & rContainer,
const Reference< XChartDocument > & xChartDoc,
const Reference< XDiagram > & xDiagram );
+ void createAdditionalShapesTree( ObjectHierarchy::tChildContainer& rContainer );
- ObjectHierarchy::tCID getParentImpl(
- const ObjectHierarchy::tCID & rParentCID,
- const ObjectHierarchy::tCID & rCID );
+ ObjectHierarchy::tOID getParentImpl(
+ const ObjectHierarchy::tOID& rParentOID,
+ const ObjectHierarchy::tOID& rOID );
- typedef ::std::map< OUString, ObjectHierarchy::tChildContainer >
+ typedef ::std::map< ObjectHierarchy::tOID, ObjectHierarchy::tChildContainer >
tChildMap;
tChildMap m_aChildMap;
- ExplicitValueProvider * m_pExplicitValueProvider;
+ ExplicitValueProvider* m_pExplicitValueProvider;
bool m_bFlattenDiagram;
bool m_bOrderingForElementSelector;
};
ImplObjectHierarchy::ImplObjectHierarchy(
- const Reference< XChartDocument > & xChartDocument,
- ExplicitValueProvider * pExplicitValueProvider,
+ const Reference< XChartDocument >& xChartDocument,
+ ExplicitValueProvider* pExplicitValueProvider,
bool bFlattenDiagram,
bool bOrderingForElementSelector ) :
m_pExplicitValueProvider( pExplicitValueProvider ),
@@ -192,15 +192,15 @@ ImplObjectHierarchy::ImplObjectHierarchy(
m_pExplicitValueProvider = 0;
}
-void ImplObjectHierarchy::createTree( const Reference< XChartDocument > & xChartDocument )
+void ImplObjectHierarchy::createTree( const Reference< XChartDocument >& xChartDocument )
{
- if( !xChartDocument.is())
+ if( !xChartDocument.is() )
return;
//@todo: change ObjectIdentifier to take an XChartDocument rather than XModel
Reference< frame::XModel > xModel( xChartDocument, uno::UNO_QUERY );
Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartDocument ) );
- OUString aDiaCID( ObjectIdentifier::createClassifiedIdentifierForObject( xDiagram, xModel ));
+ ObjectHierarchy::tOID aDiaOID( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForObject( xDiagram, xModel ) ) );
ObjectHierarchy::tChildContainer aTopLevelContainer;
// First Level
@@ -208,8 +208,8 @@ void ImplObjectHierarchy::createTree( const Reference< XChartDocument > & xChart
// Chart Area
if( m_bOrderingForElementSelector )
{
- aTopLevelContainer.push_back( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) );
- aTopLevelContainer.push_back( aDiaCID );
+ aTopLevelContainer.push_back( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) ) );
+ aTopLevelContainer.push_back( aDiaOID );
createWallAndFloor( aTopLevelContainer, xDiagram );
createLegendTree( aTopLevelContainer, xChartDocument, xDiagram );
}
@@ -221,7 +221,7 @@ void ImplObjectHierarchy::createTree( const Reference< XChartDocument > & xChart
Reference< XTitle > xMainTitle( xDocTitled->getTitleObject());
if( xMainTitle.is())
aTopLevelContainer.push_back(
- ObjectIdentifier::createClassifiedIdentifierForObject( xMainTitle, xModel ));
+ ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForObject( xMainTitle, xModel ) ) );
}
if( xDiagram.is())
@@ -233,7 +233,7 @@ void ImplObjectHierarchy::createTree( const Reference< XChartDocument > & xChart
Reference< XTitle > xSubTitle( xDiaTitled->getTitleObject());
if( xSubTitle.is())
aTopLevelContainer.push_back(
- ObjectIdentifier::createClassifiedIdentifierForObject( xSubTitle, xModel ));
+ ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForObject( xSubTitle, xModel ) ) );
}
if( !m_bOrderingForElementSelector )
@@ -244,7 +244,7 @@ void ImplObjectHierarchy::createTree( const Reference< XChartDocument > & xChart
lcl_addAxisTitle( aAxes[i], aTopLevelContainer, xModel );
// Diagram
- aTopLevelContainer.push_back( aDiaCID );
+ aTopLevelContainer.push_back( aDiaOID );
}
if( m_bFlattenDiagram )
@@ -253,21 +253,27 @@ void ImplObjectHierarchy::createTree( const Reference< XChartDocument > & xChart
{
ObjectHierarchy::tChildContainer aSubContainer;
createDiagramTree( aSubContainer, xChartDocument, xDiagram );
- if( ! aSubContainer.empty())
- m_aChildMap[ aDiaCID ] = aSubContainer;
+ if( !aSubContainer.empty() )
+ m_aChildMap[ aDiaOID ] = aSubContainer;
}
if( !m_bOrderingForElementSelector )
createLegendTree( aTopLevelContainer, xChartDocument, xDiagram );
}
+ // #i12587# support for shapes in chart
+ if ( !m_bOrderingForElementSelector )
+ {
+ createAdditionalShapesTree( aTopLevelContainer );
+ }
+
// Chart Area
if( !m_bOrderingForElementSelector )
aTopLevelContainer.push_back(
- ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) );
+ ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) ) );
if( ! aTopLevelContainer.empty())
- m_aChildMap[ ObjectHierarchy::getRootNodeCID() ] = aTopLevelContainer;
+ m_aChildMap[ ObjectHierarchy::getRootNodeOID() ] = aTopLevelContainer;
}
void ImplObjectHierarchy::createLegendTree(
@@ -277,18 +283,18 @@ void ImplObjectHierarchy::createLegendTree(
{
if( xDiagram.is() && LegendHelper::hasLegend( xDiagram ) )
{
- OUString aLegendCID( ObjectIdentifier::createClassifiedIdentifierForObject( xDiagram->getLegend(), Reference< frame::XModel >( xChartDoc, uno::UNO_QUERY ) ));
- rContainer.push_back( aLegendCID );
+ ObjectHierarchy::tOID aLegendOID( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForObject( xDiagram->getLegend(), Reference< frame::XModel >( xChartDoc, uno::UNO_QUERY ) ) ) );
+ rContainer.push_back( aLegendOID );
// iterate over child shapes of legend and search for matching CIDs
if( m_pExplicitValueProvider )
{
Reference< container::XIndexAccess > xLegendShapeContainer(
- m_pExplicitValueProvider->getShapeForCID( aLegendCID ), uno::UNO_QUERY );
- ObjectHierarchy::tChildContainer aLegendEntryCIDs;
- lcl_getChildCIDs( aLegendEntryCIDs, xLegendShapeContainer );
+ m_pExplicitValueProvider->getShapeForCID( aLegendOID.getObjectCID() ), uno::UNO_QUERY );
+ ObjectHierarchy::tChildContainer aLegendEntryOIDs;
+ lcl_getChildOIDs( aLegendEntryOIDs, xLegendShapeContainer );
- m_aChildMap[ aLegendCID ] = aLegendEntryCIDs;
+ m_aChildMap[ aLegendOID ] = aLegendEntryOIDs;
}
}
}
@@ -308,7 +314,7 @@ void ImplObjectHierarchy::createAxesTree(
if( !m_bOrderingForElementSelector )
::std::transform( aAxes.getConstArray(), aAxes.getConstArray() + aAxes.getLength(),
::std::back_inserter( rContainer ),
- lcl_ObjectToCID( xChartDoc ));
+ lcl_ObjectToOID( xChartDoc ));
// get all axes, also invisible ones
aAxes = AxisHelper::getAllAxesOfDiagram( xDiagram, /* bOnlyVisible = */ false );
@@ -332,7 +338,7 @@ void ImplObjectHierarchy::createAxesTree(
// axis
if( AxisHelper::isAxisVisible( xAxis ) )
rContainer.push_back(
- ObjectIdentifier::createClassifiedIdentifierForObject( xAxis, xChartModel ) );
+ ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForObject( xAxis, xChartModel ) ) );
// axis title
lcl_addAxisTitle( aAxes[nA], rContainer, xChartModel );
@@ -343,7 +349,7 @@ void ImplObjectHierarchy::createAxesTree(
{
//main grid
rContainer.push_back(
- ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel ) );
+ ObjectIdentifier( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel ) ) ) );
}
Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );;
@@ -355,7 +361,7 @@ void ImplObjectHierarchy::createAxesTree(
{
//sub grid
rContainer.push_back(
- ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel, nSubGrid ) );
+ ObjectIdentifier( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel, nSubGrid ) ) ) );
}
}
}
@@ -372,12 +378,12 @@ void ImplObjectHierarchy::createWallAndFloor(
if( bHasWall && bIsThreeD )
{
rContainer.push_back(
- ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, rtl::OUString()));
+ ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, rtl::OUString() ) ) );
Reference< beans::XPropertySet > xFloor( xDiagram->getFloor());
if( xFloor.is())
rContainer.push_back(
- ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_FLOOR, rtl::OUString()));
+ ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_FLOOR, rtl::OUString() ) ) );
}
}
@@ -429,9 +435,9 @@ void ImplObjectHierarchy::createDataSeriesTree(
OUString aSeriesParticle(
ObjectIdentifier::createParticleForSeries(
nDiagramIndex, nCooSysIdx, nCTIdx, nSeriesIdx ));
- ObjectHierarchy::tCID aSeriesCID(
- ObjectIdentifier::createClassifiedIdentifierForParticle( aSeriesParticle ));
- rOutDiagramSubContainer.push_back( aSeriesCID );
+ ObjectHierarchy::tOID aSeriesOID(
+ ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForParticle( aSeriesParticle ) ) );
+ rOutDiagramSubContainer.push_back( aSeriesOID );
ObjectHierarchy::tChildContainer aSeriesSubContainer;
@@ -443,7 +449,7 @@ void ImplObjectHierarchy::createDataSeriesTree(
rtl::OUString aChildParticle( ObjectIdentifier::getStringForType( OBJECTTYPE_DATA_LABELS ) );
aChildParticle+=(C2U("="));
aSeriesSubContainer.push_back(
- ObjectIdentifier::createClassifiedIdentifierForParticles( aSeriesParticle, aChildParticle ));
+ ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForParticles( aSeriesParticle, aChildParticle ) ) );
}
// Statistics
@@ -457,11 +463,11 @@ void ImplObjectHierarchy::createDataSeriesTree(
{
bool bIsAverageLine = RegressionCurveHelper::isMeanValueLine( aCurves[nCurveIdx] );
aSeriesSubContainer.push_back(
- ObjectIdentifier::createDataCurveCID( aSeriesParticle, nCurveIdx, bIsAverageLine ));
+ ObjectIdentifier( ObjectIdentifier::createDataCurveCID( aSeriesParticle, nCurveIdx, bIsAverageLine ) ) );
if( RegressionCurveHelper::hasEquation( aCurves[nCurveIdx] ) )
{
aSeriesSubContainer.push_back(
- ObjectIdentifier::createDataCurveEquationCID( aSeriesParticle, nCurveIdx ));
+ ObjectIdentifier( ObjectIdentifier::createDataCurveEquationCID( aSeriesParticle, nCurveIdx ) ) );
}
}
Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY );
@@ -475,8 +481,8 @@ void ImplObjectHierarchy::createDataSeriesTree(
( nStyle != ::com::sun::star::chart::ErrorBarStyle::NONE ) )
{
aSeriesSubContainer.push_back(
- ObjectIdentifier::createClassifiedIdentifierWithParent(
- OBJECTTYPE_DATA_ERRORS, OUString(), aSeriesParticle ));
+ ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierWithParent(
+ OBJECTTYPE_DATA_ERRORS, OUString(), aSeriesParticle ) ) );
}
}
}
@@ -487,12 +493,12 @@ void ImplObjectHierarchy::createDataSeriesTree(
if( m_pExplicitValueProvider )
{
Reference< container::XIndexAccess > xSeriesShapeContainer(
- m_pExplicitValueProvider->getShapeForCID( aSeriesCID ), uno::UNO_QUERY );
- lcl_getChildCIDs( aSeriesSubContainer, xSeriesShapeContainer );
+ m_pExplicitValueProvider->getShapeForCID( aSeriesOID.getObjectCID() ), uno::UNO_QUERY );
+ lcl_getChildOIDs( aSeriesSubContainer, xSeriesShapeContainer );
}
if( ! aSeriesSubContainer.empty())
- m_aChildMap[ aSeriesCID ] = aSeriesSubContainer;
+ m_aChildMap[ aSeriesOID ] = aSeriesSubContainer;
}
}
}
@@ -503,9 +509,38 @@ void ImplObjectHierarchy::createDataSeriesTree(
}
}
-bool ImplObjectHierarchy::hasChildren( const OUString & rParent )
+void ImplObjectHierarchy::createAdditionalShapesTree( ObjectHierarchy::tChildContainer& rContainer )
+{
+ try
+ {
+ if ( m_pExplicitValueProvider )
+ {
+ Reference< drawing::XDrawPage > xDrawPage( m_pExplicitValueProvider->getDrawModelWrapper()->getMainDrawPage() );
+ Reference< drawing::XShapes > xDrawPageShapes( xDrawPage, uno::UNO_QUERY_THROW );
+ Reference< drawing::XShapes > xChartRoot( DrawModelWrapper::getChartRootShape( xDrawPage ) );
+ sal_Int32 nCount = xDrawPageShapes->getCount();
+ for ( sal_Int32 i = 0; i < nCount; ++i )
+ {
+ Reference< drawing::XShape > xShape;
+ if ( xDrawPageShapes->getByIndex( i ) >>= xShape )
+ {
+ if ( xShape.is() && xShape != xChartRoot )
+ {
+ rContainer.push_back( ObjectIdentifier( xShape ) );
+ }
+ }
+ }
+ }
+ }
+ catch ( uno::Exception& ex )
+ {
+ ASSERT_EXCEPTION( ex );
+ }
+}
+
+bool ImplObjectHierarchy::hasChildren( const ObjectHierarchy::tOID& rParent )
{
- if( rParent.getLength())
+ if ( rParent.isValid() )
{
tChildMap::const_iterator aIt( m_aChildMap.find( rParent ));
if( aIt != m_aChildMap.end())
@@ -514,9 +549,9 @@ bool ImplObjectHierarchy::hasChildren( const OUString & rParent )
return false;
}
-ObjectHierarchy::tChildContainer ImplObjectHierarchy::getChildren( const OUString & rParent )
+ObjectHierarchy::tChildContainer ImplObjectHierarchy::getChildren( const ObjectHierarchy::tOID& rParent )
{
- if( rParent.getLength())
+ if ( rParent.isValid() )
{
tChildMap::const_iterator aIt( m_aChildMap.find( rParent ));
if( aIt != m_aChildMap.end())
@@ -525,9 +560,9 @@ ObjectHierarchy::tChildContainer ImplObjectHierarchy::getChildren( const OUStrin
return ObjectHierarchy::tChildContainer();
}
-ObjectHierarchy::tChildContainer ImplObjectHierarchy::getSiblings( const OUString & rNode )
+ObjectHierarchy::tChildContainer ImplObjectHierarchy::getSiblings( const ObjectHierarchy::tOID& rNode )
{
- if( rNode.getLength() && !ObjectHierarchy::isRootNode( rNode ))
+ if ( rNode.isValid() && !ObjectHierarchy::isRootNode( rNode ) )
{
for( tChildMap::const_iterator aIt( m_aChildMap.begin());
aIt != m_aChildMap.end(); ++aIt )
@@ -541,23 +576,23 @@ ObjectHierarchy::tChildContainer ImplObjectHierarchy::getSiblings( const OUStrin
return ObjectHierarchy::tChildContainer();
}
-ObjectHierarchy::tCID ImplObjectHierarchy::getParentImpl(
- const ObjectHierarchy::tCID & rParentCID,
- const ObjectHierarchy::tCID & rCID )
+ObjectHierarchy::tOID ImplObjectHierarchy::getParentImpl(
+ const ObjectHierarchy::tOID & rParentOID,
+ const ObjectHierarchy::tOID & rOID )
{
// search children
- ObjectHierarchy::tChildContainer aChildren( getChildren( rParentCID ));
+ ObjectHierarchy::tChildContainer aChildren( getChildren( rParentOID ));
ObjectHierarchy::tChildContainer::const_iterator aIt(
- ::std::find( aChildren.begin(), aChildren.end(), rCID ));
+ ::std::find( aChildren.begin(), aChildren.end(), rOID ));
// recursion end
if( aIt != aChildren.end())
- return rParentCID;
+ return rParentOID;
for( aIt = aChildren.begin(); aIt != aChildren.end(); ++aIt )
{
// recursion
- ObjectHierarchy::tCID aTempParent( getParentImpl( *aIt, rCID ));
- if( aTempParent.getLength())
+ ObjectHierarchy::tOID aTempParent( getParentImpl( *aIt, rOID ));
+ if ( aTempParent.isValid() )
{
// exit on success
return aTempParent;
@@ -565,17 +600,18 @@ ObjectHierarchy::tCID ImplObjectHierarchy::getParentImpl(
}
// exit on fail
- return ObjectHierarchy::tCID();
+ return ObjectHierarchy::tOID();
}
-ObjectHierarchy::tCID ImplObjectHierarchy::getParent(
- const ObjectHierarchy::tCID & rCID )
+ObjectHierarchy::tOID ImplObjectHierarchy::getParent(
+ const ObjectHierarchy::tOID & rOID )
{
- return getParentImpl( ObjectHierarchy::getRootNodeCID(), rCID );
+ return getParentImpl( ObjectHierarchy::getRootNodeOID(), rOID );
}
} // namespace impl
+
ObjectHierarchy::ObjectHierarchy(
const Reference< XChartDocument > & xChartDocument,
ExplicitValueProvider * pExplicitValueProvider /* = 0 */,
@@ -588,60 +624,60 @@ ObjectHierarchy::~ObjectHierarchy()
{}
// static
-ObjectHierarchy::tCID ObjectHierarchy::getRootNodeCID()
+ObjectHierarchy::tOID ObjectHierarchy::getRootNodeOID()
{
- return C2U("ROOT");
+ return ObjectIdentifier( C2U( "ROOT" ) );
}
// static
-bool ObjectHierarchy::isRootNode( const ObjectHierarchy::tCID & rCID )
+bool ObjectHierarchy::isRootNode( const ObjectHierarchy::tOID& rOID )
{
- return rCID.equals( ObjectHierarchy::getRootNodeCID());
+ return ( rOID == ObjectHierarchy::getRootNodeOID() );
}
ObjectHierarchy::tChildContainer ObjectHierarchy::getTopLevelChildren() const
{
- return m_apImpl->getChildren( ObjectHierarchy::getRootNodeCID());
+ return m_apImpl->getChildren( ObjectHierarchy::getRootNodeOID());
}
-bool ObjectHierarchy::hasChildren( const tCID & rParent ) const
+bool ObjectHierarchy::hasChildren( const tOID& rParent ) const
{
return m_apImpl->hasChildren( rParent );
}
ObjectHierarchy::tChildContainer ObjectHierarchy::getChildren(
- const ObjectHierarchy::tCID & rParent ) const
+ const ObjectHierarchy::tOID& rParent ) const
{
- if( rParent.getLength())
+ if ( rParent.isValid() )
return m_apImpl->getChildren( rParent );
return ObjectHierarchy::tChildContainer();
}
ObjectHierarchy::tChildContainer ObjectHierarchy::getSiblings(
- const ObjectHierarchy::tCID & rNode ) const
+ const ObjectHierarchy::tOID& rNode ) const
{
- if( rNode.getLength() && !isRootNode( rNode ))
+ if ( rNode.isValid() && !isRootNode( rNode ) )
return m_apImpl->getSiblings( rNode );
return ObjectHierarchy::tChildContainer();
}
-ObjectHierarchy::tCID ObjectHierarchy::getParent(
- const ObjectHierarchy::tCID & rNode ) const
+ObjectHierarchy::tOID ObjectHierarchy::getParent(
+ const ObjectHierarchy::tOID& rNode ) const
{
return m_apImpl->getParent( rNode );
}
sal_Int32 ObjectHierarchy::getIndexInParent(
- const ObjectHierarchy::tCID & rNode ) const
+ const ObjectHierarchy::tOID& rNode ) const
{
- tCID aParentCID( m_apImpl->getParent( rNode ));
- tChildContainer aChildren( m_apImpl->getChildren( aParentCID ));
- tChildContainer::const_iterator aIt( aChildren.begin());
+ tOID aParentOID( m_apImpl->getParent( rNode ));
+ tChildContainer aChildren( m_apImpl->getChildren( aParentOID ) );
+ tChildContainer::const_iterator aIt( aChildren.begin() );
for( sal_Int32 nIndex = 0; aIt != aChildren.end(); ++nIndex, ++aIt )
{
- if( aIt->equals( rNode ))
+ if ( *aIt == rNode )
return nIndex;
}
return -1;
@@ -650,16 +686,18 @@ sal_Int32 ObjectHierarchy::getIndexInParent(
// ================================================================================
ObjectKeyNavigation::ObjectKeyNavigation(
- const ObjectHierarchy::tCID & rCurrentCID,
+ const ObjectHierarchy::tOID & rCurrentOID,
const Reference< chart2::XChartDocument > & xChartDocument,
ExplicitValueProvider * pExplicitValueProvider /* = 0 */ ) :
- m_aCurrentCID( rCurrentCID ),
+ m_aCurrentOID( rCurrentOID ),
m_xChartDocument( xChartDocument ),
m_pExplicitValueProvider( pExplicitValueProvider ),
m_bStepDownInDiagram( true )
{
- if( m_aCurrentCID.getLength() == 0 )
- setCurrentSelection( ObjectHierarchy::getRootNodeCID());
+ if ( !m_aCurrentOID.isValid() )
+ {
+ setCurrentSelection( ObjectHierarchy::getRootNodeOID() );
+ }
}
bool ObjectKeyNavigation::handleKeyEvent(
@@ -688,7 +726,7 @@ bool ObjectKeyNavigation::handleKeyEvent(
bResult = down();
break;
case awt::Key::ESCAPE:
- setCurrentSelection( OUString());
+ setCurrentSelection( ObjectIdentifier() );
bResult = true;
break;
default:
@@ -698,20 +736,20 @@ bool ObjectKeyNavigation::handleKeyEvent(
return bResult;
}
-void ObjectKeyNavigation::setCurrentSelection( const ObjectHierarchy::tCID & rCID )
+void ObjectKeyNavigation::setCurrentSelection( const ObjectHierarchy::tOID& rOID )
{
- m_aCurrentCID = rCID;
+ m_aCurrentOID = rOID;
}
-ObjectHierarchy::tCID ObjectKeyNavigation::getCurrentSelection() const
+ObjectHierarchy::tOID ObjectKeyNavigation::getCurrentSelection() const
{
- return m_aCurrentCID;
+ return m_aCurrentOID;
}
bool ObjectKeyNavigation::first()
{
ObjectHierarchy aHierarchy( m_xChartDocument, m_pExplicitValueProvider, m_bStepDownInDiagram );
- ObjectHierarchy::tChildContainer aSiblings( aHierarchy.getSiblings( getCurrentSelection()));
+ ObjectHierarchy::tChildContainer aSiblings( aHierarchy.getSiblings( getCurrentSelection() ) );
bool bResult = !aSiblings.empty();
if( bResult )
setCurrentSelection( aSiblings.front());
@@ -723,7 +761,7 @@ bool ObjectKeyNavigation::first()
bool ObjectKeyNavigation::last()
{
ObjectHierarchy aHierarchy( m_xChartDocument, m_pExplicitValueProvider, m_bStepDownInDiagram );
- ObjectHierarchy::tChildContainer aSiblings( aHierarchy.getSiblings( getCurrentSelection()));
+ ObjectHierarchy::tChildContainer aSiblings( aHierarchy.getSiblings( getCurrentSelection() ) );
bool bResult = !aSiblings.empty();
if( bResult )
setCurrentSelection( aSiblings.back());
@@ -735,7 +773,7 @@ bool ObjectKeyNavigation::last()
bool ObjectKeyNavigation::next()
{
ObjectHierarchy aHierarchy( m_xChartDocument, m_pExplicitValueProvider, m_bStepDownInDiagram );
- ObjectHierarchy::tChildContainer aSiblings( aHierarchy.getSiblings( getCurrentSelection()));
+ ObjectHierarchy::tChildContainer aSiblings( aHierarchy.getSiblings( getCurrentSelection() ) );
bool bResult = !aSiblings.empty();
if( bResult )
{
diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx
index a4a50af995a9..089abb1822f6 100644
--- a/chart2/source/controller/main/PositionAndSizeHelper.cxx
+++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PositionAndSizeHelper.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index 8e2b8911be77..567a36473a5b 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SelectionHelper.cxx,v $
- * $Revision: 1.11.68.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -83,25 +80,29 @@ void impl_selectObject( SdrObject* pObjectToSelect, DrawViewWrapper& rDrawViewWr
bool Selection::hasSelection()
{
- return m_aSelectedObjectCID.getLength() || m_xSelectAdditionalShape.is();
+ return m_aSelectedOID.isValid();
}
rtl::OUString Selection::getSelectedCID()
{
- return m_aSelectedObjectCID;
+ return m_aSelectedOID.getObjectCID();
}
uno::Reference< drawing::XShape > Selection::getSelectedAdditionalShape()
{
- return m_xSelectAdditionalShape;
+ return m_aSelectedOID.getAdditionalShape();
+}
+
+ObjectIdentifier Selection::getSelectedOID() const
+{
+ return m_aSelectedOID;
}
bool Selection::setSelection( const ::rtl::OUString& rCID )
{
- if( !rCID.equals( m_aSelectedObjectCID ) )
+ if ( !rCID.equals( m_aSelectedOID.getObjectCID() ) )
{
- m_aSelectedObjectCID = rCID;
- m_xSelectAdditionalShape.set(0);
+ m_aSelectedOID = ObjectIdentifier( rCID );
return true;
}
return false;
@@ -109,10 +110,10 @@ bool Selection::setSelection( const ::rtl::OUString& rCID )
bool Selection::setSelection( const uno::Reference< drawing::XShape >& xShape )
{
- if( !(m_xSelectAdditionalShape==xShape) )
+ if ( !( xShape == m_aSelectedOID.getAdditionalShape() ) )
{
clearSelection();
- m_xSelectAdditionalShape = xShape;
+ m_aSelectedOID = ObjectIdentifier( xShape );
return true;
}
return false;
@@ -120,18 +121,18 @@ bool Selection::setSelection( const uno::Reference< drawing::XShape >& xShape )
void Selection::clearSelection()
{
- m_aSelectedObjectCID = m_aSelectedObjectCID_beforeMouseDown
- = m_aSelectedObjectCID_selectOnlyIfNoDoubleClickIsFollowing = rtl::OUString();
- m_xSelectAdditionalShape.set(0);
+ m_aSelectedOID = ObjectIdentifier();
+ m_aSelectedOID_beforeMouseDown = ObjectIdentifier();
+ m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing = ObjectIdentifier();
}
bool Selection::maybeSwitchSelectionAfterSingleClickWasEnsured()
{
- if( m_aSelectedObjectCID_selectOnlyIfNoDoubleClickIsFollowing.getLength()
- && !m_aSelectedObjectCID_selectOnlyIfNoDoubleClickIsFollowing.equals(m_aSelectedObjectCID) )
+ if ( m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing.isValid()
+ && m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing != m_aSelectedOID )
{
- m_aSelectedObjectCID = m_aSelectedObjectCID_selectOnlyIfNoDoubleClickIsFollowing;
- m_aSelectedObjectCID_selectOnlyIfNoDoubleClickIsFollowing = C2U("");
+ m_aSelectedOID = m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing;
+ m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing = ObjectIdentifier();
return true;
}
return false;
@@ -139,18 +140,20 @@ bool Selection::maybeSwitchSelectionAfterSingleClickWasEnsured()
void Selection::resetPossibleSelectionAfterSingleClickWasEnsured()
{
- if( m_aSelectedObjectCID_selectOnlyIfNoDoubleClickIsFollowing.getLength() )
- m_aSelectedObjectCID_selectOnlyIfNoDoubleClickIsFollowing = C2U("");
+ if ( m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing.isValid() )
+ {
+ m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing = ObjectIdentifier();
+ }
}
void Selection::remindSelectionBeforeMouseDown()
{
- m_aSelectedObjectCID_beforeMouseDown = m_aSelectedObjectCID;
+ m_aSelectedOID_beforeMouseDown = m_aSelectedOID;
}
bool Selection::isSelectionDifferentFromBeforeMouseDown()
{
- return !ObjectIdentifier::areIdenticalObjects( m_aSelectedObjectCID, m_aSelectedObjectCID_beforeMouseDown );
+ return ( m_aSelectedOID != m_aSelectedOID_beforeMouseDown );
}
void Selection::applySelection( DrawViewWrapper* pDrawViewWrapper )
@@ -162,10 +165,14 @@ void Selection::applySelection( DrawViewWrapper* pDrawViewWrapper )
pDrawViewWrapper->UnmarkAll();
}
SdrObject* pObjectToSelect = 0;
- if( m_aSelectedObjectCID.getLength() )
- pObjectToSelect = pDrawViewWrapper->getNamedSdrObject( m_aSelectedObjectCID );
- else if( m_xSelectAdditionalShape.is() )
- pObjectToSelect = DrawViewWrapper::getSdrObject( m_xSelectAdditionalShape );
+ if ( m_aSelectedOID.isAutoGeneratedObject() )
+ {
+ pObjectToSelect = pDrawViewWrapper->getNamedSdrObject( m_aSelectedOID.getObjectCID() );
+ }
+ else if( m_aSelectedOID.isAdditionalShape() )
+ {
+ pObjectToSelect = DrawViewWrapper::getSdrObject( m_aSelectedOID.getAdditionalShape() );
+ }
impl_selectObject( pObjectToSelect, *pDrawViewWrapper );
}
@@ -179,7 +186,7 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper*
//do not toggel multiclick selection if right clicked on the selected object or waiting for double click
bool bAllowMultiClickSelectionChange = !bIsRightMouse && !bWaitingForDoubleClick;
- const rtl::OUString aNameOfLastSelectedObject( m_aSelectedObjectCID );
+ ObjectIdentifier aLastSelectedObject( m_aSelectedOID );
::vos::OGuard aSolarGuard( Application::GetSolarMutex());
@@ -188,86 +195,89 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper*
//get object to select:
SdrObject* pNewObj = 0;
{
- m_aSelectedObjectCID_selectOnlyIfNoDoubleClickIsFollowing = C2U("");
- m_xSelectAdditionalShape.set(0);
+ m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing = ObjectIdentifier();
//the search for the object to select starts with the hit object deepest in the grouping hierarchy (a leaf in the tree)
//further we travel along the grouping hierarchy from child to parent
pNewObj = pDrawViewWrapper->getHitObject(rMousePos);
- m_aSelectedObjectCID = lcl_getObjectName( pNewObj );//name of pNewObj
- rtl::OUString aTestFirstHit = m_aSelectedObjectCID;
+ m_aSelectedOID = ObjectIdentifier( lcl_getObjectName( pNewObj ) );//name of pNewObj
//ignore handle only objects for hit test
- while( pNewObj && m_aSelectedObjectCID.match(C2U("HandlesOnly")) )
+ while( pNewObj && m_aSelectedOID.getObjectCID().match( C2U( "HandlesOnly" ) ) )
{
pNewObj->SetMarkProtect(true);
pNewObj = pDrawViewWrapper->getHitObject(rMousePos);
- m_aSelectedObjectCID = lcl_getObjectName( pNewObj );
+ m_aSelectedOID = ObjectIdentifier( lcl_getObjectName( pNewObj ) );
}
//accept only named objects while searching for the object to select
- //this call may change m_aSelectedObjectCID
- if( SelectionHelper::findNamedParent( pNewObj, m_aSelectedObjectCID, true ) )
+ //this call may change m_aSelectedOID
+ if ( SelectionHelper::findNamedParent( pNewObj, m_aSelectedOID, true ) )
{
//if the so far found object is a multi click object further steps are necessary
- while( ObjectIdentifier::isMultiClickObject( m_aSelectedObjectCID ) )
+ while( ObjectIdentifier::isMultiClickObject( m_aSelectedOID.getObjectCID() ) )
{
- bool bSameObjectAsLastSelected = ObjectIdentifier::areIdenticalObjects( aNameOfLastSelectedObject, m_aSelectedObjectCID );
+ bool bSameObjectAsLastSelected = ( aLastSelectedObject == m_aSelectedOID );
if( bSameObjectAsLastSelected )
{
//if the same child is clicked again don't go up further
break;
}
- if( ObjectIdentifier::areSiblings(aNameOfLastSelectedObject,m_aSelectedObjectCID) )
+ if ( ObjectIdentifier::areSiblings( aLastSelectedObject.getObjectCID(), m_aSelectedOID.getObjectCID() ) )
{
//if a sibling of the last selected object is clicked don't go up further
break;
}
SdrObject* pLastChild = pNewObj;
- rtl::OUString aLastChildName = m_aSelectedObjectCID;
- if(!SelectionHelper::findNamedParent( pNewObj, m_aSelectedObjectCID, false ))
+ ObjectIdentifier aLastChild = m_aSelectedOID;
+ if ( !SelectionHelper::findNamedParent( pNewObj, m_aSelectedOID, false ) )
{
//take the one found so far
break;
}
//if the last selected object is found don't go up further
//but take the last child if selection change is allowed
- if( ObjectIdentifier::areIdenticalObjects( aNameOfLastSelectedObject, m_aSelectedObjectCID ) )
+ if ( aLastSelectedObject == m_aSelectedOID )
{
if( bAllowMultiClickSelectionChange )
{
pNewObj = pLastChild;
- m_aSelectedObjectCID = aLastChildName;
+ m_aSelectedOID = aLastChild;
}
else
- m_aSelectedObjectCID_selectOnlyIfNoDoubleClickIsFollowing = aLastChildName;
+ m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing = aLastChild;
break;
}
}
- DBG_ASSERT(pNewObj && m_aSelectedObjectCID.getLength(),"somehow lost selected object");
+ DBG_ASSERT( pNewObj && m_aSelectedOID.isValid(), "somehow lost selected object" );
}
else
{
//maybe an additional shape was hit
- m_aSelectedObjectCID = rtl::OUString();
- if( pNewObj )
+ if ( pNewObj )
{
- m_xSelectAdditionalShape = uno::Reference< drawing::XShape >( pNewObj->getUnoShape(), uno::UNO_QUERY);
+ m_aSelectedOID = ObjectIdentifier( uno::Reference< drawing::XShape >( pNewObj->getUnoShape(), uno::UNO_QUERY ) );
+ }
+ else
+ {
+ m_aSelectedOID = ObjectIdentifier();
}
}
- if(!m_xSelectAdditionalShape.is())
+ if ( !m_aSelectedOID.isAdditionalShape() )
{
rtl::OUString aPageCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, rtl::OUString() ) );//@todo read CID from model
- if( !m_aSelectedObjectCID.getLength() )
- m_aSelectedObjectCID = aPageCID;
+ if ( !m_aSelectedOID.isAutoGeneratedObject() )
+ {
+ m_aSelectedOID = ObjectIdentifier( aPageCID );
+ }
//check wether the diagram was hit but not selected (e.g. because it has no filling):
rtl::OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, rtl::OUString() ) );//@todo read CID from model
- if( m_aSelectedObjectCID.equals( aPageCID ) || m_aSelectedObjectCID.equals( aWallCID ) || !m_aSelectedObjectCID.getLength() )
+ if ( m_aSelectedOID.getObjectCID().equals( aPageCID ) || m_aSelectedOID.getObjectCID().equals( aWallCID ) || !m_aSelectedOID.isAutoGeneratedObject() )
{
rtl::OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, rtl::OUString::valueOf( sal_Int32(0) ) );
//todo: if more than one diagram is available in future do chack the list of all diagrams here
@@ -276,7 +286,7 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper*
{
if( pDrawViewWrapper->IsObjectHit( pDiagram, rMousePos ) )
{
- m_aSelectedObjectCID = aDiagramCID;
+ m_aSelectedOID = ObjectIdentifier( aDiagramCID );
pNewObj = pDiagram;
}
}
@@ -284,18 +294,21 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper*
}
}
- if( bIsRightMouse && m_aSelectedObjectCID_selectOnlyIfNoDoubleClickIsFollowing.getLength() )
- m_aSelectedObjectCID_selectOnlyIfNoDoubleClickIsFollowing = C2U("");
+ if ( bIsRightMouse && m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing.isValid() )
+ {
+ m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing = ObjectIdentifier();
+ }
}
}
bool Selection::isResizeableObjectSelected()
{
- ObjectType eObjectType = ObjectIdentifier::getObjectType( m_aSelectedObjectCID );
+ ObjectType eObjectType = m_aSelectedOID.getObjectType();
switch( eObjectType )
{
case OBJECTTYPE_DIAGRAM:
case OBJECTTYPE_DIAGRAM_WALL:
+ case OBJECTTYPE_SHAPE:
return true;
default:
return false;
@@ -305,14 +318,17 @@ bool Selection::isResizeableObjectSelected()
bool Selection::isRotateableObjectSelected( const uno::Reference< frame::XModel >& xChartModel )
{
- return SelectionHelper::isRotateableObject( m_aSelectedObjectCID, xChartModel );
+ return SelectionHelper::isRotateableObject( m_aSelectedOID.getObjectCID(), xChartModel );
}
bool Selection::isDragableObjectSelected()
{
- if( m_aSelectedObjectCID.getLength() )
- return ObjectIdentifier::isDragableObject( m_aSelectedObjectCID );
- return m_xSelectAdditionalShape.is();
+ return m_aSelectedOID.isDragableObject();
+}
+
+bool Selection::isAdditionalShapeSelected() const
+{
+ return m_aSelectedOID.isAdditionalShape();
}
//-----------------------------------------------------------------------------
@@ -354,6 +370,20 @@ bool SelectionHelper::findNamedParent( SdrObject*& pInOutObject
}
//static
+bool SelectionHelper::findNamedParent( SdrObject*& pInOutObject
+ , ObjectIdentifier& rOutObject
+ , bool bGivenObjectMayBeResult )
+{
+ rtl::OUString aName;
+ if ( findNamedParent( pInOutObject, aName, bGivenObjectMayBeResult ) )
+ {
+ rOutObject = ObjectIdentifier( aName );
+ return true;
+ }
+ return false;
+}
+
+//static
bool SelectionHelper::isDragableObjectHitTwice( const Point& rMPos
, const rtl::OUString& rNameOfSelectedObject
, const DrawViewWrapper& rDrawViewWrapper )
@@ -369,107 +399,6 @@ bool SelectionHelper::isDragableObjectHitTwice( const Point& rMPos
return true;
}
-/*
-rtl::OUString lcl_getObjectCIDToSelect( const Point& rMPos
- , const rtl::OUString& rNameOfLastSelectedObject
- , DrawViewWrapper& rDrawViewWrapper
- , bool bAllowMultiClickSelectionChange
- , rtl::OUString& rObjectToSelectIfNoDoubleClickIsFollowing //out parameter only
- )
-{
- rtl::OUString aRet;
-
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex());
-
- //bAllowMultiClickSelectionChange==true -> a second click on the same object can lead to a changed selection (e.g. series -> single data point)
-
- //get object to select:
- SdrObject* pNewObj = 0;
- {
- rObjectToSelectIfNoDoubleClickIsFollowing = C2U("");
-
- //the search for the object to select starts with the hit object deepest in the grouping hierarchy (a leaf in the tree)
- //further we travel along the grouping hierarchy from child to parent
- pNewObj = rDrawViewWrapper.getHitObject(rMPos);
- aRet = lcl_getObjectName( pNewObj );//name of pNewObj
- rtl::OUString aTestFirstHit = aRet;
-
- //ignore handle only objects for hit test
- while( pNewObj && aRet.match(C2U("HandlesOnly")) )
- {
- pNewObj->SetMarkProtect(true);
- pNewObj = rDrawViewWrapper.getHitObject(rMPos);
- aRet = lcl_getObjectName( pNewObj );
- }
-
- //accept only named objects while searching for the object to select
- //this call may change aRet
- if( !findNamedParent( pNewObj, aRet, true ) )
- {
- return C2U("");
- }
- //if the so far found object is a multi click object further steps are necessary
- while( ObjectIdentifier::isMultiClickObject( aRet ) )
- {
- bool bSameObjectAsLastSelected = ObjectIdentifier::areIdenticalObjects( rNameOfLastSelectedObject, aRet );
- if( bSameObjectAsLastSelected )
- {
- //if the same child is clicked again don't go up further
- break;
- }
- if( ObjectIdentifier::areSiblings(rNameOfLastSelectedObject,aRet) )
- {
- //if a sibling of the last selected object is clicked don't go up further
- break;
- }
- SdrObject* pLastChild = pNewObj;
- rtl::OUString aLastChildName = aRet;
- if(!findNamedParent( pNewObj, aRet, false ))
- {
- //take the one found so far
- break;
- }
- //if the last selected object is found don't go up further
- //but take the last child if selection change is allowed
- if( ObjectIdentifier::areIdenticalObjects( rNameOfLastSelectedObject, aRet ) )
- {
- if( bAllowMultiClickSelectionChange )
- {
- pNewObj = pLastChild;
- aRet = aLastChildName;
- }
- else
- rObjectToSelectIfNoDoubleClickIsFollowing = aLastChildName;
-
- break;
- }
- }
-
- //check wether the diagram was hit but not selected:
- rtl::OUString aPageCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, rtl::OUString() ) );//@todo read CID from model
- rtl::OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, rtl::OUString() ) );//@todo read CID from model
- if( aRet.equals( aPageCID ) || aRet.equals( aWallCID ) || !aRet.getLength() )
- {
- rtl::OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, rtl::OUString::valueOf( sal_Int32(0) ) );
- //todo: if more than one diagram is available in future do chack the list of all diagrams here
- SdrObject* pDiagram = rDrawViewWrapper.getNamedSdrObject( aDiagramCID );
- if( pDiagram )
- {
- if( rDrawViewWrapper.IsObjectHit( pDiagram, rMPos ) )
- {
- aRet = aDiagramCID;
- pNewObj = pDiagram;
- }
- }
- }
-
- DBG_ASSERT(pNewObj && aRet.getLength(),"somehow lost selected object");
- }
-
- return aRet;
-}
-*/
-
// static
::rtl::OUString SelectionHelper::getHitObjectCID(
const Point& rMPos,
diff --git a/chart2/source/controller/main/SelectionHelper.hxx b/chart2/source/controller/main/SelectionHelper.hxx
index 6e01ed005978..b3516e2326a4 100644
--- a/chart2/source/controller/main/SelectionHelper.hxx
+++ b/chart2/source/controller/main/SelectionHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SelectionHelper.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,6 +28,7 @@
#define _CHART2_SELECTIONHELPER_HXX
#include "DrawViewWrapper.hxx"
+#include "ObjectIdentifier.hxx"
class SdrObject;
// header for enum SdrDragMode
@@ -42,6 +40,8 @@ namespace chart
{
//.............................................................................
+class ObjectIdentifier;
+
//-----------------------------------------------------------------------------
/**
*/
@@ -53,12 +53,15 @@ public: //methods
rtl::OUString getSelectedCID();
::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape > getSelectedAdditionalShape();
+ ObjectIdentifier getSelectedOID() const;
bool isResizeableObjectSelected();
bool isRotateableObjectSelected( const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XModel >& xChartModel );
bool isDragableObjectSelected();
+ bool isAdditionalShapeSelected() const;
+
//returns true if selection has changed
bool setSelection( const ::rtl::OUString& rCID );
bool setSelection( const ::com::sun::star::uno::Reference<
@@ -84,12 +87,9 @@ private: //member
//the content of m_xSelectedShape is ignored in that case
//the strings are used for autogenerated chart specific objects
//the shape reference is used for additional shapes
- ::rtl::OUString m_aSelectedObjectCID;//only single object selection so far
- ::rtl::OUString m_aSelectedObjectCID_beforeMouseDown;
- ::rtl::OUString m_aSelectedObjectCID_selectOnlyIfNoDoubleClickIsFollowing;
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::drawing::XShape > m_xSelectAdditionalShape;
+ ObjectIdentifier m_aSelectedOID; //only single object selection so far
+ ObjectIdentifier m_aSelectedOID_beforeMouseDown;
+ ObjectIdentifier m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing;
};
class SelectionHelper : public MarkHandleProvider
@@ -98,6 +98,9 @@ public:
static bool findNamedParent( SdrObject*& pInOutObject
, rtl::OUString& rOutName
, bool bGivenObjectMayBeResult );
+ static bool findNamedParent( SdrObject*& pInOutObject
+ , ObjectIdentifier& rOutObject
+ , bool bGivenObjectMayBeResult );
static SdrObject* getMarkHandlesObject( SdrObject* pObj );
static E3dScene* getSceneToRotate( SdrObject* pObj );
static bool isDragableObjectHitTwice( const Point& rMPos
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
new file mode 100644
index 000000000000..b6adf9bf7477
--- /dev/null
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -0,0 +1,738 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "ShapeController.hxx"
+#include "ShapeController.hrc"
+#include "ChartController.hxx"
+#include "ChartWindow.hxx"
+#include "ViewElementListProvider.hxx"
+#include "dlg_ShapeFont.hxx"
+#include "dlg_ShapeParagraph.hxx"
+#include "chartview/DrawModelWrapper.hxx"
+#include "macros.hxx"
+
+#include <com/sun/star/frame/XStorable.hpp>
+
+#include <vos/mutex.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/svapp.hxx>
+#include <editeng/brkitem.hxx>
+#include <svx/dialogs.hrc>
+#include <svx/drawitem.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/hyznitem.hxx>
+#include <editeng/orphitem.hxx>
+#include <editeng/spltitem.hxx>
+#include <svx/svxdlg.hxx>
+#include <editeng/widwitem.hxx>
+
+#include <boost/scoped_ptr.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::frame;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+ShapeController::ShapeController( const Reference< uno::XComponentContext >& rxContext,
+ ChartController* pController )
+ :FeatureCommandDispatchBase( rxContext )
+ ,m_pChartController( pController )
+{
+}
+
+ShapeController::~ShapeController()
+{
+}
+
+void ShapeController::initialize()
+{
+ FeatureCommandDispatchBase::initialize();
+}
+
+// WeakComponentImplHelperBase
+void ShapeController::disposing()
+{
+}
+
+// XEventListener
+void ShapeController::disposing( const lang::EventObject& /* Source */ )
+ throw (uno::RuntimeException)
+{
+}
+
+FeatureState ShapeController::getState( const ::rtl::OUString& rCommand )
+{
+ FeatureState aReturn;
+ aReturn.bEnabled = false;
+ aReturn.aState <<= false;
+
+ bool bWritable = false;
+ if ( m_pChartController )
+ {
+ Reference< frame::XStorable > xStorable( m_pChartController->getModel(), uno::UNO_QUERY );
+ if ( xStorable.is() )
+ {
+ bWritable = !xStorable->isReadonly();
+ }
+ }
+
+ SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( rCommand );
+ if ( aIter != m_aSupportedFeatures.end() )
+ {
+ sal_uInt16 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:
+ {
+ aReturn.bEnabled = bWritable;
+ aReturn.aState <<= false;
+ }
+ break;
+ case COMMAND_ID_BRING_TO_FRONT:
+ case COMMAND_ID_FORWARD:
+ {
+ aReturn.bEnabled = ( bWritable && isForwardPossible() );
+ aReturn.aState <<= false;
+ }
+ break;
+ case COMMAND_ID_BACKWARD:
+ case COMMAND_ID_SEND_TO_BACK:
+ {
+
+ aReturn.bEnabled = ( bWritable && isBackwardPossible() );
+ aReturn.aState <<= false;
+ }
+ break;
+ case COMMAND_ID_FONT_DIALOG:
+ case COMMAND_ID_PARAGRAPH_DIALOG:
+ {
+ aReturn.bEnabled = bWritable;
+ aReturn.aState <<= false;
+ }
+ break;
+ default:
+ {
+ aReturn.bEnabled = false;
+ aReturn.aState <<= false;
+ }
+ break;
+ }
+ }
+
+ return aReturn;
+}
+
+void ShapeController::execute( const ::rtl::OUString& rCommand, const Sequence< beans::PropertyValue>& rArgs )
+{
+ (void)rArgs;
+
+ SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( rCommand );
+ if ( aIter != m_aSupportedFeatures.end() )
+ {
+ sal_uInt16 nFeatureId = aIter->second.nFeatureId;
+ switch ( nFeatureId )
+ {
+ case COMMAND_ID_FORMAT_LINE:
+ {
+ executeDispatch_FormatLine();
+ }
+ break;
+ case COMMAND_ID_FORMAT_AREA:
+ {
+ executeDispatch_FormatArea();
+ }
+ break;
+ case COMMAND_ID_TEXT_ATTRIBUTES:
+ {
+ executeDispatch_TextAttributes();
+ }
+ break;
+ case COMMAND_ID_TRANSFORM_DIALOG:
+ {
+ executeDispatch_TransformDialog();
+ }
+ break;
+ case COMMAND_ID_OBJECT_TITLE_DESCRIPTION:
+ {
+ executeDispatch_ObjectTitleDescription();
+ }
+ break;
+ case COMMAND_ID_RENAME_OBJECT:
+ {
+ executeDispatch_RenameObject();
+ }
+ break;
+ case COMMAND_ID_BRING_TO_FRONT:
+ case COMMAND_ID_FORWARD:
+ case COMMAND_ID_BACKWARD:
+ case COMMAND_ID_SEND_TO_BACK:
+ {
+ executeDispatch_ChangeZOrder( nFeatureId );
+ }
+ break;
+ case COMMAND_ID_FONT_DIALOG:
+ {
+ executeDispatch_FontDialog();
+ }
+ break;
+ case COMMAND_ID_PARAGRAPH_DIALOG:
+ {
+ executeDispatch_ParagraphDialog();
+ }
+ break;
+ default:
+ {
+ }
+ break;
+ }
+ }
+}
+
+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 );
+}
+
+IMPL_LINK( ShapeController, CheckNameHdl, AbstractSvxNameDialog*, pDialog )
+{
+ String aName;
+ if ( pDialog )
+ {
+ pDialog->GetName( aName );
+ }
+ if ( aName.Len() )
+ {
+ DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL );
+ if ( pDrawViewWrapper && pDrawViewWrapper->getNamedSdrObject( aName ) )
+ {
+ return 0;
+ }
+ }
+ return 1;
+}
+
+void ShapeController::executeDispatch_FormatLine()
+{
+ if ( m_pChartController )
+ {
+ Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
+ DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
+ {
+ SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
+ SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
+ BOOL bHasMarked = pDrawViewWrapper->AreObjectsMarked();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE );
+ }
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
+ pFact->CreateSvxLineTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(),
+ pSelectedObj, bHasMarked ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->SetAttrToMarked( *pOutAttr, FALSE );
+ }
+ else
+ {
+ pDrawViewWrapper->SetDefaultAttr( *pOutAttr, FALSE );
+ }
+ }
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_FormatArea()
+{
+ if ( m_pChartController )
+ {
+ Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
+ DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
+ {
+ SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
+ BOOL bHasMarked = pDrawViewWrapper->AreObjectsMarked();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE );
+ }
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< AbstractSvxAreaTabDialog > pDlg(
+ pFact->CreateSvxAreaTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(),
+ pDrawViewWrapper ) );
+ if ( pDlg.get() )
+ {
+ SfxItemPool& rItemPool = pDrawViewWrapper->GetModel()->GetItemPool();
+ SfxItemSet aSet( rItemPool, rItemPool.GetFirstWhich(), rItemPool.GetLastWhich() );
+ const SvxColorTableItem* pColorItem = static_cast< const SvxColorTableItem* >( aSet.GetItem( SID_COLOR_TABLE ) );
+ if ( pColorItem && pColorItem->GetColorTable() == XColorTable::GetStdColorTable() )
+ {
+ pDlg->DontDeleteColorTable();
+ }
+ if ( pDlg->Execute() == RET_OK )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->SetAttrToMarked( *pOutAttr, FALSE );
+ }
+ else
+ {
+ pDrawViewWrapper->SetDefaultAttr( *pOutAttr, FALSE );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_TextAttributes()
+{
+ if ( m_pChartController )
+ {
+ Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pParent && pDrawViewWrapper )
+ {
+ SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
+ BOOL bHasMarked = pDrawViewWrapper->AreObjectsMarked();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE );
+ }
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
+ pFact->CreateTextTabDialog( pParent, &aAttr, pDrawViewWrapper ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ if ( bHasMarked )
+ {
+ pDrawViewWrapper->SetAttributes( *pOutAttr );
+ }
+ else
+ {
+ pDrawViewWrapper->SetDefaultAttr( *pOutAttr, FALSE );
+ }
+ }
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_TransformDialog()
+{
+ if ( m_pChartController )
+ {
+ Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pParent && pDrawViewWrapper )
+ {
+ SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
+ if ( pSelectedObj && pSelectedObj->GetObjIdentifier() == OBJ_CAPTION )
+ {
+ // item set for caption
+ SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
+ pDrawViewWrapper->GetAttributes( aAttr );
+ // item set for position and size
+ SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
+ pFact->CreateCaptionDialog( pParent, pDrawViewWrapper ) );
+ if ( pDlg.get() )
+ {
+ const USHORT* pRange = pDlg->GetInputRanges( *aAttr.GetPool() );
+ SfxItemSet aCombAttr( *aAttr.GetPool(), pRange );
+ aCombAttr.Put( aAttr );
+ aCombAttr.Put( aGeoAttr );
+ pDlg->SetInputSet( &aCombAttr );
+ if ( pDlg->Execute() == RET_OK )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ pDrawViewWrapper->SetAttributes( *pOutAttr );
+ pDrawViewWrapper->SetGeoAttrToMarked( *pOutAttr );
+ }
+ }
+ }
+ }
+ else
+ {
+ SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
+ pFact->CreateSvxTransformTabDialog( pParent, &aGeoAttr, pDrawViewWrapper ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ pDrawViewWrapper->SetGeoAttrToMarked( *pOutAttr );
+ }
+ }
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_ObjectTitleDescription()
+{
+ if ( m_pChartController )
+ {
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pDrawViewWrapper && pDrawViewWrapper->GetMarkedObjectCount() == 1 )
+ {
+ SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
+ if ( pSelectedObj )
+ {
+ String aTitle( pSelectedObj->GetTitle() );
+ String aDescription( pSelectedObj->GetDescription() );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< AbstractSvxObjectTitleDescDialog > pDlg(
+ pFact->CreateSvxObjectTitleDescDialog( NULL, aTitle, aDescription ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ pDlg->GetTitle( aTitle );
+ pDlg->GetDescription( aDescription );
+ pSelectedObj->SetTitle( aTitle );
+ pSelectedObj->SetDescription( aDescription );
+ }
+ }
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_RenameObject()
+{
+ if ( m_pChartController )
+ {
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pDrawViewWrapper && pDrawViewWrapper->GetMarkedObjectCount() == 1 )
+ {
+ SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
+ if ( pSelectedObj )
+ {
+ String aName( pSelectedObj->GetName() );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ if ( pFact )
+ {
+ ::boost::scoped_ptr< AbstractSvxObjectNameDialog > pDlg(
+ pFact->CreateSvxObjectNameDialog( NULL, aName ) );
+ pDlg->SetCheckNameHdl( LINK( this, ShapeController, CheckNameHdl ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ pDlg->GetName( aName );
+ if ( aName != pSelectedObj->GetName() )
+ {
+ pSelectedObj->SetName( aName );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
+{
+ DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL );
+ if ( pDrawViewWrapper )
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ switch ( nId )
+ {
+ case COMMAND_ID_BRING_TO_FRONT:
+ {
+ if ( isForwardPossible() )
+ {
+ pDrawViewWrapper->PutMarkedToTop();
+ }
+ }
+ break;
+ case COMMAND_ID_FORWARD:
+ {
+ if ( isForwardPossible() )
+ {
+ pDrawViewWrapper->MovMarkedToTop();
+ }
+ }
+ break;
+ case COMMAND_ID_BACKWARD:
+ {
+ if ( isBackwardPossible() )
+ {
+ pDrawViewWrapper->MovMarkedToBtm();
+ }
+ }
+ break;
+ case COMMAND_ID_SEND_TO_BACK:
+ {
+ if ( isBackwardPossible() )
+ {
+ SdrObject* pFirstObj = getFirstAdditionalShape();
+ pDrawViewWrapper->PutMarkedBehindObj( pFirstObj );
+ }
+ }
+ break;
+ default:
+ {
+ }
+ break;
+ }
+ }
+}
+
+void ShapeController::executeDispatch_FontDialog()
+{
+ if ( m_pChartController )
+ {
+ Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
+ DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
+ {
+ SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
+ pDrawViewWrapper->GetAttributes( aAttr );
+ ViewElementListProvider aViewElementListProvider( pDrawModelWrapper );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ ::boost::scoped_ptr< ShapeFontDialog > pDlg( new ShapeFontDialog( pParent, &aAttr, &aViewElementListProvider ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ pDrawViewWrapper->SetAttributes( *pOutAttr );
+ }
+ }
+ }
+}
+
+void ShapeController::executeDispatch_ParagraphDialog()
+{
+ if ( m_pChartController )
+ {
+ Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pParent && pDrawViewWrapper )
+ {
+ SfxItemPool& rPool = pDrawViewWrapper->GetModel()->GetItemPool();
+ SfxItemSet aAttr( rPool );
+ pDrawViewWrapper->GetAttributes( aAttr );
+
+ SfxItemSet aNewAttr( rPool,
+ EE_ITEMS_START, EE_ITEMS_END,
+ SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
+ SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_PAGEBREAK,
+ SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_SPLIT,
+ SID_ATTR_PARA_WIDOWS, SID_ATTR_PARA_WIDOWS,
+ SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS,
+ 0 );
+ aNewAttr.Put( aAttr );
+ aNewAttr.Put( SvxHyphenZoneItem( sal_False, SID_ATTR_PARA_HYPHENZONE ) );
+ aNewAttr.Put( SvxFmtBreakItem( SVX_BREAK_NONE, SID_ATTR_PARA_PAGEBREAK ) );
+ aNewAttr.Put( SvxFmtSplitItem( sal_True, SID_ATTR_PARA_SPLIT) );
+ aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) );
+ aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) );
+
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ ::boost::scoped_ptr< ShapeParagraphDialog > pDlg( new ShapeParagraphDialog( pParent, &aNewAttr ) );
+ if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+ {
+ const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+ pDrawViewWrapper->SetAttributes( *pOutAttr );
+ }
+ }
+ }
+}
+
+SdrObject* ShapeController::getFirstAdditionalShape()
+{
+ SdrObject* pFirstObj = NULL;
+
+ try
+ {
+ DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : NULL );
+ if ( pDrawModelWrapper )
+ {
+ Reference< drawing::XShape > xFirstShape;
+ Reference< drawing::XDrawPage > xDrawPage( pDrawModelWrapper->getMainDrawPage() );
+ Reference< drawing::XShapes > xDrawPageShapes( xDrawPage, uno::UNO_QUERY_THROW );
+ Reference< drawing::XShapes > xChartRoot( DrawModelWrapper::getChartRootShape( xDrawPage ) );
+ sal_Int32 nCount = xDrawPageShapes->getCount();
+ for ( sal_Int32 i = 0; i < nCount; ++i )
+ {
+ Reference< drawing::XShape > xShape;
+ if ( xDrawPageShapes->getByIndex( i ) >>= xShape )
+ {
+ if ( xShape.is() && xShape != xChartRoot )
+ {
+ xFirstShape = xShape;
+ break;
+ }
+ }
+ }
+ if ( xFirstShape.is() )
+ {
+ pFirstObj = DrawViewWrapper::getSdrObject( xFirstShape );
+ }
+ }
+ }
+ catch ( uno::Exception& ex )
+ {
+ ASSERT_EXCEPTION( ex );
+ }
+
+ return pFirstObj;
+}
+
+SdrObject* ShapeController::getLastAdditionalShape()
+{
+ SdrObject* pLastObj = NULL;
+
+ try
+ {
+ DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : NULL );
+ if ( pDrawModelWrapper )
+ {
+ Reference< drawing::XShape > xLastShape;
+ Reference< drawing::XDrawPage > xDrawPage( pDrawModelWrapper->getMainDrawPage() );
+ Reference< drawing::XShapes > xDrawPageShapes( xDrawPage, uno::UNO_QUERY_THROW );
+ Reference< drawing::XShapes > xChartRoot( DrawModelWrapper::getChartRootShape( xDrawPage ) );
+ sal_Int32 nCount = xDrawPageShapes->getCount();
+ for ( sal_Int32 i = nCount - 1; i >= 0; --i )
+ {
+ Reference< drawing::XShape > xShape;
+ if ( xDrawPageShapes->getByIndex( i ) >>= xShape )
+ {
+ if ( xShape.is() && xShape != xChartRoot )
+ {
+ xLastShape = xShape;
+ break;
+ }
+ }
+ }
+ if ( xLastShape.is() )
+ {
+ pLastObj = DrawViewWrapper::getSdrObject( xLastShape );
+ }
+ }
+ }
+ catch ( uno::Exception& ex )
+ {
+ ASSERT_EXCEPTION( ex );
+ }
+
+ return pLastObj;
+}
+
+bool ShapeController::isBackwardPossible()
+{
+ if ( m_pChartController && m_pChartController->m_aSelection.isAdditionalShapeSelected() )
+ {
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pDrawViewWrapper )
+ {
+ SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
+ SdrObject* pFirstObj = getFirstAdditionalShape();
+ if ( pSelectedObj && pFirstObj && pSelectedObj != pFirstObj )
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+bool ShapeController::isForwardPossible()
+{
+ if ( m_pChartController && m_pChartController->m_aSelection.isAdditionalShapeSelected() )
+ {
+ DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
+ if ( pDrawViewWrapper )
+ {
+ SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
+ SdrObject* pLastObj = getLastAdditionalShape();
+ if ( pSelectedObj && pLastObj && pSelectedObj != pLastObj )
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
diff --git a/chart2/source/controller/main/ShapeController.hxx b/chart2/source/controller/main/ShapeController.hxx
new file mode 100644
index 000000000000..aea01d6c478d
--- /dev/null
+++ b/chart2/source/controller/main/ShapeController.hxx
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_SHAPECONTROLLER_HXX
+#define CHART2_SHAPECONTROLLER_HXX
+
+#include "FeatureCommandDispatchBase.hxx"
+#include <tools/link.hxx>
+
+class AbstractSvxNameDialog;
+class SdrObject;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class ChartController;
+
+/** This is a CommandDispatch implementation for shapes.
+ */
+class ShapeController: public FeatureCommandDispatchBase
+{
+ friend class ControllerCommandDispatch;
+
+public:
+ ShapeController( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& rxContext, ChartController* pController );
+ virtual ~ShapeController();
+
+ // late initialisation, especially for adding as listener
+ virtual void initialize();
+
+protected:
+ // WeakComponentImplHelperBase
+ virtual void SAL_CALL disposing();
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // state of a feature
+ virtual FeatureState getState( const ::rtl::OUString& rCommand );
+
+ // execute a feature
+ virtual void execute( const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs );
+
+ // all the features which should be handled by this class
+ virtual void describeSupportedFeatures();
+
+private:
+ DECL_LINK( CheckNameHdl, AbstractSvxNameDialog* );
+
+ void executeDispatch_FormatLine();
+ void executeDispatch_FormatArea();
+ void executeDispatch_TextAttributes();
+ void executeDispatch_TransformDialog();
+ void executeDispatch_ObjectTitleDescription();
+ void executeDispatch_RenameObject();
+ void executeDispatch_ChangeZOrder( sal_uInt16 nId );
+ void executeDispatch_FontDialog();
+ void executeDispatch_ParagraphDialog();
+
+ SdrObject* getFirstAdditionalShape();
+ SdrObject* getLastAdditionalShape();
+ bool isBackwardPossible();
+ bool isForwardPossible();
+
+ ChartController* m_pChartController;
+};
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
+
+// CHART2_SHAPECONTROLLER_HXX
+#endif
diff --git a/chart2/source/controller/main/ShapeToolbarController.cxx b/chart2/source/controller/main/ShapeToolbarController.cxx
new file mode 100644
index 000000000000..a8a6cfba20ff
--- /dev/null
+++ b/chart2/source/controller/main/ShapeToolbarController.cxx
@@ -0,0 +1,298 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "ShapeToolbarController.hxx"
+
+#include <vos/mutex.hxx>
+#include <comphelper/sequence.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/toolbox.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <svx/svxids.hrc>
+#include <svx/tbxcustomshapes.hxx>
+
+
+using namespace com::sun::star;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+::rtl::OUString ShapeToolbarController::getImplementationName() throw (uno::RuntimeException)
+{
+ return getImplementationName_Static();
+}
+
+::rtl::OUString ShapeToolbarController::getImplementationName_Static() throw (uno::RuntimeException)
+{
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.comp.ShapeToolbarController" ) );
+}
+
+Sequence< ::rtl::OUString > ShapeToolbarController::getSupportedServiceNames_Static() throw (uno::RuntimeException)
+{
+ Sequence< ::rtl::OUString > aSupported(1);
+ aSupported.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.ShapeToolbarController" ) );
+ return aSupported;
+}
+
+::sal_Bool ShapeToolbarController::supportsService( const ::rtl::OUString& ServiceName ) throw (uno::RuntimeException)
+{
+ return ::comphelper::existsValue( ServiceName, getSupportedServiceNames_Static() );
+}
+
+Sequence< ::rtl::OUString> ShapeToolbarController::getSupportedServiceNames() throw (uno::RuntimeException)
+{
+ return getSupportedServiceNames_Static();
+}
+
+Reference< uno::XInterface > ShapeToolbarController::create( const Reference< uno::XComponentContext >& xContext )
+{
+ return *( new ShapeToolbarController( Reference< lang::XMultiServiceFactory >( xContext->getServiceManager(), uno::UNO_QUERY ) ) );
+}
+
+ShapeToolbarController::ShapeToolbarController( const Reference< lang::XMultiServiceFactory >& rxFact )
+ :m_pToolbarController( NULL )
+ ,m_nToolBoxId( 1 )
+ ,m_nSlotId( 0 )
+{
+ osl_incrementInterlockedCount( &m_refCount );
+ m_xServiceManager = rxFact;
+ osl_decrementInterlockedCount( &m_refCount );
+}
+
+ShapeToolbarController::~ShapeToolbarController()
+{
+}
+
+// ::com::sun::star::uno::XInterface
+uno::Any ShapeToolbarController::queryInterface( const uno::Type& rType ) throw (uno::RuntimeException)
+{
+ uno::Any aReturn = ToolboxController::queryInterface( rType );
+ if ( !aReturn.hasValue() )
+ {
+ aReturn = ShapeToolbarController_Base::queryInterface( rType );
+ }
+ return aReturn;
+}
+
+void ShapeToolbarController::acquire() throw ()
+{
+ ToolboxController::acquire();
+}
+
+void ShapeToolbarController::release() throw ()
+{
+ ToolboxController::release();
+}
+
+// ::com::sun::star::lang::XInitialization
+void ShapeToolbarController::initialize( const Sequence< uno::Any >& rArguments ) throw (uno::Exception, uno::RuntimeException)
+{
+ ToolboxController::initialize( rArguments );
+ ::vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ToolBox* pToolBox = static_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ) );
+ if ( pToolBox )
+ {
+ const USHORT nCount = pToolBox->GetItemCount();
+ for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ {
+ const USHORT nItemId = pToolBox->GetItemId( nPos );
+ if ( pToolBox->GetItemCommand( nItemId ) == String( m_aCommandURL ) )
+ {
+ m_nToolBoxId = nItemId;
+ break;
+ }
+ }
+ if ( m_aCommandURL.equalsAscii( ".uno:BasicShapes" ) )
+ {
+ m_aStates.insert( TCommandState::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:BasicShapes" ) ), sal_True ) );
+ m_nSlotId = SID_DRAWTBX_CS_BASIC;
+ m_pToolbarController = TToolbarHelper::createFromQuery( new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ) );
+ }
+ else if ( m_aCommandURL.equalsAscii( ".uno:SymbolShapes" ) )
+ {
+ m_aStates.insert( TCommandState::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:SymbolShapes" ) ), sal_True ) );
+ m_nSlotId = SID_DRAWTBX_CS_SYMBOL;
+ m_pToolbarController = TToolbarHelper::createFromQuery( new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ) );
+ }
+ else if ( m_aCommandURL.equalsAscii( ".uno:ArrowShapes" ) )
+ {
+ m_aStates.insert( TCommandState::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ArrowShapes" ) ), sal_True ) );
+ m_nSlotId = SID_DRAWTBX_CS_ARROW;
+ m_pToolbarController = TToolbarHelper::createFromQuery( new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox) );
+ }
+ else if ( m_aCommandURL.equalsAscii( ".uno:FlowChartShapes" ) )
+ {
+ m_aStates.insert( TCommandState::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FlowChartShapes" ) ), sal_True ) );
+ m_nSlotId = SID_DRAWTBX_CS_FLOWCHART;
+ m_pToolbarController = TToolbarHelper::createFromQuery( new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ) );
+ }
+ else if ( m_aCommandURL.equalsAscii( ".uno:CalloutShapes" ) )
+ {
+ m_aStates.insert( TCommandState::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CalloutShapes" ) ), sal_True ) );
+ m_nSlotId = SID_DRAWTBX_CS_CALLOUT;
+ m_pToolbarController = TToolbarHelper::createFromQuery( new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ) );
+ }
+ else if ( m_aCommandURL.equalsAscii( ".uno:StarShapes" ) )
+ {
+ m_aStates.insert( TCommandState::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:StarShapes" ) ), sal_True ) );
+ m_nSlotId = SID_DRAWTBX_CS_STAR;
+ m_pToolbarController = TToolbarHelper::createFromQuery( new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ) );
+ }
+
+ for ( TCommandState::iterator aIter( m_aStates.begin() ); aIter != m_aStates.end(); ++aIter )
+ {
+ addStatusListener( aIter->first );
+ }
+
+ if ( m_pToolbarController.is() )
+ {
+ m_pToolbarController->initialize( rArguments );
+ }
+
+ // check if paste special is allowed, when not don't add DROPDOWN
+ pToolBox->SetItemBits( m_nToolBoxId, pToolBox->GetItemBits( m_nToolBoxId ) | TIB_DROPDOWN );
+ }
+}
+
+// ::com::sun::star::frame::XStatusListener
+void ShapeToolbarController::statusChanged( const frame::FeatureStateEvent& Event ) throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ TCommandState::iterator aFind = m_aStates.find( Event.FeatureURL.Complete );
+ if ( aFind != m_aStates.end() )
+ {
+ aFind->second = Event.IsEnabled;
+ if ( m_pToolbarController.is() )
+ {
+ sal_Bool bCheckmark = sal_False;
+ ToolBox& rTb = m_pToolbarController->GetToolBox();
+
+ for ( USHORT i = 0; i < rTb.GetItemCount(); ++i )
+ {
+ USHORT nId = rTb.GetItemId( i );
+ if ( nId == 0 )
+ {
+ continue;
+ }
+ ::rtl::OUString aCmd = rTb.GetItemCommand( nId );
+ if ( aCmd == Event.FeatureURL.Complete )
+ {
+ rTb.EnableItem( nId, Event.IsEnabled );
+ if ( Event.State >>= bCheckmark )
+ {
+ rTb.CheckItem( nId, bCheckmark );
+ }
+ else
+ {
+ ::rtl::OUString aItemText;
+ if ( Event.State >>= aItemText )
+ {
+ rTb.SetItemText( nId, aItemText );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+// ::com::sun::star::frame::XToolbarController
+Reference< awt::XWindow > ShapeToolbarController::createPopupWindow() throw (uno::RuntimeException)
+{
+ ::vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ Reference< awt::XWindow > xRet;
+ if ( m_pToolbarController.is() )
+ {
+ xRet = m_pToolbarController.getRef()->createPopupWindow();
+ }
+
+ return xRet;
+}
+
+// ::com::sun::star::frame::XSubToolbarController
+::sal_Bool ShapeToolbarController::opensSubToolbar() throw (uno::RuntimeException)
+{
+ return ( m_nSlotId == SID_DRAWTBX_CS_BASIC ||
+ m_nSlotId == SID_DRAWTBX_CS_SYMBOL ||
+ m_nSlotId == SID_DRAWTBX_CS_ARROW ||
+ m_nSlotId == SID_DRAWTBX_CS_FLOWCHART ||
+ m_nSlotId == SID_DRAWTBX_CS_CALLOUT ||
+ m_nSlotId == SID_DRAWTBX_CS_STAR );
+}
+
+::rtl::OUString ShapeToolbarController::getSubToolbarName() throw (uno::RuntimeException)
+{
+ ::vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard(m_aMutex);
+ uno::Reference< frame::XSubToolbarController > xSub( m_pToolbarController.getRef(), uno::UNO_QUERY );
+ if ( xSub.is() )
+ {
+ return xSub->getSubToolbarName();
+ }
+ return ::rtl::OUString();
+}
+
+void ShapeToolbarController::functionSelected( const ::rtl::OUString& rCommand ) throw (uno::RuntimeException)
+{
+ ::vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ uno::Reference< frame::XSubToolbarController > xSub( m_pToolbarController.getRef(), uno::UNO_QUERY );
+ if ( xSub.is() )
+ {
+ m_aCommandURL = rCommand;
+ xSub->functionSelected( rCommand );
+ }
+}
+
+void ShapeToolbarController::updateImage() throw (uno::RuntimeException)
+{
+ ::vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ uno::Reference< frame::XSubToolbarController > xSub( m_pToolbarController.getRef(), uno::UNO_QUERY );
+ if ( xSub.is() )
+ {
+ xSub->updateImage();
+ }
+}
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
diff --git a/chart2/source/controller/main/ShapeToolbarController.hxx b/chart2/source/controller/main/ShapeToolbarController.hxx
new file mode 100644
index 000000000000..544cac7f9831
--- /dev/null
+++ b/chart2/source/controller/main/ShapeToolbarController.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_SHAPETOOLBARCONTROLLER_HXX
+#define CHART2_SHAPETOOLBARCONTROLLER_HXX
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/frame/XSubToolbarController.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+#include <comphelper/implementationreference.hxx>
+#include <comphelper/stl_types.hxx>
+#include <svtools/toolboxcontroller.hxx>
+
+class SfxToolBoxControl;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+typedef ::cppu::ImplHelper2 < ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::frame::XSubToolbarController> ShapeToolbarController_Base;
+
+typedef ::comphelper::ImplementationReference< SfxToolBoxControl, ::com::sun::star::frame::XToolbarController > TToolbarHelper;
+
+class ShapeToolbarController : public ::svt::ToolboxController
+ ,public ShapeToolbarController_Base
+{
+ DECLARE_STL_USTRINGACCESS_MAP( sal_Bool, TCommandState );
+ TCommandState m_aStates;
+ TToolbarHelper m_pToolbarController;
+ sal_uInt16 m_nToolBoxId;
+ sal_uInt16 m_nSlotId;
+ ShapeToolbarController( const ShapeToolbarController& );
+ void operator =( const ShapeToolbarController& );
+
+public:
+ ShapeToolbarController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxFact );
+ virtual ~ShapeToolbarController();
+
+ // ::com::sun::star::uno::XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+
+ // ::com::sun::star::lang::XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+
+ // needed by registration
+ static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw(::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::frame::XStatusListener
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::frame::XToolbarController
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::frame::XSubToolbarController
+ virtual ::sal_Bool SAL_CALL opensSubToolbar() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSubToolbarName() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL functionSelected( const ::rtl::OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateImage() throw (::com::sun::star::uno::RuntimeException);
+};
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
+
+#endif //CHART2_SHAPETOOLBARCONTROLLER_HXX
+
diff --git a/chart2/source/controller/main/StatusBarCommandDispatch.cxx b/chart2/source/controller/main/StatusBarCommandDispatch.cxx
index 7960e2493fd2..d80d37eff7da 100644
--- a/chart2/source/controller/main/StatusBarCommandDispatch.cxx
+++ b/chart2/source/controller/main/StatusBarCommandDispatch.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StatusBarCommandDispatch.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -98,7 +95,7 @@ void StatusBarCommandDispatch::fireStatusEvent(
{
uno::Any aArg;
Reference< chart2::XChartDocument > xDoc( m_xModifiable, uno::UNO_QUERY );
- aArg <<= ObjectNameProvider::getSelectedObjectText( m_aSelectedCID, xDoc );
+ aArg <<= ObjectNameProvider::getSelectedObjectText( m_aSelectedOID.getObjectCID(), xDoc );
fireStatusEventForURL( C2U(".uno:Context"), aArg, true, xSingleListener );
}
if( bFireModified )
@@ -150,9 +147,9 @@ void SAL_CALL StatusBarCommandDispatch::selectionChanged( const lang::EventObjec
throw (uno::RuntimeException)
{
if( m_xSelectionSupplier.is())
- m_xSelectionSupplier->getSelection() >>= m_aSelectedCID;
+ m_aSelectedOID = ObjectIdentifier( m_xSelectionSupplier->getSelection() );
else
- m_aSelectedCID = OUString();
+ m_aSelectedOID = ObjectIdentifier();
fireAllStatusEvents( 0 );
}
diff --git a/chart2/source/controller/main/StatusBarCommandDispatch.hxx b/chart2/source/controller/main/StatusBarCommandDispatch.hxx
index f1d0808cac6b..c84f81f83258 100644
--- a/chart2/source/controller/main/StatusBarCommandDispatch.hxx
+++ b/chart2/source/controller/main/StatusBarCommandDispatch.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StatusBarCommandDispatch.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,6 +28,7 @@
#define CHART2_STATUSBARCOMMANDDISPATCH_HXX
#include "CommandDispatch.hxx"
+#include "ObjectIdentifier.hxx"
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
@@ -103,7 +101,7 @@ private:
::com::sun::star::uno::Reference<
::com::sun::star::view::XSelectionSupplier > m_xSelectionSupplier;
bool m_bIsModified;
- ::rtl::OUString m_aSelectedCID;
+ ObjectIdentifier m_aSelectedOID;
};
} // namespace chart
diff --git a/chart2/source/controller/main/UndoCommandDispatch.cxx b/chart2/source/controller/main/UndoCommandDispatch.cxx
index 14aedcdbae46..eb3d00a2723a 100644
--- a/chart2/source/controller/main/UndoCommandDispatch.cxx
+++ b/chart2/source/controller/main/UndoCommandDispatch.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: UndoCommandDispatch.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/controller/main/UndoCommandDispatch.hxx b/chart2/source/controller/main/UndoCommandDispatch.hxx
index 9efafd1685ed..28fb813f63de 100644
--- a/chart2/source/controller/main/UndoCommandDispatch.hxx
+++ b/chart2/source/controller/main/UndoCommandDispatch.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: UndoCommandDispatch.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/UndoGuard.cxx b/chart2/source/controller/main/UndoGuard.cxx
index e44b3b6a5787..61bed4029db5 100644
--- a/chart2/source/tools/UndoGuard.cxx
+++ b/chart2/source/controller/main/UndoGuard.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: UndoGuard.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/UndoManager.cxx b/chart2/source/controller/main/UndoManager.cxx
index e1542ade6020..34157503e629 100644
--- a/chart2/source/tools/UndoManager.cxx
+++ b/chart2/source/controller/main/UndoManager.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: UndoManager.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -44,6 +41,8 @@
#include <unotools/configitem.hxx>
#include <cppuhelper/compbase1.hxx>
+#include <rtl/uuid.h>
+#include <svx/svdundo.hxx>
#include <functional>
@@ -134,10 +133,31 @@ UndoManager::~UndoManager()
m_pLastRemeberedUndoElement = 0;
}
+void UndoManager::addShapeUndoAction( SdrUndoAction* pAction )
+{
+ if ( !pAction )
+ {
+ return;
+ }
+
+ impl::ShapeUndoElement* pShapeUndoElement = new impl::ShapeUndoElement( pAction->GetComment(), pAction );
+ if ( pShapeUndoElement )
+ {
+ m_apUndoStack->push( pShapeUndoElement );
+ m_apRedoStack->disposeAndClear();
+ if ( !m_apUndoStepsConfigItem.get() )
+ {
+ retrieveConfigUndoSteps();
+ }
+ fireModifyEvent();
+ }
+}
+
void UndoManager::impl_undoRedo(
Reference< frame::XModel > & xCurrentModel,
impl::UndoStack * pStackToRemoveFrom,
- impl::UndoStack * pStackToAddTo )
+ impl::UndoStack * pStackToAddTo,
+ bool bUndo )
{
if( pStackToRemoveFrom && ! pStackToRemoveFrom->empty() )
{
@@ -145,11 +165,32 @@ void UndoManager::impl_undoRedo(
impl::UndoElement * pTop( pStackToRemoveFrom->top());
if( pTop )
{
- // put a clone of current model into redo/undo stack with the same
- // action string as the undo/redo
- pStackToAddTo->push( pTop->createFromModel( xCurrentModel ));
- // change current model by properties of the model from undo
- pTop->applyToModel( xCurrentModel );
+ impl::ShapeUndoElement* pShapeUndoElement = dynamic_cast< impl::ShapeUndoElement* >( pTop );
+ if ( pShapeUndoElement )
+ {
+ impl::ShapeUndoElement* pNewShapeUndoElement = new impl::ShapeUndoElement( *pShapeUndoElement );
+ pStackToAddTo->push( pNewShapeUndoElement );
+ SdrUndoAction* pAction = pNewShapeUndoElement->getSdrUndoAction();
+ if ( pAction )
+ {
+ if ( bUndo )
+ {
+ pAction->Undo();
+ }
+ else
+ {
+ pAction->Redo();
+ }
+ }
+ }
+ else
+ {
+ // put a clone of current model into redo/undo stack with the same
+ // action string as the undo/redo
+ pStackToAddTo->push( pTop->createFromModel( xCurrentModel ));
+ // change current model by properties of the model from undo
+ pTop->applyToModel( xCurrentModel );
+ }
// remove the top undo element
pStackToRemoveFrom->pop(), pTop = 0;
ChartViewHelper::setViewToDirtyState( xCurrentModel );
@@ -290,14 +331,14 @@ void SAL_CALL UndoManager::undo( Reference< frame::XModel >& xCurrentModel )
throw (uno::RuntimeException)
{
OSL_ASSERT( m_apUndoStack.get() && m_apRedoStack.get());
- impl_undoRedo( xCurrentModel, m_apUndoStack.get(), m_apRedoStack.get());
+ impl_undoRedo( xCurrentModel, m_apUndoStack.get(), m_apRedoStack.get(), true );
}
void SAL_CALL UndoManager::redo( Reference< frame::XModel >& xCurrentModel )
throw (uno::RuntimeException)
{
OSL_ASSERT( m_apUndoStack.get() && m_apRedoStack.get());
- impl_undoRedo( xCurrentModel, m_apRedoStack.get(), m_apUndoStack.get());
+ impl_undoRedo( xCurrentModel, m_apRedoStack.get(), m_apUndoStack.get(), false );
}
::sal_Bool SAL_CALL UndoManager::undoPossible()
@@ -352,4 +393,44 @@ void SAL_CALL UndoManager::applyModelContent(
impl::UndoElement::applyModelContentToModel( xModelToChange, xModelToCopyFrom );
}
+// ____ XUnoTunnel ____
+sal_Int64 UndoManager::getSomething( const Sequence< sal_Int8 >& rId )
+ throw (uno::RuntimeException)
+{
+ if ( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) )
+ {
+ return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this ) );
+ }
+ return 0;
+}
+
+// static
+const Sequence< sal_Int8 >& UndoManager::getUnoTunnelId()
+{
+ static Sequence< sal_Int8 >* pSeq = 0;
+ if( !pSeq )
+ {
+ osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
+ if( !pSeq )
+ {
+ static Sequence< sal_Int8 > aSeq( 16 );
+ rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
+ pSeq = &aSeq;
+ }
+ }
+ return *pSeq;
+}
+
+// static
+UndoManager* UndoManager::getImplementation( const Reference< uno::XInterface > xObj )
+{
+ UndoManager* pRet = NULL;
+ Reference< lang::XUnoTunnel > xUT( xObj, uno::UNO_QUERY );
+ if ( xUT.is() )
+ {
+ pRet = reinterpret_cast< UndoManager* >( sal::static_int_cast< sal_IntPtr >( xUT->getSomething( getUnoTunnelId() ) ) );
+ }
+ return pRet;
+}
+
} // namespace chart
diff --git a/chart2/source/controller/main/_serviceregistration_controller.cxx b/chart2/source/controller/main/_serviceregistration_controller.cxx
index 7de2e8fa8588..cf8f5525e624 100644
--- a/chart2/source/controller/main/_serviceregistration_controller.cxx
+++ b/chart2/source/controller/main/_serviceregistration_controller.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: _serviceregistration_controller.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,6 +34,7 @@
#include "ChartDocumentWrapper.hxx"
#include "AccessibleChartView.hxx"
#include "ElementSelector.hxx"
+#include "ShapeToolbarController.hxx"
#include <cppuhelper/implementationentry.hxx>
static struct ::cppu::ImplementationEntry g_entries_chart2_controller[] =
@@ -82,17 +80,17 @@ static struct ::cppu::ImplementationEntry g_entries_chart2_controller[] =
, 0
}
,{
- ::chart::AccessibleChartView::create
- , ::chart::AccessibleChartView::getImplementationName_Static
- , ::chart::AccessibleChartView::getSupportedServiceNames_Static
+ ::chart::ElementSelectorToolbarController::create
+ , ::chart::ElementSelectorToolbarController::getImplementationName_Static
+ , ::chart::ElementSelectorToolbarController::getSupportedServiceNames_Static
, ::cppu::createSingleComponentFactory
, 0
, 0
}
,{
- ::chart::ElementSelectorToolbarController::create
- , ::chart::ElementSelectorToolbarController::getImplementationName_Static
- , ::chart::ElementSelectorToolbarController::getSupportedServiceNames_Static
+ ::chart::ShapeToolbarController::create
+ , ::chart::ShapeToolbarController::getImplementationName_Static
+ , ::chart::ShapeToolbarController::getSupportedServiceNames_Static
, ::cppu::createSingleComponentFactory
, 0
, 0
diff --git a/chart2/source/controller/main/makefile.mk b/chart2/source/controller/main/makefile.mk
index 5d0ecadc0ae0..729276d5bd0e 100644
--- a/chart2/source/controller/main/makefile.mk
+++ b/chart2/source/controller/main/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.9 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -71,7 +67,14 @@ SLOFILES = \
$(SLO)$/_serviceregistration_controller.obj \
$(SLO)$/ChartDropTargetHelper.obj \
$(SLO)$/StatusBarCommandDispatch.obj \
- $(SLO)$/ChartTransferable.obj
+ $(SLO)$/ChartTransferable.obj \
+ $(SLO)$/FeatureCommandDispatchBase.obj \
+ $(SLO)$/DrawCommandDispatch.obj \
+ $(SLO)$/ShapeController.obj \
+ $(SLO)$/ShapeToolbarController.obj \
+ $(SLO)$/ImplUndoManager.obj \
+ $(SLO)$/UndoManager.obj \
+ $(SLO)$/UndoGuard.obj
# $(SLO)$/CommonConverters.obj \
# $(SLO)$/Scaling.obj \
diff --git a/chart2/source/controller/makefile.mk b/chart2/source/controller/makefile.mk
index 45060a60d297..8fdd6000fbe1 100644
--- a/chart2/source/controller/makefile.mk
+++ b/chart2/source/controller/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.12.68.1 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -80,12 +76,12 @@ SHL1LIBS= $(LIB1TARGET)
SHL1STDLIBS= $(CHARTTOOLS) \
$(CHARTVIEW) \
+ $(EDITENGLIB) \
$(CPPULIB) \
$(CPPUHELPERLIB) \
$(COMPHELPERLIB) \
$(BASEGFXLIB) \
$(DRAWINGLAYERLIB) \
- $(GOODIESLIB) \
$(BASEGFXLIB) \
$(SALLIB) \
$(SVLLIB) \
@@ -116,6 +112,7 @@ DEF1NAME= $(SHL1TARGET)
# sfx.srs is needed for the strings for UNDO and REDO in the UndoCommandDispatch
RESLIB1LIST=\
$(SRS)$/chcdialogs.srs \
+ $(SRS)$/chcmenus.srs \
$(SOLARCOMMONRESDIR)$/sfx.srs
RESLIB1NAME= $(TARGET)
diff --git a/chart2/source/controller/menus/ShapeContextMenu.src b/chart2/source/controller/menus/ShapeContextMenu.src
new file mode 100644
index 000000000000..79e424707807
--- /dev/null
+++ b/chart2/source/controller/menus/ShapeContextMenu.src
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "MenuResIds.hrc"
+#include "ShapeController.hrc"
+
+
+Menu RID_CONTEXTMENU_SHAPE
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = COMMAND_ID_FORMAT_LINE;
+ Command = ".uno:FormatLine";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_FORMAT_AREA;
+ Command = ".uno:FormatArea";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_TEXT_ATTRIBUTES;
+ Command = ".uno:TextAttributes";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_TRANSFORM_DIALOG;
+ Command = ".uno:TransformDialog";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_OBJECT_TITLE_DESCRIPTION;
+ Command = ".uno:ObjectTitleDescription";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_RENAME_OBJECT;
+ Command = ".uno:RenameObject";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_ARRANGE_ROW;
+ Command = ".uno:ArrangeRow";
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = COMMAND_ID_BRING_TO_FRONT;
+ Command = ".uno:BringToFront";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_FORWARD;
+ Command = ".uno:Forward";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_BACKWARD;
+ Command = ".uno:Backward";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_SEND_TO_BACK;
+ Command = ".uno:SendToBack";
+ };
+ };
+ };
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_CUT;
+ Command = ".uno:Cut";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_COPY;
+ Command = ".uno:Copy";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_PASTE;
+ Command = ".uno:Paste";
+ };
+ };
+};
diff --git a/chart2/source/controller/menus/ShapeEditContextMenu.src b/chart2/source/controller/menus/ShapeEditContextMenu.src
new file mode 100644
index 000000000000..60f5d4eab5af
--- /dev/null
+++ b/chart2/source/controller/menus/ShapeEditContextMenu.src
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "MenuResIds.hrc"
+#include "ShapeController.hrc"
+
+
+Menu RID_CONTEXTMENU_SHAPEEDIT
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = COMMAND_ID_FONT_DIALOG;
+ Command = ".uno:FontDialog";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_PARAGRAPH_DIALOG;
+ Command = ".uno:ParagraphDialog";
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_CUT;
+ Command = ".uno:Cut";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_COPY;
+ Command = ".uno:Copy";
+ };
+ MenuItem
+ {
+ Identifier = COMMAND_ID_PASTE;
+ Command = ".uno:Paste";
+ };
+ };
+};
diff --git a/chart2/source/controller/menus/makefile.mk b/chart2/source/controller/menus/makefile.mk
new file mode 100644
index 000000000000..f97548963e38
--- /dev/null
+++ b/chart2/source/controller/menus/makefile.mk
@@ -0,0 +1,63 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ= ..$/..$/..
+PRJINC= $(PRJ)$/source
+PRJNAME= chart2
+TARGET= chcmenus
+
+ENABLE_EXCEPTIONS= TRUE
+VISIBILITY_HIDDEN=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE: settings.mk
+
+# i26518 the gcc-3.0.4 requires to enhance the template-depth
+# this seems to be a compiler issue, so we recommend not to use 3.0.x anymore
+.IF "$(COM)"=="GCC"
+ CFLAGS+=-ftemplate-depth-128
+.ENDIF
+
+# --- Resources ---------------------------------------------------------------
+
+SRC1FILES= \
+ ShapeContextMenu.src \
+ ShapeEditContextMenu.src
+
+SRS1NAME=$(TARGET)
+
+# --- Targets -----------------------------------------------------------------
+
+.INCLUDE: target.mk
+
+#dependencies:
+
+$(SRS)$/chcmenus.srs: \
+ ..$/inc$/MenuResIds.hrc
+
+#$(SRS)$/$(TARGET).srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
diff --git a/chart2/source/inc/AxisHelper.hxx b/chart2/source/inc/AxisHelper.hxx
index 15d5e9cb4ae5..be2a60bb63f7 100644
--- a/chart2/source/inc/AxisHelper.hxx
+++ b/chart2/source/inc/AxisHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AxisHelper.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/AxisIndexDefines.hxx b/chart2/source/inc/AxisIndexDefines.hxx
index 025b9ff0d91f..d994f8a85ea4 100644
--- a/chart2/source/inc/AxisIndexDefines.hxx
+++ b/chart2/source/inc/AxisIndexDefines.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AxisIndexDefines.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/BaseGFXHelper.hxx b/chart2/source/inc/BaseGFXHelper.hxx
index 675b2ff5acd5..384841261073 100644
--- a/chart2/source/inc/BaseGFXHelper.hxx
+++ b/chart2/source/inc/BaseGFXHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BaseGFXHelper.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/CachedDataSequence.hxx b/chart2/source/inc/CachedDataSequence.hxx
index 22b2c9311085..2ad418939945 100644
--- a/chart2/source/inc/CachedDataSequence.hxx
+++ b/chart2/source/inc/CachedDataSequence.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CachedDataSequence.hxx,v $
- * $Revision: 1.6.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/CharacterProperties.hxx b/chart2/source/inc/CharacterProperties.hxx
index ae32f29ba20f..0742435e9bfe 100644
--- a/chart2/source/inc/CharacterProperties.hxx
+++ b/chart2/source/inc/CharacterProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CharacterProperties.hxx,v $
- * $Revision: 1.4.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ChartDebugTrace.hxx b/chart2/source/inc/ChartDebugTrace.hxx
index 84b8541a38fb..d31267f9cfc4 100644
--- a/chart2/source/inc/ChartDebugTrace.hxx
+++ b/chart2/source/inc/ChartDebugTrace.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartDebugTrace.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ChartModelHelper.hxx b/chart2/source/inc/ChartModelHelper.hxx
index fa80d00413f7..7cd205b83fb5 100644
--- a/chart2/source/inc/ChartModelHelper.hxx
+++ b/chart2/source/inc/ChartModelHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartModelHelper.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +34,6 @@
#include <com/sun/star/chart2/XUndoManager.hpp>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
#include <com/sun/star/chart2/data/XRangeHighlighter.hpp>
-#include <com/sun/star/chart/XChartDataArray.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/awt/Size.hpp>
@@ -58,18 +54,11 @@ namespace chart
class OOO_DLLPUBLIC_CHARTTOOLS ChartModelHelper
{
public:
- static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XUndoManager > createUndoManager();
-
static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XRangeHighlighter > createRangeHighlighter(
const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier >& xSelectionSupplier );
- static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > createInternalDataProvider();
-
static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > createInternalDataProvider(
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataArray >& xDataToCopy );
-
- static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > createInternalDataProvider(
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc, bool bConnectToModel );
static ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XDiagram >
@@ -79,6 +68,10 @@ public:
::com::sun::star::chart2::XDiagram >
findDiagram( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc );
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XCoordinateSystem >
+ getFirstCoordinateSystem( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
+
SAL_DLLPRIVATE static ::std::vector< ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XDataSeries > > getDataSeries(
const ::com::sun::star::uno::Reference<
diff --git a/chart2/source/inc/ChartTypeHelper.hxx b/chart2/source/inc/ChartTypeHelper.hxx
index 9c5cdafe49f2..729cfc86bc52 100644
--- a/chart2/source/inc/ChartTypeHelper.hxx
+++ b/chart2/source/inc/ChartTypeHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartTypeHelper.hxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ChartViewHelper.hxx b/chart2/source/inc/ChartViewHelper.hxx
index f373d4a10da0..772841418e45 100644
--- a/chart2/source/inc/ChartViewHelper.hxx
+++ b/chart2/source/inc/ChartViewHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartViewHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/CloneHelper.hxx b/chart2/source/inc/CloneHelper.hxx
index 943f2b18dea4..6747bd614d84 100644
--- a/chart2/source/inc/CloneHelper.hxx
+++ b/chart2/source/inc/CloneHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CloneHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,6 +29,7 @@
#include <com/sun/star/util/XCloneable.hpp>
+#include <map>
#include <functional>
#include <algorithm>
diff --git a/chart2/source/inc/ColorPerPointHelper.hxx b/chart2/source/inc/ColorPerPointHelper.hxx
index c1391d9837cd..af49918a1154 100644
--- a/chart2/source/inc/ColorPerPointHelper.hxx
+++ b/chart2/source/inc/ColorPerPointHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ColorPerPointHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/CommonConverters.hxx b/chart2/source/inc/CommonConverters.hxx
index 493c4d2096e2..1ce032b3af69 100644
--- a/chart2/source/inc/CommonConverters.hxx
+++ b/chart2/source/inc/CommonConverters.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CommonConverters.hxx,v $
- * $Revision: 1.10.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx
index 2ec4efa41b8c..13435741e63e 100644
--- a/chart2/source/inc/CommonFunctors.hxx
+++ b/chart2/source/inc/CommonFunctors.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CommonFunctors.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ConfigColorScheme.hxx b/chart2/source/inc/ConfigColorScheme.hxx
index 3fe9355fd8cb..56d13f8971c1 100644
--- a/chart2/source/inc/ConfigColorScheme.hxx
+++ b/chart2/source/inc/ConfigColorScheme.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ConfigColorScheme.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ConfigItemListener.hxx b/chart2/source/inc/ConfigItemListener.hxx
index 146cc1e596ad..9ddde49908c2 100644
--- a/chart2/source/inc/ConfigItemListener.hxx
+++ b/chart2/source/inc/ConfigItemListener.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ConfigItemListener.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ContainerHelper.hxx b/chart2/source/inc/ContainerHelper.hxx
index 5ce297dc6540..4c6d10d6b1f0 100644
--- a/chart2/source/inc/ContainerHelper.hxx
+++ b/chart2/source/inc/ContainerHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ContainerHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ControllerLockGuard.hxx b/chart2/source/inc/ControllerLockGuard.hxx
index 0440018d2c72..69044d4a2b3f 100644
--- a/chart2/source/inc/ControllerLockGuard.hxx
+++ b/chart2/source/inc/ControllerLockGuard.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ControllerLockGuard.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/DataSeriesHelper.hxx b/chart2/source/inc/DataSeriesHelper.hxx
index 317c92849fb7..640d5cd70dec 100644
--- a/chart2/source/inc/DataSeriesHelper.hxx
+++ b/chart2/source/inc/DataSeriesHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSeriesHelper.hxx,v $
- * $Revision: 1.7.24.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/DataSource.hxx b/chart2/source/inc/DataSource.hxx
index 555bbad847c4..3dd6ff72d330 100644
--- a/chart2/source/inc/DataSource.hxx
+++ b/chart2/source/inc/DataSource.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSource.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/DataSourceHelper.hxx b/chart2/source/inc/DataSourceHelper.hxx
index c2f29e42c6ba..06888fe858d6 100644
--- a/chart2/source/inc/DataSourceHelper.hxx
+++ b/chart2/source/inc/DataSourceHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSourceHelper.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -114,14 +111,12 @@ public:
static ::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XDataSource > getUsedData(
const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XModel >& xChartModel,
- bool bIncludeUnusedData = false );
+ ::com::sun::star::frame::XModel >& xChartModel );
static ::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XDataSource > getUsedData(
const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XChartDocument >& xChartDoc,
- bool bIncludeUnusedData = false );
+ ::com::sun::star::chart2::XChartDocument >& xChartDoc );
static bool detectRangeSegmentation(
const ::com::sun::star::uno::Reference<
@@ -130,8 +125,7 @@ public:
, ::com::sun::star::uno::Sequence< sal_Int32 >& rSequenceMapping
, bool& rOutUseColumns
, bool& rOutFirstCellAsLabel
- , bool& rOutHasCategories
- , bool bIncludeUnusedData = false );
+ , bool& rOutHasCategories );
static void setRangeSegmentation(
const ::com::sun::star::uno::Reference<
@@ -155,6 +149,10 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XLabeledDataSequence > & xLSeq );
+ SAL_DLLPRIVATE static ::rtl::OUString getRangeFromValues(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::data::XLabeledDataSequence > & xLSeq );
+
SAL_DLLPRIVATE static ::com::sun::star::uno::Sequence< ::rtl::OUString > getRangesFromDataSource(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XDataSource > & xSource );
diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx
index 119d206a2937..c685b99b974f 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DiagramHelper.hxx,v $
- * $Revision: 1.9.22.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -226,19 +223,15 @@ public:
::com::sun::star::chart2::XDiagram > & xDiagram );
static ::com::sun::star::uno::Sequence< rtl::OUString >
- generateAutomaticCategories(
+ getExplicitSimpleCategories(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > & xChartDoc );
SAL_DLLPRIVATE static ::com::sun::star::uno::Sequence< rtl::OUString >
- generateAutomaticCategories(
+ generateAutomaticCategoriesFromCooSys(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XCoordinateSystem > & xCooSys );
- SAL_DLLPRIVATE static void generateAutomaticCategoriesFromChartType(
- ::com::sun::star::uno::Sequence< rtl::OUString >& rRet,
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
-
static ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartType >
getChartTypeByIndex( const ::com::sun::star::uno::Reference<
diff --git a/chart2/source/inc/DisposeHelper.hxx b/chart2/source/inc/DisposeHelper.hxx
index 22100c6f0d95..7e8932f17581 100644
--- a/chart2/source/inc/DisposeHelper.hxx
+++ b/chart2/source/inc/DisposeHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DisposeHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ErrorBar.hxx b/chart2/source/inc/ErrorBar.hxx
index 4b586aefc8a9..f4d2b457acc4 100644
--- a/chart2/source/inc/ErrorBar.hxx
+++ b/chart2/source/inc/ErrorBar.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ErrorBar.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/EventListenerHelper.hxx b/chart2/source/inc/EventListenerHelper.hxx
index 75852d62593f..79840a2bd2e4 100644
--- a/chart2/source/inc/EventListenerHelper.hxx
+++ b/chart2/source/inc/EventListenerHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: EventListenerHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ExplicitCategoriesProvider.hxx b/chart2/source/inc/ExplicitCategoriesProvider.hxx
index a6d8926d36ac..18d54eb6e2ad 100644
--- a/chart2/source/inc/ExplicitCategoriesProvider.hxx
+++ b/chart2/source/inc/ExplicitCategoriesProvider.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ExplicitCategoriesProvider.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,36 +35,71 @@
#include <com/sun/star/frame/XModel.hpp>
#include "charttoolsdllapi.hxx"
+#include <vector>
+
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS ExplicitCategoriesProvider :
- public ::cppu::WeakImplHelper1<
- ::com::sun::star::chart2::data::XTextualDataSequence
- >
+struct OOO_DLLPUBLIC_CHARTTOOLS ComplexCategory
+{
+ rtl::OUString Text;
+ sal_Int32 Count;
+
+ ComplexCategory( const rtl::OUString& rText, sal_Int32 nCount ) : Text( rText ), Count (nCount)
+ {}
+};
+
+class OOO_DLLPUBLIC_CHARTTOOLS SplitCategoriesProvider
+{
+public:
+ virtual ~SplitCategoriesProvider();
+
+ virtual sal_Int32 getLevelCount() const = 0;
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > getStringsForLevel( sal_Int32 nIndex ) const = 0;
+};
+
+class OOO_DLLPUBLIC_CHARTTOOLS ExplicitCategoriesProvider
{
public:
ExplicitCategoriesProvider( const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XCoordinateSystem >& xCooSysModel );
- SAL_DLLPRIVATE virtual ~ExplicitCategoriesProvider();
+ ::com::sun::star::chart2::XCoordinateSystem >& xCooSysModel
+ , const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel >& xChartModel
+ );
+ virtual ~ExplicitCategoriesProvider();
+
+ void init();
- //XTextualDataSequence
- SAL_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getTextualData()
- throw (::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > getSimpleCategories();
+ ::std::vector< ComplexCategory > getCategoriesByLevel( sal_Int32 nLevel );
static ::rtl::OUString getCategoryByIndex(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XCoordinateSystem >& xCooSysModel,
- sal_Int32 nIndex );
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XCoordinateSystem >& xCooSysModel
+ , const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel >& xChartModel
+ , sal_Int32 nIndex );
+
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getExplicitSimpleCategories(
+ const SplitCategoriesProvider& rSplitCategoriesProvider );
+
+ bool hasComplexCategories() const;
+ sal_Int32 getCategoryLevelCount() const;
+
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::data::XLabeledDataSequence> >& getSplitCategoriesList();
private: //member
- ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aExplicitCategories;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aExplicitCategories;
+ ::std::vector< ::std::vector< ComplexCategory > > m_aComplexCats;
bool volatile m_bDirty;
::com::sun::star::uno::WeakReference<
::com::sun::star::chart2::XCoordinateSystem > m_xCooSysModel;
::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XLabeledDataSequence> m_xCategories;
+ ::com::sun::star::chart2::data::XLabeledDataSequence> m_xOriginalCategories;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::data::XLabeledDataSequence> > m_aSplitCategoriesList;
};
} // namespace chart
diff --git a/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx b/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
index fe7734730a45..91c3034ea79c 100644
--- a/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ExponentialRegressionCurveCalculator.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/FastPropertyIdRanges.hxx b/chart2/source/inc/FastPropertyIdRanges.hxx
index 4dd7ed7febe5..d0651d60f923 100644
--- a/chart2/source/inc/FastPropertyIdRanges.hxx
+++ b/chart2/source/inc/FastPropertyIdRanges.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: FastPropertyIdRanges.hxx,v $
- * $Revision: 1.4.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/FillProperties.hxx b/chart2/source/inc/FillProperties.hxx
index 95f8068c6c23..f9fa970828a2 100644
--- a/chart2/source/inc/FillProperties.hxx
+++ b/chart2/source/inc/FillProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: FillProperties.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/FormattedStringHelper.hxx b/chart2/source/inc/FormattedStringHelper.hxx
index d867b69ff175..a0e69011f77d 100644
--- a/chart2/source/inc/FormattedStringHelper.hxx
+++ b/chart2/source/inc/FormattedStringHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: FormattedStringHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/InternalData.hxx b/chart2/source/inc/InternalData.hxx
new file mode 100755
index 000000000000..6b6590cffdac
--- /dev/null
+++ b/chart2/source/inc/InternalData.hxx
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_INTERNALDATA_HXX
+#define CHART2_INTERNALDATA_HXX
+
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <vector>
+#include <valarray>
+
+namespace chart
+{
+
+class InternalData
+{
+public:
+ InternalData();
+
+ void createDefaultData();
+
+ void setData( const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence< double > > & rDataInRows );
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence< double > > getData() const;
+
+ ::com::sun::star::uno::Sequence< double > getColumnValues( sal_Int32 nColumnIndex ) const;
+ ::com::sun::star::uno::Sequence< double > getRowValues( sal_Int32 nRowIndex ) const;
+
+ void setColumnValues( sal_Int32 nColumnIndex, const ::std::vector< double > & rNewData );
+ void setRowValues( sal_Int32 nRowIndex, const ::std::vector< double > & rNewData );
+
+ void setComplexColumnLabel( sal_Int32 nColumnIndex, const ::std::vector< ::rtl::OUString >& rComplexLabel );
+ void setComplexRowLabel( sal_Int32 nRowIndex, const ::std::vector< ::rtl::OUString >& rComplexLabel );
+
+ ::std::vector< ::rtl::OUString > getComplexColumnLabel( sal_Int32 nColumnIndex ) const;
+ ::std::vector< ::rtl::OUString > getComplexRowLabel( sal_Int32 nRowIndex ) const;
+
+ void swapRowWithNext( sal_Int32 nRowIndex );
+ void swapColumnWithNext( sal_Int32 nColumnIndex );
+
+ void insertColumn( sal_Int32 nAfterIndex );
+ void insertRow( sal_Int32 nAfterIndex );
+ void deleteColumn( sal_Int32 nAtIndex );
+ void deleteRow( sal_Int32 nAtIndex );
+
+ /// @return the index of the newly appended column
+ sal_Int32 appendColumn();
+ /// @return the index of the newly appended row
+ sal_Int32 appendRow();
+
+ sal_Int32 getRowCount() const;
+ sal_Int32 getColumnCount() const;
+
+ typedef ::std::valarray< double > tDataType;
+ typedef ::std::vector< ::std::vector< ::rtl::OUString > > tVecVecString; //inner index is hierarchical level
+
+ void setComplexRowLabels( const tVecVecString& rNewRowLabels );
+ tVecVecString getComplexRowLabels() const;
+ void setComplexColumnLabels( const tVecVecString& rNewColumnLabels );
+ tVecVecString getComplexColumnLabels() const;
+
+#if OSL_DEBUG_LEVEL > 2
+ void traceData() const;
+#endif
+
+private: //methods
+ /** resizes the data if at least one of the given dimensions is larger than
+ before. The data is never becoming smaller only larger.
+
+ @return </TRUE>, if the data was enlarged
+ */
+ bool enlargeData( sal_Int32 nColumnCount, sal_Int32 nRowCount );
+
+private:
+ sal_Int32 m_nColumnCount;
+ sal_Int32 m_nRowCount;
+
+ tDataType m_aData;
+ tVecVecString m_aRowLabels;//outer index is row index, inner index is category level
+ tVecVecString m_aColumnLabels;//outer index is column index
+};
+
+#endif
+
+} // namespace chart
diff --git a/chart2/source/inc/InternalDataProvider.hxx b/chart2/source/inc/InternalDataProvider.hxx
index 9bf598441b3a..f5e12f87f505 100644
--- a/chart2/source/inc/InternalDataProvider.hxx
+++ b/chart2/source/inc/InternalDataProvider.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: InternalDataProvider.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,8 +27,10 @@
#ifndef CHART2_INTERNALDATAPROVIDER_HXX
#define CHART2_INTERNALDATAPROVIDER_HXX
+#include "InternalData.hxx"
+
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/chart/XChartDataArray.hpp>
+#include <com/sun/star/chart/XComplexDescriptionAccess.hpp>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
#include <com/sun/star/chart2/XInternalDataProvider.hpp>
#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
@@ -52,12 +51,11 @@ namespace chart
namespace impl
{
-class InternalData;
typedef ::cppu::WeakImplHelper6<
::com::sun::star::chart2::XInternalDataProvider,
::com::sun::star::chart2::data::XRangeXMLConversion,
- ::com::sun::star::chart::XChartDataArray,
+ ::com::sun::star::chart::XComplexDescriptionAccess,
::com::sun::star::util::XCloneable,
::com::sun::star::lang::XInitialization,
::com::sun::star::lang::XServiceInfo >
@@ -78,16 +76,9 @@ class InternalDataProvider :
public impl::InternalDataProvider_Base
{
public:
- explicit InternalDataProvider();
explicit InternalDataProvider(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & _xContext);
- /// sets the internal data to the given data
- explicit InternalDataProvider(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart::XChartDataArray > & xDataToCopy );
- /// copies the data from the given data provider for all given used ranges
explicit InternalDataProvider( const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XChartDocument > & xChartDoc );
- // copy-CTOR
+ ::com::sun::star::chart2::XChartDocument > & xChartDoc, bool bConnectToModel );
explicit InternalDataProvider( const InternalDataProvider & rOther );
virtual ~InternalDataProvider();
@@ -113,6 +104,10 @@ public:
throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL appendSequence()
throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertComplexCategoryLevel( ::sal_Int32 nLevel )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL deleteComplexCategoryLevel( ::sal_Int32 nLevel )
+ throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL insertDataPointForAllSequences( ::sal_Int32 nAfterIndex )
throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deleteDataPointForAllSequences( ::sal_Int32 nAtIndex )
@@ -154,7 +149,21 @@ public:
throw (::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
- // ____ XChartDataArray ____
+ // ____ XComplexDescriptionAccess ____
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > > SAL_CALL
+ getComplexRowDescriptions() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setComplexRowDescriptions(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > >& aRowDescriptions )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > > SAL_CALL
+ getComplexColumnDescriptions() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setComplexColumnDescriptions(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > >& aColumnDescriptions )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XChartDataArray (base of XComplexDescriptionAccess) ____
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData()
throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setData(
@@ -192,29 +201,27 @@ public:
throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::uno::Exception);
private:
- impl::InternalData & getInternalData();
- const impl::InternalData & getInternalData() const;
-
- void addDataSequenceToMap(
+ void lcl_addDataSequenceToMap(
const ::rtl::OUString & rRangeRepresentation,
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XDataSequence > & xSequence );
+
::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XDataSequence >
- createDataSequenceAndAddToMap( const ::rtl::OUString & rRangeRepresentation,
+ lcl_createDataSequenceAndAddToMap( const ::rtl::OUString & rRangeRepresentation,
const ::rtl::OUString & rRole );
::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XDataSequence >
- createDataSequenceAndAddToMap( const ::rtl::OUString & rRangeRepresentation );
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataSequence >
- createErrorBarDataSequenceAndAddToMap( const ::rtl::OUString & rRangeRepresentation );
- void deleteMapReferences( const ::rtl::OUString & rRangeRepresentation );
- void adaptMapReferences(
+ lcl_createDataSequenceAndAddToMap( const ::rtl::OUString & rRangeRepresentation );
+
+ void lcl_deleteMapReferences( const ::rtl::OUString & rRangeRepresentation );
+
+ void lcl_adaptMapReferences(
const ::rtl::OUString & rOldRangeRepresentation,
const ::rtl::OUString & rNewRangeRepresentation );
- void increaseMapReferences( sal_Int32 nBegin, sal_Int32 nEnd );
- void decreaseMapReferences( sal_Int32 nBegin, sal_Int32 nEnd );
+
+ void lcl_increaseMapReferences( sal_Int32 nBegin, sal_Int32 nEnd );
+ void lcl_decreaseMapReferences( sal_Int32 nBegin, sal_Int32 nEnd );
typedef ::std::multimap< ::rtl::OUString,
::com::sun::star::uno::WeakReference< ::com::sun::star::chart2::data::XDataSequence > >
@@ -228,14 +235,9 @@ private:
referred to by some component (weak reference is valid), the range will
be adapted.
*/
- mutable tSequenceMap m_aSequenceMap;
- mutable ::std::auto_ptr< impl::InternalData > m_apData;
+ tSequenceMap m_aSequenceMap;
+ InternalData m_aInternalData;
bool m_bDataInColumns;
-
-// typedef ::std::map< ::rtl::OUString,
-// ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > >
-// tHardRefSequenceMap;
-// tHardRefSequenceMap m_aErrorBarSequences;
};
} // namespace chart
diff --git a/chart2/source/inc/LabeledDataSequence.hxx b/chart2/source/inc/LabeledDataSequence.hxx
index 3eba45bd2df9..a5ec1d99307d 100644
--- a/chart2/source/inc/LabeledDataSequence.hxx
+++ b/chart2/source/inc/LabeledDataSequence.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LabeledDataSequence.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/LegendHelper.hxx b/chart2/source/inc/LegendHelper.hxx
index f88e2cba0aae..5f8279286b72 100644
--- a/chart2/source/inc/LegendHelper.hxx
+++ b/chart2/source/inc/LegendHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LegendHelper.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx
index 26b9f09f7880..cb199b7c2947 100644
--- a/chart2/source/inc/LifeTime.hxx
+++ b/chart2/source/inc/LifeTime.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LifeTime.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/LineProperties.hxx b/chart2/source/inc/LineProperties.hxx
index 3cc60c5f3aa7..15cd08654a46 100644
--- a/chart2/source/inc/LineProperties.hxx
+++ b/chart2/source/inc/LineProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LineProperties.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/LinearRegressionCurveCalculator.hxx b/chart2/source/inc/LinearRegressionCurveCalculator.hxx
index ad79a887c019..faef7bdbe0c8 100644
--- a/chart2/source/inc/LinearRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/LinearRegressionCurveCalculator.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LinearRegressionCurveCalculator.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx b/chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx
index b0274600d543..4b3a6fa8d0b0 100644
--- a/chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LogarithmicRegressionCurveCalculator.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/MeanValueRegressionCurveCalculator.hxx b/chart2/source/inc/MeanValueRegressionCurveCalculator.hxx
index 8febb3d6078c..3fc2c6f1c354 100644
--- a/chart2/source/inc/MeanValueRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/MeanValueRegressionCurveCalculator.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MeanValueRegressionCurveCalculator.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/MediaDescriptorHelper.hxx b/chart2/source/inc/MediaDescriptorHelper.hxx
index 35cc90d30ca7..a41ad1f8c751 100644
--- a/chart2/source/inc/MediaDescriptorHelper.hxx
+++ b/chart2/source/inc/MediaDescriptorHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MediaDescriptorHelper.hxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ModifyListenerCallBack.hxx b/chart2/source/inc/ModifyListenerCallBack.hxx
index 92e7a778348c..3833806d185e 100644
--- a/chart2/source/inc/ModifyListenerCallBack.hxx
+++ b/chart2/source/inc/ModifyListenerCallBack.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ModifyListenerCallBack.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ModifyListenerHelper.hxx b/chart2/source/inc/ModifyListenerHelper.hxx
index fa2977fd1b44..262d2078deea 100644
--- a/chart2/source/inc/ModifyListenerHelper.hxx
+++ b/chart2/source/inc/ModifyListenerHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ModifyListenerHelper.hxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/MutexContainer.hxx b/chart2/source/inc/MutexContainer.hxx
index 68d7f9f74fd0..026c53634b12 100644
--- a/chart2/source/inc/MutexContainer.hxx
+++ b/chart2/source/inc/MutexContainer.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MutexContainer.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/NameContainer.hxx b/chart2/source/inc/NameContainer.hxx
index 9a55884d9535..f44d3cea490a 100644
--- a/chart2/source/inc/NameContainer.hxx
+++ b/chart2/source/inc/NameContainer.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NameContainer.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/NamedFillProperties.hxx b/chart2/source/inc/NamedFillProperties.hxx
index e356ec6141c0..325f8960f7fd 100644
--- a/chart2/source/inc/NamedFillProperties.hxx
+++ b/chart2/source/inc/NamedFillProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NamedFillProperties.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/NamedLineProperties.hxx b/chart2/source/inc/NamedLineProperties.hxx
index 13533a3130e6..8f16cd970932 100644
--- a/chart2/source/inc/NamedLineProperties.hxx
+++ b/chart2/source/inc/NamedLineProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NamedLineProperties.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/NamedProperties.hxx b/chart2/source/inc/NamedProperties.hxx
index 7ecb2e43b1c1..5f9f5eb94823 100644
--- a/chart2/source/inc/NamedProperties.hxx
+++ b/chart2/source/inc/NamedProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NamedProperties.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/NoWarningThisInCTOR.hxx b/chart2/source/inc/NoWarningThisInCTOR.hxx
index e0de75daa503..00167d07636b 100644
--- a/chart2/source/inc/NoWarningThisInCTOR.hxx
+++ b/chart2/source/inc/NoWarningThisInCTOR.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NoWarningThisInCTOR.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/OPropertySet.hxx b/chart2/source/inc/OPropertySet.hxx
index 00517f87c61a..fa773a6dab00 100644
--- a/chart2/source/inc/OPropertySet.hxx
+++ b/chart2/source/inc/OPropertySet.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: OPropertySet.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ObjectIdentifier.hxx b/chart2/source/inc/ObjectIdentifier.hxx
index 7793cd57d21e..0765c9acf94a 100644
--- a/chart2/source/inc/ObjectIdentifier.hxx
+++ b/chart2/source/inc/ObjectIdentifier.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ObjectIdentifier.hxx,v $
- * $Revision: 1.6.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,6 +40,7 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
//.............................................................................
namespace chart
@@ -79,6 +77,7 @@ enum ObjectType
OBJECTTYPE_DATA_STOCK_RANGE,
OBJECTTYPE_DATA_STOCK_LOSS,
OBJECTTYPE_DATA_STOCK_GAIN,
+ OBJECTTYPE_SHAPE,
OBJECTTYPE_UNKNOWN
};
@@ -102,6 +101,18 @@ class OOO_DLLPUBLIC_CHARTTOOLS ObjectIdentifier
//where Type: getStringForType( ObjectType eType ) or other string
public:
+ ObjectIdentifier();
+ ObjectIdentifier( const ::rtl::OUString& rObjectCID );
+ ObjectIdentifier( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape );
+ ObjectIdentifier( const ::com::sun::star::uno::Any& rAny );
+ virtual ~ObjectIdentifier();
+
+ ObjectIdentifier( const ObjectIdentifier& rOID );
+ ObjectIdentifier& operator=( const ObjectIdentifier& rOID );
+ bool operator==( const ObjectIdentifier& rOID ) const;
+ bool operator!=( const ObjectIdentifier& rOID ) const;
+ bool operator<( const ObjectIdentifier& rOID ) const;
+
static rtl::OUString createClassifiedIdentifierForObject(
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface >& xObject
@@ -172,6 +183,7 @@ public:
static rtl::OUString getDragMethodServiceName( const rtl::OUString& rClassifiedIdentifier );
static rtl::OUString getDragParameterString( const rtl::OUString& rCID );
static bool isDragableObject( const rtl::OUString& rClassifiedIdentifier );
+ bool isDragableObject();
static bool isRotateableObject( const rtl::OUString& rClassifiedIdentifier );
static bool isMultiClickObject( const rtl::OUString& rClassifiedIdentifier );
static bool areSiblings( const rtl::OUString& rCID1, const rtl::OUString& rCID2 );//identical object is no sibling
@@ -179,6 +191,7 @@ public:
static rtl::OUString getStringForType( ObjectType eObjectType );
static ObjectType getObjectType( const rtl::OUString& rCID );
+ ObjectType getObjectType();
static rtl::OUString createSeriesSubObjectStub( ObjectType eSubObjectType
, const rtl::OUString& rSeriesParticle
@@ -241,6 +254,22 @@ public:
static TitleHelper::eTitleType getTitleTypeForCID( const ::rtl::OUString& rCID );
static ::rtl::OUString getMovedSeriesCID( const ::rtl::OUString& rObjectCID, sal_Bool bForward );
+
+ bool isValid() const;
+ bool isAutoGeneratedObject() const;
+ bool isAdditionalShape() const;
+ ::rtl::OUString getObjectCID() const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > getAdditionalShape() const;
+ ::com::sun::star::uno::Any getAny() const;
+
+private:
+ // #i12587# support for shapes in chart
+ // For autogenerated chart objects a CID is specified in m_aObjectCID,
+ // for all other objects m_xAdditionalShape is set.
+ // Note, that if m_aObjectCID is set, m_xAdditionalShape must be empty
+ // and vice versa.
+ ::rtl::OUString m_aObjectCID;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xAdditionalShape;
};
//.............................................................................
diff --git a/chart2/source/inc/PotentialRegressionCurveCalculator.hxx b/chart2/source/inc/PotentialRegressionCurveCalculator.hxx
index f5b8a7c7428f..5548cf81be87 100644
--- a/chart2/source/inc/PotentialRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/PotentialRegressionCurveCalculator.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PotentialRegressionCurveCalculator.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/PropertyHelper.hxx b/chart2/source/inc/PropertyHelper.hxx
index 6646f8cf086d..eb4fce0360cc 100644
--- a/chart2/source/inc/PropertyHelper.hxx
+++ b/chart2/source/inc/PropertyHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PropertyHelper.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/RangeHighlighter.hxx b/chart2/source/inc/RangeHighlighter.hxx
index caa424dc4f05..48719ec2eeda 100644
--- a/chart2/source/inc/RangeHighlighter.hxx
+++ b/chart2/source/inc/RangeHighlighter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RangeHighlighter.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ReferenceSizeProvider.hxx b/chart2/source/inc/ReferenceSizeProvider.hxx
index c6505c4d3796..35819ba111cb 100644
--- a/chart2/source/inc/ReferenceSizeProvider.hxx
+++ b/chart2/source/inc/ReferenceSizeProvider.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ReferenceSizeProvider.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/RegressionCurveCalculator.hxx b/chart2/source/inc/RegressionCurveCalculator.hxx
index 0168ca2f57ba..25fda5080409 100644
--- a/chart2/source/inc/RegressionCurveCalculator.hxx
+++ b/chart2/source/inc/RegressionCurveCalculator.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionCurveCalculator.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/RegressionCurveHelper.hxx b/chart2/source/inc/RegressionCurveHelper.hxx
index 7dbc9e33bf3d..0a8fd0315bb5 100644
--- a/chart2/source/inc/RegressionCurveHelper.hxx
+++ b/chart2/source/inc/RegressionCurveHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionCurveHelper.hxx,v $
- * $Revision: 1.11.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/RelativePositionHelper.hxx b/chart2/source/inc/RelativePositionHelper.hxx
index e8e7dde535b5..1dd0617236ad 100644
--- a/chart2/source/inc/RelativePositionHelper.hxx
+++ b/chart2/source/inc/RelativePositionHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RelativePositionHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/RelativeSizeHelper.hxx b/chart2/source/inc/RelativeSizeHelper.hxx
index aaacd124bed2..a5585d9901bc 100644
--- a/chart2/source/inc/RelativeSizeHelper.hxx
+++ b/chart2/source/inc/RelativeSizeHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RelativeSizeHelper.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ResId.hxx b/chart2/source/inc/ResId.hxx
index 5cc98eb230c0..551f5f0da40d 100644
--- a/chart2/source/inc/ResId.hxx
+++ b/chart2/source/inc/ResId.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ResId.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/RessourceManager.hxx b/chart2/source/inc/RessourceManager.hxx
index 6cefa1a23d02..9204fa106580 100644
--- a/chart2/source/inc/RessourceManager.hxx
+++ b/chart2/source/inc/RessourceManager.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RessourceManager.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/Scaling.hxx b/chart2/source/inc/Scaling.hxx
index 8f5e83c5254e..29fd8e2fb2e0 100644
--- a/chart2/source/inc/Scaling.hxx
+++ b/chart2/source/inc/Scaling.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Scaling.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/SceneProperties.hxx b/chart2/source/inc/SceneProperties.hxx
index f37fbf86b0ce..bceef6712106 100644
--- a/chart2/source/inc/SceneProperties.hxx
+++ b/chart2/source/inc/SceneProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SceneProperties.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/ServiceMacros.hxx b/chart2/source/inc/ServiceMacros.hxx
index a953be11d0fb..03913fa22842 100644
--- a/chart2/source/inc/ServiceMacros.hxx
+++ b/chart2/source/inc/ServiceMacros.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ServiceMacros.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/StackMode.hxx b/chart2/source/inc/StackMode.hxx
index b23d586579a7..e341205522d4 100644
--- a/chart2/source/inc/StackMode.hxx
+++ b/chart2/source/inc/StackMode.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StackMode.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/StatisticsHelper.hxx b/chart2/source/inc/StatisticsHelper.hxx
index 1d49940fd46c..af05d5f3f0e8 100644
--- a/chart2/source/inc/StatisticsHelper.hxx
+++ b/chart2/source/inc/StatisticsHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StatisticsHelper.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc
index 3353e48e9238..47ed75e80a9a 100644
--- a/chart2/source/inc/Strings.hrc
+++ b/chart2/source/inc/Strings.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Strings.hrc,v $
- * $Revision: 1.9.72.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
// this includes no link dependency
#include <svl/solar.hrc>
-//next free is 290
+//next free is 291
//single free is: 134
//#define RID_APP_START 30000
@@ -267,6 +264,8 @@
#define STR_OBJECT_CURVE_EQUATION (RID_APP_START + 268)
#define STR_STATISTICS_IN_LEGEND (RID_APP_START + 180)
+#define STR_OBJECT_SHAPE (RID_APP_START + 290)
+
//-----------------------------------------------------------------------------
//Titles for tabpages and dialogs
diff --git a/chart2/source/inc/ThreeDHelper.hxx b/chart2/source/inc/ThreeDHelper.hxx
index 62eaba4ffa77..d3d31bd38c5d 100644
--- a/chart2/source/inc/ThreeDHelper.hxx
+++ b/chart2/source/inc/ThreeDHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ThreeDHelper.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/TitleHelper.hxx b/chart2/source/inc/TitleHelper.hxx
index 96ecee79dc3e..2de0c16266db 100644
--- a/chart2/source/inc/TitleHelper.hxx
+++ b/chart2/source/inc/TitleHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TitleHelper.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/TrueGuard.hxx b/chart2/source/inc/TrueGuard.hxx
index 5b9c007d33a0..6a3c639df26e 100644
--- a/chart2/source/inc/TrueGuard.hxx
+++ b/chart2/source/inc/TrueGuard.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TrueGuard.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/UncachedDataSequence.hxx b/chart2/source/inc/UncachedDataSequence.hxx
index 2a5e23602738..0b601b06f721 100644
--- a/chart2/source/inc/UncachedDataSequence.hxx
+++ b/chart2/source/inc/UncachedDataSequence.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: UncachedDataSequence.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/UndoGuard.hxx b/chart2/source/inc/UndoGuard.hxx
index cdefdcd44c41..864d5ccff994 100644
--- a/chart2/source/inc/UndoGuard.hxx
+++ b/chart2/source/inc/UndoGuard.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: UndoGuard.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,7 +29,6 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/chart2/XUndoManager.hpp>
-#include "charttoolsdllapi.hxx"
// header for class OUString
#include <rtl/ustring.hxx>
@@ -51,7 +47,7 @@ public:
::com::sun::star::frame::XModel > & xModel );
virtual ~UndoGuard_Base();
-OOO_DLLPUBLIC_CHARTTOOLS void commitAction();
+ void commitAction();
protected:
::com::sun::star::uno::Reference<
@@ -67,7 +63,7 @@ protected:
cancelAction in the DTOR if no other method is called.
If commitAction is called the destructor does nothin anymore.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS UndoGuard : public UndoGuard_Base
+class UndoGuard : public UndoGuard_Base
{
public:
explicit UndoGuard( const rtl::OUString& rUndoMessage
@@ -82,7 +78,7 @@ public:
cancelActionUndo in the DTOR if no other method is called.
If commitAction is called the destructor does nothin anymore.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS UndoLiveUpdateGuard : public UndoGuard_Base
+class UndoLiveUpdateGuard : public UndoGuard_Base
{
public:
explicit UndoLiveUpdateGuard( const rtl::OUString& rUndoMessage
@@ -96,7 +92,7 @@ public:
/** Same as UndoLiveUpdateGuard but with additional storage of the chart's data.
Only use this if the data has internal data.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS UndoLiveUpdateGuardWithData :
+class UndoLiveUpdateGuardWithData :
public UndoGuard_Base
{
public:
@@ -108,7 +104,7 @@ public:
virtual ~UndoLiveUpdateGuardWithData();
};
-class OOO_DLLPUBLIC_CHARTTOOLS UndoGuardWithSelection : public UndoGuard_Base
+class UndoGuardWithSelection : public UndoGuard_Base
{
public:
explicit UndoGuardWithSelection( const rtl::OUString& rUndoMessage
diff --git a/chart2/source/inc/UndoManager.hxx b/chart2/source/inc/UndoManager.hxx
index 6c71e668a2b5..a28a0d78c470 100644
--- a/chart2/source/inc/UndoManager.hxx
+++ b/chart2/source/inc/UndoManager.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: UndoManager.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,8 +36,9 @@
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/chart2/XUndoManager.hpp>
#include <com/sun/star/chart2/XUndoHelper.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <cppuhelper/compbase3.hxx>
+#include <cppuhelper/compbase4.hxx>
#include <rtl/ustring.hxx>
// for pair
@@ -48,6 +46,8 @@
// for auto_ptr
#include <memory>
+class SdrUndoAction;
+
namespace com { namespace sun { namespace star {
namespace frame {
class XModel;
@@ -65,10 +65,11 @@ class UndoElement;
class UndoStack;
class ModifyBroadcaster;
-typedef ::cppu::WeakComponentImplHelper3<
+typedef ::cppu::WeakComponentImplHelper4<
::com::sun::star::util::XModifyBroadcaster,
::com::sun::star::chart2::XUndoManager,
- ::com::sun::star::chart2::XUndoHelper >
+ ::com::sun::star::chart2::XUndoHelper,
+ ::com::sun::star::lang::XUnoTunnel >
UndoManager_Base;
} // namespace impl
@@ -90,6 +91,15 @@ public:
explicit UndoManager();
virtual ~UndoManager();
+ void addShapeUndoAction( SdrUndoAction* pAction );
+
+ // ____ XUnoTunnel ____
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+ static UndoManager* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xObj );
+
protected:
// ____ ConfigItemListener ____
virtual void notify( const ::rtl::OUString & rPropertyName );
@@ -148,7 +158,8 @@ private:
::com::sun::star::uno::Reference<
::com::sun::star::frame::XModel > & xCurrentModel,
impl::UndoStack * pStackToRemoveFrom,
- impl::UndoStack * pStackToAddTo );
+ impl::UndoStack * pStackToAddTo,
+ bool bUndo = true );
::std::auto_ptr< impl::UndoStack > m_apUndoStack;
::std::auto_ptr< impl::UndoStack > m_apRedoStack;
diff --git a/chart2/source/inc/UserDefinedProperties.hxx b/chart2/source/inc/UserDefinedProperties.hxx
index a94f64b2cf5f..af616a6f6c22 100644
--- a/chart2/source/inc/UserDefinedProperties.hxx
+++ b/chart2/source/inc/UserDefinedProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: UserDefinedProperties.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/WeakListenerAdapter.hxx b/chart2/source/inc/WeakListenerAdapter.hxx
index 936e6e4ab4cf..55f283a94600 100644
--- a/chart2/source/inc/WeakListenerAdapter.hxx
+++ b/chart2/source/inc/WeakListenerAdapter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WeakListenerAdapter.hxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/WrappedDefaultProperty.hxx b/chart2/source/inc/WrappedDefaultProperty.hxx
index 7f60a42a78ed..78a263c70cdc 100644
--- a/chart2/source/inc/WrappedDefaultProperty.hxx
+++ b/chart2/source/inc/WrappedDefaultProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedDefaultProperty.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/WrappedDirectStateProperty.hxx b/chart2/source/inc/WrappedDirectStateProperty.hxx
index 50221bec97df..1dd5889f0d55 100644
--- a/chart2/source/inc/WrappedDirectStateProperty.hxx
+++ b/chart2/source/inc/WrappedDirectStateProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedDirectStateProperty.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/WrappedIgnoreProperty.hxx b/chart2/source/inc/WrappedIgnoreProperty.hxx
index db45c5291a9a..1e76bf91ea95 100644
--- a/chart2/source/inc/WrappedIgnoreProperty.hxx
+++ b/chart2/source/inc/WrappedIgnoreProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedIgnoreProperty.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/WrappedProperty.hxx b/chart2/source/inc/WrappedProperty.hxx
index 5fd3e3e624bd..91a4b40fd2c9 100644
--- a/chart2/source/inc/WrappedProperty.hxx
+++ b/chart2/source/inc/WrappedProperty.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedProperty.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/WrappedPropertySet.hxx b/chart2/source/inc/WrappedPropertySet.hxx
index 3a6f19b06473..03cfea84f502 100644
--- a/chart2/source/inc/WrappedPropertySet.hxx
+++ b/chart2/source/inc/WrappedPropertySet.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedPropertySet.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/XMLRangeHelper.hxx b/chart2/source/inc/XMLRangeHelper.hxx
index 32bb08f4a552..addc8a351c29 100644
--- a/chart2/source/inc/XMLRangeHelper.hxx
+++ b/chart2/source/inc/XMLRangeHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: XMLRangeHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/charttoolsdllapi.hxx b/chart2/source/inc/charttoolsdllapi.hxx
index c920823b8b96..5534f2ca737c 100644
--- a/chart2/source/inc/charttoolsdllapi.hxx
+++ b/chart2/source/inc/charttoolsdllapi.hxx
@@ -1,31 +1,29 @@
/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2008 by Sun Microsystems, Inc.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* $RCSfile: $
-*
-* $Revision: $
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ***********************************************************************/
#ifndef INCLUDED_CHART2_SOURCE_INC_CHARTTOOLSDLLAPI_HXX
#define INCLUDED_CHART2_SOURCE_INC_CHARTTOOLSDLLAPI_HXX
diff --git a/chart2/source/inc/chartview/ChartSfxItemIds.hxx b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
index e4afc0d9efbd..fbcce70bd1d6 100644
--- a/chart2/source/inc/chartview/ChartSfxItemIds.hxx
+++ b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartSfxItemIds.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx b/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
index f53cf5525d0b..4d07791a884f 100644
--- a/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
+++ b/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataPointSymbolSupplier.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index caec07d58a15..5bcf67a8592b 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DrawModelWrapper.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -98,8 +95,6 @@ public:
getUnoModel();
SdrModel& getSdrModel();
- SAL_DLLPRIVATE void updateTablesFromChartModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel );
-
XColorTable* GetColorTable() const;
XDashList* GetDashList() const;
XLineEndList* GetLineEndList() const;
diff --git a/chart2/source/inc/chartview/ExplicitValueProvider.hxx b/chart2/source/inc/chartview/ExplicitValueProvider.hxx
index ab94e7e1c337..49d38a4247ac 100644
--- a/chart2/source/inc/chartview/ExplicitValueProvider.hxx
+++ b/chart2/source/inc/chartview/ExplicitValueProvider.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ExplicitValueProvider.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/chartview/NumberFormatterWrapper.hxx b/chart2/source/inc/chartview/NumberFormatterWrapper.hxx
index 03c182229d45..9f5f44107997 100644
--- a/chart2/source/inc/chartview/NumberFormatterWrapper.hxx
+++ b/chart2/source/inc/chartview/NumberFormatterWrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NumberFormatterWrapper.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/chartview/chartviewdllapi.hxx b/chart2/source/inc/chartview/chartviewdllapi.hxx
index f18291ac49e3..39c553a15fe6 100644
--- a/chart2/source/inc/chartview/chartviewdllapi.hxx
+++ b/chart2/source/inc/chartview/chartviewdllapi.hxx
@@ -1,31 +1,29 @@
/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2008 by Sun Microsystems, Inc.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* $RCSfile: $
-*
-* $Revision: $
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ***********************************************************************/
#ifndef INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_CHARTVIEWDLLAPI_HXX
#define INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_CHARTVIEWDLLAPI_HXX
diff --git a/chart2/source/inc/chartview/servicenames_charttypes.hxx b/chart2/source/inc/chartview/servicenames_charttypes.hxx
index b69879972d97..bd52c33f51ec 100644
--- a/chart2/source/inc/chartview/servicenames_charttypes.hxx
+++ b/chart2/source/inc/chartview/servicenames_charttypes.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: servicenames_charttypes.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/macros.hxx b/chart2/source/inc/macros.hxx
index 9e933a099109..ac64e879e9ec 100644
--- a/chart2/source/inc/macros.hxx
+++ b/chart2/source/inc/macros.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: macros.hxx,v $
- * $Revision: 1.5.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/servicenames.hxx b/chart2/source/inc/servicenames.hxx
index 946fc3e7b1c1..d1af0edb3335 100644
--- a/chart2/source/inc/servicenames.hxx
+++ b/chart2/source/inc/servicenames.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: servicenames.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -60,14 +57,13 @@ namespace chart
#define CHART_CHARTAPIWRAPPER_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartDocumentWrapper")
// accessibility
-#define CHART2_ACCESSIBLE_SERVICE_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.comp.chart2.AccessibleChartView")
-#define CHART2_ACCESSIBLE_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.AccessibleChartView")
-
#define CHART_ACCESSIBLE_TEXT_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.comp.chart2.AccessibleTextComponent")
#define CHART_ACCESSIBLE_TEXT_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.accessibility.AccessibleTextComponent")
#define CHART_RENDERER_SERVICE_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.comp.chart2.ChartRenderer")
+#define CHART_UNDOMANAGER_SERVICE_NAME ::rtl::OUString::createFromAscii( "com.sun.star.chart2.UndoManager" )
+
//.............................................................................
} //namespace chart
//.............................................................................
diff --git a/chart2/source/inc/servicenames_charttypes.hxx b/chart2/source/inc/servicenames_charttypes.hxx
index 1e824798fa66..60e39bccf09a 100644
--- a/chart2/source/inc/servicenames_charttypes.hxx
+++ b/chart2/source/inc/servicenames_charttypes.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: servicenames_charttypes.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/servicenames_coosystems.hxx b/chart2/source/inc/servicenames_coosystems.hxx
index 470663ac7ed4..002f75c7ece6 100644
--- a/chart2/source/inc/servicenames_coosystems.hxx
+++ b/chart2/source/inc/servicenames_coosystems.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: servicenames_coosystems.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/inc/servicenames_dlwrapper.hxx b/chart2/source/inc/servicenames_dlwrapper.hxx
index 3af95408f3d5..0b78a8c8227f 100644
--- a/chart2/source/inc/servicenames_dlwrapper.hxx
+++ b/chart2/source/inc/servicenames_dlwrapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: servicenames_dlwrapper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx
index f3971b28d40f..b66c4bc46102 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: XMLFilter.cxx,v $
- * $Revision: 1.5.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/filter/makefile.mk b/chart2/source/model/filter/makefile.mk
index 1d0ee39d8768..fc9f7ebb9973 100644
--- a/chart2/source/model/filter/makefile.mk
+++ b/chart2/source/model/filter/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.3 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/inc/BaseCoordinateSystem.hxx b/chart2/source/model/inc/BaseCoordinateSystem.hxx
index 4afd4f6ff51f..22346e917453 100644
--- a/chart2/source/model/inc/BaseCoordinateSystem.hxx
+++ b/chart2/source/model/inc/BaseCoordinateSystem.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BaseCoordinateSystem.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/inc/CartesianCoordinateSystem.hxx b/chart2/source/model/inc/CartesianCoordinateSystem.hxx
index d389d8372208..7c9fd075d787 100644
--- a/chart2/source/model/inc/CartesianCoordinateSystem.hxx
+++ b/chart2/source/model/inc/CartesianCoordinateSystem.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CartesianCoordinateSystem.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/inc/ChartTypeManager.hxx b/chart2/source/model/inc/ChartTypeManager.hxx
index ab5fdb0792b8..de721be48142 100644
--- a/chart2/source/model/inc/ChartTypeManager.hxx
+++ b/chart2/source/model/inc/ChartTypeManager.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartTypeManager.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/inc/DataSeries.hxx b/chart2/source/model/inc/DataSeries.hxx
index e483cc96e5b5..e05bac782b86 100644
--- a/chart2/source/model/inc/DataSeries.hxx
+++ b/chart2/source/model/inc/DataSeries.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSeries.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/inc/DataSeriesTree.hxx b/chart2/source/model/inc/DataSeriesTree.hxx
index 9332724a9956..5c6734dde845 100644
--- a/chart2/source/model/inc/DataSeriesTree.hxx
+++ b/chart2/source/model/inc/DataSeriesTree.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSeriesTree.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/inc/Diagram.hxx b/chart2/source/model/inc/Diagram.hxx
index 69e58bad0128..fc672e29b24c 100644
--- a/chart2/source/model/inc/Diagram.hxx
+++ b/chart2/source/model/inc/Diagram.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Diagram.hxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -139,11 +136,6 @@ protected:
virtual void SAL_CALL setDefaultColorScheme(
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XColorScheme >& xColorScheme )
throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setUnusedData(
- const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > >& aUnusedData )
- throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > > SAL_CALL getUnusedData()
- throw (::com::sun::star::uno::RuntimeException);
// ____ XCoordinateSystemContainer ____
@@ -240,11 +232,6 @@ private:
::com::sun::star::chart2::XColorScheme >
m_xColorScheme;
- ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XLabeledDataSequence > >
- m_aUnusedData;
-
::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
};
diff --git a/chart2/source/model/inc/PolarCoordinateSystem.hxx b/chart2/source/model/inc/PolarCoordinateSystem.hxx
index 6fca2ace1d2f..cf82e1cb0871 100644
--- a/chart2/source/model/inc/PolarCoordinateSystem.hxx
+++ b/chart2/source/model/inc/PolarCoordinateSystem.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PolarCoordinateSystem.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/inc/StockBar.hxx b/chart2/source/model/inc/StockBar.hxx
index 6db0c02b8959..7fa98b79964b 100644
--- a/chart2/source/model/inc/StockBar.hxx
+++ b/chart2/source/model/inc/StockBar.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StockBar.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/inc/XMLFilter.hxx b/chart2/source/model/inc/XMLFilter.hxx
index cf0825963052..69b008bbcb75 100644
--- a/chart2/source/model/inc/XMLFilter.hxx
+++ b/chart2/source/model/inc/XMLFilter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: XMLFilter.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/inc/_serviceregistration_charttypes.hxx b/chart2/source/model/inc/_serviceregistration_charttypes.hxx
index 8d473c27d3f9..481a7064f311 100644
--- a/chart2/source/model/inc/_serviceregistration_charttypes.hxx
+++ b/chart2/source/model/inc/_serviceregistration_charttypes.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: _serviceregistration_charttypes.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index 2b119c633537..17d8fe9f3989 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Axis.cxx,v $
- * $Revision: 1.15.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/Axis.hxx b/chart2/source/model/main/Axis.hxx
index f1f727c70f69..7f72e08b8b69 100644
--- a/chart2/source/model/main/Axis.hxx
+++ b/chart2/source/model/main/Axis.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Axis.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx
index ebbffe2ef1eb..4fa58cff5039 100644
--- a/chart2/source/model/main/BaseCoordinateSystem.cxx
+++ b/chart2/source/model/main/BaseCoordinateSystem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BaseCoordinateSystem.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx
index cbef09eccceb..fdaa333b1cb8 100644
--- a/chart2/source/model/main/CartesianCoordinateSystem.cxx
+++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CartesianCoordinateSystem.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/ChartData.cxx b/chart2/source/model/main/ChartData.cxx
deleted file mode 100644
index af332f6c3c6e..000000000000
--- a/chart2/source/model/main/ChartData.cxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: ChartData.cxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_chart2.hxx"
-
-#include "ChartData.hxx"
-#include "ChartModelHelper.hxx"
-
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
-
-using namespace ::com::sun::star;
-
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
-using ::rtl::OUString;
-
-namespace chart
-{
-
-ChartData::ChartData( const Reference< uno::XComponentContext > & xContext ) :
- m_xContext( xContext ),
- m_xDataProvider( 0 ),
- m_xInternalDataProvider( 0 )
-{}
-
-ChartData::~ChartData()
-{}
-
-void ChartData::setDataProvider(
- const Reference< chart2::data::XDataProvider > & xDataProvider ) throw()
-{
- m_xDataProvider.set( xDataProvider );
- m_xInternalDataProvider.clear();
-}
-
-Reference< chart2::data::XDataProvider > ChartData::getDataProvider() const throw()
-{
- return m_xDataProvider;
-}
-
-bool ChartData::createInternalData(
- bool bCloneOldData, const Reference< chart2::XChartDocument > & xChartDoc ) throw()
-{
- if( hasInternalData() )
- return false;
-
- if( bCloneOldData )
- m_xInternalDataProvider = ChartModelHelper::createInternalDataProvider( xChartDoc );
- else
- m_xInternalDataProvider = ChartModelHelper::createInternalDataProvider();
-
- m_xDataProvider.set( m_xInternalDataProvider );
- return true;
-}
-
-bool ChartData::hasInternalData() const
-{
- return (m_xDataProvider.is() && m_xInternalDataProvider.is());
-}
-
-bool ChartData::createDefaultData() throw()
-{
- if( hasInternalData() )
- {
- uno::Reference< lang::XInitialization > xIni(m_xInternalDataProvider,uno::UNO_QUERY);
- if ( xIni.is() )
- {
- uno::Sequence< uno::Any > aArgs(1);
- beans::NamedValue aParam(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDefaultData")),uno::makeAny(sal_True));
- aArgs[0] <<= aParam;
- xIni->initialize(aArgs);
- return true;
- }
- }
- return false;
-}
-
-} // namespace chart
diff --git a/chart2/source/model/main/ChartData.hxx b/chart2/source/model/main/ChartData.hxx
deleted file mode 100644
index 308db5ab0f6a..000000000000
--- a/chart2/source/model/main/ChartData.hxx
+++ /dev/null
@@ -1,105 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: ChartData.hxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef CHART2_CHARTDATA_HXX
-#define CHART2_CHARTDATA_HXX
-
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-
-#include <memory>
-
-namespace com { namespace sun { namespace star {
- namespace uno {
- class XComponentContext;
- }
- namespace embed {
- class XStorage;
- class XEmbeddedObject;
- class XEmbeddedClient;
- }
- namespace chart2 {
- namespace data {
- class XDataProvider;
- }
- }
- namespace util {
- class XCloseBroadcaster;
- }
-}}}
-
-namespace chart
-{
-
-class ChartData
-{
-public:
- explicit ChartData(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XComponentContext > & xContext );
- ~ChartData();
-
- void setDataProvider(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataProvider > & xDataProvider ) throw();
-
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider >
- getDataProvider() const throw();
-
- /** @return </TRUE>, if a new internal data provider has been created
- */
- bool createInternalData(
- bool bCloneOldData,
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > & xChartDoc ) throw();
-
- bool hasInternalData() const;
-
- /** only works if currently an internal data provider is set
- */
- bool createDefaultData() throw();
-
-private:
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
- m_xContext;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider >
- m_xDataProvider;
-
- /** is only valid if m_xDataProvider is set. If m_xDataProvider is set to an
- external data provider this reference must be set to 0
- */
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider >
- m_xInternalDataProvider;
-};
-
-} // namespace chart
-
-// CHART2_CHARTDATA_HXX
-#endif
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 1286a6e553cc..77533ec1306b 100644..100755
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartModel.cxx,v $
- * $Revision: 1.17.8.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,19 +28,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_chart2.hxx"
#include "ChartModel.hxx"
-#include "ImplChartModel.hxx"
#include "servicenames.hxx"
#include "MediaDescriptorHelper.hxx"
#include "macros.hxx"
-#include "InternalData.hxx"
#include "servicenames.hxx"
-#include "DataSourceHelper.hxx"
#include "NoWarningThisInCTOR.hxx"
+#include "DataSourceHelper.hxx"
#include "ChartModelHelper.hxx"
+#include "DiagramHelper.hxx"
#include "DisposeHelper.hxx"
#include "ControllerLockGuard.hxx"
#include "ObjectIdentifier.hxx"
-#include "ChartModelHelper.hxx"
+#include "PageBackground.hxx"
+#include "CloneHelper.hxx"
+#include "NameContainer.hxx"
+
+#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <comphelper/InlineContainer.hxx>
#include <comphelper/processfactory.hxx>
@@ -60,12 +60,16 @@
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/EmbedMapUnits.hpp>
#include <com/sun/star/embed/Aspects.hpp>
+#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/datatransfer/XTransferable.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
-#include <map>
-#include <algorithm>
+// header for class SvNumberFormatter
+#include <svl/zforlist.hxx>
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Reference;
@@ -75,6 +79,7 @@ using ::osl::MutexGuard;
using namespace ::com::sun::star;
using namespace ::apphelper;
+using namespace ::chart::CloneHelper;
namespace
{
@@ -103,11 +108,22 @@ ChartModel::ChartModel(uno::Reference<uno::XComponentContext > const & xContext)
, m_xContext( xContext )
// default visual area is 8 x 7 cm
, m_aVisualAreaSize( 8000, 7000 )
+ , m_xDataProvider( 0 )
+ , m_xInternalDataProvider( 0 )
+ , m_xPageBackground( new PageBackground( m_xContext ) )
+ , m_xXMLNamespaceMap( createNameContainer( ::getCppuType( (const OUString*) 0 ),
+ C2U( "com.sun.star.xml.NamespaceMap" ), C2U( "com.sun.star.comp.chart.XMLNameSpaceMap" ) ), uno::UNO_QUERY)
{
OSL_TRACE( "ChartModel: CTOR called" );
+ osl_incrementInterlockedCount(&m_refCount);
- // attention: passing this as reference to ImplChartModel
- m_pImplChartModel.reset( new impl::ImplChartModel( xContext, this ));
+ ModifyListenerHelper::addListener( m_xPageBackground, this );
+ m_xChartTypeManager.set( xContext->getServiceManager()->createInstanceWithContext(
+ C2U( "com.sun.star.chart2.ChartTypeManager" ), m_xContext ), uno::UNO_QUERY );
+ m_xUndoManager = Reference< chart2::XUndoManager >(
+ this->createInstance( CHART_UNDOMANAGER_SERVICE_NAME ), uno::UNO_QUERY );
+
+ osl_decrementInterlockedCount(&m_refCount);
}
ChartModel::ChartModel( const ChartModel & rOther )
@@ -128,14 +144,23 @@ ChartModel::ChartModel( const ChartModel & rOther )
, m_xStorage( 0 ) //rOther.m_xStorage )
, m_aVisualAreaSize( rOther.m_aVisualAreaSize )
, m_aGraphicObjectVector( rOther.m_aGraphicObjectVector )
+ , m_xDataProvider( rOther.m_xDataProvider )
+ , m_xInternalDataProvider( rOther.m_xInternalDataProvider )
+ , m_xUndoManager( rOther.m_xUndoManager )
{
OSL_TRACE( "ChartModel: Copy-CTOR called" );
+ osl_incrementInterlockedCount(&m_refCount);
- // attention: passing this as reference to ImplChartModel
- if( rOther.m_pImplChartModel.get())
- m_pImplChartModel.reset( new impl::ImplChartModel( * rOther.m_pImplChartModel.get(), this ));
- else
- m_pImplChartModel.reset( new impl::ImplChartModel( m_xContext, this ));
+ m_xChartTypeManager.set( CreateRefClone< Reference< chart2::XChartTypeManager > >()( rOther.m_xChartTypeManager ));
+ m_xTitle.set( CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle ));
+ ModifyListenerHelper::addListener( m_xTitle, this );
+ m_xPageBackground.set( CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xPageBackground ));
+ ModifyListenerHelper::addListener( m_xPageBackground, this );
+
+ m_xXMLNamespaceMap.set( CreateRefClone< Reference< container::XNameAccess > >()( rOther.m_xXMLNamespaceMap ));
+
+ CloneRefVector< Reference< chart2::XDiagram > >( rOther.m_aDiagrams, m_aDiagrams );
+ osl_decrementInterlockedCount(&m_refCount);
}
ChartModel::~ChartModel()
@@ -150,8 +175,7 @@ ChartModel::~ChartModel()
// private methods
//-----------------------------------------------------------------
- ::rtl::OUString ChartModel
-::impl_g_getLocation()
+::rtl::OUString ChartModel::impl_g_getLocation()
{
LifeTimeGuard aGuard(m_aLifeTimeManager);
@@ -161,8 +185,7 @@ ChartModel::~ChartModel()
return m_aResource;
}
- sal_Bool ChartModel
-::impl_isControllerConnected( const uno::Reference< frame::XController >& xController )
+sal_Bool ChartModel::impl_isControllerConnected( const uno::Reference< frame::XController >& xController )
{
try
{
@@ -179,8 +202,7 @@ ChartModel::~ChartModel()
return sal_False;
}
- uno::Reference< frame::XController > ChartModel
-::impl_getCurrentController() throw(uno::RuntimeException)
+uno::Reference< frame::XController > ChartModel::impl_getCurrentController() throw(uno::RuntimeException)
{
//@todo? hold only weak references to controllers
@@ -199,8 +221,7 @@ ChartModel::~ChartModel()
return uno::Reference< frame::XController > ();
}
- void SAL_CALL ChartModel
-::impl_notifyCloseListeners()
+void SAL_CALL ChartModel::impl_notifyCloseListeners()
throw( uno::RuntimeException)
{
::cppu::OInterfaceContainerHelper* pIC = m_aLifeTimeManager.m_aListenerContainer
@@ -214,14 +235,50 @@ ChartModel::~ChartModel()
}
}
+void ChartModel::impl_adjustAdditionalShapesPositionAndSize( const awt::Size& aVisualAreaSize )
+{
+ uno::Reference< beans::XPropertySet > xProperties( static_cast< ::cppu::OWeakObject* >( this ), uno::UNO_QUERY );
+ if ( xProperties.is() )
+ {
+ uno::Reference< drawing::XShapes > xShapes;
+ xProperties->getPropertyValue( C2U( "AdditionalShapes" ) ) >>= xShapes;
+ if ( xShapes.is() )
+ {
+ sal_Int32 nCount = xShapes->getCount();
+ for ( sal_Int32 i = 0; i < nCount; ++i )
+ {
+ Reference< drawing::XShape > xShape;
+ if ( xShapes->getByIndex( i ) >>= xShape )
+ {
+ if ( xShape.is() )
+ {
+ awt::Point aPos( xShape->getPosition() );
+ awt::Size aSize( xShape->getSize() );
+
+ double fWidth = static_cast< double >( aVisualAreaSize.Width ) / m_aVisualAreaSize.Width;
+ double fHeight = static_cast< double >( aVisualAreaSize.Height ) / m_aVisualAreaSize.Height;
+
+ aPos.X = static_cast< long >( aPos.X * fWidth );
+ aPos.Y = static_cast< long >( aPos.Y * fHeight );
+ aSize.Width = static_cast< long >( aSize.Width * fWidth );
+ aSize.Height = static_cast< long >( aSize.Height * fHeight );
+
+ xShape->setPosition( aPos );
+ xShape->setSize( aSize );
+ }
+ }
+ }
+ }
+ }
+}
+
//-----------------------------------------------------------------
// lang::XServiceInfo
//-----------------------------------------------------------------
APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
- uno::Sequence< rtl::OUString > ChartModel
-::getSupportedServiceNames_Static()
+uno::Sequence< rtl::OUString > ChartModel::getSupportedServiceNames_Static()
{
uno::Sequence< rtl::OUString > aSNS( 3 );
aSNS[0] = CHART_MODEL_SERVICE_NAME;
@@ -235,8 +292,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
// frame::XModel (required interface)
//-----------------------------------------------------------------
- sal_Bool SAL_CALL ChartModel
-::attachResource( const ::rtl::OUString& rURL
+sal_Bool SAL_CALL ChartModel::attachResource( const ::rtl::OUString& rURL
, const uno::Sequence< beans::PropertyValue >& rMediaDescriptor )
throw(uno::RuntimeException)
{
@@ -262,14 +318,12 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
return sal_True;
}
- ::rtl::OUString SAL_CALL ChartModel
-::getURL() throw(uno::RuntimeException)
+::rtl::OUString SAL_CALL ChartModel::getURL() throw(uno::RuntimeException)
{
return impl_g_getLocation();
}
- uno::Sequence< beans::PropertyValue > SAL_CALL ChartModel
-::getArgs() throw(uno::RuntimeException)
+uno::Sequence< beans::PropertyValue > SAL_CALL ChartModel::getArgs() throw(uno::RuntimeException)
{
/*
The method getArgs() returns a sequence of property values
@@ -285,8 +339,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
return m_aMediaDescriptor;
}
- void SAL_CALL ChartModel
-::connectController( const uno::Reference< frame::XController >& xController )
+void SAL_CALL ChartModel::connectController( const uno::Reference< frame::XController >& xController )
throw(uno::RuntimeException)
{
//@todo? this method is declared as oneway -> ...?
@@ -300,8 +353,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
m_aControllers.addInterface(xController);
}
- void SAL_CALL ChartModel
-::disconnectController( const uno::Reference< frame::XController >& xController )
+void SAL_CALL ChartModel::disconnectController( const uno::Reference< frame::XController >& xController )
throw(uno::RuntimeException)
{
//@todo? this method is declared as oneway -> ...?
@@ -320,8 +372,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
DisposeHelper::DisposeAndClear( m_xRangeHighlighter );
}
- void SAL_CALL ChartModel
-::lockControllers() throw(uno::RuntimeException)
+void SAL_CALL ChartModel::lockControllers() throw(uno::RuntimeException)
{
/*
suspends some notifications to the controllers which are used for display updates.
@@ -339,8 +390,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
++m_nControllerLockCount;
}
- void SAL_CALL ChartModel
-::unlockControllers() throw(uno::RuntimeException)
+void SAL_CALL ChartModel::unlockControllers() throw(uno::RuntimeException)
{
/*
resumes the notifications which were suspended by lockControllers() .
@@ -368,8 +418,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
}
}
- sal_Bool SAL_CALL ChartModel
-::hasControllersLocked() throw(uno::RuntimeException)
+sal_Bool SAL_CALL ChartModel::hasControllersLocked() throw(uno::RuntimeException)
{
LifeTimeGuard aGuard(m_aLifeTimeManager);
if(!aGuard.startApiCall())
@@ -377,8 +426,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
return ( m_nControllerLockCount != 0 ) ;
}
- uno::Reference< frame::XController > SAL_CALL ChartModel
-::getCurrentController() throw(uno::RuntimeException)
+uno::Reference< frame::XController > SAL_CALL ChartModel::getCurrentController() throw(uno::RuntimeException)
{
LifeTimeGuard aGuard(m_aLifeTimeManager);
if(!aGuard.startApiCall())
@@ -389,8 +437,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
return impl_getCurrentController();
}
- void SAL_CALL ChartModel
-::setCurrentController( const uno::Reference< frame::XController >& xController )
+void SAL_CALL ChartModel::setCurrentController( const uno::Reference< frame::XController >& xController )
throw(container::NoSuchElementException, uno::RuntimeException)
{
LifeTimeGuard aGuard(m_aLifeTimeManager);
@@ -410,8 +457,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
DisposeHelper::DisposeAndClear( m_xRangeHighlighter );
}
- uno::Reference< uno::XInterface > SAL_CALL ChartModel
-::getCurrentSelection() throw(uno::RuntimeException)
+uno::Reference< uno::XInterface > SAL_CALL ChartModel::getCurrentSelection() throw(uno::RuntimeException)
{
LifeTimeGuard aGuard(m_aLifeTimeManager);
if(!aGuard.startApiCall())
@@ -444,8 +490,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
//-----------------------------------------------------------------
// lang::XComponent (base of XModel)
//-----------------------------------------------------------------
- void SAL_CALL ChartModel
-::dispose() throw(uno::RuntimeException)
+void SAL_CALL ChartModel::dispose() throw(uno::RuntimeException)
{
//This object should release all resources and references in the
//easiest possible manner
@@ -458,8 +503,17 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
//--release all resources and references
//// @todo
- if( m_pImplChartModel.get())
- m_pImplChartModel->dispose();
+
+ m_xDataProvider.clear();
+ m_xInternalDataProvider.clear();
+ m_xNumberFormatsSupplier.clear();
+ DisposeHelper::DisposeAndClear( m_xOwnNumberFormatsSupplier );
+ DisposeHelper::DisposeAndClear( m_xChartTypeManager );
+ DisposeHelper::DisposeAllElements( m_aDiagrams );
+ m_aDiagrams.clear();
+ DisposeHelper::DisposeAndClear( m_xTitle );
+ DisposeHelper::DisposeAndClear( m_xPageBackground );
+ DisposeHelper::DisposeAndClear( m_xXMLNamespaceMap );
// not owner of storage
// if( m_xStorage.is())
@@ -485,8 +539,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
OSL_TRACE( "ChartModel: dispose() called" );
}
- void SAL_CALL ChartModel
-::addEventListener( const uno::Reference< lang::XEventListener > & xListener )
+void SAL_CALL ChartModel::addEventListener( const uno::Reference< lang::XEventListener > & xListener )
throw(uno::RuntimeException)
{
if( m_aLifeTimeManager.impl_isDisposedOrClosed() )
@@ -495,8 +548,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
m_aLifeTimeManager.m_aListenerContainer.addInterface( ::getCppuType((const uno::Reference< lang::XEventListener >*)0), xListener );
}
- void SAL_CALL ChartModel
-::removeEventListener( const uno::Reference< lang::XEventListener > & xListener )
+void SAL_CALL ChartModel::removeEventListener( const uno::Reference< lang::XEventListener > & xListener )
throw(uno::RuntimeException)
{
if( m_aLifeTimeManager.impl_isDisposedOrClosed() )
@@ -509,15 +561,13 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
//-----------------------------------------------------------------
// util::XCloseBroadcaster (base of XCloseable)
//-----------------------------------------------------------------
- void SAL_CALL ChartModel
-::addCloseListener( const uno::Reference< util::XCloseListener > & xListener )
+void SAL_CALL ChartModel::addCloseListener( const uno::Reference< util::XCloseListener > & xListener )
throw(uno::RuntimeException)
{
m_aLifeTimeManager.g_addCloseListener( xListener );
}
- void SAL_CALL ChartModel
-::removeCloseListener( const uno::Reference< util::XCloseListener > & xListener )
+void SAL_CALL ChartModel::removeCloseListener( const uno::Reference< util::XCloseListener > & xListener )
throw(uno::RuntimeException)
{
if( m_aLifeTimeManager.impl_isDisposedOrClosed() )
@@ -530,8 +580,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
//-----------------------------------------------------------------
// util::XCloseable
//-----------------------------------------------------------------
- void SAL_CALL ChartModel
-::close( sal_Bool bDeliverOwnership )
+void SAL_CALL ChartModel::close( sal_Bool bDeliverOwnership )
throw( util::CloseVetoException,
uno::RuntimeException )
{
@@ -588,8 +637,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME)
//-----------------------------------------------------------------
// lang::XTypeProvider
//-----------------------------------------------------------------
- uno::Sequence< uno::Type > SAL_CALL ChartModel
-::getTypes()
+uno::Sequence< uno::Type > SAL_CALL ChartModel::getTypes()
throw (uno::RuntimeException)
{
uno::Reference< lang::XTypeProvider > xAggTypeProvider;
@@ -630,82 +678,121 @@ uno::Reference< document::XDocumentProperties > SAL_CALL
// chart2::XChartDocument
//-----------------------------------------------------------------
- uno::Reference< chart2::XDiagram > SAL_CALL ChartModel
-::getFirstDiagram()
+uno::Reference< chart2::XDiagram > SAL_CALL ChartModel::getFirstDiagram()
throw (uno::RuntimeException)
{
- OSL_ASSERT( m_pImplChartModel.get() != 0 );
// /--
MutexGuard aGuard( m_aModelMutex );
- try
- {
- return m_pImplChartModel->GetDiagram( 0 );
- }
- catch( container::NoSuchElementException )
- {
- }
-
+ if( m_aDiagrams.size() )
+ return m_aDiagrams[ 0 ];
return uno::Reference< chart2::XDiagram >();
// \--
}
- void SAL_CALL ChartModel
-::setFirstDiagram( const uno::Reference< chart2::XDiagram >& xDiagram )
+void ChartModel::impl_removeAllDiagrams()
+{
+ ModifyListenerHelper::removeListenerFromAllElements( m_aDiagrams, this );
+ m_aDiagrams.clear();
+}
+
+void ChartModel::impl_appendDiagram( const Reference< chart2::XDiagram > & xDiagram )
+{
+ Reference< util::XModifyBroadcaster > xBroadcaster( xDiagram, uno::UNO_QUERY );
+ ModifyListenerHelper::addListener( xDiagram, this );
+ m_aDiagrams.push_back( xDiagram );
+}
+
+
+void SAL_CALL ChartModel::setFirstDiagram( const uno::Reference< chart2::XDiagram >& xDiagram )
throw (uno::RuntimeException)
{
- OSL_ASSERT( m_pImplChartModel.get() != 0 );
{
// /--
MutexGuard aGuard( m_aModelMutex );
- m_pImplChartModel->RemoveAllDiagrams();
- m_pImplChartModel->AppendDiagram( xDiagram );
+ impl_removeAllDiagrams();
+ impl_appendDiagram( xDiagram );
// \--
}
setModified( sal_True );
}
- void SAL_CALL ChartModel
-::createInternalDataProvider( sal_Bool bCloneExistingData )
- throw (util::CloseVetoException,
- uno::RuntimeException)
+Reference< chart2::data::XDataSource > ChartModel::impl_createDefaultData()
+{
+ Reference< chart2::data::XDataSource > xDataSource;
+ if( hasInternalDataProvider() )
+ {
+ uno::Reference< lang::XInitialization > xIni(m_xInternalDataProvider,uno::UNO_QUERY);
+ if( xIni.is() )
+ {
+ //init internal dataprovider
+ {
+ uno::Sequence< uno::Any > aArgs(1);
+ beans::NamedValue aParam(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDefaultData")),uno::makeAny(sal_True));
+ aArgs[0] <<= aParam;
+ xIni->initialize(aArgs);
+ }
+ //create data
+ uno::Sequence< beans::PropertyValue > aArgs( 4 );
+ aArgs[0] = beans::PropertyValue(
+ ::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1,
+ uno::makeAny( C2U("all") ), beans::PropertyState_DIRECT_VALUE );
+ aArgs[1] = beans::PropertyValue(
+ ::rtl::OUString::createFromAscii("HasCategories"), -1,
+ uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE );
+ aArgs[2] = beans::PropertyValue(
+ ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1,
+ uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE );
+ aArgs[3] = beans::PropertyValue(
+ ::rtl::OUString::createFromAscii("DataRowSource"), -1,
+ uno::makeAny( ::com::sun::star::chart::ChartDataRowSource_COLUMNS ), beans::PropertyState_DIRECT_VALUE );
+ xDataSource = m_xInternalDataProvider->createDataSource( aArgs );
+ }
+ }
+ return xDataSource;
+}
+
+void SAL_CALL ChartModel::createInternalDataProvider( sal_Bool bCloneExistingData )
+ throw (util::CloseVetoException, uno::RuntimeException)
{
- OSL_ASSERT( m_pImplChartModel.get() != 0 );
// don't lock the mutex, because this call calls out to code that tries to
// lock the solar mutex. On the other hand, a paint locks the solar mutex
// and calls to the model lock the model's mutex => deadlock
// @todo: lock a separate mutex in the InternalData class
- m_pImplChartModel->CreateInternalDataProvider( bCloneExistingData, this );
+ if( !hasInternalDataProvider() )
+ {
+ if( bCloneExistingData )
+ m_xInternalDataProvider = ChartModelHelper::createInternalDataProvider( this, true );
+ else
+ m_xInternalDataProvider = ChartModelHelper::createInternalDataProvider( Reference<XChartDocument>(), true );
+ m_xDataProvider.set( m_xInternalDataProvider );
+ }
setModified( sal_True );
}
sal_Bool SAL_CALL ChartModel::hasInternalDataProvider()
throw (uno::RuntimeException)
{
- return m_pImplChartModel->HasInternalDataProvider();
+ return m_xDataProvider.is() && m_xInternalDataProvider.is();
}
- uno::Reference< chart2::data::XDataProvider > SAL_CALL ChartModel
-::getDataProvider()
+uno::Reference< chart2::data::XDataProvider > SAL_CALL ChartModel::getDataProvider()
throw (uno::RuntimeException)
{
- OSL_ASSERT( m_pImplChartModel.get() != 0 );
// /--
MutexGuard aGuard( m_aModelMutex );
- return m_pImplChartModel->GetDataProvider();
+ return m_xDataProvider;
// \--
}
// ____ XDataReceiver ____
- void SAL_CALL ChartModel
-::attachDataProvider( const uno::Reference< chart2::data::XDataProvider >& xProvider )
+void SAL_CALL ChartModel::attachDataProvider( const uno::Reference< chart2::data::XDataProvider >& xDataProvider )
throw (uno::RuntimeException)
{
- OSL_ASSERT( m_pImplChartModel.get() != 0 );
{
// /--
MutexGuard aGuard( m_aModelMutex );
- uno::Reference< beans::XPropertySet > xProp( xProvider, uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xProp( xDataProvider, uno::UNO_QUERY );
if( xProp.is() )
{
try
@@ -718,41 +805,95 @@ sal_Bool SAL_CALL ChartModel::hasInternalDataProvider()
}
}
- m_pImplChartModel->SetDataProvider( xProvider );
+ m_xDataProvider.set( xDataProvider );
+ m_xInternalDataProvider.clear();
+
+ //the numberformatter is kept independent of the data provider!
// \--
}
setModified( sal_True );
}
- void SAL_CALL ChartModel
-::attachNumberFormatsSupplier( const uno::Reference< util::XNumberFormatsSupplier >& xSupplier )
+void SAL_CALL ChartModel::attachNumberFormatsSupplier( const uno::Reference< util::XNumberFormatsSupplier >& xNewSupplier )
throw (uno::RuntimeException)
{
- OSL_ASSERT( m_pImplChartModel.get() != 0 );
{
// /--
MutexGuard aGuard( m_aModelMutex );
- m_pImplChartModel->SetNumberFormatsSupplier( xSupplier );
+ if( xNewSupplier==m_xNumberFormatsSupplier )
+ return;
+ if( xNewSupplier==m_xOwnNumberFormatsSupplier )
+ return;
+ if( m_xOwnNumberFormatsSupplier.is() && xNewSupplier.is() )
+ {
+ //@todo
+ //merge missing numberformats from own to new formatter
+ }
+ else if( !xNewSupplier.is() )
+ {
+ if( m_xNumberFormatsSupplier.is() )
+ {
+ //@todo
+ //merge missing numberformats from old numberformatter to own numberformatter
+ //create own numberformatter if necessary
+ }
+ }
+
+ m_xNumberFormatsSupplier.set( xNewSupplier );
+ m_xOwnNumberFormatsSupplier.clear();
// \--
}
setModified( sal_True );
}
- void SAL_CALL ChartModel
-::setArguments( const Sequence< beans::PropertyValue >& aArguments )
+void SAL_CALL ChartModel::setArguments( const Sequence< beans::PropertyValue >& aArguments )
throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
- OSL_ASSERT( m_pImplChartModel.get() != 0 );
{
// /--
MutexGuard aGuard( m_aModelMutex );
+ if( !m_xDataProvider.is() )
+ return;
lockControllers();
+
try
{
- m_pImplChartModel->SetArguments( aArguments, true /* bSetData */ );
+ Reference< chart2::data::XDataSource > xDataSource( m_xDataProvider->createDataSource( aArguments ) );
+ if( xDataSource.is() )
+ {
+ // set new data
+ Reference< chart2::XChartTypeTemplate > xTemplate;
+ Reference< chart2::XDiagram > xDia( getFirstDiagram() );
+ if( xDia.is())
+ {
+ // apply new data
+ DiagramHelper::tTemplateWithServiceName aTemplateAndService =
+ DiagramHelper::getTemplateForDiagram(
+ xDia, Reference< lang::XMultiServiceFactory >( m_xChartTypeManager, uno::UNO_QUERY ));
+ xTemplate.set( aTemplateAndService.first );
+ }
+
+ if( !xTemplate.is())
+ xTemplate.set( impl_createDefaultChartTypeTemplate() );
+
+ if( xTemplate.is())
+ {
+ if( xDia.is())
+ xTemplate->changeDiagramData( xDia, xDataSource, aArguments );
+ else
+ {
+ impl_removeAllDiagrams();
+ impl_appendDiagram( xTemplate->createDiagramByDataSource( xDataSource, aArguments ));
+ }
+ }
+ }
+ }
+ catch( lang::IllegalArgumentException & )
+ {
+ throw;
}
- catch( const uno::Exception & ex )
+ catch( uno::Exception & ex )
{
ASSERT_EXCEPTION( ex );
}
@@ -762,22 +903,19 @@ sal_Bool SAL_CALL ChartModel::hasInternalDataProvider()
setModified( sal_True );
}
- Sequence< OUString > SAL_CALL ChartModel
-::getUsedRangeRepresentations()
+Sequence< OUString > SAL_CALL ChartModel::getUsedRangeRepresentations()
throw (uno::RuntimeException)
{
return DataSourceHelper::getUsedDataRanges( Reference< frame::XModel >(this));
}
- Reference< chart2::data::XDataSource > SAL_CALL ChartModel
-::getUsedData()
+Reference< chart2::data::XDataSource > SAL_CALL ChartModel::getUsedData()
throw (uno::RuntimeException)
{
return DataSourceHelper::getUsedData( Reference< chart2::XChartDocument >(this));
}
- Reference< chart2::data::XRangeHighlighter > SAL_CALL ChartModel
-::getRangeHighlighter()
+Reference< chart2::data::XRangeHighlighter > SAL_CALL ChartModel::getRangeHighlighter()
throw (uno::RuntimeException)
{
if( ! m_xRangeHighlighter.is())
@@ -789,40 +927,42 @@ sal_Bool SAL_CALL ChartModel::hasInternalDataProvider()
return m_xRangeHighlighter;
}
+Reference< chart2::XChartTypeTemplate > ChartModel::impl_createDefaultChartTypeTemplate()
+{
+ Reference< chart2::XChartTypeTemplate > xTemplate;
+ Reference< lang::XMultiServiceFactory > xFact( m_xChartTypeManager, uno::UNO_QUERY );
+ if( xFact.is() )
+ xTemplate.set( xFact->createInstance( C2U( "com.sun.star.chart2.template.Column" ) ), uno::UNO_QUERY );
+ return xTemplate;
+}
- void SAL_CALL ChartModel
-::setChartTypeManager( const uno::Reference< chart2::XChartTypeManager >& xNewManager )
+void SAL_CALL ChartModel::setChartTypeManager( const uno::Reference< chart2::XChartTypeManager >& xNewManager )
throw (uno::RuntimeException)
{
- OSL_ASSERT( m_pImplChartModel.get() != 0 );
{
// /--
MutexGuard aGuard( m_aModelMutex );
- m_pImplChartModel->SetChartTypeManager( xNewManager );
+ m_xChartTypeManager = xNewManager;
// \--
}
setModified( sal_True );
}
- uno::Reference< chart2::XChartTypeManager > SAL_CALL ChartModel
-::getChartTypeManager()
+uno::Reference< chart2::XChartTypeManager > SAL_CALL ChartModel::getChartTypeManager()
throw (uno::RuntimeException)
{
- OSL_ASSERT( m_pImplChartModel.get() != 0 );
// /--
MutexGuard aGuard( m_aModelMutex );
- return m_pImplChartModel->GetChartTypeManager();
+ return m_xChartTypeManager;
// \--
}
- uno::Reference< beans::XPropertySet > SAL_CALL ChartModel
-::getPageBackground()
+uno::Reference< beans::XPropertySet > SAL_CALL ChartModel::getPageBackground()
throw (uno::RuntimeException)
{
- OSL_ASSERT( m_pImplChartModel.get() != 0 );
// /--
MutexGuard aGuard( m_aModelMutex );
- return m_pImplChartModel->GetPageBackground();
+ return m_xPageBackground;
// \--
}
@@ -830,23 +970,22 @@ sal_Bool SAL_CALL ChartModel::hasInternalDataProvider()
uno::Reference< chart2::XTitle > SAL_CALL ChartModel::getTitleObject()
throw (uno::RuntimeException)
{
- OSL_ASSERT( m_pImplChartModel.get() != 0 );
// /--
MutexGuard aGuard( m_aModelMutex );
- return m_pImplChartModel->GetTitle();
+ return m_xTitle;
// \--
}
-void SAL_CALL ChartModel::setTitleObject(
- const uno::Reference<
- chart2::XTitle >& Title )
+void SAL_CALL ChartModel::setTitleObject( const uno::Reference< chart2::XTitle >& xTitle )
throw (uno::RuntimeException)
{
- OSL_ASSERT( m_pImplChartModel.get() != 0 );
{
// /--
MutexGuard aGuard( m_aModelMutex );
- m_pImplChartModel->SetTitle( Title );
+ if( m_xTitle.is() )
+ ModifyListenerHelper::removeListener( m_xTitle, this );
+ m_xTitle = xTitle;
+ ModifyListenerHelper::addListener( m_xTitle, this );
// \--
}
setModified( sal_True );
@@ -907,6 +1046,13 @@ void SAL_CALL ChartModel::setVisualAreaSize( ::sal_Int64 nAspect, const awt::Siz
bool bChanged =
(m_aVisualAreaSize.Width != aSize.Width ||
m_aVisualAreaSize.Height != aSize.Height);
+
+ // #i12587# support for shapes in chart
+ if ( bChanged )
+ {
+ impl_adjustAdditionalShapesPositionAndSize( aSize );
+ }
+
m_aVisualAreaSize = aSize;
if( bChanged )
setModified( sal_True );
@@ -1077,9 +1223,6 @@ tServiceNameMap & lcl_getStaticServiceNameMap()
Reference< uno::XInterface > SAL_CALL ChartModel::createInstance( const OUString& rServiceSpecifier )
throw( uno::Exception, uno::RuntimeException )
{
- if( ! m_pImplChartModel.get() )
- return 0;
-
uno::Reference< uno::XInterface > xResult;
tServiceNameMap & rMap = lcl_getStaticServiceNameMap();
@@ -1089,22 +1232,22 @@ Reference< uno::XInterface > SAL_CALL ChartModel::createInstance( const OUString
switch( (*aIt).second )
{
case SERVICE_DASH_TABLE:
- return m_pImplChartModel->GetDashTable();
case SERVICE_GARDIENT_TABLE:
- return m_pImplChartModel->GetGradientTable();
case SERVICE_HATCH_TABLE:
- return m_pImplChartModel->GetHatchTable();
case SERVICE_BITMAP_TABLE:
- return m_pImplChartModel->GetBitmapTable();
case SERVICE_TRANSP_GRADIENT_TABLE:
- return m_pImplChartModel->GetTransparencyGradientTable();
case SERVICE_MARKER_TABLE:
- // not supported
- return 0;
+ {
+ uno::Reference< lang::XMultiServiceFactory > xFact(
+ this->createInstance( CHART_VIEW_SERVICE_NAME ), uno::UNO_QUERY );
+ if ( xFact.is() )
+ {
+ return xFact->createInstance( rServiceSpecifier );
+ }
+ }
+ break;
case SERVICE_NAMESPACE_MAP:
- // not yet supported, @todo
-// return 0;
- return m_pImplChartModel->GetXMLNameSpaceMap();
+ return Reference< uno::XInterface >( m_xXMLNamespaceMap );
}
}
else
@@ -1150,6 +1293,21 @@ Sequence< OUString > SAL_CALL ChartModel::getAvailableServiceNames()
return aResult;
}
+Reference< util::XNumberFormatsSupplier > ChartModel::impl_getNumberFormatsSupplier()
+{
+ if( !m_xNumberFormatsSupplier.is() )
+ {
+ if( !m_xOwnNumberFormatsSupplier.is() )
+ {
+ Reference< lang::XMultiServiceFactory > xFactory( m_xContext->getServiceManager(), uno::UNO_QUERY );
+ m_xOwnNumberFormatsSupplier = new SvNumberFormatsSupplierObj( new SvNumberFormatter( xFactory, LANGUAGE_SYSTEM ) );
+ //pOwnNumberFormatter->ChangeStandardPrec( 15 ); todo?
+ }
+ m_xNumberFormatsSupplier = m_xOwnNumberFormatsSupplier;
+ }
+ return m_xNumberFormatsSupplier;
+}
+
// ____ XUnoTunnel ___
::sal_Int64 SAL_CALL ChartModel::getSomething( const Sequence< ::sal_Int8 >& aIdentifier )
throw( uno::RuntimeException)
@@ -1157,14 +1315,9 @@ Sequence< OUString > SAL_CALL ChartModel::getAvailableServiceNames()
if( aIdentifier.getLength() == 16 && 0 == rtl_compareMemory( SvNumberFormatsSupplierObj::getUnoTunnelId().getConstArray(),
aIdentifier.getConstArray(), 16 ) )
{
- OSL_ENSURE( m_pImplChartModel.get(), "need a model implementation to provide a numberformatter" );
- if( m_pImplChartModel.get() )
- {
- Reference< lang::XUnoTunnel > xTunnel( m_pImplChartModel->GetNumberFormatsSupplier(), uno::UNO_QUERY );
- if( xTunnel.is() )
- return xTunnel->getSomething( aIdentifier );
- }
- return 0;
+ Reference< lang::XUnoTunnel > xTunnel( impl_getNumberFormatsSupplier(), uno::UNO_QUERY );
+ if( xTunnel.is() )
+ return xTunnel->getSomething( aIdentifier );
}
return 0;
}
@@ -1173,26 +1326,18 @@ Sequence< OUString > SAL_CALL ChartModel::getAvailableServiceNames()
uno::Reference< beans::XPropertySet > SAL_CALL ChartModel::getNumberFormatSettings()
throw (uno::RuntimeException)
{
- OSL_ENSURE( m_pImplChartModel.get(), "need a model implementation to provide a numberformatter" );
- if( m_pImplChartModel.get() )
- {
- Reference< util::XNumberFormatsSupplier > xSupplier( m_pImplChartModel->GetNumberFormatsSupplier() );
- if( xSupplier.is() )
- return xSupplier->getNumberFormatSettings();
- }
+ Reference< util::XNumberFormatsSupplier > xSupplier( impl_getNumberFormatsSupplier() );
+ if( xSupplier.is() )
+ return xSupplier->getNumberFormatSettings();
return uno::Reference< beans::XPropertySet >();
}
uno::Reference< util::XNumberFormats > SAL_CALL ChartModel::getNumberFormats()
throw (uno::RuntimeException)
{
- OSL_ENSURE( m_pImplChartModel.get(), "need a model implementation to provide a numberformatter" );
- if( m_pImplChartModel.get() )
- {
- Reference< util::XNumberFormatsSupplier > xSupplier( m_pImplChartModel->GetNumberFormatsSupplier() );
- if( xSupplier.is() )
- return xSupplier->getNumberFormats();
- }
+ Reference< util::XNumberFormatsSupplier > xSupplier( impl_getNumberFormatsSupplier() );
+ if( xSupplier.is() )
+ return xSupplier->getNumberFormats();
return uno::Reference< util::XNumberFormats >();
}
@@ -1215,7 +1360,7 @@ void SAL_CALL ChartModel::setParent( const Reference< uno::XInterface >& Parent
Reference< chart2::XUndoManager > SAL_CALL ChartModel::getUndoManager()
throw (uno::RuntimeException)
{
- return m_pImplChartModel->GetUndoManager();
+ return m_xUndoManager;
}
// ____ XDataSource ____
diff --git a/chart2/source/model/main/ChartModel.hxx b/chart2/source/model/main/ChartModel.hxx
index bee4332a857c..860f71f909ea 100644
--- a/chart2/source/model/main/ChartModel.hxx
+++ b/chart2/source/model/main/ChartModel.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartModel.hxx,v $
- * $Revision: 1.12.8.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -50,6 +47,8 @@
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/chart2/XUndoSupplier.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
+#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
// public API
#include <com/sun/star/chart2/data/XDataProvider.hpp>
@@ -70,7 +69,7 @@
#endif
#include <osl/mutex.hxx>
#include <cppuhelper/interfacecontainer.hxx>
-#include <goodies/grfmgr.hxx>
+#include <svtools/grfmgr.hxx>
// for auto_ptr
#include <memory>
@@ -84,7 +83,6 @@ namespace chart
namespace impl
{
- class ImplChartModel;
// Note: needed for queryInterface (if it calls the base-class implementation)
typedef ::comphelper::WeakImplHelper20<
@@ -139,8 +137,6 @@ private:
// ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aPrinterOptions;
- ::std::auto_ptr< impl::ImplChartModel > m_pImplChartModel;
-
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > m_xOldModelAgg;
@@ -151,6 +147,40 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XRangeHighlighter > m_xRangeHighlighter;
::std::vector< GraphicObject > m_aGraphicObjectVector;
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > m_xDataProvider;
+ /** is only valid if m_xDataProvider is set. If m_xDataProvider is set to an
+ external data provider this reference must be set to 0
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > m_xInternalDataProvider;
+
+ ::com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatsSupplier >
+ m_xOwnNumberFormatsSupplier;
+ ::com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatsSupplier >
+ m_xNumberFormatsSupplier;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartTypeManager >
+ m_xChartTypeManager;
+
+ // Diagram Access
+ typedef ::std::vector< ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDiagram > >
+ tDiagramContainer;
+
+ tDiagramContainer m_aDiagrams;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle >
+ m_xTitle;
+
+ bool m_bIsDisposed;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
+ m_xPageBackground;
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XUndoManager >
+ m_xUndoManager;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xXMLNamespaceMap;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyListener;
+
private:
//private methods
@@ -195,6 +225,19 @@ private:
impl_createFilter( const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue > & rMediaDescriptor );
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartTypeTemplate > impl_createDefaultChartTypeTemplate();
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > impl_createDefaultData();
+
+ void impl_adjustAdditionalShapesPositionAndSize(
+ const ::com::sun::star::awt::Size& aVisualAreaSize );
+
+ void impl_removeAllDiagrams();
+ void impl_appendDiagram( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDiagram > & xDiagram );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >
+ impl_getNumberFormatsSupplier();
+
public:
//no default constructor
ChartModel(::com::sun::star::uno::Reference<
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index 2e317ba7a0db..b7b8f380ceea 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartModel_Persistence.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,28 +29,36 @@
#include "precompiled_chart2.hxx"
#include "ChartModel.hxx"
-#include "ImplChartModel.hxx"
#include "MediaDescriptorHelper.hxx"
#include "ChartDebugTrace.hxx"
#include "macros.hxx"
#include "ChartViewHelper.hxx"
#include "ChartModelHelper.hxx"
+#include "AxisHelper.hxx"
+#include "ThreeDHelper.hxx"
+
+#include <com/sun/star/chart2/LegendPosition.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/document/XExporter.hpp>
#include <com/sun/star/document/XImporter.hpp>
#include <com/sun/star/document/XFilter.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/ProjectionMode.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/io/XSeekable.hpp>
+
#include <ucbhelper/content.hxx>
#ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX
#include <unotools/ucbstreamhelper.hxx>
#endif
#include <vcl/cvtgrf.hxx>
#include <comphelper/storagehelper.hxx>
+#include <vcl/svapp.hxx>
#include <algorithm>
#include <functional>
@@ -407,7 +412,88 @@ void SAL_CALL ChartModel::initNew()
createInternalDataProvider( sal_False );
try
{
- m_pImplChartModel->CreateDefaultChart();
+ // create default chart
+ impl_removeAllDiagrams();
+
+ Reference< chart2::XChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() );
+ if( xTemplate.is())
+ {
+ try
+ {
+ Reference< chart2::data::XDataSource > xDataSource( impl_createDefaultData() );
+ Sequence< beans::PropertyValue > aParam;
+
+ bool bSupportsCategories = xTemplate->supportsCategories();
+ if( bSupportsCategories )
+ {
+ aParam.realloc( 1 );
+ aParam[0] = beans::PropertyValue( C2U("HasCategories"), -1, uno::makeAny( true ),
+ beans::PropertyState_DIRECT_VALUE );
+ }
+
+ Reference< chart2::XDiagram > xDiagram( xTemplate->createDiagramByDataSource( xDataSource, aParam ) );
+
+ impl_appendDiagram( xDiagram );
+
+ bool bIsRTL = Application::GetSettings().GetLayoutRTL();
+ //reverse x axis for rtl charts
+ if( bIsRTL )
+ AxisHelper::setRTLAxisLayout( AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 ) );
+
+ // create and attach legend
+ Reference< chart2::XLegend > xLegend(
+ m_xContext->getServiceManager()->createInstanceWithContext(
+ C2U( "com.sun.star.chart2.Legend" ), m_xContext ), uno::UNO_QUERY_THROW );
+ Reference< beans::XPropertySet > xLegendProperties( xLegend, uno::UNO_QUERY );
+ if( xLegendProperties.is() )
+ {
+ xLegendProperties->setPropertyValue( C2U( "FillStyle" ), uno::makeAny( drawing::FillStyle_NONE ));
+ xLegendProperties->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_NONE ));
+ xLegendProperties->setPropertyValue( C2U( "LineColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) )); // gray30
+ xLegendProperties->setPropertyValue( C2U( "FillColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xe6e6e6 ) ) ); // gray10
+
+ if( bIsRTL )
+ xLegendProperties->setPropertyValue( C2U( "AnchorPosition" ), uno::makeAny( 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() )
+ {
+ xDiagramProperties->setPropertyValue( C2U("RightAngledAxes"), uno::makeAny( sal_True ));
+ xDiagramProperties->setPropertyValue( C2U("D3DScenePerspective"), uno::makeAny( drawing::ProjectionMode_PARALLEL ));
+ ThreeDHelper::setScheme( xDiagram, ThreeDLookScheme_Simple );
+ }
+
+ //set some new 'defaults' for wall and floor
+ if( xDiagram.is() )
+ {
+ Reference< beans::XPropertySet > xWall( xDiagram->getWall() );
+ if( xWall.is() )
+ {
+ xWall->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_SOLID ) );
+ xWall->setPropertyValue( C2U( "FillStyle" ), uno::makeAny( drawing::FillStyle_NONE ) );
+ xWall->setPropertyValue( C2U( "LineColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30
+ xWall->setPropertyValue( C2U( "FillColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xe6e6e6 ) ) ); // gray10
+ }
+ Reference< beans::XPropertySet > xFloor( xDiagram->getFloor() );
+ if( xFloor.is() )
+ {
+ xFloor->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_NONE ) );
+ xFloor->setPropertyValue( C2U( "FillStyle" ), uno::makeAny( drawing::FillStyle_SOLID ) );
+ xFloor->setPropertyValue( C2U( "LineColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30
+ xFloor->setPropertyValue( C2U( "FillColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xcccccc ) ) ); // gray20
+ }
+
+ }
+ }
+ catch( uno::Exception & ex )
+ {
+ ASSERT_EXCEPTION( ex );
+ }
+ }
ChartModelHelper::setIncludeHiddenCells( false, this );
}
catch( uno::Exception & ex )
diff --git a/chart2/source/model/main/DataPoint.cxx b/chart2/source/model/main/DataPoint.cxx
index 983ba72080c1..1f3d92e4d94b 100644
--- a/chart2/source/model/main/DataPoint.cxx
+++ b/chart2/source/model/main/DataPoint.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataPoint.cxx,v $
- * $Revision: 1.9.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/DataPoint.hxx b/chart2/source/model/main/DataPoint.hxx
index 7117276800df..1498b8345963 100644
--- a/chart2/source/model/main/DataPoint.hxx
+++ b/chart2/source/model/main/DataPoint.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataPoint.hxx,v $
- * $Revision: 1.6.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx
index a748d04d4b64..964f61b128ed 100644
--- a/chart2/source/model/main/DataPointProperties.cxx
+++ b/chart2/source/model/main/DataPointProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataPointProperties.cxx,v $
- * $Revision: 1.18.8.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/DataPointProperties.hxx b/chart2/source/model/main/DataPointProperties.hxx
index 6482adaa8679..5d4d02af36ef 100644
--- a/chart2/source/model/main/DataPointProperties.hxx
+++ b/chart2/source/model/main/DataPointProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataPointProperties.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index 0d76aab40366..2ef6be657f8c 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSeries.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/DataSeriesProperties.cxx b/chart2/source/model/main/DataSeriesProperties.cxx
index 4c8de69a12d4..29a41bd38e14 100644
--- a/chart2/source/model/main/DataSeriesProperties.cxx
+++ b/chart2/source/model/main/DataSeriesProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSeriesProperties.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/DataSeriesProperties.hxx b/chart2/source/model/main/DataSeriesProperties.hxx
index 9601c27216c7..6805b80c975b 100644
--- a/chart2/source/model/main/DataSeriesProperties.hxx
+++ b/chart2/source/model/main/DataSeriesProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSeriesProperties.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 3e8c8ea9cd24..f74764c398ef 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -2,14 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Diagram.cxx,v $
- *
- * $Revision: 1.24.32.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -373,18 +369,6 @@ void SAL_CALL Diagram::setDefaultColorScheme( const Reference< chart2::XColorSch
fireModifyEvent();
}
-void SAL_CALL Diagram::setUnusedData( const Sequence< Reference< chart2::data::XLabeledDataSequence > >& aUnusedData )
- throw (uno::RuntimeException)
-{
- m_aUnusedData = aUnusedData;
-}
-
-Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL Diagram::getUnusedData()
- throw (uno::RuntimeException)
-{
- return m_aUnusedData;
-}
-
// ____ XTitled ____
uno::Reference< chart2::XTitle > SAL_CALL Diagram::getTitleObject()
throw (uno::RuntimeException)
diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx
index e0d565bdb187..ae810266df29 100644
--- a/chart2/source/model/main/FormattedString.cxx
+++ b/chart2/source/model/main/FormattedString.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: FormattedString.cxx,v $
- * $Revision: 1.9.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/FormattedString.hxx b/chart2/source/model/main/FormattedString.hxx
index de2c8adc40b5..9293d73afa5b 100644
--- a/chart2/source/model/main/FormattedString.hxx
+++ b/chart2/source/model/main/FormattedString.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: FormattedString.hxx,v $
- * $Revision: 1.6.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/GridProperties.cxx b/chart2/source/model/main/GridProperties.cxx
index 4f48d16886b1..a8d5be5d1453 100644
--- a/chart2/source/model/main/GridProperties.cxx
+++ b/chart2/source/model/main/GridProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: GridProperties.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/GridProperties.hxx b/chart2/source/model/main/GridProperties.hxx
index e6925ae18819..1c0ae0ed849a 100644
--- a/chart2/source/model/main/GridProperties.hxx
+++ b/chart2/source/model/main/GridProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: GridProperties.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/ImplChartModel.cxx b/chart2/source/model/main/ImplChartModel.cxx
deleted file mode 100644
index 4c8e3bdfc8c9..000000000000
--- a/chart2/source/model/main/ImplChartModel.cxx
+++ /dev/null
@@ -1,589 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: ImplChartModel.cxx,v $
- * $Revision: 1.17.44.2 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_chart2.hxx"
-#include "ImplChartModel.hxx"
-#include "DataSeries.hxx"
-#include "macros.hxx"
-#include "PageBackground.hxx"
-#include "DiagramHelper.hxx"
-#include "NameContainer.hxx"
-#include "CloneHelper.hxx"
-#include "ModifyListenerHelper.hxx"
-#include "DataSourceHelper.hxx"
-#include "DisposeHelper.hxx"
-#include "ChartModelHelper.hxx"
-#include "ThreeDHelper.hxx"
-#include "AxisHelper.hxx"
-
-// header for class SvNumberFormatter
-#include <svl/zforlist.hxx>
-// header for class SvNumberFormatsSupplierObj
-#include <svl/numuno.hxx>
-#include <vcl/svapp.hxx>
-#include <cppuhelper/component_context.hxx>
-
-#include <com/sun/star/chart2/LegendPosition.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
-#include <com/sun/star/chart/ChartDataRowSource.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/embed/XStorage.hpp>
-#include <com/sun/star/embed/ElementModes.hpp>
-#include <com/sun/star/document/XFilter.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
-#include <com/sun/star/drawing/FillStyle.hpp>
-#include <com/sun/star/drawing/Hatch.hpp>
-#include <com/sun/star/drawing/LineDash.hpp>
-#include <com/sun/star/drawing/LineStyle.hpp>
-#include <com/sun/star/awt/Gradient.hpp>
-#include <com/sun/star/drawing/ProjectionMode.hpp>
-
-#include <vector>
-#include <algorithm>
-#include <functional>
-
-using namespace ::com::sun::star;
-using namespace ::chart::CloneHelper;
-
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
-
-using ::rtl::OUString;
-
-namespace
-{
-
-struct lcl_removeListener : public ::std::unary_function< Reference< chart2::XDiagram >, void >
-{
- explicit lcl_removeListener( const Reference< util::XModifyListener > & xListener ) :
- m_xListener( xListener )
- {}
-
- void operator() ( const Reference< chart2::XDiagram > & xDia )
- {
- Reference< util::XModifyBroadcaster > xBroadcaster( xDia, uno::UNO_QUERY );
- if( xBroadcaster.is() && m_xListener.is())
- xBroadcaster->removeModifyListener( m_xListener );
- }
-private:
- Reference< util::XModifyListener > m_xListener;
-};
-
-} // anonymous namespace
-
-namespace chart
-{
-namespace impl
-{
-
-ImplChartModel::ImplChartModel(
- Reference< uno::XComponentContext > const & xContext,
- const Reference< util::XModifyListener > & xListener ) :
- m_xContext( xContext ),
- m_spChartData( new ChartData( m_xContext )),
- m_bIsDisposed( false ),
- m_xPageBackground( new PageBackground( m_xContext )),
- m_xUndoManager( ChartModelHelper::createUndoManager() ),
- m_xDashTable( createNameContainer( ::getCppuType( reinterpret_cast< const drawing::LineDash * >(0)),
- C2U( "com.sun.star.drawing.DashTable" ), C2U( "com.sun.star.comp.chart.DashTable" ) )),
- m_xGradientTable( createNameContainer( ::getCppuType( reinterpret_cast< const awt::Gradient * >(0)),
- C2U( "com.sun.star.drawing.GradientTable" ), C2U( "com.sun.star.comp.chart.GradientTable" ) )),
- m_xHatchTable( createNameContainer( ::getCppuType( reinterpret_cast< const drawing::Hatch * >(0)),
- C2U( "com.sun.star.drawing.HatchTable" ), C2U( "com.sun.star.comp.chart.HatchTable" ) )),
- m_xBitmapTable( createNameContainer( ::getCppuType( reinterpret_cast< const OUString * >(0)), // URL
- C2U( "com.sun.star.drawing.BitmapTable" ), C2U( "com.sun.star.comp.chart.BitmapTable" ) )),
- m_xTransparencyGradientTable( createNameContainer( ::getCppuType( reinterpret_cast< const awt::Gradient * >(0)),
- C2U( "com.sun.star.drawing.TransparencyGradientTable" ), C2U( "com.sun.star.comp.chart.TransparencyGradientTable" ) )),
- m_xXMLNamespaceMap( createNameContainer( ::getCppuType( (const OUString*) 0 ),
- C2U( "com.sun.star.xml.NamespaceMap" ), C2U( "com.sun.star.comp.chart.XMLNameSpaceMap" ) ), uno::UNO_QUERY),
- m_xModifyListener( xListener )
-{
- ModifyListenerHelper::addListener( m_xPageBackground, m_xModifyListener );
- m_xChartTypeManager.set(
- xContext->getServiceManager()->createInstanceWithContext(
- C2U( "com.sun.star.chart2.ChartTypeManager" ),
- xContext ), uno::UNO_QUERY );
-
- GetStyleFamilies();
- CreateDefaultChartTypeTemplate();
-}
-
-ImplChartModel::ImplChartModel( const ImplChartModel & rOther, const Reference< util::XModifyListener > & xListener ) :
- m_xContext( rOther.m_xContext ),
- m_spChartData( rOther.m_spChartData ),
- m_bIsDisposed( rOther.m_bIsDisposed ),
- m_xModifyListener( xListener )
-{
- m_xFamilies.set( CreateRefClone< Reference< container::XNameAccess > >()( rOther.m_xFamilies ));
- m_xChartTypeManager.set( CreateRefClone< Reference< chart2::XChartTypeManager > >()( rOther.m_xChartTypeManager ));
- m_xChartTypeTemplate.set( CreateRefClone< Reference< chart2::XChartTypeTemplate > >()( rOther.m_xChartTypeTemplate ));
- m_xTitle.set( CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle ));
- ModifyListenerHelper::addListener( m_xTitle, m_xModifyListener );
- m_xPageBackground.set( CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xPageBackground ));
- ModifyListenerHelper::addListener( m_xPageBackground, m_xModifyListener );
-
- m_xDashTable.set( CreateRefClone< Reference< container::XNameContainer > >()( rOther.m_xDashTable ));
- m_xGradientTable.set( CreateRefClone< Reference< container::XNameContainer > >()( rOther.m_xGradientTable ));
- m_xHatchTable.set( CreateRefClone< Reference< container::XNameContainer > >()( rOther.m_xHatchTable ));
- m_xBitmapTable.set( CreateRefClone< Reference< container::XNameContainer > >()( rOther.m_xBitmapTable ));
- m_xTransparencyGradientTable.set( CreateRefClone< Reference< container::XNameContainer > >()( rOther.m_xTransparencyGradientTable ));
-
- m_xXMLNamespaceMap.set( CreateRefClone< Reference< container::XNameAccess > >()( rOther.m_xXMLNamespaceMap ));
-
- CloneRefVector< Reference< chart2::XDiagram > >( rOther.m_aDiagrams, m_aDiagrams );
-}
-
-ImplChartModel::~ImplChartModel()
-{}
-
-Reference< container::XNameAccess > ImplChartModel::GetStyleFamilies()
-{
- return m_xFamilies;
-}
-
-// Diagram Access
-
-void ImplChartModel::RemoveAllDiagrams()
-{
- ModifyListenerHelper::removeListenerFromAllElements( m_aDiagrams, m_xModifyListener );
- m_aDiagrams.clear();
-}
-
-void ImplChartModel::AppendDiagram( const Reference< chart2::XDiagram > & xDiagram )
-{
- Reference< util::XModifyBroadcaster > xBroadcaster( xDiagram, uno::UNO_QUERY );
- ModifyListenerHelper::addListener( xDiagram, m_xModifyListener );
- m_aDiagrams.push_back( xDiagram );
-}
-
-Reference< chart2::XDiagram > ImplChartModel::GetDiagram( size_t nIndex ) const
- throw( container::NoSuchElementException )
-{
- if( nIndex >= m_aDiagrams.size() )
- throw container::NoSuchElementException();
-
- return m_aDiagrams[ nIndex ];
-}
-
-void ImplChartModel::SetDataProvider(
- const Reference< chart2::data::XDataProvider > & xProvider )
-{
- OSL_ASSERT( m_spChartData.get() );
-
- m_spChartData->setDataProvider( xProvider );
-
- //the numberformatter is kept independent of the data provider!
-
- // release other ressources
-
- // @todo: maybe we need to save some properties of the old diagrams. When
- // the data provider changes from an outside Calc to an internal Calc,
- // e.g. when copying a chart into the clipboard as "standalone" format
-// if( bDeleteDiagrams && ! m_aDiagrams.empty())
-// m_aDiagrams.clear();
-}
-
-Reference< chart2::data::XDataProvider > ImplChartModel::GetDataProvider() const
-{
- OSL_ASSERT( m_spChartData.get() );
-
- return m_spChartData->getDataProvider();
-}
-
-void ImplChartModel::CreateInternalDataProvider(
- bool bCloneExistingData,
- const Reference< chart2::XChartDocument > & xChartDoc )
-{
- m_spChartData->createInternalData( bCloneExistingData, xChartDoc );
-}
-
-bool ImplChartModel::HasInternalDataProvider() const
-{
- OSL_ASSERT( m_spChartData.get() );
-
- return m_spChartData->hasInternalData();
-}
-
-Reference< chart2::data::XDataSource > SAL_CALL ImplChartModel::SetArguments(
- const Sequence< beans::PropertyValue > & aArguments,
- bool bSetData )
- throw (lang::IllegalArgumentException)
-{
- Reference< chart2::data::XDataSource > xResult;
- try
- {
- OSL_ASSERT( m_spChartData.get() );
-
- Reference< chart2::data::XDataProvider > xDataProvider(
- m_spChartData->getDataProvider());
- if( xDataProvider.is() )
- {
- xResult.set( xDataProvider->createDataSource( aArguments ));
-
- if( bSetData && xResult.is())
- SetNewData( xResult, aArguments );
- }
- }
- catch( lang::IllegalArgumentException & )
- {
- throw;
- }
- catch( uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- }
-
- return xResult;
-}
-
-Reference< chart2::data::XDataSource > SAL_CALL ImplChartModel::SetRangeRepresentation(
- const OUString & rRangeRepresentation, bool bSetData )
- throw (::com::sun::star::lang::IllegalArgumentException)
-{
- uno::Sequence< beans::PropertyValue > aArgs( 4 );
- aArgs[0] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1,
- uno::makeAny( rRangeRepresentation ), beans::PropertyState_DIRECT_VALUE );
- aArgs[1] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("HasCategories"), -1,
- uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE );
- aArgs[2] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1,
- uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE );
- aArgs[3] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("DataRowSource"), -1,
- uno::makeAny( ::com::sun::star::chart::ChartDataRowSource_COLUMNS ), beans::PropertyState_DIRECT_VALUE );
- return SetArguments( aArgs, bSetData );
- /*
- uno::Sequence< beans::PropertyValue > aArgs();
-
- Reference< chart2::data::XDataProvider > xDataProvider( this->GetDataProvider() );
- if( xDataProvider.is() )
- aArgs = xDataProvider->detectArguments( DataSourceHelper::getUsedData( xChartModel ) ),
-
- ::rtl::OUString aRangeString;
- uno::Sequence< sal_Int32 > aSequenceMapping;
- bool bUseColumns = true;
- bool bFirstCellAsLabel = true;
- bool bHasCategories = true;
-
- DataSourceHelper::detectRangeSegmentation(
- uno::Reference< frame::XModel >( m_xChartDoc, uno::UNO_QUERY ),
- aRangeString, aSequenceMapping, bUseColumns, bFirstCellAsLabel, bHasCategories );
-
- aArgs = createArguments( rRangeRepresentation, aSequenceMapping, bUseColumns, bFirstCellAsLabel, bHasCategories ) );
-
- return SetArguments( aArgs, bSetData );
- */
-}
-
-void ImplChartModel::SetChartTypeManager(
- const Reference< chart2::XChartTypeManager > & xManager )
-{
- m_xChartTypeManager = xManager;
-}
-
-Reference< chart2::XChartTypeManager > ImplChartModel::GetChartTypeManager()
-{
- return m_xChartTypeManager;
-}
-
-Reference< chart2::XChartTypeTemplate > ImplChartModel::GetChartTypeTemplate()
-{
- return m_xChartTypeTemplate;
-}
-
-void ImplChartModel::CreateDefaultChart()
-{
- CreateDefaultChartTypeTemplate();
-
- // clean up
- RemoveAllDiagrams();
-
- Reference< chart2::XChartTypeTemplate > xTemplate( GetChartTypeTemplate());
- if( xTemplate.is())
- {
- try
- {
- Reference< chart2::data::XDataSource > xDataSource( CreateDefaultData());
- Sequence< beans::PropertyValue > aParam;
-
- Sequence< OUString > aParamNames( xTemplate->getAvailableCreationParameterNames());
- const OUString * pBeg = aParamNames.getConstArray();
- const OUString * pEnd = pBeg + aParamNames.getLength();
- const OUString * pFound( ::std::find( pBeg, pEnd, C2U("HasCategories")));
- if( pFound != pEnd )
- {
- aParam.realloc( 1 );
- aParam[0] = beans::PropertyValue( C2U("HasCategories"), -1, uno::makeAny( true ),
- beans::PropertyState_DIRECT_VALUE );
- }
-
- Reference< chart2::XDiagram > xDiagram( xTemplate->createDiagramByDataSource( xDataSource, aParam ) );
-
- AppendDiagram( xDiagram );
-
- bool bIsRTL = Application::GetSettings().GetLayoutRTL();
- //reverse x axis for rtl charts
- if( bIsRTL )
- AxisHelper::setRTLAxisLayout( AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 ) );
-
- // create and attach legend
- Reference< chart2::XLegend > xLegend(
- m_xContext->getServiceManager()->createInstanceWithContext(
- C2U( "com.sun.star.chart2.Legend" ), m_xContext ), uno::UNO_QUERY_THROW );
- Reference< beans::XPropertySet > xLegendProperties( xLegend, uno::UNO_QUERY );
- if( xLegendProperties.is() )
- {
- xLegendProperties->setPropertyValue( C2U( "FillStyle" ), uno::makeAny( drawing::FillStyle_NONE ));
- xLegendProperties->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_NONE ));
- xLegendProperties->setPropertyValue( C2U( "LineColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) )); // gray30
- xLegendProperties->setPropertyValue( C2U( "FillColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xe6e6e6 ) ) ); // gray10
-
- if( bIsRTL )
- xLegendProperties->setPropertyValue( C2U( "AnchorPosition" ), uno::makeAny( 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() )
- {
- xDiagramProperties->setPropertyValue( C2U("RightAngledAxes"), uno::makeAny( sal_True ));
- xDiagramProperties->setPropertyValue( C2U("D3DScenePerspective"), uno::makeAny( drawing::ProjectionMode_PARALLEL ));
- ThreeDHelper::setScheme( xDiagram, ThreeDLookScheme_Simple );
- }
-
- //set some new 'defaults' for wall and floor
- if( xDiagram.is() )
- {
- Reference< beans::XPropertySet > xWall( xDiagram->getWall() );
- if( xWall.is() )
- {
- xWall->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_SOLID ) );
- xWall->setPropertyValue( C2U( "FillStyle" ), uno::makeAny( drawing::FillStyle_NONE ) );
- xWall->setPropertyValue( C2U( "LineColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30
- xWall->setPropertyValue( C2U( "FillColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xe6e6e6 ) ) ); // gray10
- }
- Reference< beans::XPropertySet > xFloor( xDiagram->getFloor() );
- if( xFloor.is() )
- {
- xFloor->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_NONE ) );
- xFloor->setPropertyValue( C2U( "FillStyle" ), uno::makeAny( drawing::FillStyle_SOLID ) );
- xFloor->setPropertyValue( C2U( "LineColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30
- xFloor->setPropertyValue( C2U( "FillColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xcccccc ) ) ); // gray20
- }
-
- }
- }
- catch( uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- }
- }
-}
-
-Reference< chart2::XTitle > ImplChartModel::GetTitle()
-{
- return m_xTitle;
-}
-
-void ImplChartModel::SetTitle( const Reference< chart2::XTitle >& rTitle )
-{
- if( m_xTitle.is())
- ModifyListenerHelper::removeListener( m_xTitle, m_xModifyListener );
- m_xTitle = rTitle;
- ModifyListenerHelper::addListener( m_xTitle, m_xModifyListener );
-}
-
-void ImplChartModel::dispose()
-{
- // exception is thrown by ChartModel
- if( m_bIsDisposed )
- return;
-
- m_spChartData.reset();
- m_xNumberFormatsSupplier.clear();
-
- DisposeHelper::DisposeAndClear( m_xFamilies );
- DisposeHelper::DisposeAndClear( m_xOwnNumberFormatsSupplier );
- DisposeHelper::DisposeAndClear( m_xChartTypeManager );
- DisposeHelper::DisposeAndClear( m_xChartTypeTemplate );
- DisposeHelper::DisposeAllElements( m_aDiagrams );
- m_aDiagrams.clear();
- DisposeHelper::DisposeAndClear( m_xTitle );
- DisposeHelper::DisposeAndClear( m_xPageBackground );
- DisposeHelper::DisposeAndClear( m_xDashTable );
- DisposeHelper::DisposeAndClear( m_xGradientTable );
- DisposeHelper::DisposeAndClear( m_xHatchTable );
- DisposeHelper::DisposeAndClear( m_xBitmapTable );
- DisposeHelper::DisposeAndClear( m_xTransparencyGradientTable );
-
- DisposeHelper::DisposeAndClear( m_xXMLNamespaceMap );
-
- // note: m_xModifyListener is the ChartModel, so don't call dispose()
- m_xModifyListener.clear();
-
- m_bIsDisposed = true;
-}
-
-Reference< beans::XPropertySet > ImplChartModel::GetPageBackground()
-{
- return m_xPageBackground;
-}
-
-Reference< chart2::XUndoManager > ImplChartModel::GetUndoManager()
-{
- return m_xUndoManager;
-}
-
-void ImplChartModel::SetNewData( const Reference< chart2::data::XDataSource > & xDataSource,
- const Sequence< beans::PropertyValue > & rArgs )
-{
- Reference< chart2::XDiagram > xDia;
- if( m_aDiagrams.size() > 0 )
- xDia.set( GetDiagram(0));
- Reference< chart2::XChartTypeTemplate > xTemplate;
-
- if( xDia.is())
- {
- // apply new data
- DiagramHelper::tTemplateWithServiceName aTemplateAndService =
- DiagramHelper::getTemplateForDiagram(
- xDia, Reference< lang::XMultiServiceFactory >( m_xChartTypeManager, uno::UNO_QUERY ));
- xTemplate.set( aTemplateAndService.first );
- }
-
- if( !xTemplate.is())
- xTemplate.set( GetChartTypeTemplate());
-
- if( xTemplate.is())
- {
- if( xDia.is())
- xTemplate->changeDiagramData( xDia, xDataSource, rArgs );
- else
- {
- RemoveAllDiagrams();
- AppendDiagram( xTemplate->createDiagramByDataSource( xDataSource, rArgs ));
- }
- }
-}
-
-Reference< chart2::data::XDataSource > ImplChartModel::CreateDefaultData()
-{
- Reference< chart2::data::XDataSource > xResult;
- if( m_spChartData->createDefaultData())
- xResult.set( SetRangeRepresentation( C2U("all"), false /* bSetData */ ));
- return xResult;
-}
-
-void ImplChartModel::CreateDefaultChartTypeTemplate()
-{
- // set default chart type
- Reference< lang::XMultiServiceFactory > xFact( m_xChartTypeManager, uno::UNO_QUERY );
- if( xFact.is() )
- {
- m_xChartTypeTemplate.set(
- xFact->createInstance( C2U( "com.sun.star.chart2.template.Column" ) ), uno::UNO_QUERY );
- }
-}
-
-Reference< uno::XInterface > ImplChartModel::GetDashTable() const
-{
- return Reference< uno::XInterface >( m_xDashTable );
-}
-Reference< uno::XInterface > ImplChartModel::GetGradientTable() const
-{
- return Reference< uno::XInterface >( m_xGradientTable );
-}
-Reference< uno::XInterface > ImplChartModel::GetHatchTable() const
-{
- return Reference< uno::XInterface >( m_xHatchTable );
-}
-Reference< uno::XInterface > ImplChartModel::GetBitmapTable() const
-{
- return Reference< uno::XInterface >( m_xBitmapTable );
-}
-Reference< uno::XInterface > ImplChartModel::GetTransparencyGradientTable() const
-{
- return Reference< uno::XInterface >( m_xTransparencyGradientTable );
-}
-
-Reference< uno::XInterface > ImplChartModel::GetXMLNameSpaceMap() const
-{
- return Reference< uno::XInterface >( m_xXMLNamespaceMap );
-}
-
-void ImplChartModel::SetNumberFormatsSupplier(
- const Reference< util::XNumberFormatsSupplier > & xNew )
-{
- if( xNew==m_xNumberFormatsSupplier )
- return;
- if( xNew==m_xOwnNumberFormatsSupplier )
- return;
- if( m_xOwnNumberFormatsSupplier.is() && xNew.is() )
- {
- //@todo
- //merge missing numberformats from own to new formatter
- }
- else if( !xNew.is() )
- {
- if( m_xNumberFormatsSupplier.is() )
- {
- //@todo
- //merge missing numberformats from old numberformatter to own numberformatter
- //create own numberformatter if necessary
- }
- }
-
- m_xNumberFormatsSupplier.set( xNew );
- m_xOwnNumberFormatsSupplier.clear();
-}
-
-Reference< util::XNumberFormatsSupplier > ImplChartModel::GetNumberFormatsSupplier()
-{
- if( !m_xNumberFormatsSupplier.is() )
- {
- if( !m_xOwnNumberFormatsSupplier.is() )
- {
- Reference< lang::XMultiServiceFactory > xFactory( m_xContext->getServiceManager(), uno::UNO_QUERY );
- m_xOwnNumberFormatsSupplier = new SvNumberFormatsSupplierObj( new SvNumberFormatter( xFactory, LANGUAGE_SYSTEM ) );
- //pOwnNumberFormatter->ChangeStandardPrec( 15 ); todo?
- }
- m_xNumberFormatsSupplier = m_xOwnNumberFormatsSupplier;
- }
- return m_xNumberFormatsSupplier;
-}
-
-} // namespace impl
-} // namespace chart
diff --git a/chart2/source/model/main/ImplChartModel.hxx b/chart2/source/model/main/ImplChartModel.hxx
deleted file mode 100644
index 9a912feee246..000000000000
--- a/chart2/source/model/main/ImplChartModel.hxx
+++ /dev/null
@@ -1,253 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: ImplChartModel.hxx,v $
- * $Revision: 1.10.44.1 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef CHART_IMPLCHARTMODEL_HXX
-#define CHART_IMPLCHARTMODEL_HXX
-
-#include <com/sun/star/chart2/data/XDataSource.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
-#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
-#include <com/sun/star/chart2/data/XDataProvider.hpp>
-#include <com/sun/star/chart2/XChartTypeManager.hpp>
-#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
-#include <com/sun/star/chart2/XTitle.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XUndoManager.hpp>
-
-#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/container/NoSuchElementException.hpp>
-#include <com/sun/star/io/IOException.hpp>
-#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-
-#include <cppuhelper/weakref.hxx>
-
-#include "ChartData.hxx"
-
-#include <vector>
-#include <memory>
-#include <boost/shared_ptr.hpp>
-
-namespace com { namespace sun { namespace star {
- namespace container {
- class XNameAccess;
- }
- namespace uno {
- class XComponentContext;
- }
- namespace embed {
- class XStorage;
- }
- namespace document {
- class XFilter;
- }
- namespace util {
- class XModifyListener;
- }
-}}}
-
-class SvNumberFormatter;
-
-namespace chart
-{
-namespace impl
-{
-
-class ImplChartModel
-{
- typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > tDataSourceType;
-
-public:
- ImplChartModel( ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XComponentContext > const & xContext,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::util::XModifyListener > & xListener );
- explicit ImplChartModel( const ImplChartModel & rOther,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::util::XModifyListener > & xListener );
- ~ImplChartModel();
-
-// ::com::sun::star::uno::Sequence<
-// ::com::sun::star::uno::Reference<
-// ::com::sun::star::chart2::XDataSeries > >
-// GetDataSeries() const;
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XNameAccess >
- GetStyleFamilies();
-
- // Diagram Access
- void RemoveAllDiagrams();
- /** @return true, if the chart was found and removed, false otherwise.
- */
- void AppendDiagram( const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDiagram > & xDiagram );
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDiagram >
- GetDiagram( size_t nIndex ) const
- throw( ::com::sun::star::container::NoSuchElementException );
-
- void SetDataProvider( const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataProvider > & xProvider );
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataProvider > GetDataProvider() const;
-
- void CreateInternalDataProvider(
- bool bCloneExistingData,
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > & xChartDoc );
-
- bool HasInternalDataProvider() const;
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataSource > SAL_CALL SetArguments(
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & rArgs,
- bool bSetData )
- throw (::com::sun::star::lang::IllegalArgumentException);
-
- void SetChartTypeManager(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XChartTypeManager > & xManager );
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XChartTypeManager >
- GetChartTypeManager();
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XChartTypeTemplate >
- GetChartTypeTemplate();
-
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle >
- GetTitle();
-
- void SetTitle( const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XTitle >& rTitle );
-
- /** Is called by the ChartModel's XComponent::dispose() to notify the
- impl-class to release resources
- */
- void dispose();
-
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
- GetPageBackground();
-
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XUndoManager >
- GetUndoManager();
-
- void CreateDefaultChart();
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XInterface > GetDashTable() const;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XInterface > GetGradientTable() const;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XInterface > GetHatchTable() const;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XInterface > GetBitmapTable() const;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XInterface > GetTransparencyGradientTable() const;
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XInterface > GetXMLNameSpaceMap() const;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >
- GetNumberFormatsSupplier();
-
- void SetNumberFormatsSupplier(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::util::XNumberFormatsSupplier > & xNumberFormatsSupplier );
-
-private:
- void CreateDefaultChartTypeTemplate();
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataSource > CreateDefaultData();
- void SetNewData( const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataSource > & xDataSource,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & rArgs );
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataSource > SAL_CALL SetRangeRepresentation(
- const ::rtl::OUString & rRangeRepresentation, bool bSetData )
- throw (::com::sun::star::lang::IllegalArgumentException);
-
-// void CreateDefaultLayout();
-
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xFamilies;
-
- ::boost::shared_ptr< ChartData > m_spChartData;
-
- // Data Access (deprecated, temporary solution)
-// ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > m_xChartData;
-// ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > m_xDataProvider;
-
-// ::std::vector< ::com::sun::star::uno::Reference<
-// ::com::sun::star::chart2::XDataSeries > > m_aInterpretedData;
-
- ::com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatsSupplier >
- m_xOwnNumberFormatsSupplier;
- ::com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatsSupplier >
- m_xNumberFormatsSupplier;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartTypeManager >
- m_xChartTypeManager;
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartTypeTemplate >
- m_xChartTypeTemplate;
-
- // Diagram Access
- typedef ::std::vector< ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDiagram > >
- tDiagramContainer;
-
- tDiagramContainer m_aDiagrams;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle >
- m_xTitle;
-
- bool m_bIsDisposed;
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
- m_xPageBackground;
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XUndoManager >
- m_xUndoManager;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xDashTable;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xGradientTable;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xHatchTable;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xBitmapTable;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xTransparencyGradientTable;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xXMLNamespaceMap;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyListener;
-};
-
-} // namespace impl
-} // namespace chart
-
-// CHART_IMPLCHARTMODEL_HXX
-#endif
diff --git a/chart2/source/model/main/InternalData.cxx b/chart2/source/model/main/InternalData.cxx
deleted file mode 100644
index 5c572a699f0b..000000000000
--- a/chart2/source/model/main/InternalData.cxx
+++ /dev/null
@@ -1,260 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: InternalData.cxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_chart2.hxx"
-
-#include "InternalData.hxx"
-#include "macros.hxx"
-#include <com/sun/star/embed/XEmbedPersist.hpp>
-#include <com/sun/star/embed/XEmbedObjectCreator.hpp>
-#include <com/sun/star/chart2/data/XDataProvider.hpp>
-#include <com/sun/star/util/XCloseable.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <sot/clsids.hxx>
-
-using namespace ::com::sun::star;
-
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
-using ::rtl::OUString;
-
-namespace
-{
-/** convert a class-id macro into a byte-sequence
- call e.g. lcl_GetSequenceClassID( SO3_SC_CLASSID_60 )
- */
-Sequence< sal_Int8 > lcl_GetSequenceClassID( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3,
- sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11,
- sal_uInt8 b12, sal_uInt8 b13, sal_uInt8 b14, sal_uInt8 b15 )
-{
- Sequence< sal_Int8 > aResult( 16 );
- aResult[0] = static_cast<sal_Int8>(n1 >> 24);
- aResult[1] = static_cast<sal_Int8>(( n1 << 8 ) >> 24);
- aResult[2] = static_cast<sal_Int8>(( n1 << 16 ) >> 24);
- aResult[3] = static_cast<sal_Int8>(( n1 << 24 ) >> 24);
- aResult[4] = n2 >> 8;
- aResult[5] = ( n2 << 8 ) >> 8;
- aResult[6] = n3 >> 8;
- aResult[7] = ( n3 << 8 ) >> 8;
- aResult[8] = b8;
- aResult[9] = b9;
- aResult[10] = b10;
- aResult[11] = b11;
- aResult[12] = b12;
- aResult[13] = b13;
- aResult[14] = b14;
- aResult[15] = b15;
-
- return aResult;
-}
-
-Reference< embed::XStorage > lcl_CreateTempStorage(
- const Reference< lang::XMultiServiceFactory > & rFactory )
-{
- Reference< embed::XStorage > xResult;
-
- try
- {
- Reference< lang::XSingleServiceFactory > xStorageFact(
- rFactory->createInstance( C2U( "com.sun.star.embed.StorageFactory" )),
- uno::UNO_QUERY_THROW );
- xResult.set( xStorageFact->createInstance(), uno::UNO_QUERY_THROW );
- }
- catch( uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- }
-
- return xResult;
-}
-
-} // anonymous namespace
-
-
-
-namespace chart
-{
-
-//explicit
-InternalData::InternalData(
- const Reference< uno::XComponentContext > & xContext,
- const Reference< embed::XStorage > & xParentStorage ) :
- m_aDataStorageName( RTL_CONSTASCII_USTRINGPARAM("ChartData")),
- m_xContext( xContext ),
- m_xParentStorage( xParentStorage )
-{}
-
-InternalData::~InternalData()
-{
-}
-
-void SAL_CALL InternalData::saveObject()
- throw (embed::ObjectSaveVetoException,
- uno::Exception,
- uno::RuntimeException)
-{
- if( m_xInternalData.is())
- {
- try
- {
- Reference< embed::XEmbedPersist > xPersist( m_xInternalData, uno::UNO_QUERY_THROW );
- xPersist->storeOwn();
- }
- catch( uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- }
- }
-}
-
-void SAL_CALL InternalData::visibilityChanged( sal_Bool bVisible )
- throw (embed::WrongStateException,
- uno::RuntimeException)
-{
- // ignore (this is for swapping OLE objects?)
-}
-
-Reference< util::XCloseable > SAL_CALL InternalData::getComponent()
- throw (uno::RuntimeException)
-{
- return Reference< util::XCloseable >( m_xInternalData, uno::UNO_QUERY );
-}
-
-// ____ XCloseListener ____
-void SAL_CALL InternalData::queryClosing( const lang::EventObject& Source, ::sal_Bool GetsOwnership )
- throw (util::CloseVetoException,
- uno::RuntimeException)
-{
- // empty
-}
-
-void SAL_CALL InternalData::notifyClosing( const lang::EventObject& Source )
- throw (uno::RuntimeException)
-{
- try
- {
- Reference< util::XCloseable > xCloseable( m_xInternalData, uno::UNO_QUERY );
- if( xCloseable.is())
- xCloseable->close( /* DeliverOwnership */ sal_False );
-
- Reference< lang::XComponent > xComp( m_xInternalData, uno::UNO_QUERY );
- if( xComp.is())
- xComp->dispose();
- m_xInternalData = 0;
- }
- catch( const util::CloseVetoException & )
- {
- throw;
- }
- catch( const uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- }
-}
-
- // ____ XEventListener ____
-void SAL_CALL InternalData::disposing(
- const lang::EventObject& Source )
- throw (uno::RuntimeException)
-{
- // empty
-}
-
-Reference< chart2::data::XDataProvider > InternalData::createEmbeddedObject() throw()
-{
- OSL_ASSERT( m_xContext.is());
- Reference< chart2::data::XDataProvider > xResult;
-
- try
- {
- if( ! m_xInternalData.is() && m_xContext.is())
- {
- Reference< lang::XMultiServiceFactory > xFactory(
- m_xContext->getServiceManager(), uno::UNO_QUERY_THROW );
- Reference< embed::XEmbedObjectCreator > xCreator(
- xFactory->createInstance(
- C2U( "com.sun.star.embed.EmbeddedObjectCreator")), uno::UNO_QUERY_THROW );
-
- Reference< embed::XStorage > xStorage( m_xParentStorage );
- if( !xStorage.is())
- {
- // as we don't store the spreadsheet as substorage in the final
- // document, it is ok, or maybe even better to create a
- // temporary storage
-// OSL_ENSURE( false, "Using temporary storage for chart data!" );
- xStorage.set( lcl_CreateTempStorage( xFactory ));
- }
-
- m_xInternalData.set(
- xCreator->createInstanceInitNew(
- lcl_GetSequenceClassID( SO3_SC_CLASSID_60 ),
- C2U( "ChartDataEditor" ),
- xStorage,
- m_aDataStorageName,
- Sequence< beans::PropertyValue >() ), uno::UNO_QUERY_THROW );
-
- m_xInternalData->setClientSite( this );
-
- xFactory.set( m_xInternalData->getComponent(), uno::UNO_QUERY_THROW );
- xResult.set(
- xFactory->createInstance( C2U( "com.sun.star.chart2.data.DataProvider" )), uno::UNO_QUERY_THROW );
- }
- }
- catch( uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- }
-
- return xResult;
-}
-
-void InternalData::removeEmbeddedObject() throw()
-{
- if( m_xParentStorage.is())
- {
- try
- {
- m_xParentStorage->removeElement( m_aDataStorageName );
- }
- catch( uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- }
- }
-}
-
-Reference< embed::XEmbeddedObject > InternalData::getEmbeddedObject() const throw()
-{
- return m_xInternalData;
-}
-
-} // namespace chart
diff --git a/chart2/source/model/main/InternalData.hxx b/chart2/source/model/main/InternalData.hxx
deleted file mode 100644
index e50470467b3e..000000000000
--- a/chart2/source/model/main/InternalData.hxx
+++ /dev/null
@@ -1,121 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: InternalData.hxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef CHART2_INTERNALDATA_HXX
-#define CHART2_INTERNALDATA_HXX
-
-#include <com/sun/star/embed/XEmbeddedClient.hpp>
-#include <com/sun/star/embed/XEmbeddedObject.hpp>
-#include <com/sun/star/util/XCloseListener.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-namespace com { namespace sun { namespace star {
- namespace uno {
- class XComponentContext;
- }
- namespace embed {
- class XStorage;
- class XEmbeddedObject;
- }
- namespace chart2 {
- namespace data {
- class XDataProvider;
- }
- }
-}}}
-
-namespace chart
-{
-
-class InternalData :
- public ::cppu::WeakImplHelper2<
- ::com::sun::star::embed::XEmbeddedClient,
- ::com::sun::star::util::XCloseListener >
-{
-public:
- explicit InternalData(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XComponentContext > & xContext,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::embed::XStorage > & xParentStorage );
- virtual ~InternalData();
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataProvider > createEmbeddedObject() throw();
-
- void removeEmbeddedObject() throw();
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::embed::XEmbeddedObject > getEmbeddedObject() const throw();
-
- // ____ XEmbeddedClient ____
- virtual void SAL_CALL saveObject()
- throw (::com::sun::star::embed::ObjectSaveVetoException,
- ::com::sun::star::uno::Exception,
- ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL visibilityChanged( sal_Bool bVisible )
- throw (::com::sun::star::embed::WrongStateException,
- ::com::sun::star::uno::RuntimeException);
-
- // ____ XComponentSupplier ____
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > SAL_CALL getComponent()
- throw (::com::sun::star::uno::RuntimeException);
-
- // ____ XCloseListener ____
- virtual void SAL_CALL queryClosing(
- const ::com::sun::star::lang::EventObject& Source,
- ::sal_Bool GetsOwnership )
- throw (::com::sun::star::util::CloseVetoException,
- ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL notifyClosing(
- const ::com::sun::star::lang::EventObject& Source )
- throw (::com::sun::star::uno::RuntimeException);
-
- // ____ XEventListener ____
- virtual void SAL_CALL disposing(
- const ::com::sun::star::lang::EventObject& Source )
- throw (::com::sun::star::uno::RuntimeException);
-
-private:
- const ::rtl::OUString m_aDataStorageName;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
- m_xContext;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >
- m_xInternalData;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
- m_xParentStorage;
-};
-
-} // namespace chart
-
-// CHART2_INTERNALDATA_HXX
-#endif
diff --git a/chart2/source/model/main/LayoutContainer.cxx b/chart2/source/model/main/LayoutContainer.cxx
index e02eeca78b2d..d962113f78c7 100644
--- a/chart2/source/model/main/LayoutContainer.cxx
+++ b/chart2/source/model/main/LayoutContainer.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LayoutContainer.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/LayoutContainer.hxx b/chart2/source/model/main/LayoutContainer.hxx
index 4e838bba931b..ea645dcff536 100644
--- a/chart2/source/model/main/LayoutContainer.hxx
+++ b/chart2/source/model/main/LayoutContainer.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LayoutContainer.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx
index 3f7f66d23950..e3d8a3107d4c 100644
--- a/chart2/source/model/main/Legend.cxx
+++ b/chart2/source/model/main/Legend.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Legend.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/Legend.hxx b/chart2/source/model/main/Legend.hxx
index 4cf5d354f4dc..6b645828f4c1 100644
--- a/chart2/source/model/main/Legend.hxx
+++ b/chart2/source/model/main/Legend.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Legend.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx
index 07def9bf496c..0dbe1d82fcf3 100644
--- a/chart2/source/model/main/PageBackground.cxx
+++ b/chart2/source/model/main/PageBackground.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PageBackground.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/PageBackground.hxx b/chart2/source/model/main/PageBackground.hxx
index 61b56995a84c..9875a76eae2b 100644
--- a/chart2/source/model/main/PageBackground.hxx
+++ b/chart2/source/model/main/PageBackground.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PageBackground.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx
index 076a1401d194..9022a5e17901 100644
--- a/chart2/source/model/main/PolarCoordinateSystem.cxx
+++ b/chart2/source/model/main/PolarCoordinateSystem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PolarCoordinateSystem.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/StockBar.cxx b/chart2/source/model/main/StockBar.cxx
index 5edaf6a606d8..9a3c7f8ab623 100644
--- a/chart2/source/model/main/StockBar.cxx
+++ b/chart2/source/model/main/StockBar.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StockBar.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx
index 55fa2df663cd..0a215c2d4c15 100644
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Title.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/Title.hxx b/chart2/source/model/main/Title.hxx
index f1a3d44b1f7d..5889910018b7 100644
--- a/chart2/source/model/main/Title.hxx
+++ b/chart2/source/model/main/Title.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Title.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/Wall.cxx b/chart2/source/model/main/Wall.cxx
index bd27e9fd733a..2ad00a4c90ae 100644
--- a/chart2/source/model/main/Wall.cxx
+++ b/chart2/source/model/main/Wall.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Wall.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/Wall.hxx b/chart2/source/model/main/Wall.hxx
index 0750325a0de6..8c796b4da432 100644
--- a/chart2/source/model/main/Wall.hxx
+++ b/chart2/source/model/main/Wall.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Wall.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/_serviceregistration_model.cxx b/chart2/source/model/main/_serviceregistration_model.cxx
index b2b8ae8a84cc..b0a7739008ad 100644
--- a/chart2/source/model/main/_serviceregistration_model.cxx
+++ b/chart2/source/model/main/_serviceregistration_model.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: _serviceregistration_model.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/main/makefile.mk b/chart2/source/model/main/makefile.mk
index 409e29eaca7d..8e963dfa0f5c 100644
--- a/chart2/source/model/main/makefile.mk
+++ b/chart2/source/model/main/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.8.44.1 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -50,7 +46,6 @@ SLOFILES= \
$(SLO)$/GridProperties.obj \
$(SLO)$/BaseCoordinateSystem.obj \
$(SLO)$/CartesianCoordinateSystem.obj \
- $(SLO)$/ChartData.obj \
$(SLO)$/ChartModel.obj \
$(SLO)$/ChartModel_Persistence.obj \
$(SLO)$/DataPoint.obj \
@@ -59,7 +54,6 @@ SLOFILES= \
$(SLO)$/Diagram.obj \
$(SLO)$/DataSeriesProperties.obj \
$(SLO)$/FormattedString.obj \
- $(SLO)$/ImplChartModel.obj \
$(SLO)$/Legend.obj \
$(SLO)$/PageBackground.obj \
$(SLO)$/PolarCoordinateSystem.obj \
diff --git a/chart2/source/model/makefile.mk b/chart2/source/model/makefile.mk
index 8fb1e9dc3bed..701f47fb94b5 100644
--- a/chart2/source/model/makefile.mk
+++ b/chart2/source/model/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.7 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -82,7 +78,6 @@ SHL1STDLIBS= $(CHARTTOOLS) \
$(VCLLIB) \
$(SVLLIB) \
$(SVTOOLLIB) \
- $(GOODIESLIB) \
$(SALLIB) \
$(UCBHELPERLIB)
diff --git a/chart2/source/model/template/AreaChartType.cxx b/chart2/source/model/template/AreaChartType.cxx
index c66be54bb0c1..003220c87dfb 100644
--- a/chart2/source/model/template/AreaChartType.cxx
+++ b/chart2/source/model/template/AreaChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AreaChartType.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/AreaChartType.hxx b/chart2/source/model/template/AreaChartType.hxx
index 06497f3fad4e..9955d5eb537e 100644
--- a/chart2/source/model/template/AreaChartType.hxx
+++ b/chart2/source/model/template/AreaChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AreaChartType.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/AreaChartTypeTemplate.cxx b/chart2/source/model/template/AreaChartTypeTemplate.cxx
index 092ef3c4ccb0..072b16a07d26 100644
--- a/chart2/source/model/template/AreaChartTypeTemplate.cxx
+++ b/chart2/source/model/template/AreaChartTypeTemplate.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AreaChartTypeTemplate.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/AreaChartTypeTemplate.hxx b/chart2/source/model/template/AreaChartTypeTemplate.hxx
index c7ee5f2520cd..a84a4b645c2a 100644
--- a/chart2/source/model/template/AreaChartTypeTemplate.hxx
+++ b/chart2/source/model/template/AreaChartTypeTemplate.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AreaChartTypeTemplate.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/BarChartType.cxx b/chart2/source/model/template/BarChartType.cxx
index 5d388829a4bc..e877a34007de 100644
--- a/chart2/source/model/template/BarChartType.cxx
+++ b/chart2/source/model/template/BarChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BarChartType.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/BarChartType.hxx b/chart2/source/model/template/BarChartType.hxx
index 7bcaf8fd445a..884a52e3a228 100644
--- a/chart2/source/model/template/BarChartType.hxx
+++ b/chart2/source/model/template/BarChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BarChartType.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx
index 056c1d820164..81f1337ccb29 100644
--- a/chart2/source/model/template/BarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BarChartTypeTemplate.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BarChartTypeTemplate.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/BarChartTypeTemplate.hxx b/chart2/source/model/template/BarChartTypeTemplate.hxx
index 39a4a92606e7..fabf7a59826c 100644
--- a/chart2/source/model/template/BarChartTypeTemplate.hxx
+++ b/chart2/source/model/template/BarChartTypeTemplate.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BarChartTypeTemplate.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/BubbleChartType.cxx b/chart2/source/model/template/BubbleChartType.cxx
index 09e629462d48..9922ed4df5fb 100644
--- a/chart2/source/model/template/BubbleChartType.cxx
+++ b/chart2/source/model/template/BubbleChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ,v $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/BubbleChartType.hxx b/chart2/source/model/template/BubbleChartType.hxx
index 3694ac1c955c..eea8a0e7a6ee 100644
--- a/chart2/source/model/template/BubbleChartType.hxx
+++ b/chart2/source/model/template/BubbleChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ,v $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.cxx b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
index 0853cea6a5cb..3f297d1e2e27 100644
--- a/chart2/source/model/template/BubbleChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ,v $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -181,12 +178,6 @@ StackMode BubbleChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */
return StackMode_NONE;
}
-bool BubbleChartTypeTemplate::supportsCategories() const
-{
- return false;
-}
-
-
void SAL_CALL BubbleChartTypeTemplate::applyStyle(
const Reference< chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
@@ -206,10 +197,10 @@ void SAL_CALL BubbleChartTypeTemplate::applyStyle(
}
// ____ XChartTypeTemplate ____
-Sequence< OUString > SAL_CALL BubbleChartTypeTemplate::getAvailableCreationParameterNames()
+sal_Bool SAL_CALL BubbleChartTypeTemplate::supportsCategories()
throw (uno::RuntimeException)
{
- return Sequence< OUString >();
+ return false;
}
sal_Bool SAL_CALL BubbleChartTypeTemplate::matchesTemplate(
diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.hxx b/chart2/source/model/template/BubbleChartTypeTemplate.hxx
index c094e38e28ac..24d35c6acbb7 100644
--- a/chart2/source/model/template/BubbleChartTypeTemplate.hxx
+++ b/chart2/source/model/template/BubbleChartTypeTemplate.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ,v $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -70,7 +67,7 @@ protected:
throw (::com::sun::star::uno::RuntimeException);
// ____ XChartTypeTemplate ____
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableCreationParameterNames()
+ virtual sal_Bool SAL_CALL supportsCategories()
throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL matchesTemplate(
const ::com::sun::star::uno::Reference<
@@ -96,8 +93,6 @@ protected:
getChartTypeForIndex( sal_Int32 nChartTypeIndex );
virtual sal_Int32 getDimension() const;
virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const;
-
- virtual bool supportsCategories() const;
};
} // namespace chart
diff --git a/chart2/source/model/template/BubbleDataInterpreter.cxx b/chart2/source/model/template/BubbleDataInterpreter.cxx
index a5ebb6b1ec2f..1f26fff907e4 100644
--- a/chart2/source/model/template/BubbleDataInterpreter.cxx
+++ b/chart2/source/model/template/BubbleDataInterpreter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ,v $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -81,8 +78,6 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource(
Reference< data::XLabeledDataSequence > xCategories;
bool bHasCategories = HasCategories( aArguments, aData );
- Sequence< Reference< data::XLabeledDataSequence > > aUnusedData;
-
bool bHasXValues = false;
sal_Int32 nDataSeqCount = aData.getLength();
@@ -173,7 +168,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource(
Sequence< Sequence< Reference< XDataSeries > > > aSeries(1);
aSeries[0] = ContainerHelper::ContainerToSequence( aSeriesVec );
- return InterpretedData( aSeries, xCategories, aUnusedData );
+ return InterpretedData( aSeries, xCategories );
}
chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries(
@@ -181,8 +176,6 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries(
throw (uno::RuntimeException)
{
InterpretedData aResult( aInterpretedData );
- vector< Reference< data::XLabeledDataSequence > > aUnused(
- ContainerHelper::SequenceToVector( aInterpretedData.UnusedData ));
sal_Int32 i=0;
Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
@@ -269,17 +262,15 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries(
Sequence< Reference< data::XLabeledDataSequence > > aSeqs( xSeriesSource->getDataSequences());
if( aSeqs.getLength() != aNewSequences.getLength() )
{
+#if OSL_DEBUG_LEVEL > 1
sal_Int32 j=0;
for( ; j<aSeqs.getLength(); ++j )
{
- if( aSeqs[j] != xValuesY &&
- aSeqs[j] != xValuesX &&
- aSeqs[j] != xValuesSize )
- aUnused.push_back( aSeqs[j] );
+ OSL_ENSURE( aSeqs[j] == xValuesY || aSeqs[j] == xValuesX || aSeqs[j] == xValuesSize, "All sequences should be used" );
}
+#endif
Reference< data::XDataSink > xSink( xSeriesSource, uno::UNO_QUERY_THROW );
xSink->setData( aNewSequences );
- aResult.UnusedData = ContainerHelper::ContainerToSequence( aUnused );
}
}
catch( uno::Exception & ex )
diff --git a/chart2/source/model/template/BubbleDataInterpreter.hxx b/chart2/source/model/template/BubbleDataInterpreter.hxx
index a173f801812c..3eb6ebaedbf0 100644
--- a/chart2/source/model/template/BubbleDataInterpreter.hxx
+++ b/chart2/source/model/template/BubbleDataInterpreter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ,v $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/CandleStickChartType.cxx b/chart2/source/model/template/CandleStickChartType.cxx
index a4eb3fc628bd..22c8e058ea53 100644
--- a/chart2/source/model/template/CandleStickChartType.cxx
+++ b/chart2/source/model/template/CandleStickChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CandleStickChartType.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/CandleStickChartType.hxx b/chart2/source/model/template/CandleStickChartType.hxx
index f08508d8ec4e..d32c4c455d74 100644
--- a/chart2/source/model/template/CandleStickChartType.hxx
+++ b/chart2/source/model/template/CandleStickChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CandleStickChartType.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx
index 2834d9354f95..22a744769fc6 100644
--- a/chart2/source/model/template/ChartType.cxx
+++ b/chart2/source/model/template/ChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartType.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/ChartType.hxx b/chart2/source/model/template/ChartType.hxx
index 14a7ce6b9634..07e72ea2890b 100644
--- a/chart2/source/model/template/ChartType.hxx
+++ b/chart2/source/model/template/ChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartType.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx
index bb419a10f1ac..d34617ffce1f 100644
--- a/chart2/source/model/template/ChartTypeManager.cxx
+++ b/chart2/source/model/template/ChartTypeManager.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartTypeManager.cxx,v $
- * $Revision: 1.18.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index 1996cc12830e..393321a19d55 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartTypeTemplate.cxx,v $
- * $Revision: 1.22 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -195,11 +192,10 @@ uno::Reference< XDiagram > SAL_CALL ChartTypeTemplate::createDiagramByDataSource
return xDia;
}
-Sequence< OUString > SAL_CALL ChartTypeTemplate::getAvailableCreationParameterNames()
+sal_Bool SAL_CALL ChartTypeTemplate::supportsCategories()
throw (uno::RuntimeException)
{
- OUString aHasCat( C2U("HasCategories"));
- return Sequence< OUString >( & aHasCat, 1 );
+ return sal_True;
}
void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >& xDiagram )
@@ -220,10 +216,8 @@ void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >
chart2::InterpretedData aData;
aData.Series = aSeriesSeq;
aData.Categories = DiagramHelper::getCategoriesFromDiagram( xDiagram );
- aData.UnusedData = xDiagram->getUnusedData();
- if( (aData.UnusedData.getLength() == 0) &&
- xInterpreter->isDataCompatible( aData ))
+ if( xInterpreter->isDataCompatible( aData ) )
{
aData = xInterpreter->reinterpretDataSeries( aData );
}
@@ -241,32 +235,9 @@ void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >
aParam[0] = beans::PropertyValue( C2U("HasCategories"), -1, uno::makeAny( true ),
beans::PropertyState_DIRECT_VALUE );
}
- else if( aData.UnusedData.getLength())
- {
- for( sal_Int32 i=0; i<aData.UnusedData.getLength(); ++i )
- try
- {
- Reference< beans::XPropertySet > xProp( aData.UnusedData[i]->getValues(), uno::UNO_QUERY_THROW );
- OUString aRole;
- if( (xProp->getPropertyValue(C2U("Role")) >>= aRole) &
- aRole.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("categories")) )
- {
- aData.Categories = aData.UnusedData[i];
- for( ++i; i<aData.UnusedData.getLength(); ++i )
- aData.UnusedData[i-1] = aData.UnusedData[i];
- aData.UnusedData.realloc( aData.UnusedData.getLength() - 1 );
- break;
- }
- }
- catch( const uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- }
- }
aData = xInterpreter->interpretDataSource( xSource, aParam, aFlatSeriesSeq );
}
aSeriesSeq = aData.Series;
- xDiagram->setUnusedData( aData.UnusedData );
sal_Int32 i, j, nIndex = 0;
for( i=0; i<aSeriesSeq.getLength(); ++i )
@@ -586,11 +557,6 @@ bool ChartTypeTemplate::isSwapXAndY() const
return false;
}
-bool ChartTypeTemplate::supportsCategories() const
-{
- return true;
-}
-
// ________________________________________
void ChartTypeTemplate::createCoordinateSystems(
@@ -664,7 +630,7 @@ void ChartTypeTemplate::adaptScales(
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());
+ bool bSupportsCategories( supportsCategories() );
for( sal_Int32 nCooSysIdx=0; nCooSysIdx<aCooSysSeq.getLength(); ++nCooSysIdx )
{
try
diff --git a/chart2/source/model/template/ChartTypeTemplate.hxx b/chart2/source/model/template/ChartTypeTemplate.hxx
index 0ba9e24d0248..3f43e0ca6038 100644
--- a/chart2/source/model/template/ChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ChartTypeTemplate.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartTypeTemplate.hxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -103,7 +100,8 @@ protected:
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource >& xDataSource,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments )
throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableCreationParameterNames()
+ /// denotes if the chart needs categories at the first scale
+ virtual sal_Bool SAL_CALL supportsCategories()
throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL changeDiagram(
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram )
@@ -161,9 +159,6 @@ protected:
virtual bool isSwapXAndY() const;
- /// denotes if the chart needs categories at the first scale
- virtual bool supportsCategories() const;
-
// Methods for creating the diagram piecewise
// ------------------------------------------
diff --git a/chart2/source/model/template/ColumnChartType.cxx b/chart2/source/model/template/ColumnChartType.cxx
index a3cb06ff9e41..aa11d77e8995 100644
--- a/chart2/source/model/template/ColumnChartType.cxx
+++ b/chart2/source/model/template/ColumnChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ColumnChartType.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/ColumnChartType.hxx b/chart2/source/model/template/ColumnChartType.hxx
index f437af79c8db..3386b6a1cd40 100644
--- a/chart2/source/model/template/ColumnChartType.hxx
+++ b/chart2/source/model/template/ColumnChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ColumnChartType.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
index ea3215b0ccc6..70a0a633836a 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ColumnLineChartTypeTemplate.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
index 4c861a07820a..ce86188e2bb6 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ColumnLineChartTypeTemplate.hxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/ColumnLineDataInterpreter.cxx b/chart2/source/model/template/ColumnLineDataInterpreter.cxx
index 557825b0eccf..18e22f78e86e 100644
--- a/chart2/source/model/template/ColumnLineDataInterpreter.cxx
+++ b/chart2/source/model/template/ColumnLineDataInterpreter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ColumnLineDataInterpreter.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/ColumnLineDataInterpreter.hxx b/chart2/source/model/template/ColumnLineDataInterpreter.hxx
index 95d668cd3456..b9b8a62a4097 100644
--- a/chart2/source/model/template/ColumnLineDataInterpreter.hxx
+++ b/chart2/source/model/template/ColumnLineDataInterpreter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ColumnLineDataInterpreter.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx
index 8073b7af04ef..b619553ee959 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataInterpreter.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -152,7 +149,7 @@ InterpretedData SAL_CALL DataInterpreter::interpretDataSource(
Sequence< Sequence< Reference< XDataSeries > > > aSeries(1);
aSeries[0] = ContainerToSequence( aSeriesVec );
- return InterpretedData( aSeries, xCategories, Sequence< Reference< data::XLabeledDataSequence > >() );
+ return InterpretedData( aSeries, xCategories );
}
InterpretedData SAL_CALL DataInterpreter::reinterpretDataSeries(
@@ -160,8 +157,6 @@ InterpretedData SAL_CALL DataInterpreter::reinterpretDataSeries(
throw (uno::RuntimeException)
{
InterpretedData aResult( aInterpretedData );
- vector< Reference< data::XLabeledDataSequence > > aUnused(
- SequenceToVector( aInterpretedData.UnusedData ));
sal_Int32 i=0;
Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
@@ -193,14 +188,14 @@ InterpretedData SAL_CALL DataInterpreter::reinterpretDataSeries(
Sequence< Reference< data::XLabeledDataSequence > > aSeqs( xSeriesSource->getDataSequences());
if( aSeqs.getLength() != aNewSequences.getLength() )
{
+#if OSL_DEBUG_LEVEL > 1
sal_Int32 j=0;
for( ; j<aSeqs.getLength(); ++j )
{
- if( aSeqs[j] != xValuesY )
- aUnused.push_back( aSeqs[j] );
+ OSL_ENSURE( aSeqs[j] == xValuesY, "All sequences should be used" );
}
+#endif
Reference< data::XDataSink > xSink( xSeriesSource, uno::UNO_QUERY_THROW );
-
xSink->setData( aNewSequences );
}
}
@@ -210,8 +205,6 @@ InterpretedData SAL_CALL DataInterpreter::reinterpretDataSeries(
}
}
- aResult.UnusedData = ContainerToSequence( aUnused );
-
return aResult;
}
@@ -297,34 +290,13 @@ Reference< data::XDataSource > SAL_CALL DataInterpreter::mergeInterpretedData(
throw (uno::RuntimeException)
{
vector< Reference< data::XLabeledDataSequence > > aResultVec;
- vector< Reference< data::XLabeledDataSequence > > aUnusedDataVec;
aResultVec.reserve( aInterpretedData.Series.getLength() +
- aInterpretedData.UnusedData.getLength() +
1 // categories
);
if( aInterpretedData.Categories.is())
aResultVec.push_back( aInterpretedData.Categories );
- // add unused data that has the Role categories at front
- if( aInterpretedData.UnusedData.getLength())
- {
- sal_Int32 nSize = aInterpretedData.UnusedData.getLength();
- for( sal_Int32 i=0; i<nSize; ++i )
- {
- Reference< data::XLabeledDataSequence > xPotentialCategories( aInterpretedData.UnusedData[i] );
- if( xPotentialCategories.is() )
- {
- if( GetRole( xPotentialCategories->getValues()).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("categories")))
- aResultVec.push_back( xPotentialCategories );
- else
- aUnusedDataVec.push_back( xPotentialCategories );
- }
- }
- }
- else
- aUnusedDataVec = SequenceToVector( aInterpretedData.UnusedData );
-
Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
for( sal_Int32 nSeriesIdx=0; nSeriesIdx<aSeries.getLength(); ++nSeriesIdx )
{
@@ -352,9 +324,6 @@ Reference< data::XDataSource > SAL_CALL DataInterpreter::mergeInterpretedData(
}
}
- // add unused data at end
- copy( aUnusedDataVec.begin(), aUnusedDataVec.end(), back_inserter( aResultVec ));
-
return Reference< data::XDataSource >( DataSourceHelper::createDataSource( ContainerToSequence( aResultVec ) ) );
}
diff --git a/chart2/source/model/template/DataInterpreter.hxx b/chart2/source/model/template/DataInterpreter.hxx
index fa8ddcc6ff76..a2d6201fc023 100644
--- a/chart2/source/model/template/DataInterpreter.hxx
+++ b/chart2/source/model/template/DataInterpreter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataInterpreter.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/FilledNetChartType.cxx b/chart2/source/model/template/FilledNetChartType.cxx
index ce96488270a4..d90dc8b9f7c7 100644
--- a/chart2/source/model/template/FilledNetChartType.cxx
+++ b/chart2/source/model/template/FilledNetChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: FilledNetChartType.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/FilledNetChartType.hxx b/chart2/source/model/template/FilledNetChartType.hxx
index 3e694c12b0dd..14beee021b34 100644
--- a/chart2/source/model/template/FilledNetChartType.hxx
+++ b/chart2/source/model/template/FilledNetChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: FilledNetChartType.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/LineChartType.cxx b/chart2/source/model/template/LineChartType.cxx
index 49ee619a02d9..f96d7ed1297d 100644
--- a/chart2/source/model/template/LineChartType.cxx
+++ b/chart2/source/model/template/LineChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LineChartType.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/LineChartType.hxx b/chart2/source/model/template/LineChartType.hxx
index 4005ded89a4a..1821333a4cdc 100644
--- a/chart2/source/model/template/LineChartType.hxx
+++ b/chart2/source/model/template/LineChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LineChartType.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx
index 5ffe02b5212b..8d582178a128 100644
--- a/chart2/source/model/template/LineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/LineChartTypeTemplate.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LineChartTypeTemplate.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/LineChartTypeTemplate.hxx b/chart2/source/model/template/LineChartTypeTemplate.hxx
index 3e993548aeab..faee9715720a 100644
--- a/chart2/source/model/template/LineChartTypeTemplate.hxx
+++ b/chart2/source/model/template/LineChartTypeTemplate.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LineChartTypeTemplate.hxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/NetChartType.cxx b/chart2/source/model/template/NetChartType.cxx
index 757d2dc07122..ddf001b2a6e4 100644
--- a/chart2/source/model/template/NetChartType.cxx
+++ b/chart2/source/model/template/NetChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NetChartType.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/NetChartType.hxx b/chart2/source/model/template/NetChartType.hxx
index 97afeeaeea13..ba5dc48b6881 100644
--- a/chart2/source/model/template/NetChartType.hxx
+++ b/chart2/source/model/template/NetChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NetChartType_Base.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/NetChartTypeTemplate.cxx b/chart2/source/model/template/NetChartTypeTemplate.cxx
index 9b2c089b7298..b67817e73997 100644
--- a/chart2/source/model/template/NetChartTypeTemplate.cxx
+++ b/chart2/source/model/template/NetChartTypeTemplate.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NetChartTypeTemplate.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/NetChartTypeTemplate.hxx b/chart2/source/model/template/NetChartTypeTemplate.hxx
index 9c17e6639497..f66355a3576e 100644
--- a/chart2/source/model/template/NetChartTypeTemplate.hxx
+++ b/chart2/source/model/template/NetChartTypeTemplate.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NetChartTypeTemplate.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx
index a4c98413fe7d..9c199bb23d70 100644
--- a/chart2/source/model/template/PieChartType.cxx
+++ b/chart2/source/model/template/PieChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PieChartType.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/PieChartType.hxx b/chart2/source/model/template/PieChartType.hxx
index 0559a4fe126f..fccd4e9ee25c 100644
--- a/chart2/source/model/template/PieChartType.hxx
+++ b/chart2/source/model/template/PieChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PieChartType.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx
index 1ece7c5edb93..a8f2fc12720a 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.cxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PieChartTypeTemplate.cxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/PieChartTypeTemplate.hxx b/chart2/source/model/template/PieChartTypeTemplate.hxx
index ebdaca1f6996..1634e643611f 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.hxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PieChartTypeTemplate.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/ScatterChartType.cxx b/chart2/source/model/template/ScatterChartType.cxx
index 50b1b4f0ac70..8c4ab0d18415 100644
--- a/chart2/source/model/template/ScatterChartType.cxx
+++ b/chart2/source/model/template/ScatterChartType.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ScatterChartType.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/ScatterChartType.hxx b/chart2/source/model/template/ScatterChartType.hxx
index fee35f1efd8a..aed0cce2a97f 100644
--- a/chart2/source/model/template/ScatterChartType.hxx
+++ b/chart2/source/model/template/ScatterChartType.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ScatterChartType.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
index a87a82c05827..f952abaa3611 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ScatterChartTypeTemplate.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -222,12 +219,6 @@ StackMode ScatterChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex *
return StackMode_NONE;
}
-bool ScatterChartTypeTemplate::supportsCategories() const
-{
- return false;
-}
-
-
void SAL_CALL ScatterChartTypeTemplate::applyStyle(
const Reference< chart2::XDataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
@@ -252,10 +243,10 @@ void SAL_CALL ScatterChartTypeTemplate::applyStyle(
}
// ____ XChartTypeTemplate ____
-Sequence< OUString > SAL_CALL ScatterChartTypeTemplate::getAvailableCreationParameterNames()
+sal_Bool SAL_CALL ScatterChartTypeTemplate::supportsCategories()
throw (uno::RuntimeException)
{
- return Sequence< OUString >();
+ return sal_False;
}
sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate(
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.hxx b/chart2/source/model/template/ScatterChartTypeTemplate.hxx
index 12a4343c3014..048cca73a92c 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ScatterChartTypeTemplate.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -74,7 +71,7 @@ protected:
throw (::com::sun::star::uno::RuntimeException);
// ____ XChartTypeTemplate ____
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableCreationParameterNames()
+ virtual sal_Bool SAL_CALL supportsCategories()
throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL matchesTemplate(
const ::com::sun::star::uno::Reference<
@@ -101,8 +98,6 @@ protected:
virtual sal_Int32 getDimension() const;
virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const;
- virtual bool supportsCategories() const;
-
private:
bool m_bHasSymbols;
bool m_bHasLines;
diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx
index 719decae49a7..90a313b78c8a 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.cxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StockChartTypeTemplate.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/StockChartTypeTemplate.hxx b/chart2/source/model/template/StockChartTypeTemplate.hxx
index f968b2505e4f..c9347ff4e070 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.hxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StockChartTypeTemplate.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/StockDataInterpreter.cxx b/chart2/source/model/template/StockDataInterpreter.cxx
index b3e1ea78768e..0d134516a1bb 100644
--- a/chart2/source/model/template/StockDataInterpreter.cxx
+++ b/chart2/source/model/template/StockDataInterpreter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StockDataInterpreter.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -271,8 +268,7 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
}
}
- const Sequence< Reference< data::XLabeledDataSequence > > aUnusedData;//@todo remove the unused data concept completely
- return InterpretedData( aResultSeries, xCategories, aUnusedData );
+ return InterpretedData( aResultSeries, xCategories );
}
// criterion: there must be two groups for stock-charts with volume and all
@@ -305,7 +301,7 @@ sal_Bool SAL_CALL StockDataInterpreter::isDataCompatible(
if( ! DataInterpreter::isDataCompatible(
InterpretedData( Sequence< Sequence< Reference< XDataSeries > > >(
aInterpretedData.Series.getConstArray(), 1 ),
- aInterpretedData.Categories, aInterpretedData.UnusedData )))
+ aInterpretedData.Categories )))
return sal_False;
}
diff --git a/chart2/source/model/template/StockDataInterpreter.hxx b/chart2/source/model/template/StockDataInterpreter.hxx
index da74582a0fca..bb9edf48c169 100644
--- a/chart2/source/model/template/StockDataInterpreter.hxx
+++ b/chart2/source/model/template/StockDataInterpreter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StockDataInterpreter.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/XYDataInterpreter.cxx b/chart2/source/model/template/XYDataInterpreter.cxx
index 74d8da6b13bd..839c0cbac510 100644
--- a/chart2/source/model/template/XYDataInterpreter.cxx
+++ b/chart2/source/model/template/XYDataInterpreter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: XYDataInterpreter.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -82,8 +79,6 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::interpretDataSource(
bool bHasCategories = HasCategories( aArguments, aData );
// parse data
- Sequence< Reference< data::XLabeledDataSequence > > aUnusedData;
-
bool bCategoriesUsed = false;
for( sal_Int32 nDataIdx= 0; nDataIdx < aData.getLength(); ++nDataIdx )
{
@@ -160,7 +155,7 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::interpretDataSource(
Sequence< Sequence< Reference< XDataSeries > > > aSeries(1);
aSeries[0] = ContainerHelper::ContainerToSequence( aSeriesVec );
- return InterpretedData( aSeries, xCategories, aUnusedData );
+ return InterpretedData( aSeries, xCategories );
}
chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries(
@@ -168,8 +163,6 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries(
throw (uno::RuntimeException)
{
InterpretedData aResult( aInterpretedData );
- vector< Reference< data::XLabeledDataSequence > > aUnused(
- ContainerHelper::SequenceToVector( aInterpretedData.UnusedData ));
sal_Int32 i=0;
Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( aInterpretedData.Series ));
@@ -233,16 +226,15 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries(
Sequence< Reference< data::XLabeledDataSequence > > aSeqs( xSeriesSource->getDataSequences());
if( aSeqs.getLength() != aNewSequences.getLength() )
{
+#if OSL_DEBUG_LEVEL > 1
sal_Int32 j=0;
for( ; j<aSeqs.getLength(); ++j )
{
- if( aSeqs[j] != xValuesY &&
- aSeqs[j] != xValuesX )
- aUnused.push_back( aSeqs[j] );
+ OSL_ENSURE( aSeqs[j] == xValuesY || aSeqs[j] == xValuesX, "All sequences should be used" );
}
+#endif
Reference< data::XDataSink > xSink( xSeriesSource, uno::UNO_QUERY_THROW );
xSink->setData( aNewSequences );
- aResult.UnusedData = ContainerHelper::ContainerToSequence( aUnused );
}
}
catch( uno::Exception & ex )
diff --git a/chart2/source/model/template/XYDataInterpreter.hxx b/chart2/source/model/template/XYDataInterpreter.hxx
index 1bee9b616e26..c8ecb4d17778 100644
--- a/chart2/source/model/template/XYDataInterpreter.hxx
+++ b/chart2/source/model/template/XYDataInterpreter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: XYDataInterpreter.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/_serviceregistration_charttypes.cxx b/chart2/source/model/template/_serviceregistration_charttypes.cxx
index 7b739ca73830..c0ffb8f4825f 100644
--- a/chart2/source/model/template/_serviceregistration_charttypes.cxx
+++ b/chart2/source/model/template/_serviceregistration_charttypes.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: _serviceregistration_charttypes.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/model/template/makefile.mk b/chart2/source/model/template/makefile.mk
index 63367014ed6b..5599aed50256 100644
--- a/chart2/source/model/template/makefile.mk
+++ b/chart2/source/model/template/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.10 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index b7dfd60f8712..b2f7fb24e6f2 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AxisHelper.cxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/BaseGFXHelper.cxx b/chart2/source/tools/BaseGFXHelper.cxx
index 813b1dd70360..0ec7df9b7d71 100644
--- a/chart2/source/tools/BaseGFXHelper.cxx
+++ b/chart2/source/tools/BaseGFXHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BaseGFXHelper.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx
index 09a814f277c8..678cd8ba8314 100644
--- a/chart2/source/tools/CachedDataSequence.cxx
+++ b/chart2/source/tools/CachedDataSequence.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CachedDataSequence.cxx,v $
- * $Revision: 1.7.24.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index 6981d7fab9a2..3b39609f8b85 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CharacterProperties.cxx,v $
- * $Revision: 1.11.46.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ChartDebugTrace.cxx b/chart2/source/tools/ChartDebugTrace.cxx
index 9486180ececd..9629138cb2be 100644
--- a/chart2/source/tools/ChartDebugTrace.cxx
+++ b/chart2/source/tools/ChartDebugTrace.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartDebugTrace.cxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ChartModelHelper.cxx b/chart2/source/tools/ChartModelHelper.cxx
index 2d6ce7cbfd9d..ed8c36e08c8d 100644
--- a/chart2/source/tools/ChartModelHelper.cxx
+++ b/chart2/source/tools/ChartModelHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartModelHelper.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,7 +32,6 @@
#include "DiagramHelper.hxx"
#include "DataSourceHelper.hxx"
#include "ControllerLockGuard.hxx"
-#include "UndoManager.hxx"
#include "RangeHighlighter.hxx"
#include "InternalDataProvider.hxx"
@@ -59,12 +55,6 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
//static
-uno::Reference< chart2::XUndoManager > ChartModelHelper::createUndoManager()
-{
- return new UndoManager();
-}
-
-//static
uno::Reference< chart2::data::XRangeHighlighter > ChartModelHelper::createRangeHighlighter(
const uno::Reference< view::XSelectionSupplier > & xSelectionSupplier )
{
@@ -72,23 +62,10 @@ uno::Reference< chart2::data::XRangeHighlighter > ChartModelHelper::createRangeH
}
//static
-uno::Reference< chart2::data::XDataProvider > ChartModelHelper::createInternalDataProvider()
-{
- return new InternalDataProvider();
-}
-
-//static
-uno::Reference< chart2::data::XDataProvider > ChartModelHelper::createInternalDataProvider(
- const uno::Reference< ::com::sun::star::chart::XChartDataArray >& xDataToCopy )
-{
- return new InternalDataProvider( xDataToCopy );
-}
-
-//static
uno::Reference< chart2::data::XDataProvider > ChartModelHelper::createInternalDataProvider(
- const uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc )
+ const uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc, bool bConnectToModel )
{
- return new InternalDataProvider( xChartDoc );
+ return new InternalDataProvider( xChartDoc, bConnectToModel );
}
//static
@@ -115,6 +92,20 @@ uno::Reference< XDiagram > ChartModelHelper::findDiagram( const uno::Reference<
return NULL;
}
+//static
+uno::Reference< XCoordinateSystem > ChartModelHelper::getFirstCoordinateSystem( const uno::Reference< frame::XModel >& xModel )
+{
+ uno::Reference< XCoordinateSystem > XCooSys;
+ uno::Reference< XCoordinateSystemContainer > xCooSysCnt( ChartModelHelper::findDiagram( xModel ), uno::UNO_QUERY );
+ if( xCooSysCnt.is() )
+ {
+ uno::Sequence< uno::Reference< XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems() );
+ if( aCooSysSeq.getLength() )
+ XCooSys = aCooSysSeq[0];
+ }
+ return XCooSys;
+}
+
// static
::std::vector< uno::Reference< XDataSeries > > ChartModelHelper::getDataSeries(
const uno::Reference< XChartDocument > & xChartDoc )
diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx
index 243e30093ff3..9e0b22ba75ac 100644
--- a/chart2/source/tools/ChartTypeHelper.cxx
+++ b/chart2/source/tools/ChartTypeHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartTypeHelper.cxx,v $
- * $Revision: 1.22 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ChartViewHelper.cxx b/chart2/source/tools/ChartViewHelper.cxx
index d5423bcc78f5..55fbd368426a 100644
--- a/chart2/source/tools/ChartViewHelper.cxx
+++ b/chart2/source/tools/ChartViewHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartViewHelper.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ColorPerPointHelper.cxx b/chart2/source/tools/ColorPerPointHelper.cxx
index d0afc11128c6..762cb436a9a7 100644
--- a/chart2/source/tools/ColorPerPointHelper.cxx
+++ b/chart2/source/tools/ColorPerPointHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ColorPerPointHelper.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx
index 9452763153a5..e9d90248ce84 100644
--- a/chart2/source/tools/CommonConverters.cxx
+++ b/chart2/source/tools/CommonConverters.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CommonConverters.cxx,v $
- * $Revision: 1.12.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx
index 648aca20bc77..fb7106d87096 100644
--- a/chart2/source/tools/ConfigColorScheme.cxx
+++ b/chart2/source/tools/ConfigColorScheme.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ConfigColorScheme.cxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ControllerLockGuard.cxx b/chart2/source/tools/ControllerLockGuard.cxx
index e76d0c322ed0..4ef430c5e483 100644
--- a/chart2/source/tools/ControllerLockGuard.cxx
+++ b/chart2/source/tools/ControllerLockGuard.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ControllerLockGuard.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index 7203f9ad6e63..538f2966105f 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSeriesHelper.cxx,v $
- * $Revision: 1.11.24.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/DataSource.cxx b/chart2/source/tools/DataSource.cxx
index 5814de4724fa..edbf4dfacfeb 100644
--- a/chart2/source/tools/DataSource.cxx
+++ b/chart2/source/tools/DataSource.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSource.cxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index 37c3a609ac9f..0cc6ef4a4315 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataSourceHelper.cxx,v $
- * $Revision: 1.6.16.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -301,18 +298,13 @@ uno::Sequence< ::rtl::OUString > DataSourceHelper::getUsedDataRanges( const uno:
}
uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
- const uno::Reference< chart2::XChartDocument >& xChartDoc,
- bool bIncludeUnusedData /* = false */ )
+ const uno::Reference< chart2::XChartDocument >& xChartDoc )
{
- if( bIncludeUnusedData )
- return getUsedData( uno::Reference< frame::XModel >( xChartDoc, uno::UNO_QUERY ), bIncludeUnusedData );
- else
- return pressUsedDataIntoRectangularFormat( xChartDoc );
+ return pressUsedDataIntoRectangularFormat( xChartDoc );
}
uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
- const uno::Reference< frame::XModel >& xChartModel,
- bool bIncludeUnusedData /* = false */ )
+ const uno::Reference< frame::XModel >& xChartModel )
{
::std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aResult;
@@ -333,14 +325,6 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
::std::back_inserter( aResult ));
}
- if( bIncludeUnusedData && xDiagram.is())
- {
- uno::Sequence< uno::Reference< data::XLabeledDataSequence > > aUnusedData( xDiagram->getUnusedData());
- ::std::copy( aUnusedData.getConstArray(),
- aUnusedData.getConstArray() + aUnusedData.getLength(),
- ::std::back_inserter( aResult ));
- }
-
return uno::Reference< chart2::data::XDataSource >(
new DataSource( ContainerHelper::ContainerToSequence( aResult )));
}
@@ -352,8 +336,7 @@ bool DataSourceHelper::detectRangeSegmentation(
, ::com::sun::star::uno::Sequence< sal_Int32 >& rSequenceMapping
, bool& rOutUseColumns
, bool& rOutFirstCellAsLabel
- , bool& rOutHasCategories
- , bool bIncludeUnusedData /* = false */)
+ , bool& rOutHasCategories )
{
bool bSomethingDetected = false;
@@ -364,9 +347,6 @@ bool DataSourceHelper::detectRangeSegmentation(
if( !xDataProvider.is() )
return bSomethingDetected;
- OSL_ASSERT( !bIncludeUnusedData ); //bIncludeUnusedData is not supported currently
- (void)(bIncludeUnusedData); // avoid warning in non-debug build
-
try
{
DataSourceHelper::readArguments(
@@ -534,6 +514,19 @@ Sequence< OUString > DataSourceHelper::getRangesFromLabeledDataSequence(
return aResult;
}
+OUString DataSourceHelper::getRangeFromValues(
+ const Reference< data::XLabeledDataSequence > & xLSeq )
+{
+ OUString aResult;
+ if( xLSeq.is() )
+ {
+ Reference< data::XDataSequence > xValues( xLSeq->getValues() );
+ if( xValues.is() )
+ aResult = xValues->getSourceRangeRepresentation();
+ }
+ return aResult;
+}
+
Sequence< OUString > DataSourceHelper::getRangesFromDataSource( const Reference< data::XDataSource > & xSource )
{
::std::vector< OUString > aResult;
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index fbc8042af27b..a8da65e5133d 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DiagramHelper.cxx,v $
- * $Revision: 1.18.22.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,7 +35,9 @@
#include "AxisHelper.hxx"
#include "ContainerHelper.hxx"
#include "ChartTypeHelper.hxx"
+#include "ChartModelHelper.hxx"
#include "CommonConverters.hxx"
+#include "ExplicitCategoriesProvider.hxx"
#include "servicenames_charttypes.hxx"
#include <com/sun/star/chart/MissingValueTreatment.hpp>
@@ -958,8 +957,7 @@ Reference< data::XLabeledDataSequence >
return xResult;
}
-//static
-void DiagramHelper::generateAutomaticCategoriesFromChartType(
+void lcl_generateAutomaticCategoriesFromChartType(
Sequence< rtl::OUString >& rRet,
const Reference< XChartType >& xChartType )
{
@@ -989,64 +987,35 @@ void DiagramHelper::generateAutomaticCategoriesFromChartType(
}
}
-//static
-Sequence< rtl::OUString > DiagramHelper::generateAutomaticCategories(
- const Reference< XChartDocument >& xChartDoc )
+Sequence< rtl::OUString > DiagramHelper::generateAutomaticCategoriesFromCooSys( const Reference< XCoordinateSystem > & xCooSys )
{
Sequence< rtl::OUString > aRet;
- if(xChartDoc.is())
+
+ Reference< XChartTypeContainer > xTypeCntr( xCooSys, uno::UNO_QUERY );
+ if( xTypeCntr.is() )
{
- uno::Reference< chart2::XDiagram > xDia( xChartDoc->getFirstDiagram() );
- if(xDia.is())
+ Sequence< Reference< XChartType > > aChartTypes( xTypeCntr->getChartTypes() );
+ for( sal_Int32 nN=0; nN<aChartTypes.getLength(); nN++ )
{
- Reference< data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDia ) );
- if( xCategories.is() )
- aRet = DataSequenceToStringSequence(xCategories->getValues());
- if( !aRet.getLength() )
- {
- /*
- //unused ranges are very problematic as they bear the risk to damage the rectangular structure completly
- if( bUseUnusedDataAlso )
- {
- Sequence< Reference< chart2::data::XLabeledDataSequence > > aUnusedSequences( xDia->getUnusedData() );
- ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aUnusedCategoryVector(
- DataSeriesHelper::getAllDataSequencesByRole( aUnusedSequences, C2U("categories") ) );
- if( aUnusedCategoryVector.size() && aUnusedCategoryVector[0].is() )
- aRet = DataSequenceToStringSequence(aUnusedCategoryVector[0]->getValues());
- }
- */
- if( !aRet.getLength() )
- {
- Reference< XCoordinateSystemContainer > xCooSysCnt( xDia, uno::UNO_QUERY );
- if( xCooSysCnt.is() )
- {
- Sequence< Reference< XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems() );
- if( aCooSysSeq.getLength() )
- aRet = DiagramHelper::generateAutomaticCategories( aCooSysSeq[0] );
- }
- }
- }
+ lcl_generateAutomaticCategoriesFromChartType( aRet, aChartTypes[nN] );
+ if( aRet.getLength() )
+ return aRet;
}
}
return aRet;
}
//static
-Sequence< rtl::OUString > DiagramHelper::generateAutomaticCategories(
- const Reference< XCoordinateSystem > & xCooSys )
+Sequence< rtl::OUString > DiagramHelper::getExplicitSimpleCategories(
+ const Reference< XChartDocument >& xChartDoc )
{
Sequence< rtl::OUString > aRet;
-
- Reference< XChartTypeContainer > xTypeCntr( xCooSys, uno::UNO_QUERY );
- if( xTypeCntr.is() )
+ uno::Reference< frame::XModel > xChartModel( xChartDoc, uno::UNO_QUERY );
+ if(xChartModel.is())
{
- Sequence< Reference< XChartType > > aChartTypes( xTypeCntr->getChartTypes() );
- for( sal_Int32 nN=0; nN<aChartTypes.getLength(); nN++ )
- {
- DiagramHelper::generateAutomaticCategoriesFromChartType( aRet, aChartTypes[nN] );
- if( aRet.getLength() )
- return aRet;
- }
+ uno::Reference< chart2::XCoordinateSystem > xCooSys( ChartModelHelper::getFirstCoordinateSystem( xChartModel ) );
+ ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSys, xChartModel );
+ aRet = aExplicitCategoriesProvider.getSimpleCategories();
}
return aRet;
}
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index a1b8b7c02106..7468d8bb7896 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ErrorBar.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index 0bf6e8bd9e2d..bd1c1bb79813 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ExplicitCategoriesProvider.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,6 +31,10 @@
#include "ExplicitCategoriesProvider.hxx"
#include "DiagramHelper.hxx"
#include "CommonConverters.hxx"
+#include "DataSourceHelper.hxx"
+#include "ChartModelHelper.hxx"
+#include "ContainerHelper.hxx"
+#include "macros.hxx"
//.............................................................................
namespace chart
@@ -44,18 +45,88 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-using rtl::OUString;
+using ::rtl::OUString;
+using ::std::vector;
+
-ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2::XCoordinateSystem >& xCooSysModel )
+ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2::XCoordinateSystem >& xCooSysModel
+ , const uno::Reference< frame::XModel >& xChartModel )
: m_bDirty(true)
, m_xCooSysModel( xCooSysModel )
- , m_xCategories()
+ , m_xOriginalCategories()
{
- if( xCooSysModel.is() )
+ try
+ {
+ if( xCooSysModel.is() )
+ {
+ uno::Reference< XAxis > xAxis( xCooSysModel->getAxisByDimension(0,0) );
+ if( xAxis.is() )
+ m_xOriginalCategories = xAxis->getScaleData().Categories;
+ }
+
+ if( m_xOriginalCategories.is() )
+ {
+ Reference< chart2::XChartDocument > xChartDoc( xChartModel, uno::UNO_QUERY );
+ if( xChartDoc.is() )
+ {
+ uno::Reference< data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() );
+
+ if( xDataProvider.is() )
+ {
+ OUString aCatgoriesRange( DataSourceHelper::getRangeFromValues( m_xOriginalCategories ) );
+ const bool bFirstCellAsLabel = false;
+ const bool bHasCategories = false;
+ const uno::Sequence< sal_Int32 > aSequenceMapping;
+
+ uno::Reference< data::XDataSource > xColumnCategoriesSource( xDataProvider->createDataSource(
+ DataSourceHelper::createArguments( aCatgoriesRange, aSequenceMapping, true /*bUseColumns*/
+ , bFirstCellAsLabel, bHasCategories ) ) );
+
+ uno::Reference< data::XDataSource > xRowCategoriesSource( xDataProvider->createDataSource(
+ DataSourceHelper::createArguments( aCatgoriesRange, aSequenceMapping, false /*bUseColumns*/
+ , bFirstCellAsLabel, bHasCategories ) ) );
+
+ if( xColumnCategoriesSource.is() && xRowCategoriesSource.is() )
+ {
+ Sequence< Reference< data::XLabeledDataSequence> > aColumns = xColumnCategoriesSource->getDataSequences();
+ Sequence< Reference< data::XLabeledDataSequence> > aRows = xRowCategoriesSource->getDataSequences();
+
+ sal_Int32 nColumnCount = aColumns.getLength();
+ sal_Int32 nRowCount = aRows.getLength();
+ if( nColumnCount>1 && nRowCount>1 )
+ {
+ //we have complex categories
+ //->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( xChartModel ) );
+ if( !aSeries.empty() )
+ {
+ uno::Reference< data::XDataSource > xSeriesSource( aSeries.front(), uno::UNO_QUERY );
+ ::rtl::OUString aStringDummy;
+ bool bDummy;
+ uno::Sequence< sal_Int32 > aSeqDummy;
+ DataSourceHelper::readArguments( xDataProvider->detectArguments( xSeriesSource),
+ aStringDummy, aSeqDummy, bSeriesUsesColumns, bDummy, bDummy );
+ }
+ if( bSeriesUsesColumns )
+ m_aSplitCategoriesList=aColumns;
+ else
+ m_aSplitCategoriesList=aRows;
+ }
+ }
+ }
+ }
+ if( !m_aSplitCategoriesList.getLength() )
+ {
+ m_aSplitCategoriesList.realloc(1);
+ m_aSplitCategoriesList[0]=m_xOriginalCategories;
+ }
+ }
+ }
+ catch( const uno::Exception & ex )
{
- uno::Reference< XAxis > xAxis( xCooSysModel->getAxisByDimension(0,0) );
- if( xAxis.is() )
- m_xCategories = xAxis->getScaleData().Categories;
+ ASSERT_EXCEPTION( ex );
}
}
@@ -63,34 +134,285 @@ ExplicitCategoriesProvider::~ExplicitCategoriesProvider()
{
}
-//XTextualDataSequence
-Sequence< ::rtl::OUString > SAL_CALL ExplicitCategoriesProvider::getTextualData() throw( uno::RuntimeException)
+const Sequence< Reference< data::XLabeledDataSequence> >& ExplicitCategoriesProvider::getSplitCategoriesList()
+{
+ return m_aSplitCategoriesList;
+}
+
+bool ExplicitCategoriesProvider::hasComplexCategories() const
+{
+ return m_aSplitCategoriesList.getLength() > 1;
+}
+
+sal_Int32 ExplicitCategoriesProvider::getCategoryLevelCount() const
+{
+ sal_Int32 nCount = m_aSplitCategoriesList.getLength();
+ if(!nCount)
+ nCount = 1;
+ return nCount;
+}
+
+std::vector<sal_Int32> lcl_getLimitingBorders( const std::vector< ComplexCategory >& rComplexCategories )
+{
+ std::vector<sal_Int32> aLimitingBorders;
+ std::vector< ComplexCategory >::const_iterator aIt( rComplexCategories.begin() );
+ std::vector< ComplexCategory >::const_iterator aEnd( rComplexCategories.end() );
+ sal_Int32 nBorderIndex = 0; /*border below the index*/
+ for( ; aIt != aEnd; ++aIt )
+ {
+ ComplexCategory aComplexCategory(*aIt);
+ nBorderIndex += aComplexCategory.Count;
+ aLimitingBorders.push_back(nBorderIndex);
+ }
+ return aLimitingBorders;
+}
+
+uno::Sequence< rtl::OUString > lcl_DataToStringSequence( const uno::Reference< data::XDataSequence >& xDataSequence )
+{
+ uno::Sequence< rtl::OUString > aStrings;
+
+ OSL_ASSERT( xDataSequence.is());
+ if( !xDataSequence.is() )
+ return aStrings;
+
+
+ uno::Reference< data::XTextualDataSequence > xTextualDataSequence( xDataSequence, uno::UNO_QUERY );
+ if( xTextualDataSequence.is() )
+ {
+ aStrings = xTextualDataSequence->getTextualData();
+ }
+ else
+ {
+ uno::Sequence< uno::Any > aValues = xDataSequence->getData();
+ aStrings.realloc(aValues.getLength());
+
+ for(sal_Int32 nN=aValues.getLength();nN--;)
+ aValues[nN] >>= aStrings[nN];
+ }
+
+ return aStrings;
+}
+
+SplitCategoriesProvider::~SplitCategoriesProvider()
+{
+}
+
+class SplitCategoriesProvider_ForLabeledDataSequences : public SplitCategoriesProvider
+{
+public:
+
+ explicit SplitCategoriesProvider_ForLabeledDataSequences( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::data::XLabeledDataSequence> >& rSplitCategoriesList )
+ : m_rSplitCategoriesList( rSplitCategoriesList )
+ {}
+ virtual ~SplitCategoriesProvider_ForLabeledDataSequences()
+ {}
+
+ virtual sal_Int32 getLevelCount() const;
+ virtual uno::Sequence< rtl::OUString > getStringsForLevel( sal_Int32 nIndex ) const;
+
+private:
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::data::XLabeledDataSequence> >& m_rSplitCategoriesList;
+};
+
+sal_Int32 SplitCategoriesProvider_ForLabeledDataSequences::getLevelCount() const
+{
+ return m_rSplitCategoriesList.getLength();
+}
+uno::Sequence< rtl::OUString > SplitCategoriesProvider_ForLabeledDataSequences::getStringsForLevel( sal_Int32 nLevel ) const
+{
+ uno::Sequence< rtl::OUString > aRet;
+ Reference< data::XLabeledDataSequence > xLabeledDataSequence( m_rSplitCategoriesList[nLevel] );
+ if( xLabeledDataSequence.is() )
+ aRet = lcl_DataToStringSequence( xLabeledDataSequence->getValues() );
+ return aRet;
+}
+
+std::vector< ComplexCategory > lcl_DataSequenceToComplexCategoryVector(
+ const uno::Sequence< rtl::OUString >& rStrings
+ , const std::vector<sal_Int32>& rLimitingBorders, bool bCreateSingleCategories )
+{
+ std::vector< ComplexCategory > aResult;
+
+ sal_Int32 nMaxCount = rStrings.getLength();
+ OUString aPrevious;
+ sal_Int32 nCurrentCount=0;
+ for( sal_Int32 nN=0; nN<nMaxCount; nN++ )
+ {
+ OUString aCurrent = rStrings[nN];
+ if( bCreateSingleCategories || ::std::find( rLimitingBorders.begin(), rLimitingBorders.end(), nN ) != rLimitingBorders.end() )
+ {
+ aResult.push_back( ComplexCategory(aPrevious,nCurrentCount) );
+ nCurrentCount=1;
+ aPrevious = aCurrent;
+ }
+ else
+ {
+ if( aCurrent.getLength() && aPrevious != aCurrent )
+ {
+ aResult.push_back( ComplexCategory(aPrevious,nCurrentCount) );
+ nCurrentCount=1;
+ aPrevious = aCurrent;
+ }
+ else
+ nCurrentCount++;
+ }
+ }
+ if( nCurrentCount )
+ aResult.push_back( ComplexCategory(aPrevious,nCurrentCount) );
+
+ return aResult;
+}
+
+sal_Int32 lcl_getCategoryCount( std::vector< ComplexCategory >& rComplexCategories )
+{
+ sal_Int32 nCount = 0;
+ std::vector< ComplexCategory >::iterator aIt( rComplexCategories.begin() );
+ std::vector< ComplexCategory >::const_iterator aEnd( rComplexCategories.end() );
+ for( ; aIt != aEnd; ++aIt )
+ nCount+=aIt->Count;
+ return nCount;
+}
+
+Sequence< OUString > lcl_getExplicitSimpleCategories(
+ const SplitCategoriesProvider& rSplitCategoriesProvider,
+ ::std::vector< ::std::vector< ComplexCategory > >& rComplexCats )
+{
+ Sequence< OUString > aRet;
+
+ rComplexCats.clear();
+ sal_Int32 nLCount = rSplitCategoriesProvider.getLevelCount();
+ for( sal_Int32 nL = 0; nL < nLCount; nL++ )
+ {
+ std::vector<sal_Int32> aLimitingBorders;
+ if(nL>0)
+ aLimitingBorders = lcl_getLimitingBorders( rComplexCats.back() );
+ rComplexCats.push_back( lcl_DataSequenceToComplexCategoryVector(
+ rSplitCategoriesProvider.getStringsForLevel(nL), aLimitingBorders, nL==(nLCount-1) ) );
+ }
+
+ std::vector< std::vector< ComplexCategory > >::iterator aOuterIt( rComplexCats.begin() );
+ std::vector< std::vector< ComplexCategory > >::const_iterator aOuterEnd( rComplexCats.end() );
+
+ //ensure that the category count is the same on each level
+ sal_Int32 nMaxCategoryCount = 0;
+ {
+ for( aOuterIt=rComplexCats.begin(); aOuterIt != aOuterEnd; ++aOuterIt )
+ {
+ sal_Int32 nCurrentCount = lcl_getCategoryCount( *aOuterIt );
+ nMaxCategoryCount = std::max( nCurrentCount, nMaxCategoryCount );
+ }
+ for( aOuterIt=rComplexCats.begin(); aOuterIt != aOuterEnd; ++aOuterIt )
+ {
+ sal_Int32 nCurrentCount = lcl_getCategoryCount( *aOuterIt );
+ if( nCurrentCount< nMaxCategoryCount )
+ {
+ ComplexCategory& rComplexCategory = aOuterIt->back();
+ rComplexCategory.Count += (nMaxCategoryCount-nCurrentCount);
+ }
+ }
+ }
+
+ //create a list with an element for every index
+ std::vector< std::vector< ComplexCategory > > aComplexCatsPerIndex;
+ for( aOuterIt=rComplexCats.begin() ; aOuterIt != aOuterEnd; ++aOuterIt )
+ {
+ std::vector< ComplexCategory > aSingleLevel;
+ std::vector< ComplexCategory >::iterator aIt( aOuterIt->begin() );
+ std::vector< ComplexCategory >::const_iterator aEnd( aOuterIt->end() );
+ for( ; aIt != aEnd; ++aIt )
+ {
+ ComplexCategory aComplexCategory( *aIt );
+ sal_Int32 nCount = aComplexCategory.Count;
+ while( nCount-- )
+ aSingleLevel.push_back(aComplexCategory);
+ }
+ aComplexCatsPerIndex.push_back( aSingleLevel );
+ }
+
+ if(nMaxCategoryCount)
+ {
+ aRet.realloc(nMaxCategoryCount);
+ aOuterEnd = aComplexCatsPerIndex.end();
+ OUString aSpace(C2U(" "));
+ for(sal_Int32 nN=0; nN<nMaxCategoryCount; nN++)
+ {
+ OUString aText;
+ for( aOuterIt=aComplexCatsPerIndex.begin() ; aOuterIt != aOuterEnd; ++aOuterIt )
+ {
+ OUString aAddText = (*aOuterIt)[nN].Text;
+ if( aAddText.getLength() )
+ {
+ if(aText.getLength())
+ aText += aSpace;
+ aText += aAddText;
+ }
+ }
+ aRet[nN]=aText;
+ }
+ }
+ return aRet;
+}
+
+//static
+Sequence< OUString > ExplicitCategoriesProvider::getExplicitSimpleCategories(
+ const SplitCategoriesProvider& rSplitCategoriesProvider )
+{
+ vector< vector< ComplexCategory > > aComplexCats;
+ return lcl_getExplicitSimpleCategories( rSplitCategoriesProvider, aComplexCats );
+}
+
+void ExplicitCategoriesProvider::init()
{
if( m_bDirty )
{
- if( m_xCategories.is() )
- m_aExplicitCategories = DataSequenceToStringSequence(m_xCategories->getValues());
+ m_aExplicitCategories.realloc(0);
+ m_aComplexCats.clear();//not one per index
+
+ if( m_xOriginalCategories.is() )
+ {
+ if( !hasComplexCategories() )
+ m_aExplicitCategories = DataSequenceToStringSequence(m_xOriginalCategories->getValues());
+ else
+ m_aExplicitCategories = lcl_getExplicitSimpleCategories(
+ SplitCategoriesProvider_ForLabeledDataSequences( m_aSplitCategoriesList ), m_aComplexCats );
+ }
if(!m_aExplicitCategories.getLength())
- m_aExplicitCategories = DiagramHelper::generateAutomaticCategories( uno::Reference< chart2::XCoordinateSystem >( m_xCooSysModel.get(), uno::UNO_QUERY ) );
+ m_aExplicitCategories = DiagramHelper::generateAutomaticCategoriesFromCooSys( m_xCooSysModel );
m_bDirty = false;
}
+}
+
+
+Sequence< ::rtl::OUString > ExplicitCategoriesProvider::getSimpleCategories()
+{
+ init();
return m_aExplicitCategories;
}
+std::vector< ComplexCategory > ExplicitCategoriesProvider::getCategoriesByLevel( sal_Int32 nLevel )
+{
+ std::vector< ComplexCategory > aRet;
+ init();
+ sal_Int32 nMaxIndex = m_aComplexCats.size()-1;
+ if( nLevel >= 0 && nLevel <= nMaxIndex )
+ aRet = m_aComplexCats[nMaxIndex-nLevel];
+ return aRet;
+}
+
// static
OUString ExplicitCategoriesProvider::getCategoryByIndex(
- const Reference< XCoordinateSystem >& xCooSysModel,
- sal_Int32 nIndex )
+ const Reference< XCoordinateSystem >& xCooSysModel
+ , const uno::Reference< frame::XModel >& xChartModel
+ , sal_Int32 nIndex )
{
if( xCooSysModel.is())
{
- Reference< XTextualDataSequence > xTemp( new ExplicitCategoriesProvider( xCooSysModel ));
- if( xTemp.is())
- {
- Sequence< OUString > aCategories( xTemp->getTextualData());
- if( nIndex < aCategories.getLength())
- return aCategories[ nIndex ];
- }
+ ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSysModel, xChartModel );
+ Sequence< OUString > aCategories( aExplicitCategoriesProvider.getSimpleCategories());
+ if( nIndex < aCategories.getLength())
+ return aCategories[ nIndex ];
}
return OUString();
}
diff --git a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
index c769043d7213..d7bb86174323 100644
--- a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ExponentialRegressionCurveCalculator.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/FillProperties.cxx b/chart2/source/tools/FillProperties.cxx
index eb4aec48e6e6..ee23727c321b 100644
--- a/chart2/source/tools/FillProperties.cxx
+++ b/chart2/source/tools/FillProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: FillProperties.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/FormattedStringHelper.cxx b/chart2/source/tools/FormattedStringHelper.cxx
index b8ac6b59c078..c13c87d45931 100644
--- a/chart2/source/tools/FormattedStringHelper.cxx
+++ b/chart2/source/tools/FormattedStringHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: FormattedStringHelper.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ImplOPropertySet.cxx b/chart2/source/tools/ImplOPropertySet.cxx
index ad225b42d5c5..faf1defd20ac 100644
--- a/chart2/source/tools/ImplOPropertySet.cxx
+++ b/chart2/source/tools/ImplOPropertySet.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ImplOPropertySet.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ImplOPropertySet.hxx b/chart2/source/tools/ImplOPropertySet.hxx
index ba57282f3bed..505ab598d7da 100644
--- a/chart2/source/tools/ImplOPropertySet.hxx
+++ b/chart2/source/tools/ImplOPropertySet.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ImplOPropertySet.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx
new file mode 100755
index 000000000000..65fc97a04b38
--- /dev/null
+++ b/chart2/source/tools/InternalData.cxx
@@ -0,0 +1,530 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "InternalData.hxx"
+#include "ResId.hxx"
+#include "Strings.hrc"
+#include "macros.hxx"
+
+#include <rtl/math.hxx>
+
+using ::com::sun::star::uno::Sequence;
+using ::rtl::OUString;
+
+using namespace ::std;
+
+namespace chart
+{
+
+// ----------------------------------------
+namespace
+{
+struct lcl_NumberedStringGenerator
+{
+ lcl_NumberedStringGenerator( const OUString & rStub, const OUString & rWildcard ) :
+ m_aStub( rStub ),
+ m_nCounter( 0 ),
+ m_nStubStartIndex( rStub.indexOf( rWildcard )),
+ m_nWildcardLength( rWildcard.getLength())
+ {
+ }
+ vector< OUString > operator()()
+ {
+ vector< OUString > aRet(1);
+ aRet[0] = m_aStub.replaceAt( m_nStubStartIndex, m_nWildcardLength, OUString::valueOf( ++m_nCounter ));
+ return aRet;
+ }
+private:
+ OUString m_aStub;
+ sal_Int32 m_nCounter;
+ const sal_Int32 m_nStubStartIndex;
+ const sal_Int32 m_nWildcardLength;
+};
+
+template< typename T >
+ Sequence< T > lcl_ValarrayToSequence( const ::std::valarray< T > & rValarray )
+{
+ // is there a more elegant way of conversion?
+ Sequence< T > aResult( rValarray.size());
+ for( size_t i = 0; i < rValarray.size(); ++i )
+ aResult[i] = rValarray[i];
+ return aResult;
+}
+
+} // anonymous namespace
+// ----------------------------------------
+
+InternalData::InternalData()
+ : m_nColumnCount( 0 )
+ , m_nRowCount( 0 )
+ , m_aRowLabels( 0 )
+ , m_aColumnLabels( 0 )
+{}
+
+void InternalData::createDefaultData()
+{
+ const sal_Int32 nRowCount = 4;
+ const sal_Int32 nColumnCount = 3;
+
+ m_nRowCount = nRowCount;
+ m_nColumnCount = nColumnCount;
+ const sal_Int32 nSize = nColumnCount * nRowCount;
+ // @todo: localize this!
+ const OUString aRowName( ::chart::SchResId::getResString( STR_ROW_LABEL ));
+ const OUString aColName( ::chart::SchResId::getResString( STR_COLUMN_LABEL ));
+
+ const double fDefaultData[ nSize ] =
+ { 9.10, 3.20, 4.54,
+ 2.40, 8.80, 9.65,
+ 3.10, 1.50, 3.70,
+ 4.30, 9.02, 6.20 };
+
+ m_aData.resize( nSize );
+ for( sal_Int32 i=0; i<nSize; ++i )
+ m_aData[i] = fDefaultData[i];
+
+ m_aRowLabels.clear();
+ m_aRowLabels.reserve( m_nRowCount );
+ generate_n( back_inserter( m_aRowLabels ), m_nRowCount,
+ lcl_NumberedStringGenerator( aRowName, C2U("%ROWNUMBER") ));
+
+ m_aColumnLabels.clear();
+ m_aColumnLabels.reserve( m_nColumnCount );
+ generate_n( back_inserter( m_aColumnLabels ), m_nColumnCount,
+ lcl_NumberedStringGenerator( aColName, C2U("%COLUMNNUMBER") ));
+}
+
+void InternalData::setData( const Sequence< Sequence< double > >& rDataInRows )
+{
+ m_nRowCount = rDataInRows.getLength();
+ m_nColumnCount = (m_nRowCount ? rDataInRows[0].getLength() : 0);
+
+ if( m_aRowLabels.size() != static_cast< sal_uInt32 >( m_nRowCount ))
+ m_aRowLabels.resize( m_nRowCount );
+ if( m_aColumnLabels.size() != static_cast< sal_uInt32 >( m_nColumnCount ))
+ m_aColumnLabels.resize( m_nColumnCount );
+
+ m_aData.resize( m_nRowCount * m_nColumnCount );
+ double fNan;
+ ::rtl::math::setNan( & fNan );
+ // set all values to Nan
+ m_aData = fNan;
+
+ for( sal_Int32 nRow=0; nRow<m_nRowCount; ++nRow )
+ {
+ int nDataIdx = nRow*m_nColumnCount;
+ const sal_Int32 nMax = ::std::min( rDataInRows[nRow].getLength(), m_nColumnCount );
+ for( sal_Int32 nCol=0; nCol < nMax; ++nCol )
+ {
+ m_aData[nDataIdx] = rDataInRows[nRow][nCol];
+ nDataIdx += 1;
+ }
+ }
+}
+
+Sequence< Sequence< double > > InternalData::getData() const
+{
+ Sequence< Sequence< double > > aResult( m_nRowCount );
+
+ for( sal_Int32 i=0; i<m_nRowCount; ++i )
+ aResult[i] = lcl_ValarrayToSequence< tDataType::value_type >(
+ m_aData[ ::std::slice( i*m_nColumnCount, m_nColumnCount, 1 ) ] );
+
+ return aResult;
+}
+
+Sequence< double > InternalData::getColumnValues( sal_Int32 nColumnIndex ) const
+{
+ if( nColumnIndex >= 0 && nColumnIndex < m_nColumnCount )
+ return lcl_ValarrayToSequence< tDataType::value_type >(
+ m_aData[ ::std::slice( nColumnIndex, m_nRowCount, m_nColumnCount ) ] );
+ return Sequence< double >();
+}
+Sequence< double > InternalData::getRowValues( sal_Int32 nRowIndex ) const
+{
+ if( nRowIndex >= 0 && nRowIndex < m_nRowCount )
+ return lcl_ValarrayToSequence< tDataType::value_type >(
+ m_aData[ ::std::slice( nRowIndex*m_nColumnCount, m_nColumnCount, 1 ) ] );
+ return Sequence< double >();
+}
+
+void InternalData::setColumnValues( sal_Int32 nColumnIndex, const 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 )
+ aSlice[i] = rNewData[i];
+ m_aData[ ::std::slice( nColumnIndex, m_nRowCount, m_nColumnCount ) ] = aSlice;
+}
+
+void InternalData::setRowValues( sal_Int32 nRowIndex, const 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 )
+ aSlice[i] = rNewData[i];
+ m_aData[ ::std::slice( nRowIndex*m_nColumnCount, m_nColumnCount, 1 ) ]= aSlice;
+}
+
+void InternalData::setComplexColumnLabel( sal_Int32 nColumnIndex, const vector< OUString >& rComplexLabel )
+{
+ if( nColumnIndex < 0 )
+ return;
+ if( nColumnIndex >= static_cast< sal_Int32 >( m_aColumnLabels.size() ) )
+ {
+ m_aColumnLabels.resize(nColumnIndex+1);
+ enlargeData( nColumnIndex+1, 0 );
+ }
+
+ m_aColumnLabels[nColumnIndex]=rComplexLabel;
+}
+void InternalData::setComplexRowLabel( sal_Int32 nRowIndex, const vector< OUString >& rComplexLabel )
+{
+ if( nRowIndex < 0 )
+ return;
+ if( nRowIndex >= static_cast< sal_Int32 >( m_aRowLabels.size() ) )
+ {
+ m_aRowLabels.resize(nRowIndex+1);
+ enlargeData( 0, nRowIndex+1 );
+ }
+
+ m_aRowLabels[nRowIndex] = rComplexLabel;
+}
+
+vector< OUString > InternalData::getComplexColumnLabel( sal_Int32 nColumnIndex ) const
+{
+ if( nColumnIndex < static_cast< sal_Int32 >( m_aColumnLabels.size() ) )
+ return m_aColumnLabels[nColumnIndex];
+ else
+ return vector< OUString >();
+}
+vector< OUString > InternalData::getComplexRowLabel( sal_Int32 nRowIndex ) const
+{
+ if( nRowIndex < static_cast< sal_Int32 >( m_aRowLabels.size() ) )
+ return m_aRowLabels[nRowIndex];
+ else
+ return vector< OUString >();
+}
+
+void InternalData::swapRowWithNext( sal_Int32 nRowIndex )
+{
+ if( nRowIndex < m_nRowCount - 1 )
+ {
+ const sal_Int32 nMax = m_nColumnCount;
+ for( sal_Int32 nColIdx=0; nColIdx<nMax; ++nColIdx )
+ {
+ 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;
+ }
+
+ vector< OUString > aTemp( m_aRowLabels[nRowIndex] );
+ m_aRowLabels[nRowIndex] = m_aRowLabels[nRowIndex + 1];
+ m_aRowLabels[nRowIndex + 1] = aTemp;
+ }
+}
+
+void InternalData::swapColumnWithNext( sal_Int32 nColumnIndex )
+{
+ if( nColumnIndex < m_nColumnCount - 1 )
+ {
+ const sal_Int32 nMax = m_nRowCount;
+ for( sal_Int32 nRowIdx=0; nRowIdx<nMax; ++nRowIdx )
+ {
+ 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;
+ }
+
+ vector< OUString > aTemp( m_aColumnLabels[nColumnIndex] );
+ m_aColumnLabels[nColumnIndex] = m_aColumnLabels[nColumnIndex + 1];
+ m_aColumnLabels[nColumnIndex + 1] = aTemp;
+ }
+}
+
+bool InternalData::enlargeData( sal_Int32 nColumnCount, sal_Int32 nRowCount )
+{
+ sal_Int32 nNewColumnCount( ::std::max<sal_Int32>( m_nColumnCount, nColumnCount ) );
+ sal_Int32 nNewRowCount( ::std::max<sal_Int32>( m_nRowCount, nRowCount ) );
+ sal_Int32 nNewSize( nNewColumnCount*nNewRowCount );
+
+ bool bGrow = (nNewSize > m_nColumnCount*m_nRowCount);
+
+ if( bGrow )
+ {
+ double fNan;
+ ::rtl::math::setNan( &fNan );
+ tDataType aNewData( fNan, nNewSize );
+ // copy old data
+ for( int nCol=0; nCol<m_nColumnCount; ++nCol )
+ static_cast< tDataType >(
+ aNewData[ ::std::slice( nCol, m_nRowCount, nNewColumnCount ) ] ) =
+ m_aData[ ::std::slice( nCol, m_nRowCount, m_nColumnCount ) ];
+
+ m_aData.resize( nNewSize );
+ m_aData = aNewData;
+ }
+ m_nColumnCount = nNewColumnCount;
+ m_nRowCount = nNewRowCount;
+ return bGrow;
+}
+
+void InternalData::insertColumn( sal_Int32 nAfterIndex )
+{
+ // note: -1 is allowed, as we insert after the given index
+ OSL_ASSERT( nAfterIndex < m_nColumnCount && nAfterIndex >= -1 );
+ if( nAfterIndex >= m_nColumnCount || nAfterIndex < -1 )
+ return;
+ sal_Int32 nNewColumnCount = m_nColumnCount + 1;
+ sal_Int32 nNewSize( nNewColumnCount * m_nRowCount );
+
+ double fNan;
+ ::rtl::math::setNan( &fNan );
+ tDataType aNewData( fNan, nNewSize );
+
+ // copy old data
+ int nCol=0;
+ for( ; nCol<=nAfterIndex; ++nCol )
+ aNewData[ ::std::slice( nCol, m_nRowCount, nNewColumnCount ) ] =
+ static_cast< tDataType >(
+ m_aData[ ::std::slice( nCol, m_nRowCount, m_nColumnCount ) ] );
+ for( ++nCol; nCol<nNewColumnCount; ++nCol )
+ aNewData[ ::std::slice( nCol, m_nRowCount, nNewColumnCount ) ] =
+ static_cast< tDataType >(
+ m_aData[ ::std::slice( nCol - 1, m_nRowCount, m_nColumnCount ) ] );
+
+ m_nColumnCount = nNewColumnCount;
+ m_aData.resize( nNewSize );
+ m_aData = aNewData;
+
+ // labels
+ if( nAfterIndex < static_cast< sal_Int32 >( m_aColumnLabels.size()))
+ m_aColumnLabels.insert( m_aColumnLabels.begin() + (nAfterIndex + 1), vector< OUString >(1) );
+
+#if OSL_DEBUG_LEVEL > 2
+ traceData();
+#endif
+}
+
+sal_Int32 InternalData::appendColumn()
+{
+ insertColumn( getColumnCount() - 1 );
+ return getColumnCount() - 1;
+}
+
+sal_Int32 InternalData::appendRow()
+{
+ insertRow( getRowCount() - 1 );
+ return getRowCount() - 1;
+}
+
+void InternalData::insertRow( sal_Int32 nAfterIndex )
+{
+ // note: -1 is allowed, as we insert after the given index
+ OSL_ASSERT( nAfterIndex < m_nRowCount && nAfterIndex >= -1 );
+ if( nAfterIndex >= m_nRowCount || nAfterIndex < -1 )
+ return;
+ sal_Int32 nNewRowCount = m_nRowCount + 1;
+ sal_Int32 nNewSize( m_nColumnCount * nNewRowCount );
+
+ double fNan;
+ ::rtl::math::setNan( &fNan );
+ tDataType aNewData( fNan, nNewSize );
+
+ // copy old data
+ sal_Int32 nIndex = nAfterIndex + 1;
+ aNewData[ ::std::slice( 0, nIndex * m_nColumnCount, 1 ) ] =
+ static_cast< tDataType >(
+ m_aData[ ::std::slice( 0, nIndex * m_nColumnCount, 1 ) ] );
+
+ if( nIndex < m_nRowCount )
+ {
+ sal_Int32 nRemainingCount = m_nColumnCount * (m_nRowCount - nIndex);
+ aNewData[ ::std::slice( (nIndex + 1) * m_nColumnCount, nRemainingCount, 1 ) ] =
+ static_cast< tDataType >(
+ m_aData[ ::std::slice( nIndex * m_nColumnCount, nRemainingCount, 1 ) ] );
+ }
+
+ m_nRowCount = nNewRowCount;
+ m_aData.resize( nNewSize );
+ m_aData = aNewData;
+
+ // labels
+ if( nAfterIndex < static_cast< sal_Int32 >( m_aRowLabels.size()))
+ m_aRowLabels.insert( m_aRowLabels.begin() + nIndex, vector< OUString> (1));
+
+#if OSL_DEBUG_LEVEL > 2
+ traceData();
+#endif
+}
+
+void InternalData::deleteColumn( sal_Int32 nAtIndex )
+{
+ OSL_ASSERT( nAtIndex < m_nColumnCount && nAtIndex >= 0 );
+ if( nAtIndex >= m_nColumnCount || m_nColumnCount < 1 || nAtIndex < 0 )
+ return;
+ sal_Int32 nNewColumnCount = m_nColumnCount - 1;
+ sal_Int32 nNewSize( nNewColumnCount * m_nRowCount );
+
+ double fNan;
+ ::rtl::math::setNan( &fNan );
+ tDataType aNewData( fNan, nNewSize );
+
+ // copy old data
+ int nCol=0;
+ for( ; nCol<nAtIndex; ++nCol )
+ aNewData[ ::std::slice( nCol, m_nRowCount, nNewColumnCount ) ] =
+ static_cast< tDataType >(
+ m_aData[ ::std::slice( nCol, m_nRowCount, m_nColumnCount ) ] );
+ for( ; nCol<nNewColumnCount; ++nCol )
+ aNewData[ ::std::slice( nCol, m_nRowCount, nNewColumnCount ) ] =
+ static_cast< tDataType >(
+ m_aData[ ::std::slice( nCol + 1, m_nRowCount, m_nColumnCount ) ] );
+
+ m_nColumnCount = nNewColumnCount;
+ m_aData.resize( nNewSize );
+ m_aData = aNewData;
+
+ // labels
+ if( nAtIndex < static_cast< sal_Int32 >( m_aColumnLabels.size()))
+ m_aColumnLabels.erase( m_aColumnLabels.begin() + nAtIndex );
+
+#if OSL_DEBUG_LEVEL > 2
+ traceData();
+#endif
+}
+
+void InternalData::deleteRow( sal_Int32 nAtIndex )
+{
+ OSL_ASSERT( nAtIndex < m_nRowCount && nAtIndex >= 0 );
+ if( nAtIndex >= m_nRowCount || m_nRowCount < 1 || nAtIndex < 0 )
+ return;
+ sal_Int32 nNewRowCount = m_nRowCount - 1;
+ sal_Int32 nNewSize( m_nColumnCount * nNewRowCount );
+
+ double fNan;
+ ::rtl::math::setNan( &fNan );
+ tDataType aNewData( fNan, nNewSize );
+
+ // copy old data
+ sal_Int32 nIndex = nAtIndex;
+ if( nIndex )
+ aNewData[ ::std::slice( 0, nIndex * m_nColumnCount, 1 ) ] =
+ static_cast< tDataType >(
+ m_aData[ ::std::slice( 0, nIndex * m_nColumnCount, 1 ) ] );
+
+ if( nIndex < nNewRowCount )
+ {
+ sal_Int32 nRemainingCount = m_nColumnCount * (nNewRowCount - nIndex);
+ aNewData[ ::std::slice( nIndex * m_nColumnCount, nRemainingCount, 1 ) ] =
+ static_cast< tDataType >(
+ m_aData[ ::std::slice( (nIndex + 1) * m_nColumnCount, nRemainingCount, 1 ) ] );
+ }
+
+ m_nRowCount = nNewRowCount;
+ m_aData.resize( nNewSize );
+ m_aData = aNewData;
+
+ // labels
+ if( nAtIndex < static_cast< sal_Int32 >( m_aRowLabels.size()))
+ m_aRowLabels.erase( m_aRowLabels.begin() + nAtIndex );
+
+#if OSL_DEBUG_LEVEL > 2
+ traceData();
+#endif
+}
+
+sal_Int32 InternalData::getRowCount() const
+{
+ return m_nRowCount;
+}
+
+sal_Int32 InternalData::getColumnCount() const
+{
+ return m_nColumnCount;
+}
+
+void InternalData::setComplexRowLabels( const vector< vector< OUString > >& rNewRowLabels )
+{
+ m_aRowLabels = rNewRowLabels;
+ sal_Int32 nNewRowCount = static_cast< sal_Int32 >( m_aRowLabels.size() );
+ if( nNewRowCount < m_nRowCount )
+ m_aRowLabels.resize( m_nRowCount );
+ else
+ enlargeData( 0, nNewRowCount );
+}
+
+vector< vector< OUString > > InternalData::getComplexRowLabels() const
+{
+ return m_aRowLabels;
+}
+
+void InternalData::setComplexColumnLabels( const vector< vector< OUString > >& rNewColumnLabels )
+{
+ m_aColumnLabels = rNewColumnLabels;
+ sal_Int32 nNewColumnCount = static_cast< sal_Int32 >( m_aColumnLabels.size() );
+ if( nNewColumnCount < m_nColumnCount )
+ m_aColumnLabels.resize( m_nColumnCount );
+ else
+ enlargeData( nNewColumnCount, 0 );
+}
+
+vector< vector< OUString > > InternalData::getComplexColumnLabels() const
+{
+ return m_aColumnLabels;
+}
+
+#if OSL_DEBUG_LEVEL > 2
+void InternalData::traceData() const
+{
+ OSL_TRACE( "InternalData: Data in rows\n" );
+
+ for( sal_Int32 i=0; i<m_nRowCount; ++i )
+ {
+ tDataType aSlice( m_aData[ ::std::slice( i*m_nColumnCount, m_nColumnCount, 1 ) ] );
+ for( sal_Int32 j=0; j<m_nColumnCount; ++j )
+ OSL_TRACE( "%lf ", aSlice[j] );
+ OSL_TRACE( "\n" );
+ }
+ OSL_TRACE( "\n" );
+}
+#endif
+
+} // namespace chart
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 4d8f7be112ff..4abc51be31af 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: InternalDataProvider.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -48,8 +45,8 @@
#include "DataSourceHelper.hxx"
#include "ChartModelHelper.hxx"
#include "DiagramHelper.hxx"
-#include "ResId.hxx"
-#include "Strings.hrc"
+#include "ExplicitCategoriesProvider.hxx"
+
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/data/XDataSequence.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
@@ -70,774 +67,327 @@ using ::rtl::OUStringBuffer;
namespace chart
{
-namespace impl
-{
-
-
-struct OUStringBufferAppend : public unary_function< OUString, void >
-{
- OUStringBufferAppend( OUStringBuffer & rBuffer, const OUString & rSeparator ) :
- m_rBuffer( rBuffer ),
- m_aSep( rSeparator )
- {}
- void operator() ( const OUString & rStr )
- {
- m_rBuffer.append( m_aSep );
- m_rBuffer.append( rStr );
- }
-private:
- OUStringBuffer m_rBuffer;
- OUString m_aSep;
-};
-
-OUString FlattenStringSequence( const Sequence< OUString > & aSeq )
-{
- if( aSeq.getLength() == 0 )
- return OUString();
- OUStringBuffer aBuf( aSeq[0] );
- for_each( aSeq.getConstArray() + 1, aSeq.getConstArray() + aSeq.getLength(),
- OUStringBufferAppend( aBuf, OUString(RTL_CONSTASCII_USTRINGPARAM(" "))));
- return aBuf.makeStringAndClear();
-}
-
-class InternalData
-{
-public:
- InternalData();
-
- void createDefaultData();
-
- void setData( const Sequence< Sequence< double > > & rNewData, bool bDataInColumns );
- Sequence< Sequence< double > > getData( bool bDataInColumns ) const;
- Sequence< double > getDataAt( sal_Int32 nIndex, bool bDataInColumns ) const;
- void setDataAt( sal_Int32 nIndex, bool bDataInColumns, const ::std::vector< double > & rNewData );
- void swapAllDataAtIndexWithNext( sal_Int32 nAtIndex, bool bDataInColumns );
-
- /** resizes the data if at least one of the given dimensions is larger than
- before. The data is never becoming smaller only larger.
-
- @return </TRUE>, if the data was enlarged
- */
- bool enlargeData( sal_Int32 nColumnCount, sal_Int32 nRowCount );
-
- void insertColumn( sal_Int32 nAfterIndex );
- void insertRow( sal_Int32 nAfterIndex );
- void deleteColumn( sal_Int32 nAtIndex );
- void deleteRow( sal_Int32 nAtIndex );
-
- /// @return the index of the newly appended column
- sal_Int32 appendColumn();
- /// @return the index of the newly appended row
- sal_Int32 appendRow();
-
- sal_Int32 getRowCount() const;
- sal_Int32 getColumnCount() const;
-
- void setRowLabels( const ::std::vector< OUString > & rNewRowLabels );
- ::std::vector< OUString > getRowLabels() const;
- void setColumnLabels( const ::std::vector< OUString > & rNewColumnLabels );
- ::std::vector< OUString > getColumnLabels() const;
-#if OSL_DEBUG_LEVEL > 2
- void traceData() const;
-#endif
-
-private:
- sal_Int32 m_nColumnCount;
- sal_Int32 m_nRowCount;
-
- typedef ::std::valarray< double > tDataType;
- typedef ::std::vector< OUString > tLabelType;
-
- tDataType m_aData;
- tLabelType m_aRowLabels;
- tLabelType m_aColumnLabels;
-};
+// ================================================================================
-// ----------------------------------------
namespace
{
-struct lcl_NumberedStringGenerator
-{
- lcl_NumberedStringGenerator( const OUString & rStub, const OUString & rWildcard ) :
- m_aStub( rStub ),
- m_nCounter( 0 ),
- m_nStubStartIndex( rStub.indexOf( rWildcard )),
- m_nWildcardLength( rWildcard.getLength())
- {
- }
- OUString operator()() {
- return m_aStub.replaceAt( m_nStubStartIndex, m_nWildcardLength, OUString::valueOf( ++m_nCounter ));
- }
-private:
- OUString m_aStub;
- sal_Int32 m_nCounter;
- const sal_Int32 m_nStubStartIndex;
- const sal_Int32 m_nWildcardLength;
-};
-
-template< typename T >
- Sequence< T > lcl_ValarrayToSequence( const ::std::valarray< T > & rValarray )
-{
- // is there a more elegant way of conversion?
- Sequence< T > aResult( rValarray.size());
- for( size_t i = 0; i < rValarray.size(); ++i )
- aResult[i] = rValarray[i];
- return aResult;
-}
-
-struct lcl_ValuesOfLabeledSequence :
- public unary_function< Reference< chart2::data::XLabeledDataSequence >, Sequence< double > >
-{
- Sequence< double > operator() ( const Reference< chart2::data::XLabeledDataSequence > & xLSeq )
- {
- if( ! xLSeq.is())
- return Sequence< double >();
- return DataSequenceToDoubleSequence( xLSeq->getValues());
- }
-};
-
-struct lcl_LabelsOfLabeledSequence :
- public unary_function< Reference< chart2::data::XLabeledDataSequence >, Sequence< OUString > >
-{
- Sequence< OUString > operator() ( const Reference< chart2::data::XLabeledDataSequence > & xLSeq )
- {
- if( ! xLSeq.is())
- return Sequence< OUString >();
- return DataSequenceToStringSequence( xLSeq->getLabel());
- }
-};
-
-struct lcl_LabelOfLabeledSequence :
- public unary_function< Reference< chart2::data::XLabeledDataSequence >, OUString >
-{
- OUString operator() ( const Reference< chart2::data::XLabeledDataSequence > & xLSeq )
- {
- if( ! xLSeq.is())
- return OUString();
- return FlattenStringSequence( DataSequenceToStringSequence( xLSeq->getLabel()));
- }
-};
-} // anonymous namespace
-// ----------------------------------------
+// note: in xmloff this name is used to indicate usage of own data
+static const ::rtl::OUString lcl_aServiceName(
+ RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.InternalDataProvider" ));
-InternalData::InternalData() :
- m_nColumnCount( 0 ),
- m_nRowCount( 0 )
-{}
+static const ::rtl::OUString lcl_aCategoriesRangeName(
+ RTL_CONSTASCII_USTRINGPARAM( "categories" ));
+static const ::rtl::OUString lcl_aCategoriesLevelRangeNamePrefix(
+ RTL_CONSTASCII_USTRINGPARAM( "categoriesL " )); //L <-> level
+static const ::rtl::OUString lcl_aCategoriesPointRangeNamePrefix(
+ RTL_CONSTASCII_USTRINGPARAM( "categoriesP " )); //P <-> point
+static const ::rtl::OUString lcl_aCategoriesRoleName(
+ RTL_CONSTASCII_USTRINGPARAM( "categories" ));
+static const ::rtl::OUString lcl_aLabelRangePrefix(
+ RTL_CONSTASCII_USTRINGPARAM( "label " ));
+static const ::rtl::OUString lcl_aCompleteRange(
+ RTL_CONSTASCII_USTRINGPARAM( "all" ));
-void InternalData::createDefaultData()
-{
- const sal_Int32 nNumRows = 4;
- const sal_Int32 nNumColumns = 3;
- const sal_Int32 nSize = nNumColumns * nNumRows;
- // @todo: localize this!
- const OUString aRowName( ::chart::SchResId::getResString( STR_ROW_LABEL ));
- const OUString aColName( ::chart::SchResId::getResString( STR_COLUMN_LABEL ));
-
- const double fDefaultData[ nSize ] =
- { 9.10, 3.20, 4.54,
- 2.40, 8.80, 9.65,
- 3.10, 1.50, 3.70,
- 4.30, 9.02, 6.20 };
-
- m_aData.resize( nSize );
- for( sal_Int32 i=0; i<nSize; ++i )
- m_aData[i] = fDefaultData[i];
- m_nRowCount = nNumRows;
- m_nColumnCount = nNumColumns;
-
- vector< OUString > aRowLabels;
- aRowLabels.reserve( nNumRows );
- generate_n( back_inserter( aRowLabels ), nNumRows,
- lcl_NumberedStringGenerator( aRowName, C2U("%ROWNUMBER") ));
- setRowLabels( aRowLabels );
-
- vector< OUString > aColumnLabels;
- aColumnLabels.reserve( nNumColumns );
- generate_n( back_inserter( aColumnLabels ), nNumColumns,
- lcl_NumberedStringGenerator( aColName, C2U("%COLUMNNUMBER") ));
- setColumnLabels( aColumnLabels );
-}
+typedef ::std::multimap< OUString, uno::WeakReference< chart2::data::XDataSequence > >
+ lcl_tSequenceMap;
-void InternalData::setData( const Sequence< Sequence< double > > & rNewData, bool bDataInColumns )
+struct lcl_setModified : public ::std::unary_function< lcl_tSequenceMap, void >
{
- sal_Int32 nOuterSize = rNewData.getLength();
- sal_Int32 nInnerSize = (nOuterSize ? rNewData[0].getLength() : 0);
-
- m_nRowCount = (bDataInColumns ? nInnerSize : nOuterSize);
- m_nColumnCount = (bDataInColumns ? nOuterSize : nInnerSize);
-
- if( m_aRowLabels.size() != static_cast< sal_uInt32 >( m_nRowCount ))
- m_aRowLabels.resize( m_nRowCount );
- if( m_aColumnLabels.size() != static_cast< sal_uInt32 >( m_nColumnCount ))
- m_aColumnLabels.resize( m_nColumnCount );
-
- m_aData.resize( m_nRowCount * m_nColumnCount );
- double fNan;
- ::rtl::math::setNan( & fNan );
- // set all values to Nan
- m_aData = fNan;
-
- for( sal_Int32 nOuterIdx=0; nOuterIdx<nOuterSize; ++nOuterIdx )
+ void operator() ( const lcl_tSequenceMap::value_type & rMapEntry )
{
- int nDataIdx = (bDataInColumns ? nOuterIdx : nOuterIdx*nInnerSize);
- const sal_Int32 nMax = ::std::min( rNewData[nOuterIdx].getLength(), nInnerSize );
- sal_Int32 nInnerIdx=0;
- for( ; nInnerIdx < nMax; ++nInnerIdx )
+ // convert weak reference to reference
+ Reference< chart2::data::XDataSequence > xSeq( rMapEntry.second );
+ if( xSeq.is())
{
- m_aData[nDataIdx] = rNewData[nOuterIdx][nInnerIdx];
- nDataIdx += (bDataInColumns ? m_nColumnCount : 1);
+ Reference< util::XModifiable > xMod( xSeq, uno::UNO_QUERY );
+ if( xMod.is())
+ xMod->setModified( sal_True );
}
}
-}
-
-Sequence< Sequence< double > > InternalData::getData( bool bDataInColumns ) const
-{
- Sequence< Sequence< double > > aResult( bDataInColumns ? m_nColumnCount : m_nRowCount );
-
- if( bDataInColumns )
- {
- for( sal_Int32 i=0; i<m_nColumnCount; ++i )
- aResult[i] = lcl_ValarrayToSequence< tDataType::value_type >(
- m_aData[ ::std::slice( i, m_nRowCount, m_nColumnCount ) ] );
- }
- else
- {
- for( sal_Int32 i=0; i<m_nRowCount; ++i )
- aResult[i] = lcl_ValarrayToSequence< tDataType::value_type >(
- m_aData[ ::std::slice( i*m_nColumnCount, m_nColumnCount, 1 ) ] );
- }
-
- return aResult;
-}
-
-Sequence< double > InternalData::getDataAt( sal_Int32 nIndex, bool bDataInColumns ) const
-{
- Sequence< double > aResult( bDataInColumns ? m_nRowCount : m_nColumnCount );
-
- if( bDataInColumns )
- {
- if( nIndex < m_nColumnCount )
- return lcl_ValarrayToSequence< tDataType::value_type >(
- m_aData[ ::std::slice( nIndex, m_nRowCount, m_nColumnCount ) ] );
- }
- else
- {
- if( nIndex < m_nRowCount )
- return lcl_ValarrayToSequence< tDataType::value_type >(
- m_aData[ ::std::slice( nIndex*m_nColumnCount, m_nColumnCount, 1 ) ] );
- }
-
- return Sequence< double >();
-}
+};
-void InternalData::setDataAt( sal_Int32 nIndex, bool bDataInColumns, const ::std::vector< double > & rNewData )
+struct lcl_internalizeSeries : public ::std::unary_function< Reference< chart2::XDataSeries >, void >
{
- if( bDataInColumns )
- {
- if( nIndex < m_nColumnCount )
- {
- tDataType aSlice = m_aData[ ::std::slice( nIndex, m_nRowCount, m_nColumnCount ) ];
- for( ::std::vector< double >::size_type i = 0; i < rNewData.size(); ++i )
- aSlice[i] = rNewData[i];
- m_aData[ ::std::slice( nIndex, m_nRowCount, m_nColumnCount ) ] = aSlice;
- }
- }
- else
+ lcl_internalizeSeries( InternalData & rInternalData,
+ InternalDataProvider & rProvider,
+ bool bConnectToModel, bool bDataInColumns ) :
+ m_rInternalData( rInternalData ),
+ m_rProvider( rProvider ),
+ m_bConnectToModel( bConnectToModel ),
+ m_bDataInColumns( bDataInColumns )
+ {}
+ void operator() ( const Reference< chart2::XDataSeries > & xSeries )
{
- if( nIndex < m_nRowCount )
+ Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY );
+ Reference< chart2::data::XDataSink > xSink( xSeries, uno::UNO_QUERY );
+ if( xSource.is() && xSink.is() )
{
- tDataType aSlice = m_aData[ ::std::slice( nIndex*m_nColumnCount, m_nColumnCount, 1 ) ];
- for( ::std::vector< double >::size_type i = 0; i < rNewData.size(); ++i )
- aSlice[i] = rNewData[i];
- m_aData[ ::std::slice( nIndex*m_nColumnCount, m_nColumnCount, 1 ) ]= aSlice;
+ Sequence< Reference< chart2::data::XLabeledDataSequence > > aOldSeriesData = xSource->getDataSequences();
+ Sequence< Reference< chart2::data::XLabeledDataSequence > > aNewSeriesData( aOldSeriesData.getLength() );
+ for( sal_Int32 i=0; i<aOldSeriesData.getLength(); ++i )
+ {
+ sal_Int32 nNewIndex( m_bDataInColumns ? m_rInternalData.appendColumn() : m_rInternalData.appendRow() );
+ OUString aIdentifier( OUString::valueOf( nNewIndex ));
+ //@todo: deal also with genericXDataSequence
+ Reference< chart2::data::XNumericalDataSequence > xValues( aOldSeriesData[i]->getValues(), uno::UNO_QUERY );
+ Reference< chart2::data::XTextualDataSequence > xLabel( aOldSeriesData[i]->getLabel(), uno::UNO_QUERY );
+ Reference< chart2::data::XDataSequence > xNewValues;
+
+ if( xValues.is() )
+ {
+ ::std::vector< double > aValues( ContainerHelper::SequenceToVector( xValues->getNumericalData()));
+ if( m_bDataInColumns )
+ m_rInternalData.setColumnValues( nNewIndex, aValues );
+ else
+ m_rInternalData.setRowValues( nNewIndex, aValues );
+ if( m_bConnectToModel )
+ {
+ xNewValues.set( m_rProvider.createDataSequenceByRangeRepresentation( aIdentifier ));
+ comphelper::copyProperties(
+ Reference< beans::XPropertySet >( xValues, uno::UNO_QUERY ),
+ Reference< beans::XPropertySet >( xNewValues, uno::UNO_QUERY ));
+ }
+ }
+
+ if( xLabel.is() )
+ {
+ if( m_bDataInColumns )
+ m_rInternalData.setComplexColumnLabel( nNewIndex, ContainerHelper::SequenceToVector( xLabel->getTextualData() ) );
+ else
+ m_rInternalData.setComplexRowLabel( nNewIndex, ContainerHelper::SequenceToVector( xLabel->getTextualData() ) );
+ if( m_bConnectToModel )
+ {
+ Reference< chart2::data::XDataSequence > xNewLabel(
+ m_rProvider.createDataSequenceByRangeRepresentation( lcl_aLabelRangePrefix + aIdentifier ));
+ comphelper::copyProperties(
+ Reference< beans::XPropertySet >( xLabel, uno::UNO_QUERY ),
+ Reference< beans::XPropertySet >( xNewLabel, uno::UNO_QUERY ));
+ aNewSeriesData[i] = Reference< chart2::data::XLabeledDataSequence >(
+ new LabeledDataSequence( xNewValues, xNewLabel ));
+ }
+ }
+ else
+ {
+ if( m_bConnectToModel )
+ aNewSeriesData[i] = Reference< chart2::data::XLabeledDataSequence >(
+ new LabeledDataSequence( xNewValues ));
+ }
+ }
+ if( m_bConnectToModel )
+ xSink->setData( aNewSeriesData );
}
- }
-}
+ }
-void InternalData::swapAllDataAtIndexWithNext( sal_Int32 nAtIndex, bool bDataInColumns )
-{
- if( bDataInColumns && nAtIndex < m_nRowCount - 1 )
- {
- const sal_Int32 nMax = m_nColumnCount;
- for( sal_Int32 nColIdx=0; nColIdx<nMax; ++nColIdx )
- {
- size_t nIndex1 = nColIdx + nAtIndex*m_nColumnCount;
- size_t nIndex2 = nIndex1 + m_nColumnCount;
- double fTemp = m_aData[nIndex1];
- m_aData[nIndex1] = m_aData[nIndex2];
- m_aData[nIndex2] = fTemp;
- }
- OUString sTemp( m_aRowLabels[nAtIndex] );
- m_aRowLabels[nAtIndex] = m_aRowLabels[nAtIndex + 1];
- m_aRowLabels[nAtIndex + 1] = sTemp;
- }
- else if( nAtIndex < m_nColumnCount - 1 )
- {
- const sal_Int32 nMax = m_nRowCount;
- for( sal_Int32 nRowIdx=0; nRowIdx<nMax; ++nRowIdx )
- {
- size_t nIndex1 = nAtIndex + nRowIdx*m_nColumnCount;
- size_t nIndex2 = nIndex1 + 1;
- double fTemp = m_aData[nIndex1];
- m_aData[nIndex1] = m_aData[nIndex2];
- m_aData[nIndex2] = fTemp;
- }
- OUString sTemp( m_aColumnLabels[nAtIndex] );
- m_aColumnLabels[nAtIndex] = m_aColumnLabels[nAtIndex + 1];
- m_aColumnLabels[nAtIndex + 1] = sTemp;
- }
-}
+private:
+ InternalData & m_rInternalData;
+ InternalDataProvider & m_rProvider;
+ bool m_bConnectToModel;
+ bool m_bDataInColumns;
+};
-bool InternalData::enlargeData( sal_Int32 nColumnCount, sal_Int32 nRowCount )
+struct lcl_makeAnyFromLevelVector : public ::std::unary_function< vector< OUString >, uno::Any >
{
- sal_Int32 nNewColumnCount( ::std::max<sal_Int32>( m_nColumnCount, nColumnCount ) );
- sal_Int32 nNewRowCount( ::std::max<sal_Int32>( m_nRowCount, nRowCount ) );
- sal_Int32 nNewSize( nNewColumnCount*nNewRowCount );
+public:
- bool bGrow = (nNewSize > m_nColumnCount*m_nRowCount);
+ explicit lcl_makeAnyFromLevelVector( sal_Int32 nLevel ) : m_nLevel( nLevel )
+ {}
- if( bGrow )
+ uno::Any operator() ( const vector< OUString >& rVector )
{
- double fNan;
- ::rtl::math::setNan( &fNan );
- tDataType aNewData( fNan, nNewSize );
- // copy old data
- for( int nCol=0; nCol<m_nColumnCount; ++nCol )
- static_cast< tDataType >(
- aNewData[ ::std::slice( nCol, m_nRowCount, nNewColumnCount ) ] ) =
- m_aData[ ::std::slice( nCol, m_nRowCount, m_nColumnCount ) ];
-
- m_aData.resize( nNewSize );
- m_aData = aNewData;
+ OUString aString;
+ if( m_nLevel < static_cast< sal_Int32 >(rVector.size()) )
+ aString = rVector[m_nLevel];
+ return uno::makeAny( aString );
}
- m_nColumnCount = nNewColumnCount;
- m_nRowCount = nNewRowCount;
- return bGrow;
-}
-
-void InternalData::insertColumn( sal_Int32 nAfterIndex )
-{
- // note: -1 is allowed, as we insert after the given index
- OSL_ASSERT( nAfterIndex < m_nColumnCount && nAfterIndex >= -1 );
- if( nAfterIndex >= m_nColumnCount || nAfterIndex < -1 )
- return;
- sal_Int32 nNewColumnCount = m_nColumnCount + 1;
- sal_Int32 nNewSize( nNewColumnCount * m_nRowCount );
-
- double fNan;
- ::rtl::math::setNan( &fNan );
- tDataType aNewData( fNan, nNewSize );
-
- // copy old data
- int nCol=0;
- for( ; nCol<=nAfterIndex; ++nCol )
- aNewData[ ::std::slice( nCol, m_nRowCount, nNewColumnCount ) ] =
- static_cast< tDataType >(
- m_aData[ ::std::slice( nCol, m_nRowCount, m_nColumnCount ) ] );
- for( ++nCol; nCol<nNewColumnCount; ++nCol )
- aNewData[ ::std::slice( nCol, m_nRowCount, nNewColumnCount ) ] =
- static_cast< tDataType >(
- m_aData[ ::std::slice( nCol - 1, m_nRowCount, m_nColumnCount ) ] );
-
- m_nColumnCount = nNewColumnCount;
- m_aData.resize( nNewSize );
- m_aData = aNewData;
-
- // labels
- if( nAfterIndex < static_cast< sal_Int32 >( m_aColumnLabels.size()))
- m_aColumnLabels.insert( m_aColumnLabels.begin() + (nAfterIndex + 1), OUString());
-
-#if OSL_DEBUG_LEVEL > 2
- traceData();
-#endif
-}
-
-sal_Int32 InternalData::appendColumn()
-{
- insertColumn( getColumnCount() - 1 );
- return getColumnCount() - 1;
-}
-sal_Int32 InternalData::appendRow()
-{
- insertRow( getRowCount() - 1 );
- return getRowCount() - 1;
-}
+private:
+ sal_Int32 m_nLevel;
+};
-void InternalData::insertRow( sal_Int32 nAfterIndex )
+struct lcl_getStringFromLevelVector : public ::std::unary_function< vector< OUString >, OUString >
{
- // note: -1 is allowed, as we insert after the given index
- OSL_ASSERT( nAfterIndex < m_nRowCount && nAfterIndex >= -1 );
- if( nAfterIndex >= m_nRowCount || nAfterIndex < -1 )
- return;
- sal_Int32 nNewRowCount = m_nRowCount + 1;
- sal_Int32 nNewSize( m_nColumnCount * nNewRowCount );
-
- double fNan;
- ::rtl::math::setNan( &fNan );
- tDataType aNewData( fNan, nNewSize );
+public:
- // copy old data
- sal_Int32 nIndex = nAfterIndex + 1;
- aNewData[ ::std::slice( 0, nIndex * m_nColumnCount, 1 ) ] =
- static_cast< tDataType >(
- m_aData[ ::std::slice( 0, nIndex * m_nColumnCount, 1 ) ] );
+ explicit lcl_getStringFromLevelVector( sal_Int32 nLevel ) : m_nLevel( nLevel )
+ {}
- if( nIndex < m_nRowCount )
+ OUString operator() ( const vector< OUString >& rVector )
{
- sal_Int32 nRemainingCount = m_nColumnCount * (m_nRowCount - nIndex);
- aNewData[ ::std::slice( (nIndex + 1) * m_nColumnCount, nRemainingCount, 1 ) ] =
- static_cast< tDataType >(
- m_aData[ ::std::slice( nIndex * m_nColumnCount, nRemainingCount, 1 ) ] );
+ OUString aString;
+ if( m_nLevel < static_cast< sal_Int32 >(rVector.size()) )
+ aString = rVector[m_nLevel];
+ return aString;
}
- m_nRowCount = nNewRowCount;
- m_aData.resize( nNewSize );
- m_aData = aNewData;
-
- // labels
- if( nAfterIndex < static_cast< sal_Int32 >( m_aRowLabels.size()))
- m_aRowLabels.insert( m_aRowLabels.begin() + nIndex, OUString());
-
-#if OSL_DEBUG_LEVEL > 2
- traceData();
-#endif
-}
-
-void InternalData::deleteColumn( sal_Int32 nAtIndex )
-{
- OSL_ASSERT( nAtIndex < m_nColumnCount && nAtIndex >= 0 );
- if( nAtIndex >= m_nColumnCount || m_nColumnCount < 1 || nAtIndex < 0 )
- return;
- sal_Int32 nNewColumnCount = m_nColumnCount - 1;
- sal_Int32 nNewSize( nNewColumnCount * m_nRowCount );
+private:
+ sal_Int32 m_nLevel;
+};
- double fNan;
- ::rtl::math::setNan( &fNan );
- tDataType aNewData( fNan, nNewSize );
-
- // copy old data
- int nCol=0;
- for( ; nCol<nAtIndex; ++nCol )
- aNewData[ ::std::slice( nCol, m_nRowCount, nNewColumnCount ) ] =
- static_cast< tDataType >(
- m_aData[ ::std::slice( nCol, m_nRowCount, m_nColumnCount ) ] );
- for( ; nCol<nNewColumnCount; ++nCol )
- aNewData[ ::std::slice( nCol, m_nRowCount, nNewColumnCount ) ] =
- static_cast< tDataType >(
- m_aData[ ::std::slice( nCol + 1, m_nRowCount, m_nColumnCount ) ] );
-
- m_nColumnCount = nNewColumnCount;
- m_aData.resize( nNewSize );
- m_aData = aNewData;
-
- // labels
- if( nAtIndex < static_cast< sal_Int32 >( m_aColumnLabels.size()))
- m_aColumnLabels.erase( m_aColumnLabels.begin() + nAtIndex );
-
-#if OSL_DEBUG_LEVEL > 2
- traceData();
-#endif
-}
-void InternalData::deleteRow( sal_Int32 nAtIndex )
+struct lcl_setStringAtLevel : public ::std::binary_function< vector< OUString >, OUString, vector< OUString > >
{
- OSL_ASSERT( nAtIndex < m_nRowCount && nAtIndex >= 0 );
- if( nAtIndex >= m_nRowCount || m_nRowCount < 1 || nAtIndex < 0 )
- return;
- sal_Int32 nNewRowCount = m_nRowCount - 1;
- sal_Int32 nNewSize( m_nColumnCount * nNewRowCount );
-
- double fNan;
- ::rtl::math::setNan( &fNan );
- tDataType aNewData( fNan, nNewSize );
+public:
- // copy old data
- sal_Int32 nIndex = nAtIndex;
- if( nIndex )
- aNewData[ ::std::slice( 0, nIndex * m_nColumnCount, 1 ) ] =
- static_cast< tDataType >(
- m_aData[ ::std::slice( 0, nIndex * m_nColumnCount, 1 ) ] );
+ explicit lcl_setStringAtLevel( sal_Int32 nLevel ) : m_nLevel( nLevel )
+ {}
- if( nIndex < nNewRowCount )
+ vector< OUString > operator() ( const vector< OUString >& rVector, const OUString& rNewText )
{
- sal_Int32 nRemainingCount = m_nColumnCount * (nNewRowCount - nIndex);
- aNewData[ ::std::slice( nIndex * m_nColumnCount, nRemainingCount, 1 ) ] =
- static_cast< tDataType >(
- m_aData[ ::std::slice( (nIndex + 1) * m_nColumnCount, nRemainingCount, 1 ) ] );
+ vector< OUString > aRet( rVector );
+ if( m_nLevel >= static_cast< sal_Int32 >(aRet.size()) )
+ aRet.resize( m_nLevel+1 );
+ aRet[ m_nLevel ]=rNewText;
+ return aRet;
}
- m_nRowCount = nNewRowCount;
- m_aData.resize( nNewSize );
- m_aData = aNewData;
-
- // labels
- if( nAtIndex < static_cast< sal_Int32 >( m_aRowLabels.size()))
- m_aRowLabels.erase( m_aRowLabels.begin() + nAtIndex );
-
-#if OSL_DEBUG_LEVEL > 2
- traceData();
-#endif
-}
-
-sal_Int32 InternalData::getRowCount() const
-{
- return m_nRowCount;
-}
-
-sal_Int32 InternalData::getColumnCount() const
-{
- return m_nColumnCount;
-}
-
-void InternalData::setRowLabels( const ::std::vector< OUString > & rNewRowLabels )
-{
- m_aRowLabels = rNewRowLabels;
- if( m_aRowLabels.size() < static_cast< ::std::vector< OUString >::size_type >( m_nRowCount ))
- m_aRowLabels.resize( m_nRowCount );
- else
- enlargeData( 0, static_cast< sal_Int32 >( m_aRowLabels.size() ));
-}
-
-::std::vector< OUString > InternalData::getRowLabels() const
-{
- return m_aRowLabels;
-}
-
-void InternalData::setColumnLabels( const ::std::vector< OUString > & rNewColumnLabels )
-{
- m_aColumnLabels = rNewColumnLabels;
- if( m_aColumnLabels.size() < static_cast< ::std::vector< OUString >::size_type >( m_nColumnCount ))
- m_aColumnLabels.resize( m_nColumnCount );
- else
- enlargeData( static_cast< sal_Int32 >( m_aColumnLabels.size()), 0 );
-}
+private:
+ sal_Int32 m_nLevel;
+};
-::std::vector< OUString > InternalData::getColumnLabels() const
+struct lcl_insertStringAtLevel : public ::std::unary_function< vector< OUString >, void >
{
- return m_aColumnLabels;
-}
+public:
-#if OSL_DEBUG_LEVEL > 2
-void InternalData::traceData() const
-{
- OSL_TRACE( "InternalData: Data in rows\n" );
+ explicit lcl_insertStringAtLevel( sal_Int32 nLevel ) : m_nLevel( nLevel )
+ {}
- for( sal_Int32 i=0; i<m_nRowCount; ++i )
+ void operator() ( vector< OUString >& rVector )
{
- tDataType aSlice( m_aData[ ::std::slice( i*m_nColumnCount, m_nColumnCount, 1 ) ] );
- for( sal_Int32 j=0; j<m_nColumnCount; ++j )
- OSL_TRACE( "%lf ", aSlice[j] );
- OSL_TRACE( "\n" );
- }
- OSL_TRACE( "\n" );
-}
-#endif
+ if( m_nLevel > static_cast< sal_Int32 >(rVector.size()) )
+ rVector.resize( m_nLevel );
-} // namespace impl
+ vector< OUString >::iterator aIt( rVector.begin() );
+ for( sal_Int32 nN=0; aIt<rVector.end(); aIt++, nN++)
+ {
+ if( nN==m_nLevel )
+ break;
+ }
+ rVector.insert( aIt, OUString() );
+ }
-// ================================================================================
+private:
+ sal_Int32 m_nLevel;
+};
-namespace
+struct lcl_removeStringAtLevel : public ::std::unary_function< vector< OUString >, void >
{
+public:
-// note: in xmloff this name is used to indicate usage of own data
-static const ::rtl::OUString lcl_aServiceName(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.InternalDataProvider" ));
-
-static const ::rtl::OUString lcl_aCategoriesRangeName(
- RTL_CONSTASCII_USTRINGPARAM( "categories" ));
-static const ::rtl::OUString lcl_aCategoriesRoleName(
- RTL_CONSTASCII_USTRINGPARAM( "categories" ));
-static const ::rtl::OUString lcl_aLabelRangePrefix(
- RTL_CONSTASCII_USTRINGPARAM( "label " ));
-static const ::rtl::OUString lcl_aCompleteRange(
- RTL_CONSTASCII_USTRINGPARAM( "all" ));
-
-
-struct lcl_DataProviderRangeCreator : public unary_function< OUString, Reference< chart2::data::XLabeledDataSequence > >
-{
- lcl_DataProviderRangeCreator( const Reference< chart2::data::XDataProvider > & xDataProvider ) :
- m_xDataProvider( xDataProvider )
+ explicit lcl_removeStringAtLevel( sal_Int32 nLevel ) : m_nLevel( nLevel )
{}
- Reference< chart2::data::XLabeledDataSequence > operator() ( const OUString & rRange )
+ void operator() ( vector< OUString >& rVector )
{
- Reference< chart2::data::XLabeledDataSequence > xResult;
- if( m_xDataProvider.is())
- try
- {
- xResult.set( new ::chart::LabeledDataSequence(
- m_xDataProvider->createDataSequenceByRangeRepresentation( rRange )));
- }
- catch( const lang::IllegalArgumentException & ex )
- {
- // data provider cannot create single data sequences, but then
- // detectArguments should work also with an empty data source
- (void)(ex);
- }
- catch( const uno::Exception & ex )
+ vector< OUString >::iterator aIt( rVector.begin() );
+ for( sal_Int32 nN=0; aIt<rVector.end(); aIt++, nN++)
+ {
+ if( nN==m_nLevel )
{
- ASSERT_EXCEPTION( ex );
+ rVector.erase( aIt );
+ break;
}
- return xResult;
+ }
}
private:
- Reference< chart2::data::XDataProvider > m_xDataProvider;
+ sal_Int32 m_nLevel;
};
-typedef ::std::multimap< OUString, uno::WeakReference< chart2::data::XDataSequence > >
- lcl_tSequenceMap;
-
-struct lcl_modifySeqMapValue : public ::std::unary_function< lcl_tSequenceMap, void >
+vector< OUString > lcl_AnyToStringVector( const Sequence< uno::Any >& aAnySeq )
{
- void operator() ( const lcl_tSequenceMap::value_type & rMapEntry )
- {
- // convert weak reference to reference
- Reference< chart2::data::XDataSequence > xSeq( rMapEntry.second );
- if( xSeq.is())
- {
- Reference< util::XModifiable > xMod( xSeq, uno::UNO_QUERY );
- if( xMod.is())
- xMod->setModified( sal_True );
- }
- }
-};
+ vector< OUString > aStringVec;
+ transform( aAnySeq.getConstArray(), aAnySeq.getConstArray() + aAnySeq.getLength(),
+ back_inserter( aStringVec ), CommonFunctors::AnyToString() );
+ return aStringVec;
+}
-Sequence< Reference< chart2::data::XLabeledDataSequence > >
- lcl_internalizeData(
- const Sequence< Reference< chart2::data::XLabeledDataSequence > > & rDataSeq,
- impl::InternalData & rInternalData,
- InternalDataProvider & rProvider )
+Sequence< OUString > lcl_AnyToStringSequence( const Sequence< uno::Any >& aAnySeq )
{
- Sequence< Reference< chart2::data::XLabeledDataSequence > > aResult( rDataSeq.getLength());
- for( sal_Int32 i=0; i<rDataSeq.getLength(); ++i )
- {
- sal_Int32 nNewIndex( rInternalData.appendColumn());
- OUString aIdentifier( OUString::valueOf( nNewIndex ));
- //@todo: deal also with genericXDataSequence
- Reference< chart2::data::XNumericalDataSequence > xValues( rDataSeq[i]->getValues(), uno::UNO_QUERY );
- Reference< chart2::data::XTextualDataSequence > xLabel( rDataSeq[i]->getLabel(), uno::UNO_QUERY );
- Reference< chart2::data::XDataSequence > xNewValues;
-
- if( xValues.is())
- {
- ::std::vector< double > aValues( ContainerHelper::SequenceToVector( xValues->getNumericalData()));
- rInternalData.enlargeData( nNewIndex + 1, aValues.size());
- rInternalData.setDataAt( nNewIndex, true, aValues );
- xNewValues.set( rProvider.createDataSequenceByRangeRepresentation( aIdentifier ));
- comphelper::copyProperties(
- Reference< beans::XPropertySet >( xValues, uno::UNO_QUERY ),
- Reference< beans::XPropertySet >( xNewValues, uno::UNO_QUERY ));
- }
-
- if( xLabel.is())
- {
- ::std::vector< OUString > aLabels( rInternalData.getColumnLabels());
- OSL_ASSERT( static_cast< size_t >( nNewIndex ) < aLabels.size());
- if( aLabels.size() <= static_cast< size_t >( nNewIndex ) )
- aLabels.resize( nNewIndex+1 );
- aLabels[nNewIndex] = impl::FlattenStringSequence( xLabel->getTextualData());
- rInternalData.setColumnLabels( aLabels );
- Reference< chart2::data::XDataSequence > xNewLabel(
- rProvider.createDataSequenceByRangeRepresentation( lcl_aLabelRangePrefix + aIdentifier ));
- comphelper::copyProperties(
- Reference< beans::XPropertySet >( xLabel, uno::UNO_QUERY ),
- Reference< beans::XPropertySet >( xNewLabel, uno::UNO_QUERY ));
- aResult[i] =
- Reference< chart2::data::XLabeledDataSequence >(
- new LabeledDataSequence( xNewValues, xNewLabel ));
- }
- else
- {
- aResult[i] =
- Reference< chart2::data::XLabeledDataSequence >(
- new LabeledDataSequence( xNewValues ));
- }
- }
+ Sequence< OUString > aResult;
+ aResult.realloc( aAnySeq.getLength() );
+ transform( aAnySeq.getConstArray(), aAnySeq.getConstArray() + aAnySeq.getLength(),
+ aResult.getArray(), CommonFunctors::AnyToString() );
return aResult;
}
-struct lcl_internalizeSeries : public ::std::unary_function< Reference< chart2::XDataSeries >, void >
-{
- lcl_internalizeSeries( impl::InternalData & rInternalData,
- InternalDataProvider & rProvider ) :
- m_rInternalData( rInternalData ),
- m_rProvider( rProvider )
- {}
- void operator() ( const Reference< chart2::XDataSeries > & xSeries )
- {
- Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY );
- Reference< chart2::data::XDataSink > xSink( xSeries, uno::UNO_QUERY );
- if( xSource.is() && xSink.is())
- xSink->setData( lcl_internalizeData( xSource->getDataSequences(), m_rInternalData, m_rProvider ));
- }
-
-private:
- impl::InternalData & m_rInternalData;
- InternalDataProvider & m_rProvider;
-};
-
} // anonymous namespace
-InternalDataProvider::InternalDataProvider(const Reference< uno::XComponentContext > & /*_xContext*/) :
- m_bDataInColumns( true )
-{}
// ================================================================================
-InternalDataProvider::InternalDataProvider() :
- m_bDataInColumns( true )
+InternalDataProvider::InternalDataProvider( const Reference< uno::XComponentContext > & /*_xContext*/)
+ : m_bDataInColumns( true )
{}
-InternalDataProvider::InternalDataProvider(
- const Reference< ::com::sun::star::chart::XChartDataArray > & xDataToCopy ) :
- m_bDataInColumns( true )
-{
- if( xDataToCopy.is())
- {
- setData( xDataToCopy->getData() );
- setColumnDescriptions( xDataToCopy->getColumnDescriptions() );
- setRowDescriptions( xDataToCopy->getRowDescriptions() );
- }
-}
-
-InternalDataProvider::InternalDataProvider(
- const Reference< chart2::XChartDocument > & xChartDoc ) :
- m_bDataInColumns( true )
+InternalDataProvider::InternalDataProvider( const Reference< chart2::XChartDocument > & xChartDoc, bool bConnectToModel )
+ : m_bDataInColumns( true )
{
try
{
Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartDoc ) );
if( xDiagram.is())
{
- impl::InternalData & rData( getInternalData());
+ Reference< frame::XModel > xChartModel( xChartDoc, uno::UNO_QUERY );
+
+ //data in columns?
+ {
+ ::rtl::OUString aRangeString;
+ bool bFirstCellAsLabel = true;
+ bool bHasCategories = true;
+ uno::Sequence< sal_Int32 > aSequenceMapping;
+ DataSourceHelper::detectRangeSegmentation( xChartModel, aRangeString, aSequenceMapping, m_bDataInColumns, bFirstCellAsLabel, bHasCategories );
+ }
+
// categories
- Reference< chart2::data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ));
- if( xCategories.is())
{
- // @todo: be able to deal with XDataSequence, too
- Reference< chart2::data::XTextualDataSequence > xSeq( xCategories->getValues(), uno::UNO_QUERY );
- if( xSeq.is())
- rData.setRowLabels( ContainerHelper::SequenceToVector( xSeq->getTextualData()));
- DiagramHelper::setCategoriesToDiagram(
- new LabeledDataSequence(
- createDataSequenceByRangeRepresentation( lcl_aCategoriesRangeName )),
- xDiagram );
+ vector< vector< OUString > > aNewCategories;//inner count is level
+ {
+ ExplicitCategoriesProvider aExplicitCategoriesProvider( ChartModelHelper::getFirstCoordinateSystem(xChartModel), xChartModel );
+ const Sequence< Reference< chart2::data::XLabeledDataSequence> >& rSplitCategoriesList( aExplicitCategoriesProvider.getSplitCategoriesList() );
+ sal_Int32 nLevelCount = rSplitCategoriesList.getLength();
+ for( sal_Int32 nL = 0; nL<nLevelCount; nL++ )
+ {
+ Reference< chart2::data::XLabeledDataSequence > xLDS( rSplitCategoriesList[nL] );
+ if( !xLDS.is() )
+ continue;
+ Reference< chart2::data::XTextualDataSequence > xSeq( xLDS->getValues(), uno::UNO_QUERY );
+ Sequence< OUString > aStringSeq;
+ if( xSeq.is() )
+ aStringSeq = xSeq->getTextualData(); // @todo: be able to deal with XDataSequence, too
+ sal_Int32 nLength = aStringSeq.getLength();
+ if( static_cast< sal_Int32 >(aNewCategories.size()) < nLength )
+ aNewCategories.resize( nLength );
+
+ transform( aNewCategories.begin(), aNewCategories.end(), aStringSeq.getConstArray(),
+ aNewCategories.begin(), lcl_setStringAtLevel(nL) );
+ }
+ if( !nLevelCount )
+ {
+ Sequence< OUString > aSimplecategories = aExplicitCategoriesProvider.getSimpleCategories();
+ sal_Int32 nLength = aSimplecategories.getLength();
+ aNewCategories.reserve( nLength );
+ for( sal_Int32 nN=0; nN<nLength; nN++)
+ {
+ vector< OUString > aStringVector(1);
+ aStringVector[0] = aSimplecategories[nN];
+ aNewCategories.push_back( aStringVector );
+ }
+ }
+ }
+
+ if( m_bDataInColumns )
+ m_aInternalData.setComplexRowLabels( aNewCategories );
+ else
+ m_aInternalData.setComplexColumnLabels( aNewCategories );
+ if( bConnectToModel )
+ DiagramHelper::setCategoriesToDiagram( new LabeledDataSequence(
+ createDataSequenceByRangeRepresentation( lcl_aCategoriesRangeName )), xDiagram );
}
// data series
::std::vector< Reference< chart2::XDataSeries > > aSeriesVector( ChartModelHelper::getDataSeries( xChartDoc ));
- ::std::for_each( aSeriesVector.begin(), aSeriesVector.end(),
- lcl_internalizeSeries( rData, *this ));
-
- // unused data
- Sequence< Reference< chart2::data::XLabeledDataSequence > > aUnusedData( xDiagram->getUnusedData());
- aUnusedData = lcl_internalizeData( aUnusedData, rData, *this );
- xDiagram->setUnusedData( aUnusedData );
+ ::std::for_each( aSeriesVector.begin(), aSeriesVector.end(), lcl_internalizeSeries( m_aInternalData, *this, bConnectToModel, m_bDataInColumns ) );
}
}
catch( const uno::Exception & ex )
@@ -850,14 +400,14 @@ InternalDataProvider::InternalDataProvider(
InternalDataProvider::InternalDataProvider( const InternalDataProvider & rOther ) :
impl::InternalDataProvider_Base(),
m_aSequenceMap( rOther.m_aSequenceMap ),
- m_apData( new impl::InternalData( rOther.getInternalData())),
+ m_aInternalData( rOther.m_aInternalData ),
m_bDataInColumns( rOther.m_bDataInColumns )
{}
InternalDataProvider::~InternalDataProvider()
{}
-void InternalDataProvider::addDataSequenceToMap(
+void InternalDataProvider::lcl_addDataSequenceToMap(
const OUString & rRangeRepresentation,
const Reference< chart2::data::XDataSequence > & xSequence )
{
@@ -867,7 +417,7 @@ void InternalDataProvider::addDataSequenceToMap(
uno::WeakReference< chart2::data::XDataSequence >( xSequence )));
}
-void InternalDataProvider::deleteMapReferences( const OUString & rRangeRepresentation )
+void InternalDataProvider::lcl_deleteMapReferences( const OUString & rRangeRepresentation )
{
// set sequence to deleted by setting its range to an empty string
tSequenceMapRange aRange( m_aSequenceMap.equal_range( rRangeRepresentation ));
@@ -885,7 +435,7 @@ void InternalDataProvider::deleteMapReferences( const OUString & rRangeRepresent
m_aSequenceMap.erase( aRange.first, aRange.second );
}
-void InternalDataProvider::adaptMapReferences(
+void InternalDataProvider::lcl_adaptMapReferences(
const OUString & rOldRangeRepresentation,
const OUString & rNewRangeRepresentation )
{
@@ -910,70 +460,52 @@ void InternalDataProvider::adaptMapReferences(
m_aSequenceMap.upper_bound( rNewRangeRepresentation )));
}
-void InternalDataProvider::increaseMapReferences(
+void InternalDataProvider::lcl_increaseMapReferences(
sal_Int32 nBegin, sal_Int32 nEnd )
{
for( sal_Int32 nIndex = nEnd - 1; nIndex >= nBegin; --nIndex )
{
- adaptMapReferences( OUString::valueOf( nIndex ),
+ lcl_adaptMapReferences( OUString::valueOf( nIndex ),
OUString::valueOf( nIndex + 1 ));
- adaptMapReferences( lcl_aLabelRangePrefix + OUString::valueOf( nIndex ),
+ lcl_adaptMapReferences( lcl_aLabelRangePrefix + OUString::valueOf( nIndex ),
lcl_aLabelRangePrefix + OUString::valueOf( nIndex + 1 ));
}
}
-void InternalDataProvider::decreaseMapReferences(
+void InternalDataProvider::lcl_decreaseMapReferences(
sal_Int32 nBegin, sal_Int32 nEnd )
{
for( sal_Int32 nIndex = nBegin; nIndex < nEnd; ++nIndex )
{
- adaptMapReferences( OUString::valueOf( nIndex ),
+ lcl_adaptMapReferences( OUString::valueOf( nIndex ),
OUString::valueOf( nIndex - 1 ));
- adaptMapReferences( lcl_aLabelRangePrefix + OUString::valueOf( nIndex ),
+ lcl_adaptMapReferences( lcl_aLabelRangePrefix + OUString::valueOf( nIndex ),
lcl_aLabelRangePrefix + OUString::valueOf( nIndex - 1 ));
}
}
-Reference< chart2::data::XDataSequence > InternalDataProvider::createDataSequenceAndAddToMap(
+Reference< chart2::data::XDataSequence > InternalDataProvider::lcl_createDataSequenceAndAddToMap(
const OUString & rRangeRepresentation )
{
Reference< chart2::data::XDataSequence > xSeq(
new UncachedDataSequence( this, rRangeRepresentation ));
- addDataSequenceToMap( rRangeRepresentation, xSeq );
+ lcl_addDataSequenceToMap( rRangeRepresentation, xSeq );
return xSeq;
}
-Reference< chart2::data::XDataSequence > InternalDataProvider::createDataSequenceAndAddToMap(
+Reference< chart2::data::XDataSequence > InternalDataProvider::lcl_createDataSequenceAndAddToMap(
const OUString & rRangeRepresentation,
const OUString & rRole )
{
Reference< chart2::data::XDataSequence > xSeq(
new UncachedDataSequence( this, rRangeRepresentation, rRole ));
- addDataSequenceToMap( rRangeRepresentation, xSeq );
+ lcl_addDataSequenceToMap( rRangeRepresentation, xSeq );
return xSeq;
}
-const impl::InternalData & InternalDataProvider::getInternalData() const
-{
- if( m_apData.get())
- return *(m_apData.get());
-
- m_apData.reset( new impl::InternalData());
- return *(m_apData.get());
-}
-
-impl::InternalData & InternalDataProvider::getInternalData()
-{
- if( m_apData.get())
- return *(m_apData.get());
-
- m_apData.reset( new impl::InternalData());
- return *(m_apData.get());
-}
-
void InternalDataProvider::createDefaultData()
{
- getInternalData().createDefaultData();
+ m_aInternalData.createDefaultData();
}
// ____ XDataProvider ____
@@ -983,6 +515,24 @@ void InternalDataProvider::createDefaultData()
return true;
}
+namespace
+{
+
+sal_Int32 lcl_getInnerLevelCount( const vector< vector< OUString > >& rLabels )
+{
+ sal_Int32 nCount = 1;//minimum is 1!
+ vector< vector< OUString > >::const_iterator aLevelIt( rLabels.begin() );
+ vector< vector< OUString > >::const_iterator aLevelEnd( rLabels.end() );
+ for( ;aLevelIt!=aLevelEnd; ++aLevelIt )
+ {
+ const vector< ::rtl::OUString >& rCurrentLevelLabels = *aLevelIt;
+ nCount = std::max<sal_Int32>( rCurrentLevelLabels.size(), nCount );
+ }
+ return nCount;
+}
+
+}//end anonymous namespace
+
Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createDataSource(
const Sequence< beans::PropertyValue >& aArguments )
throw (lang::IllegalArgumentException,
@@ -995,25 +545,51 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData
uno::Sequence< sal_Int32 > aSequenceMapping;
DataSourceHelper::readArguments( aArguments, aRangeRepresentation, aSequenceMapping, bUseColumns, bFirstCellAsLabel, bHasCategories );
+ if( aRangeRepresentation.equals( lcl_aCategoriesRangeName ) )
+ {
+ //return split complex categories if we have any:
+ ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aComplexCategories;
+ vector< vector< OUString > > aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels());
+ if( bUseColumns==m_bDataInColumns )
+ {
+ sal_Int32 nLevelCount = lcl_getInnerLevelCount( aCategories );
+ for( sal_Int32 nL=0; nL<nLevelCount; nL++ )
+ aComplexCategories.push_back( new LabeledDataSequence(
+ new UncachedDataSequence( this
+ , lcl_aCategoriesLevelRangeNamePrefix + OUString::valueOf( nL )
+ , lcl_aCategoriesRoleName ) ) );
+ }
+ else
+ {
+ sal_Int32 nPointCount = m_bDataInColumns ? m_aInternalData.getRowCount() : m_aInternalData.getColumnCount();
+ for( sal_Int32 nP=0; nP<nPointCount; nP++ )
+ aComplexCategories.push_back( new LabeledDataSequence(
+ new UncachedDataSequence( this
+ , lcl_aCategoriesPointRangeNamePrefix + OUString::valueOf( nP )
+ , lcl_aCategoriesRoleName ) ) );
+ }
+ //don't add the created sequences to the map as they are used temporarily only ...
+ return new DataSource( ContainerHelper::ContainerToSequence(aComplexCategories) );
+ }
+
OSL_ASSERT( aRangeRepresentation.equals( lcl_aCompleteRange ));
::std::vector< Reference< chart2::data::XLabeledDataSequence > > aResultLSeqVec;
- impl::InternalData & rData( getInternalData());
// categories
- if ( bHasCategories )
+ if( bHasCategories )
aResultLSeqVec.push_back(
- new LabeledDataSequence( createDataSequenceAndAddToMap( lcl_aCategoriesRangeName, lcl_aCategoriesRoleName )));
+ new LabeledDataSequence( lcl_createDataSequenceAndAddToMap( lcl_aCategoriesRangeName, lcl_aCategoriesRoleName ) ) );
// data with labels
::std::vector< Reference< chart2::data::XLabeledDataSequence > > aDataVec;
- const sal_Int32 nCount = (bUseColumns ? rData.getColumnCount() : rData.getRowCount());
- for( sal_Int32 nIdx=0; nIdx<nCount; ++nIdx )
+ const sal_Int32 nCount = (bUseColumns ? m_aInternalData.getColumnCount() : m_aInternalData.getRowCount());
+ for( sal_Int32 nIdx=0; nIdx<nCount; ++nIdx )
{
aDataVec.push_back(
new LabeledDataSequence(
- createDataSequenceAndAddToMap( OUString::valueOf( nIdx )),
- createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::valueOf( nIdx ))));
+ lcl_createDataSequenceAndAddToMap( OUString::valueOf( nIdx )),
+ lcl_createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::valueOf( nIdx ))));
}
// attention: this data provider has the limitation that it stores
@@ -1085,29 +661,31 @@ Reference< chart2::data::XDataSequence > SAL_CALL InternalDataProvider::createDa
throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
- if( aRangeRepresentation.equals( lcl_aCategoriesRangeName ))
+ if( aRangeRepresentation.match( lcl_aCategoriesRangeName ))
{
+ OSL_ASSERT( aRangeRepresentation.equals( lcl_aCategoriesRangeName ) );//it is not expected nor implmented that only parts of the categories are really requested
+
// categories
- return createDataSequenceAndAddToMap( lcl_aCategoriesRangeName, lcl_aCategoriesRoleName );
+ return lcl_createDataSequenceAndAddToMap( lcl_aCategoriesRangeName, lcl_aCategoriesRoleName );
}
else if( aRangeRepresentation.match( lcl_aLabelRangePrefix ))
{
// label
sal_Int32 nIndex = aRangeRepresentation.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
- return createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::valueOf( nIndex ));
+ return lcl_createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::valueOf( nIndex ));
}
else if( aRangeRepresentation.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "last" )))
{
sal_Int32 nIndex = (m_bDataInColumns
- ? getInternalData().getColumnCount()
- : getInternalData().getRowCount()) - 1;
- return createDataSequenceAndAddToMap( OUString::valueOf( nIndex ));
+ ? m_aInternalData.getColumnCount()
+ : m_aInternalData.getRowCount()) - 1;
+ return lcl_createDataSequenceAndAddToMap( OUString::valueOf( nIndex ));
}
else if( aRangeRepresentation.getLength())
{
// data
sal_Int32 nIndex = aRangeRepresentation.toInt32();
- return createDataSequenceAndAddToMap( OUString::valueOf( nIndex ));
+ return lcl_createDataSequenceAndAddToMap( OUString::valueOf( nIndex ));
}
return Reference< chart2::data::XDataSequence >();
@@ -1125,21 +703,21 @@ Reference< sheet::XRangeSelection > SAL_CALL InternalDataProvider::getRangeSelec
throw (uno::RuntimeException)
{
sal_Bool bResult = false;
- const impl::InternalData & rData( getInternalData());
- if( aRange.equals( lcl_aCategoriesRangeName ))
+ if( aRange.match( lcl_aCategoriesRangeName ))
{
+ OSL_ASSERT( aRange.equals( lcl_aCategoriesRangeName ) );//it is not expected nor implmented that only parts of the categories are really requested
bResult = true;
}
else if( aRange.match( lcl_aLabelRangePrefix ))
{
sal_Int32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
- bResult = (nIndex < (m_bDataInColumns ? rData.getColumnCount(): rData.getRowCount()));
+ bResult = (nIndex < (m_bDataInColumns ? m_aInternalData.getColumnCount(): m_aInternalData.getRowCount()));
}
else
{
sal_Int32 nIndex = aRange.toInt32();
- bResult = (nIndex < (m_bDataInColumns ? rData.getColumnCount(): rData.getRowCount()));
+ bResult = (nIndex < (m_bDataInColumns ? m_aInternalData.getColumnCount(): m_aInternalData.getRowCount()));
}
return bResult;
@@ -1149,34 +727,67 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
throw (uno::RuntimeException)
{
Sequence< uno::Any > aResult;
- const impl::InternalData & rData( getInternalData());
- if( aRange.equals( lcl_aCategoriesRangeName ))
+ if( aRange.match( lcl_aLabelRangePrefix ) )
{
- vector< OUString > aCategories( m_bDataInColumns ? rData.getRowLabels() : rData.getColumnLabels());
- aResult.realloc( aCategories.size());
- transform( aCategories.begin(), aCategories.end(),
- aResult.getArray(), CommonFunctors::makeAny< OUString >());
+ sal_Int32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
+ vector< OUString > aComplexLabel = m_bDataInColumns
+ ? m_aInternalData.getComplexColumnLabel( nIndex )
+ : m_aInternalData.getComplexRowLabel( nIndex );
+ if( !aComplexLabel.empty() )
+ {
+ aResult.realloc( aComplexLabel.size() );
+ transform( aComplexLabel.begin(), aComplexLabel.end(),
+ aResult.getArray(), CommonFunctors::makeAny< OUString >());
+ }
}
- else if( aRange.match( lcl_aLabelRangePrefix ))
+ else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) )
{
- sal_Int32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
- vector< OUString > aLabels( m_bDataInColumns ? rData.getColumnLabels() : rData.getRowLabels());
- if( nIndex < static_cast< sal_Int32 >( aLabels.size()))
+ sal_Int32 nPointIndex = aRange.copy( lcl_aCategoriesPointRangeNamePrefix.getLength() ).toInt32();
+ vector< OUString > aComplexCategory = m_bDataInColumns
+ ? m_aInternalData.getComplexRowLabel( nPointIndex )
+ : m_aInternalData.getComplexColumnLabel( nPointIndex );
+ if( !aComplexCategory.empty() )
+ {
+ aResult.realloc( aComplexCategory.size() );
+ transform( aComplexCategory.begin(), aComplexCategory.end(),
+ aResult.getArray(), CommonFunctors::makeAny< OUString >());
+ }
+ }
+ else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) )
+ {
+ sal_Int32 nLevel = aRange.copy( lcl_aCategoriesLevelRangeNamePrefix.getLength() ).toInt32();
+ vector< vector< OUString > > aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels());
+ if( nLevel < lcl_getInnerLevelCount( aCategories ) )
{
- aResult.realloc( 1 );
- aResult[0] = uno::makeAny( aLabels[ nIndex ] );
+ aResult.realloc( aCategories.size() );
+ transform( aCategories.begin(), aCategories.end(),
+ aResult.getArray(), lcl_makeAnyFromLevelVector(nLevel) );
}
}
+ else if( aRange.equals( lcl_aCategoriesRangeName ) )
+ {
+ Sequence< OUString > aLabels = m_bDataInColumns ? this->getRowDescriptions() : this->getColumnDescriptions();
+ aResult.realloc( aLabels.getLength() );
+ transform( aLabels.getConstArray(), aLabels.getConstArray() + aLabels.getLength(),
+ aResult.getArray(), CommonFunctors::makeAny< OUString >() );
+ }
else
{
sal_Int32 nIndex = aRange.toInt32();
- if( nIndex < (m_bDataInColumns ? rData.getColumnCount() : rData.getRowCount()))
+ if( nIndex >= 0 )
{
- Sequence< double > aData( rData.getDataAt( nIndex, m_bDataInColumns ));
- aResult.realloc( aData.getLength());
- transform( aData.getConstArray(), aData.getConstArray() + aData.getLength(),
- aResult.getArray(), CommonFunctors::makeAny< double >());
+ Sequence< double > aData;
+ if( m_bDataInColumns )
+ aData = m_aInternalData.getColumnValues(nIndex);
+ else
+ aData = m_aInternalData.getRowValues(nIndex);
+ if( aData.getLength() )
+ {
+ aResult.realloc( aData.getLength());
+ transform( aData.getConstArray(), aData.getConstArray() + aData.getLength(),
+ aResult.getArray(), CommonFunctors::makeAny< double >());
+ }
}
}
@@ -1187,61 +798,63 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
const OUString& aRange, const Sequence< uno::Any >& aNewData )
throw (uno::RuntimeException)
{
- impl::InternalData & rData( getInternalData());
-
- if( aRange.equals( lcl_aCategoriesRangeName ))
+ if( aRange.match( lcl_aLabelRangePrefix ) )
+ {
+ vector< OUString > aNewStrings( lcl_AnyToStringVector( aNewData ) );
+ sal_uInt32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
+ if( m_bDataInColumns )
+ m_aInternalData.setComplexColumnLabel( nIndex, aNewStrings );
+ else
+ m_aInternalData.setComplexRowLabel( nIndex, aNewStrings );
+ }
+ else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) )
{
- vector< OUString > aCategories;
- transform( aNewData.getConstArray(), aNewData.getConstArray() + aNewData.getLength(),
- back_inserter( aCategories ), CommonFunctors::AnyToString());
+ vector< OUString > aNewStrings( lcl_AnyToStringVector( aNewData ) );
+ sal_Int32 nPointIndex = aRange.copy( lcl_aCategoriesLevelRangeNamePrefix.getLength()).toInt32();
+ if( m_bDataInColumns )
+ m_aInternalData.setComplexRowLabel( nPointIndex, aNewStrings );
+ else
+ m_aInternalData.setComplexColumnLabel( nPointIndex, aNewStrings );
+ }
+ else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) )
+ {
+ vector< OUString > aNewStrings( lcl_AnyToStringVector( aNewData ) );
+ sal_Int32 nLevel = aRange.copy( lcl_aCategoriesLevelRangeNamePrefix.getLength()).toInt32();
+ vector< vector< OUString > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
+
+ //ensure equal length
+ if( aNewStrings.size() > aComplexCategories.size() )
+ aComplexCategories.resize( aNewStrings.size() );
+ else if( aNewStrings.size() < aComplexCategories.size() )
+ aNewStrings.resize( aComplexCategories.size() );
+
+ transform( aComplexCategories.begin(), aComplexCategories.end(), aNewStrings.begin(),
+ aComplexCategories.begin(), lcl_setStringAtLevel(nLevel) );
if( m_bDataInColumns )
- rData.setRowLabels( aCategories );
+ m_aInternalData.setComplexRowLabels( aComplexCategories );
else
- rData.setColumnLabels( aCategories );
+ m_aInternalData.setComplexColumnLabels( aComplexCategories );
}
- else if( aRange.match( lcl_aLabelRangePrefix ))
+ else if( aRange.equals( lcl_aCategoriesRangeName ) )
{
- sal_uInt32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
- OUString aNewLabel;
- if( aNewData.getLength() &&
- (aNewData[0] >>= aNewLabel))
- {
- if( m_bDataInColumns )
- {
- vector< OUString > aLabels( rData.getColumnLabels());
- if ( aLabels.size() <= nIndex )
- aLabels.push_back(aNewLabel);
- else
- aLabels[ nIndex ] = aNewLabel;
- rData.setColumnLabels( aLabels );
- }
- else
- {
- vector< OUString > aLabels( rData.getRowLabels());
- if ( aLabels.size() <= nIndex )
- aLabels.push_back(aNewLabel);
- else
- aLabels[ nIndex ] = aNewLabel;
- rData.setRowLabels( aLabels );
- }
- }
+ if( m_bDataInColumns )
+ this->setRowDescriptions( lcl_AnyToStringSequence(aNewData) );
+ else
+ this->setColumnDescriptions( lcl_AnyToStringSequence(aNewData) );
}
else
{
sal_Int32 nIndex = aRange.toInt32();
- // ensure that the data is large enough
- if( m_bDataInColumns )
- rData.enlargeData( nIndex, 0 );
- else
- rData.enlargeData( 0, nIndex );
-
- if( nIndex < (m_bDataInColumns ? rData.getColumnCount() : rData.getRowCount()))
+ if( nIndex>=0 )
{
vector< double > aNewDataVec;
transform( aNewData.getConstArray(), aNewData.getConstArray() + aNewData.getLength(),
back_inserter( aNewDataVec ), CommonFunctors::AnyToDouble());
- rData.setDataAt( nIndex, m_bDataInColumns, aNewDataVec );
+ if( m_bDataInColumns )
+ m_aInternalData.setColumnValues( nIndex, aNewDataVec );
+ else
+ m_aInternalData.setRowValues( nIndex, aNewDataVec );
}
}
}
@@ -1251,30 +864,30 @@ void SAL_CALL InternalDataProvider::insertSequence( ::sal_Int32 nAfterIndex )
{
if( m_bDataInColumns )
{
- increaseMapReferences( nAfterIndex + 1, getInternalData().getColumnCount());
- getInternalData().insertColumn( nAfterIndex );
+ lcl_increaseMapReferences( nAfterIndex + 1, m_aInternalData.getColumnCount());
+ m_aInternalData.insertColumn( nAfterIndex );
}
else
{
- increaseMapReferences( nAfterIndex + 1, getInternalData().getRowCount());
- getInternalData().insertRow( nAfterIndex );
+ lcl_increaseMapReferences( nAfterIndex + 1, m_aInternalData.getRowCount());
+ m_aInternalData.insertRow( nAfterIndex );
}
}
void SAL_CALL InternalDataProvider::deleteSequence( ::sal_Int32 nAtIndex )
throw (uno::RuntimeException)
{
- deleteMapReferences( OUString::valueOf( nAtIndex ));
- deleteMapReferences( lcl_aLabelRangePrefix + OUString::valueOf( nAtIndex ));
+ lcl_deleteMapReferences( OUString::valueOf( nAtIndex ));
+ lcl_deleteMapReferences( lcl_aLabelRangePrefix + OUString::valueOf( nAtIndex ));
if( m_bDataInColumns )
{
- decreaseMapReferences( nAtIndex + 1, getInternalData().getColumnCount());
- getInternalData().deleteColumn( nAtIndex );
+ lcl_decreaseMapReferences( nAtIndex + 1, m_aInternalData.getColumnCount());
+ m_aInternalData.deleteColumn( nAtIndex );
}
else
{
- decreaseMapReferences( nAtIndex + 1, getInternalData().getRowCount());
- getInternalData().deleteRow( nAtIndex );
+ lcl_decreaseMapReferences( nAtIndex + 1, m_aInternalData.getRowCount());
+ m_aInternalData.deleteRow( nAtIndex );
}
}
@@ -1282,9 +895,44 @@ void SAL_CALL InternalDataProvider::appendSequence()
throw (uno::RuntimeException)
{
if( m_bDataInColumns )
- getInternalData().appendColumn();
+ m_aInternalData.appendColumn();
else
- getInternalData().appendRow();
+ m_aInternalData.appendRow();
+}
+
+void SAL_CALL InternalDataProvider::insertComplexCategoryLevel( sal_Int32 nLevel )
+ throw (uno::RuntimeException)
+{
+ 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< OUString > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
+ ::std::for_each( aComplexCategories.begin(), aComplexCategories.end(), lcl_insertStringAtLevel(nLevel) );
+ if( m_bDataInColumns )
+ m_aInternalData.setComplexRowLabels( aComplexCategories );
+ else
+ m_aInternalData.setComplexColumnLabels( aComplexCategories );
+
+ tSequenceMapRange aRange( m_aSequenceMap.equal_range( lcl_aCategoriesRangeName ));
+ ::std::for_each( aRange.first, aRange.second, lcl_setModified());
+ }
+}
+void SAL_CALL InternalDataProvider::deleteComplexCategoryLevel( sal_Int32 nLevel )
+ throw (uno::RuntimeException)
+{
+ 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< OUString > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
+ ::std::for_each( aComplexCategories.begin(), aComplexCategories.end(), lcl_removeStringAtLevel(nLevel) );
+ if( m_bDataInColumns )
+ m_aInternalData.setComplexRowLabels( aComplexCategories );
+ else
+ m_aInternalData.setComplexColumnLabels( aComplexCategories );
+
+ tSequenceMapRange aRange( m_aSequenceMap.equal_range( lcl_aCategoriesRangeName ));
+ ::std::for_each( aRange.first, aRange.second, lcl_setModified());
+ }
}
void SAL_CALL InternalDataProvider::insertDataPointForAllSequences( ::sal_Int32 nAfterIndex )
@@ -1293,22 +941,22 @@ void SAL_CALL InternalDataProvider::insertDataPointForAllSequences( ::sal_Int32
sal_Int32 nMaxRep = 0;
if( m_bDataInColumns )
{
- getInternalData().insertRow( nAfterIndex );
- nMaxRep = getInternalData().getColumnCount();
+ m_aInternalData.insertRow( nAfterIndex );
+ nMaxRep = m_aInternalData.getColumnCount();
}
else
{
- getInternalData().insertColumn( nAfterIndex );
- nMaxRep = getInternalData().getRowCount();
+ m_aInternalData.insertColumn( nAfterIndex );
+ nMaxRep = m_aInternalData.getRowCount();
}
// notify change to all affected ranges
tSequenceMap::const_iterator aBegin( m_aSequenceMap.lower_bound( C2U("0")));
tSequenceMap::const_iterator aEnd( m_aSequenceMap.upper_bound( OUString::valueOf( nMaxRep )));
- ::std::for_each( aBegin, aEnd, lcl_modifySeqMapValue());
+ ::std::for_each( aBegin, aEnd, lcl_setModified());
tSequenceMapRange aRange( m_aSequenceMap.equal_range( lcl_aCategoriesRangeName ));
- ::std::for_each( aRange.first, aRange.second, lcl_modifySeqMapValue());
+ ::std::for_each( aRange.first, aRange.second, lcl_setModified());
}
void SAL_CALL InternalDataProvider::deleteDataPointForAllSequences( ::sal_Int32 nAtIndex )
@@ -1317,46 +965,49 @@ void SAL_CALL InternalDataProvider::deleteDataPointForAllSequences( ::sal_Int32
sal_Int32 nMaxRep = 0;
if( m_bDataInColumns )
{
- getInternalData().deleteRow( nAtIndex );
- nMaxRep = getInternalData().getColumnCount();
+ m_aInternalData.deleteRow( nAtIndex );
+ nMaxRep = m_aInternalData.getColumnCount();
}
else
{
- getInternalData().deleteColumn( nAtIndex );
- nMaxRep = getInternalData().getRowCount();
+ m_aInternalData.deleteColumn( nAtIndex );
+ nMaxRep = m_aInternalData.getRowCount();
}
// notify change to all affected ranges
tSequenceMap::const_iterator aBegin( m_aSequenceMap.lower_bound( C2U("0")));
tSequenceMap::const_iterator aEnd( m_aSequenceMap.upper_bound( OUString::valueOf( nMaxRep )));
- ::std::for_each( aBegin, aEnd, lcl_modifySeqMapValue());
+ ::std::for_each( aBegin, aEnd, lcl_setModified());
tSequenceMapRange aRange( m_aSequenceMap.equal_range( lcl_aCategoriesRangeName ));
- ::std::for_each( aRange.first, aRange.second, lcl_modifySeqMapValue());
+ ::std::for_each( aRange.first, aRange.second, lcl_setModified());
}
void SAL_CALL InternalDataProvider::swapDataPointWithNextOneForAllSequences( ::sal_Int32 nAtIndex )
throw (uno::RuntimeException)
{
- getInternalData().swapAllDataAtIndexWithNext( nAtIndex, m_bDataInColumns );
+ if( m_bDataInColumns )
+ m_aInternalData.swapRowWithNext( nAtIndex );
+ else
+ m_aInternalData.swapColumnWithNext( nAtIndex );
sal_Int32 nMaxRep = (m_bDataInColumns
- ? getInternalData().getColumnCount()
- : getInternalData().getRowCount());
+ ? m_aInternalData.getColumnCount()
+ : m_aInternalData.getRowCount());
// notify change to all affected ranges
tSequenceMap::const_iterator aBegin( m_aSequenceMap.lower_bound( C2U("0")));
tSequenceMap::const_iterator aEnd( m_aSequenceMap.upper_bound( OUString::valueOf( nMaxRep )));
- ::std::for_each( aBegin, aEnd, lcl_modifySeqMapValue());
+ ::std::for_each( aBegin, aEnd, lcl_setModified());
tSequenceMapRange aRange( m_aSequenceMap.equal_range( lcl_aCategoriesRangeName ));
- ::std::for_each( aRange.first, aRange.second, lcl_modifySeqMapValue());
+ ::std::for_each( aRange.first, aRange.second, lcl_setModified());
}
void SAL_CALL InternalDataProvider::registerDataSequenceForChanges( const Reference< chart2::data::XDataSequence >& xSeq )
throw (uno::RuntimeException)
{
if( xSeq.is())
- addDataSequenceToMap( xSeq->getSourceRangeRepresentation(), xSeq );
+ lcl_addDataSequenceToMap( xSeq->getSourceRangeRepresentation(), xSeq );
}
@@ -1367,28 +1018,28 @@ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRang
{
XMLRangeHelper::CellRange aRange;
aRange.aTableName = OUString(RTL_CONSTASCII_USTRINGPARAM("local-table"));
- impl::InternalData & rData( getInternalData());
// attention: this data provider has the limitation that it stores
// internally if data comes from columns or rows. It is intended for
// creating only one used data source.
// @todo: add this information in the range representation strings
- if( aRangeRepresentation.equals( lcl_aCategoriesRangeName ))
+ if( aRangeRepresentation.match( lcl_aCategoriesRangeName ))
{
+ OSL_ASSERT( aRangeRepresentation.equals( lcl_aCategoriesRangeName ) );//it is not expected nor implmented that only parts of the categories are really requested
aRange.aUpperLeft.bIsEmpty = false;
if( m_bDataInColumns )
{
aRange.aUpperLeft.nColumn = 0;
aRange.aUpperLeft.nRow = 1;
aRange.aLowerRight = aRange.aUpperLeft;
- aRange.aLowerRight.nRow = rData.getRowCount();
+ aRange.aLowerRight.nRow = m_aInternalData.getRowCount();
}
else
{
aRange.aUpperLeft.nColumn = 1;
aRange.aUpperLeft.nRow = 0;
aRange.aLowerRight = aRange.aUpperLeft;
- aRange.aLowerRight.nColumn = rData.getColumnCount();
+ aRange.aLowerRight.nColumn = m_aInternalData.getColumnCount();
}
}
else if( aRangeRepresentation.match( lcl_aLabelRangePrefix ))
@@ -1413,8 +1064,8 @@ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRang
aRange.aLowerRight.bIsEmpty = false;
aRange.aUpperLeft.nColumn = 0;
aRange.aUpperLeft.nRow = 0;
- aRange.aLowerRight.nColumn = rData.getColumnCount();
- aRange.aLowerRight.nRow = rData.getRowCount();
+ aRange.aLowerRight.nColumn = m_aInternalData.getColumnCount();
+ aRange.aLowerRight.nRow = m_aInternalData.getRowCount();
}
else
{
@@ -1425,14 +1076,14 @@ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRang
aRange.aUpperLeft.nColumn = nIndex + 1;
aRange.aUpperLeft.nRow = 1;
aRange.aLowerRight = aRange.aUpperLeft;
- aRange.aLowerRight.nRow = rData.getRowCount();
+ aRange.aLowerRight.nRow = m_aInternalData.getRowCount();
}
else
{
aRange.aUpperLeft.nColumn = 1;
aRange.aUpperLeft.nRow = nIndex + 1;
aRange.aLowerRight = aRange.aUpperLeft;
- aRange.aLowerRight.nColumn = rData.getColumnCount();
+ aRange.aLowerRight.nColumn = m_aInternalData.getColumnCount();
}
}
@@ -1481,46 +1132,130 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM
return OUString::valueOf( aRange.aUpperLeft.nRow - 1 );
}
+namespace
+{
+Sequence< Sequence< OUString > > lcl_convertComplexVectorToSequence( const vector< vector< OUString > >& rIn )
+{
+ Sequence< Sequence< OUString > > aRet;
+ sal_Int32 nOuterCount = rIn.size();
+ if( nOuterCount )
+ {
+ aRet.realloc(nOuterCount);
+ for( sal_Int32 nN=0; nN<nOuterCount; nN++)
+ aRet[nN]=ContainerHelper::ContainerToSequence( rIn[nN] );
+ }
+ return aRet;
+}
+
+vector< vector< OUString > > lcl_convertComplexSequenceToVector( const Sequence< Sequence< OUString > >& rIn )
+{
+ vector< vector< OUString > > aRet;
+ sal_Int32 nOuterCount = rIn.getLength();
+ for( sal_Int32 nN=0; nN<nOuterCount; nN++)
+ aRet.push_back( ContainerHelper::SequenceToVector( rIn[nN] ) );
+ return aRet;
+}
+
+class SplitCategoriesProvider_ForComplexDescriptions : public SplitCategoriesProvider
+{
+public:
+
+ explicit SplitCategoriesProvider_ForComplexDescriptions( const ::std::vector< ::std::vector< ::rtl::OUString > >& rComplexDescriptions )
+ : m_rComplexDescriptions( rComplexDescriptions )
+ {}
+ virtual ~SplitCategoriesProvider_ForComplexDescriptions()
+ {}
+
+ virtual sal_Int32 getLevelCount() const;
+ virtual uno::Sequence< rtl::OUString > getStringsForLevel( sal_Int32 nIndex ) const;
+
+private:
+ const ::std::vector< ::std::vector< ::rtl::OUString > >& m_rComplexDescriptions;
+};
+
+sal_Int32 SplitCategoriesProvider_ForComplexDescriptions::getLevelCount() const
+{
+ return lcl_getInnerLevelCount( m_rComplexDescriptions );
+}
+uno::Sequence< rtl::OUString > SplitCategoriesProvider_ForComplexDescriptions::getStringsForLevel( sal_Int32 nLevel ) const
+{
+ uno::Sequence< rtl::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;
+}
+
+}//anonymous namespace
+
+// ____ XComplexDescriptionAccess ____
+Sequence< Sequence< OUString > > SAL_CALL InternalDataProvider::getComplexRowDescriptions() throw (uno::RuntimeException)
+{
+ return lcl_convertComplexVectorToSequence( m_aInternalData.getComplexRowLabels() );
+}
+void SAL_CALL InternalDataProvider::setComplexRowDescriptions( const Sequence< Sequence< ::rtl::OUString > >& aRowDescriptions ) throw (uno::RuntimeException)
+{
+ m_aInternalData.setComplexRowLabels( lcl_convertComplexSequenceToVector(aRowDescriptions) );
+}
+Sequence< Sequence< ::rtl::OUString > > SAL_CALL InternalDataProvider::getComplexColumnDescriptions() throw (uno::RuntimeException)
+{
+ return lcl_convertComplexVectorToSequence( m_aInternalData.getComplexColumnLabels() );
+}
+void SAL_CALL InternalDataProvider::setComplexColumnDescriptions( const Sequence< Sequence< ::rtl::OUString > >& aColumnDescriptions ) throw (uno::RuntimeException)
+{
+ m_aInternalData.setComplexColumnLabels( lcl_convertComplexSequenceToVector(aColumnDescriptions) );
+}
+
// ____ XChartDataArray ____
-// note: do not use m_bDataInColumns for all XChartDataArray-specific code
-// the chart-API assumes data is always in rows
Sequence< Sequence< double > > SAL_CALL InternalDataProvider::getData()
throw (uno::RuntimeException)
{
- return getInternalData().getData( false );
+ return m_aInternalData.getData();
}
-void SAL_CALL InternalDataProvider::setData( const Sequence< Sequence< double > >& aData )
+void SAL_CALL InternalDataProvider::setData( const Sequence< Sequence< double > >& rDataInRows )
throw (uno::RuntimeException)
{
- return getInternalData().setData( aData, false );
+ return m_aInternalData.setData( rDataInRows );
}
-Sequence< OUString > SAL_CALL InternalDataProvider::getRowDescriptions()
+void SAL_CALL InternalDataProvider::setRowDescriptions( const Sequence< OUString >& aRowDescriptions )
throw (uno::RuntimeException)
{
- return ContainerHelper::ContainerToSequence( getInternalData().getRowLabels());
+ vector< vector< OUString > > aComplexDescriptions( aRowDescriptions.getLength() );
+ transform( aComplexDescriptions.begin(), aComplexDescriptions.end(), aRowDescriptions.getConstArray(),
+ aComplexDescriptions.begin(), lcl_setStringAtLevel(0) );
+ m_aInternalData.setComplexRowLabels( aComplexDescriptions );
}
-void SAL_CALL InternalDataProvider::setRowDescriptions( const Sequence< OUString >& aRowDescriptions )
+void SAL_CALL InternalDataProvider::setColumnDescriptions( const Sequence< OUString >& aColumnDescriptions )
throw (uno::RuntimeException)
{
- getInternalData().setRowLabels( ContainerHelper::SequenceToVector( aRowDescriptions ));
+ vector< vector< OUString > > aComplexDescriptions( aColumnDescriptions.getLength() );
+ transform( aComplexDescriptions.begin(), aComplexDescriptions.end(), aColumnDescriptions.getConstArray(),
+ aComplexDescriptions.begin(), lcl_setStringAtLevel(0) );
+ m_aInternalData.setComplexColumnLabels( aComplexDescriptions );
}
-Sequence< OUString > SAL_CALL InternalDataProvider::getColumnDescriptions()
+Sequence< OUString > SAL_CALL InternalDataProvider::getRowDescriptions()
throw (uno::RuntimeException)
{
- return ContainerHelper::ContainerToSequence( getInternalData().getColumnLabels());
+ vector< vector< OUString > > aComplexLabels( m_aInternalData.getComplexRowLabels() );
+ SplitCategoriesProvider_ForComplexDescriptions aProvider( aComplexLabels );
+ return ExplicitCategoriesProvider::getExplicitSimpleCategories( aProvider );
}
-void SAL_CALL InternalDataProvider::setColumnDescriptions( const Sequence< OUString >& aColumnDescriptions )
+Sequence< OUString > SAL_CALL InternalDataProvider::getColumnDescriptions()
throw (uno::RuntimeException)
{
- getInternalData().setColumnLabels( ContainerHelper::SequenceToVector( aColumnDescriptions ));
+ vector< vector< OUString > > aComplexLabels( m_aInternalData.getComplexColumnLabels() );
+ SplitCategoriesProvider_ForComplexDescriptions aProvider( aComplexLabels );
+ return ExplicitCategoriesProvider::getExplicitSimpleCategories( aProvider );
}
-
// ____ XChartData (base of XChartDataArray) ____
void SAL_CALL InternalDataProvider::addChartDataChangeEventListener(
const Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& )
diff --git a/chart2/source/tools/LabeledDataSequence.cxx b/chart2/source/tools/LabeledDataSequence.cxx
index bb0ec7053497..21ade3aefadc 100644
--- a/chart2/source/tools/LabeledDataSequence.cxx
+++ b/chart2/source/tools/LabeledDataSequence.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LabeledDataSequence.cxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/LegendHelper.cxx b/chart2/source/tools/LegendHelper.cxx
index 60da06f2b638..4e778db1a68c 100644
--- a/chart2/source/tools/LegendHelper.cxx
+++ b/chart2/source/tools/LegendHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LegendHelper.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx
index 6f873b98580e..68ed06208d11 100644
--- a/chart2/source/tools/LifeTime.cxx
+++ b/chart2/source/tools/LifeTime.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LifeTime.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/LineProperties.cxx b/chart2/source/tools/LineProperties.cxx
index 1c6550dd26a1..cb72d4336faa 100644
--- a/chart2/source/tools/LineProperties.cxx
+++ b/chart2/source/tools/LineProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LineProperties.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/LinearRegressionCurveCalculator.cxx b/chart2/source/tools/LinearRegressionCurveCalculator.cxx
index a7512378ba4c..7a372cff4f51 100644
--- a/chart2/source/tools/LinearRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/LinearRegressionCurveCalculator.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LinearRegressionCurveCalculator.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
index 1832aea912b0..c7c2db60431c 100644
--- a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LogarithmicRegressionCurveCalculator.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
index f9b1ae017e07..8277a5830b0a 100644
--- a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MeanValueRegressionCurveCalculator.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/MediaDescriptorHelper.cxx b/chart2/source/tools/MediaDescriptorHelper.cxx
index d379d2152a38..687bc203a84f 100644
--- a/chart2/source/tools/MediaDescriptorHelper.cxx
+++ b/chart2/source/tools/MediaDescriptorHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MediaDescriptorHelper.cxx,v $
- * $Revision: 1.5.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ModifyListenerCallBack.cxx b/chart2/source/tools/ModifyListenerCallBack.cxx
index 0e8edbb40f4d..ae13b65c39c2 100644
--- a/chart2/source/tools/ModifyListenerCallBack.cxx
+++ b/chart2/source/tools/ModifyListenerCallBack.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ModifyListenerCallBack.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ModifyListenerHelper.cxx b/chart2/source/tools/ModifyListenerHelper.cxx
index 722ecb82e155..7ac5a2786cef 100644
--- a/chart2/source/tools/ModifyListenerHelper.cxx
+++ b/chart2/source/tools/ModifyListenerHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ModifyListenerHelper.cxx,v $
- * $Revision: 1.5.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/MutexContainer.cxx b/chart2/source/tools/MutexContainer.cxx
index 5023209b4e0e..4fbb14674cdb 100644
--- a/chart2/source/tools/MutexContainer.cxx
+++ b/chart2/source/tools/MutexContainer.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MutexContainer.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/NameContainer.cxx b/chart2/source/tools/NameContainer.cxx
index 815f72257490..05169c4608f9 100644
--- a/chart2/source/tools/NameContainer.cxx
+++ b/chart2/source/tools/NameContainer.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NameContainer.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/NamedFillProperties.cxx b/chart2/source/tools/NamedFillProperties.cxx
index f2b4b214d04f..f904c34c1df1 100644
--- a/chart2/source/tools/NamedFillProperties.cxx
+++ b/chart2/source/tools/NamedFillProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NamedFillProperties.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/NamedLineProperties.cxx b/chart2/source/tools/NamedLineProperties.cxx
index 7f7bbefbc0bb..02680abf690e 100644
--- a/chart2/source/tools/NamedLineProperties.cxx
+++ b/chart2/source/tools/NamedLineProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NamedLineProperties.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/NamedProperties.cxx b/chart2/source/tools/NamedProperties.cxx
index 87bf763dbc12..4fcb536b3279 100644
--- a/chart2/source/tools/NamedProperties.cxx
+++ b/chart2/source/tools/NamedProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NamedProperties.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/OPropertySet.cxx b/chart2/source/tools/OPropertySet.cxx
index d1cf27758110..a1caac803dd7 100644
--- a/chart2/source/tools/OPropertySet.cxx
+++ b/chart2/source/tools/OPropertySet.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: OPropertySet.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index 07f8d16efffd..0599f9317aed 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ObjectIdentifier.cxx,v $
- * $Revision: 1.8.24.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -62,6 +59,7 @@ using namespace ::com::sun::star::chart2;
using rtl::OUString;
using rtl::OUStringBuffer;
using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Any;
static OUString m_aMultiClick( C2U("MultiClick") );
static OUString m_aDragMethodEquals( C2U("DragMethod=") );
@@ -254,6 +252,94 @@ void lcl_getDiagramAndCooSys( const OUString& rObjectCID
} //anonymous namespace
+ObjectIdentifier::ObjectIdentifier()
+ :m_aObjectCID( OUString() )
+ ,m_xAdditionalShape( 0 )
+{
+}
+
+ObjectIdentifier::ObjectIdentifier( const OUString& rObjectCID )
+ :m_aObjectCID( rObjectCID )
+ ,m_xAdditionalShape( 0 )
+{
+}
+
+ObjectIdentifier::ObjectIdentifier( const Reference< drawing::XShape >& rxShape )
+ :m_aObjectCID( OUString() )
+ ,m_xAdditionalShape( rxShape )
+{
+}
+
+ObjectIdentifier::ObjectIdentifier( const Any& rAny )
+ :m_aObjectCID( OUString() )
+ ,m_xAdditionalShape( 0 )
+{
+ const uno::Type& rType = rAny.getValueType();
+ if ( rType == ::getCppuType( static_cast< const OUString* >( 0 ) ) )
+ {
+ rAny >>= m_aObjectCID;
+ }
+ else if ( rType == ::getCppuType( static_cast< const Reference< drawing::XShape >* >( 0 ) ) )
+ {
+ rAny >>= m_xAdditionalShape;
+ }
+}
+
+ObjectIdentifier::~ObjectIdentifier()
+{
+}
+
+ObjectIdentifier::ObjectIdentifier( const ObjectIdentifier& rOID )
+ :m_aObjectCID( rOID.m_aObjectCID )
+ ,m_xAdditionalShape( rOID.m_xAdditionalShape )
+{
+
+}
+
+ObjectIdentifier& ObjectIdentifier::operator=( const ObjectIdentifier& rOID )
+{
+ m_aObjectCID = rOID.m_aObjectCID;
+ m_xAdditionalShape = rOID.m_xAdditionalShape;
+ return *this;
+}
+
+bool ObjectIdentifier::operator==( const ObjectIdentifier& rOID ) const
+{
+ if ( areIdenticalObjects( m_aObjectCID, rOID.m_aObjectCID ) &&
+ ( m_xAdditionalShape == rOID.m_xAdditionalShape ) )
+ {
+ return true;
+ }
+ return false;
+}
+
+bool ObjectIdentifier::operator!=( const ObjectIdentifier& rOID ) const
+{
+ return !operator==( rOID );
+}
+
+bool ObjectIdentifier::operator<( const ObjectIdentifier& rOID ) const
+{
+ bool bReturn = false;
+ if ( m_aObjectCID.getLength() && rOID.m_aObjectCID.getLength() )
+ {
+ bReturn = ( m_aObjectCID.compareTo( rOID.m_aObjectCID ) < 0 );
+ }
+ else if ( m_aObjectCID.getLength() )
+ {
+ bReturn = true;
+ }
+ else if ( rOID.m_aObjectCID.getLength() )
+ {
+ bReturn = false;
+ }
+ else if ( m_xAdditionalShape.is() && rOID.m_xAdditionalShape.is() )
+ {
+ bReturn = ( m_xAdditionalShape < rOID.m_xAdditionalShape );
+ }
+ return bReturn;
+}
+
//static
OUString ObjectIdentifier::createClassifiedIdentifierForObject(
const Reference< uno::XInterface >& xObject
@@ -668,6 +754,20 @@ bool ObjectIdentifier::isDragableObject( const OUString& rClassifiedIdentifier )
return false;
}
+bool ObjectIdentifier::isDragableObject()
+{
+ bool bReturn = false;
+ if ( isAutoGeneratedObject() )
+ {
+ bReturn = isDragableObject( m_aObjectCID );
+ }
+ else if ( isAdditionalShape() )
+ {
+ bReturn = true;
+ }
+ return bReturn;
+}
+
//static
bool ObjectIdentifier::isRotateableObject( const OUString& rClassifiedIdentifier )
{
@@ -906,6 +1006,20 @@ ObjectType ObjectIdentifier::getObjectType( const OUString& rCID )
return eRet;
}
+ObjectType ObjectIdentifier::getObjectType()
+{
+ ObjectType eObjectType( OBJECTTYPE_UNKNOWN );
+ if ( isAutoGeneratedObject() )
+ {
+ eObjectType = getObjectType( m_aObjectCID );
+ }
+ else if ( isAdditionalShape() )
+ {
+ eObjectType = OBJECTTYPE_SHAPE;
+ }
+ return eObjectType;
+}
+
//static
OUString ObjectIdentifier::createDataCurveCID(
const OUString& rSeriesParticle
@@ -1332,7 +1446,46 @@ OUString ObjectIdentifier::getMovedSeriesCID( const ::rtl::OUString& rObjectCID,
OUString aRet = ObjectIdentifier::createParticleForSeries( nDiagramIndex, nCooSysIndex, nChartTypeIndex, nSeriesIndex );
return ObjectIdentifier::createClassifiedIdentifierForParticle( aRet );
}
-//static
+
+bool ObjectIdentifier::isValid() const
+{
+ return ( isAutoGeneratedObject() || isAdditionalShape() );
+}
+
+bool ObjectIdentifier::isAutoGeneratedObject() const
+{
+ return ( m_aObjectCID.getLength() > 0 );
+}
+
+bool ObjectIdentifier::isAdditionalShape() const
+{
+ return m_xAdditionalShape.is();
+}
+
+OUString ObjectIdentifier::getObjectCID() const
+{
+ return m_aObjectCID;
+}
+
+Reference< drawing::XShape > ObjectIdentifier::getAdditionalShape() const
+{
+ return m_xAdditionalShape;
+}
+
+Any ObjectIdentifier::getAny() const
+{
+ Any aAny;
+ if ( isAutoGeneratedObject() )
+ {
+ aAny = uno::makeAny( getObjectCID() );
+ }
+ else if ( isAdditionalShape() )
+ {
+ aAny = uno::makeAny( getAdditionalShape() );
+ }
+ return aAny;
+}
+
//.............................................................................
} //namespace chart
//.............................................................................
diff --git a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
index 14869f5ed007..b1d10424b9a1 100644
--- a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PotentialRegressionCurveCalculator.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/PropertyHelper.cxx b/chart2/source/tools/PropertyHelper.cxx
index f5f59c4c405a..dd0a1ad6cf2f 100644
--- a/chart2/source/tools/PropertyHelper.cxx
+++ b/chart2/source/tools/PropertyHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PropertyHelper.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx
index bfbab86e9008..20359bfa6b4c 100644
--- a/chart2/source/tools/RangeHighlighter.cxx
+++ b/chart2/source/tools/RangeHighlighter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RangeHighlighter.cxx,v $
- * $Revision: 1.6.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,6 +39,7 @@
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
#define PREFERED_DEFAULT_COLOR 0x0000ff
@@ -109,66 +107,81 @@ void RangeHighlighter::determineRanges()
m_bIncludeHiddenCells = ChartModelHelper::isIncludeHiddenCells( xChartModel );
uno::Any aSelection( m_xSelectionSupplier->getSelection());
- OUString aCID;
- if(( aSelection >>= aCID ) &&
- aCID.getLength() > 0 )
+ const uno::Type& rType = aSelection.getValueType();
+
+ if ( rType == ::getCppuType( static_cast< const OUString* >( 0 ) ) )
{
// @todo??: maybe getSelection() should return a model object rather than a CID
- ObjectType eObjectType = ObjectIdentifier::getObjectType( aCID );
- sal_Int32 nIndex = ObjectIdentifier::getIndexFromParticleOrCID( aCID );
- Reference< chart2::XDataSeries > xDataSeries( ObjectIdentifier::getDataSeriesForCID( aCID, xChartModel ) );
- if( OBJECTTYPE_LEGEND_ENTRY == eObjectType )
+ OUString aCID;
+ aSelection >>= aCID;
+ if ( aCID.getLength() > 0 )
{
- OUString aParentParticel( ObjectIdentifier::getFullParentParticle( aCID ) );
- ObjectType eParentObjectType = ObjectIdentifier::getObjectType( aParentParticel );
- eObjectType = eParentObjectType;
- if( OBJECTTYPE_DATA_POINT == eObjectType )
- nIndex = ObjectIdentifier::getIndexFromParticleOrCID( aParentParticel );
- }
+ ObjectType eObjectType = ObjectIdentifier::getObjectType( aCID );
+ sal_Int32 nIndex = ObjectIdentifier::getIndexFromParticleOrCID( aCID );
+ Reference< chart2::XDataSeries > xDataSeries( ObjectIdentifier::getDataSeriesForCID( aCID, xChartModel ) );
+ if( OBJECTTYPE_LEGEND_ENTRY == eObjectType )
+ {
+ OUString aParentParticel( ObjectIdentifier::getFullParentParticle( aCID ) );
+ ObjectType eParentObjectType = ObjectIdentifier::getObjectType( aParentParticel );
+ eObjectType = eParentObjectType;
+ if( OBJECTTYPE_DATA_POINT == eObjectType )
+ nIndex = ObjectIdentifier::getIndexFromParticleOrCID( aParentParticel );
+ }
- if( OBJECTTYPE_DATA_POINT == eObjectType || OBJECTTYPE_DATA_LABEL == eObjectType )
- {
- // Data Point
- fillRangesForDataPoint( xDataSeries, nIndex );
- return;
- }
- else if( OBJECTTYPE_DATA_ERRORS == eObjectType )
- {
- // select error bar ranges, or data series, if the style is
- // not set to FROM_DATA
- fillRangesForErrorBars( ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ), xDataSeries );
- return;
- }
- else if( xDataSeries.is() )
- {
- // Data Series
- fillRangesForDataSeries( xDataSeries );
- return;
- }
- else if( OBJECTTYPE_AXIS == eObjectType )
- {
- // Axis (Categories)
- Reference< chart2::XAxis > xAxis( ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ), uno::UNO_QUERY );
- if( xAxis.is())
+ if( OBJECTTYPE_DATA_POINT == eObjectType || OBJECTTYPE_DATA_LABEL == eObjectType )
{
- fillRangesForCategories( xAxis );
+ // Data Point
+ fillRangesForDataPoint( xDataSeries, nIndex );
return;
}
- }
- else if( OBJECTTYPE_PAGE == eObjectType
- || OBJECTTYPE_DIAGRAM == eObjectType
- || OBJECTTYPE_DIAGRAM_WALL == eObjectType
- || OBJECTTYPE_DIAGRAM_FLOOR == eObjectType
- )
- {
- // Diagram
- Reference< chart2::XDiagram > xDia( ObjectIdentifier::getDiagramForCID( aCID, xChartModel ) );
- if( xDia.is())
+ else if( OBJECTTYPE_DATA_ERRORS == eObjectType )
{
- fillRangesForDiagram( xDia );
+ // select error bar ranges, or data series, if the style is
+ // not set to FROM_DATA
+ fillRangesForErrorBars( ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ), xDataSeries );
return;
}
+ else if( xDataSeries.is() )
+ {
+ // Data Series
+ fillRangesForDataSeries( xDataSeries );
+ return;
+ }
+ else if( OBJECTTYPE_AXIS == eObjectType )
+ {
+ // Axis (Categories)
+ Reference< chart2::XAxis > xAxis( ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ), uno::UNO_QUERY );
+ if( xAxis.is())
+ {
+ fillRangesForCategories( xAxis );
+ return;
+ }
+ }
+ else if( OBJECTTYPE_PAGE == eObjectType
+ || OBJECTTYPE_DIAGRAM == eObjectType
+ || OBJECTTYPE_DIAGRAM_WALL == eObjectType
+ || OBJECTTYPE_DIAGRAM_FLOOR == eObjectType
+ )
+ {
+ // Diagram
+ Reference< chart2::XDiagram > xDia( ObjectIdentifier::getDiagramForCID( aCID, xChartModel ) );
+ if( xDia.is())
+ {
+ fillRangesForDiagram( xDia );
+ return;
+ }
+ }
+ }
+ }
+ else if ( rType == ::getCppuType( static_cast< const Reference< drawing::XShape >* >( 0 ) ) )
+ {
+ // #i12587# support for shapes in chart
+ Reference< drawing::XShape > xShape;
+ aSelection >>= xShape;
+ if ( xShape.is() )
+ {
+ return;
}
}
else
diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx
index ddddc7d71ee4..5a37f4980323 100644
--- a/chart2/source/tools/ReferenceSizeProvider.cxx
+++ b/chart2/source/tools/ReferenceSizeProvider.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ReferenceSizeProvider.cxx,v $
- * $Revision: 1.5.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/RegressionCalculationHelper.hxx b/chart2/source/tools/RegressionCalculationHelper.hxx
index b70caf1d2c4e..df407482b34d 100644
--- a/chart2/source/tools/RegressionCalculationHelper.hxx
+++ b/chart2/source/tools/RegressionCalculationHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionCalculationHelper.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/RegressionCurveCalculator.cxx b/chart2/source/tools/RegressionCurveCalculator.cxx
index e33256d77891..68e041e668ca 100644
--- a/chart2/source/tools/RegressionCurveCalculator.cxx
+++ b/chart2/source/tools/RegressionCurveCalculator.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionCurveCalculator.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx
index 8a4fd8ce4f7e..b553dbc2d217 100644
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart2/source/tools/RegressionCurveHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionCurveHelper.cxx,v $
- * $Revision: 1.15.16.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/RegressionCurveModel.cxx b/chart2/source/tools/RegressionCurveModel.cxx
index dea90a312845..cf5be998308e 100644
--- a/chart2/source/tools/RegressionCurveModel.cxx
+++ b/chart2/source/tools/RegressionCurveModel.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionCurveModel.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/RegressionCurveModel.hxx b/chart2/source/tools/RegressionCurveModel.hxx
index a2a16d0c8ed5..82098a76e45a 100644
--- a/chart2/source/tools/RegressionCurveModel.hxx
+++ b/chart2/source/tools/RegressionCurveModel.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionCurveModel.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/RegressionEquation.cxx b/chart2/source/tools/RegressionEquation.cxx
index b79c75cf4a28..ea16e5b7702a 100644
--- a/chart2/source/tools/RegressionEquation.cxx
+++ b/chart2/source/tools/RegressionEquation.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionEquation.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/RegressionEquation.hxx b/chart2/source/tools/RegressionEquation.hxx
index 149c0a8f0b32..35dbd828370d 100644
--- a/chart2/source/tools/RegressionEquation.hxx
+++ b/chart2/source/tools/RegressionEquation.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RegressionEquation.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/RelativePositionHelper.cxx b/chart2/source/tools/RelativePositionHelper.cxx
index bce9bce37dbb..4d566b1f7f48 100644
--- a/chart2/source/tools/RelativePositionHelper.cxx
+++ b/chart2/source/tools/RelativePositionHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RelativePositionHelper.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/RelativeSizeHelper.cxx b/chart2/source/tools/RelativeSizeHelper.cxx
index b9b03cf81df4..d3da090ca397 100644
--- a/chart2/source/tools/RelativeSizeHelper.cxx
+++ b/chart2/source/tools/RelativeSizeHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RelativeSizeHelper.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ResId.cxx b/chart2/source/tools/ResId.cxx
index 98706b9c5c4f..0d6e35974aaa 100644
--- a/chart2/source/tools/ResId.cxx
+++ b/chart2/source/tools/ResId.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ResId.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/RessourceManager.cxx b/chart2/source/tools/RessourceManager.cxx
index ef8818e07473..a2d43b309019 100644
--- a/chart2/source/tools/RessourceManager.cxx
+++ b/chart2/source/tools/RessourceManager.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RessourceManager.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx
index 4a67b0b0a45b..e106f1dcc5e2 100644
--- a/chart2/source/tools/Scaling.cxx
+++ b/chart2/source/tools/Scaling.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Scaling.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/SceneProperties.cxx b/chart2/source/tools/SceneProperties.cxx
index cbf048be914c..21a95d99be7d 100644
--- a/chart2/source/tools/SceneProperties.cxx
+++ b/chart2/source/tools/SceneProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SceneProperties.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/StatisticsHelper.cxx b/chart2/source/tools/StatisticsHelper.cxx
index f820fb78c89e..721451c276da 100644
--- a/chart2/source/tools/StatisticsHelper.cxx
+++ b/chart2/source/tools/StatisticsHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: StatisticsHelper.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx
index 1b584a9fb39a..44ed73eade43 100644
--- a/chart2/source/tools/ThreeDHelper.cxx
+++ b/chart2/source/tools/ThreeDHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ThreeDHelper.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +34,7 @@
#include "ChartTypeHelper.hxx"
#include "BaseGFXHelper.hxx"
#include "DataSeriesHelper.hxx"
-#include <svx/unoprnms.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>
diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx
index fe10c92e78cc..828a523245ff 100644
--- a/chart2/source/tools/TitleHelper.cxx
+++ b/chart2/source/tools/TitleHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TitleHelper.cxx,v $
- * $Revision: 1.10.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/TrueGuard.cxx b/chart2/source/tools/TrueGuard.cxx
index e114a33c922d..6992552367ed 100644
--- a/chart2/source/tools/TrueGuard.cxx
+++ b/chart2/source/tools/TrueGuard.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TrueGuard.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx
index 53a1f1d93c68..52cc6b9c03b6 100644
--- a/chart2/source/tools/UncachedDataSequence.cxx
+++ b/chart2/source/tools/UncachedDataSequence.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: UncachedDataSequence.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/UserDefinedProperties.cxx b/chart2/source/tools/UserDefinedProperties.cxx
index 38c8bbdf8c92..707c48c1a6cc 100644
--- a/chart2/source/tools/UserDefinedProperties.cxx
+++ b/chart2/source/tools/UserDefinedProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: UserDefinedProperties.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/WeakListenerAdapter.cxx b/chart2/source/tools/WeakListenerAdapter.cxx
index 8f3d732ec877..bbb54e20bdce 100644
--- a/chart2/source/tools/WeakListenerAdapter.cxx
+++ b/chart2/source/tools/WeakListenerAdapter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WeakListenerAdapter.cxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/WrappedDefaultProperty.cxx b/chart2/source/tools/WrappedDefaultProperty.cxx
index 3e5fe81016e5..03178d204ef7 100644
--- a/chart2/source/tools/WrappedDefaultProperty.cxx
+++ b/chart2/source/tools/WrappedDefaultProperty.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedDefaultProperty.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/WrappedDirectStateProperty.cxx b/chart2/source/tools/WrappedDirectStateProperty.cxx
index 5f39c6c29773..601b6e199d59 100644
--- a/chart2/source/tools/WrappedDirectStateProperty.cxx
+++ b/chart2/source/tools/WrappedDirectStateProperty.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedDirectStateProperty.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/WrappedIgnoreProperty.cxx b/chart2/source/tools/WrappedIgnoreProperty.cxx
index 242e371da302..bebbf77ceeef 100644
--- a/chart2/source/tools/WrappedIgnoreProperty.cxx
+++ b/chart2/source/tools/WrappedIgnoreProperty.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedIgnoreProperty.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/WrappedProperty.cxx b/chart2/source/tools/WrappedProperty.cxx
index 55a6a5a61e60..b41d8a331f11 100644
--- a/chart2/source/tools/WrappedProperty.cxx
+++ b/chart2/source/tools/WrappedProperty.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedProperty.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/WrappedPropertySet.cxx b/chart2/source/tools/WrappedPropertySet.cxx
index 8560e6ad6811..116ce6f417f9 100644
--- a/chart2/source/tools/WrappedPropertySet.cxx
+++ b/chart2/source/tools/WrappedPropertySet.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WrappedPropertySet.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/XMLRangeHelper.cxx b/chart2/source/tools/XMLRangeHelper.cxx
index 8ad30579474b..c5d345db0124 100644
--- a/chart2/source/tools/XMLRangeHelper.cxx
+++ b/chart2/source/tools/XMLRangeHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: XMLRangeHelper.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/_serviceregistration_tools.cxx b/chart2/source/tools/_serviceregistration_tools.cxx
index 475dfaac5bc3..387b87dfab5a 100644
--- a/chart2/source/tools/_serviceregistration_tools.cxx
+++ b/chart2/source/tools/_serviceregistration_tools.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: _serviceregistration_tools.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/tools/makefile.mk b/chart2/source/tools/makefile.mk
index 62e2771e64cc..2f990af7adb0 100644
--- a/chart2/source/tools/makefile.mk
+++ b/chart2/source/tools/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.28.42.2 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -68,6 +64,7 @@ SLOFILES= \
$(SLO)$/DiagramHelper.obj \
$(SLO)$/ExponentialRegressionCurveCalculator.obj \
$(SLO)$/ImplOPropertySet.obj \
+ $(SLO)$/InternalData.obj \
$(SLO)$/InternalDataProvider.obj \
$(SLO)$/LabeledDataSequence.obj \
$(SLO)$/LinearRegressionCurveCalculator.obj \
@@ -105,9 +102,6 @@ SLOFILES= \
$(SLO)$/ChartDebugTrace.obj \
$(SLO)$/_serviceregistration_tools.obj \
$(SLO)$/UncachedDataSequence.obj \
- $(SLO)$/UndoManager.obj \
- $(SLO)$/UndoGuard.obj \
- $(SLO)$/ImplUndoManager.obj \
$(SLO)$/XMLRangeHelper.obj \
$(SLO)$/ModifyListenerHelper.obj \
$(SLO)$/ModifyListenerCallBack.obj \
diff --git a/chart2/source/view/axes/MinimumAndMaximumSupplier.cxx b/chart2/source/view/axes/MinimumAndMaximumSupplier.cxx
index a17bb5e5c15d..88f99b493144 100644
--- a/chart2/source/view/axes/MinimumAndMaximumSupplier.cxx
+++ b/chart2/source/view/axes/MinimumAndMaximumSupplier.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MinimumAndMaximumSupplier.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx
index 5287ecbcdc13..0a6137af3041 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ScaleAutomatism.cxx,v $
- * $Revision: 1.12.24.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/TickmarkHelper.cxx b/chart2/source/view/axes/TickmarkHelper.cxx
index 81dc5786653e..4d1f48795fa7 100644
--- a/chart2/source/view/axes/TickmarkHelper.cxx
+++ b/chart2/source/view/axes/TickmarkHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TickmarkHelper.cxx,v $
- * $Revision: 1.15.8.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,6 +48,7 @@ TickInfo::TickInfo()
, aTickScreenPosition(0.0,0.0)
, bPaintIt( true )
, xTextShape( NULL )
+, nFactorForLimitedTextWidth(1)
{
}
@@ -62,10 +60,45 @@ void TickInfo::updateUnscaledValue( const uno::Reference< XScaling >& xInverseSc
this->fUnscaledTickValue = this->fScaledTickValue;
}
-TickIter::TickIter( const uno::Sequence< uno::Sequence< double > >& rTicks
+sal_Int32 TickInfo::getScreenDistanceBetweenTicks( const TickInfo& rOherTickInfo ) const
+{
+ //return the positive distance between the two first tickmarks in screen values
+
+ B2DVector aDistance = rOherTickInfo.aTickScreenPosition - aTickScreenPosition;
+ sal_Int32 nRet = static_cast<sal_Int32>(aDistance.getLength());
+ if(nRet<0)
+ nRet *= -1;
+ return nRet;
+}
+
+PureTickIter::PureTickIter( ::std::vector< TickInfo >& rTickInfoVector )
+ : m_rTickVector(rTickInfoVector)
+ , m_aTickIter(m_rTickVector.begin())
+{
+}
+PureTickIter::~PureTickIter()
+{
+}
+TickInfo* PureTickIter::firstInfo()
+{
+ m_aTickIter = m_rTickVector.begin();
+ if(m_aTickIter!=m_rTickVector.end())
+ return &*m_aTickIter;
+ return 0;
+}
+TickInfo* PureTickIter::nextInfo()
+{
+ m_aTickIter++;
+ if(m_aTickIter!=m_rTickVector.end())
+ return &*m_aTickIter;
+ return 0;
+}
+
+EquidistantTickIter::EquidistantTickIter( const uno::Sequence< uno::Sequence< double > >& rTicks
, const ExplicitIncrementData& rIncrement
, sal_Int32 nMinDepth, sal_Int32 nMaxDepth )
- : m_pSimpleTicks(&rTicks), m_pInfoTicks(NULL)
+ : m_pSimpleTicks(&rTicks)
+ , m_pInfoTicks(0)
, m_rIncrement(rIncrement)
, m_nMinDepth(0), m_nMaxDepth(0)
, m_nTickCount(0), m_pnPositions(NULL)
@@ -75,10 +108,11 @@ TickIter::TickIter( const uno::Sequence< uno::Sequence< double > >& rTicks
initIter( nMinDepth, nMaxDepth );
}
-TickIter::TickIter( ::std::vector< ::std::vector< TickInfo > >& rTicks
+EquidistantTickIter::EquidistantTickIter( ::std::vector< ::std::vector< TickInfo > >& rTicks
, const ExplicitIncrementData& rIncrement
, sal_Int32 nMinDepth, sal_Int32 nMaxDepth )
- : m_pSimpleTicks(NULL), m_pInfoTicks(&rTicks)
+ : m_pSimpleTicks(NULL)
+ , m_pInfoTicks(&rTicks)
, m_rIncrement(rIncrement)
, m_nMinDepth(0), m_nMaxDepth(0)
, m_nTickCount(0), m_pnPositions(NULL)
@@ -88,7 +122,7 @@ TickIter::TickIter( ::std::vector< ::std::vector< TickInfo > >& rTicks
initIter( nMinDepth, nMaxDepth );
}
-void TickIter::initIter( sal_Int32 /*nMinDepth*/, sal_Int32 nMaxDepth )
+void EquidistantTickIter::initIter( sal_Int32 /*nMinDepth*/, sal_Int32 nMaxDepth )
{
m_nMaxDepth = nMaxDepth;
if(nMaxDepth<0 || m_nMaxDepth>getMaxDepth())
@@ -131,14 +165,14 @@ void TickIter::initIter( sal_Int32 /*nMinDepth*/, sal_Int32 nMaxDepth )
}
}
-TickIter::~TickIter()
+EquidistantTickIter::~EquidistantTickIter()
{
delete[] m_pnPositions;
delete[] m_pnPreParentCount;
delete[] m_pbIntervalFinished;
}
-sal_Int32 TickIter::getStartDepth() const
+sal_Int32 EquidistantTickIter::getStartDepth() const
{
//find the depth of the first visible tickmark:
//it is the depth of the smallest value
@@ -159,7 +193,7 @@ sal_Int32 TickIter::getStartDepth() const
return nReturnDepth;
}
-double* TickIter::firstValue()
+double* EquidistantTickIter::firstValue()
{
if( gotoFirst() )
{
@@ -169,14 +203,14 @@ double* TickIter::firstValue()
return NULL;
}
-TickInfo* TickIter::firstInfo()
+TickInfo* EquidistantTickIter::firstInfo()
{
if( m_pInfoTicks && gotoFirst() )
return &(*m_pInfoTicks)[m_nCurrentDepth][m_pnPositions[m_nCurrentDepth]];
return NULL;
}
-sal_Int32 TickIter::getIntervalCount( sal_Int32 nDepth )
+sal_Int32 EquidistantTickIter::getIntervalCount( sal_Int32 nDepth )
{
if(nDepth>m_rIncrement.SubIncrements.getLength() || nDepth<0)
return 0;
@@ -187,7 +221,7 @@ sal_Int32 TickIter::getIntervalCount( sal_Int32 nDepth )
return m_rIncrement.SubIncrements[nDepth-1].IntervalCount;
}
-bool TickIter::isAtLastPartTick()
+bool EquidistantTickIter::isAtLastPartTick()
{
if(!m_nCurrentDepth)
return false;
@@ -206,7 +240,7 @@ bool TickIter::isAtLastPartTick()
return bRet;
}
-bool TickIter::gotoFirst()
+bool EquidistantTickIter::gotoFirst()
{
if( m_nMaxDepth<0 )
return false;
@@ -222,7 +256,7 @@ bool TickIter::gotoFirst()
return true;
}
-bool TickIter::gotoNext()
+bool EquidistantTickIter::gotoNext()
{
if( m_nCurrentPos < 0 )
return false;
@@ -253,7 +287,7 @@ bool TickIter::gotoNext()
return true;
}
-bool TickIter::gotoIndex( sal_Int32 nTickIndex )
+bool EquidistantTickIter::gotoIndex( sal_Int32 nTickIndex )
{
if( nTickIndex < 0 )
return false;
@@ -271,16 +305,16 @@ bool TickIter::gotoIndex( sal_Int32 nTickIndex )
return true;
}
-sal_Int32 TickIter::getCurrentIndex() const
+sal_Int32 EquidistantTickIter::getCurrentIndex() const
{
return m_nCurrentPos;
}
-sal_Int32 TickIter::getMaxIndex() const
+sal_Int32 EquidistantTickIter::getMaxIndex() const
{
return m_nTickCount-1;
}
-double* TickIter::nextValue()
+double* EquidistantTickIter::nextValue()
{
if( gotoNext() )
{
@@ -290,7 +324,7 @@ double* TickIter::nextValue()
return NULL;
}
-TickInfo* TickIter::nextInfo()
+TickInfo* EquidistantTickIter::nextInfo()
{
if( m_pInfoTicks && gotoNext() &&
static_cast< sal_Int32 >(
@@ -649,7 +683,7 @@ void TickmarkHelper::getAllTicksShifted( ::std::vector< ::std::vector< TickInfo
void TickmarkHelper::addSubTicks( sal_Int32 nDepth, uno::Sequence< uno::Sequence< double > >& rParentTicks ) const
{
- TickIter aIter( rParentTicks, m_rIncrement, 0, nDepth-1 );
+ EquidistantTickIter aIter( rParentTicks, m_rIncrement, 0, nDepth-1 );
double* pfNextParentTick = aIter.firstValue();
if(!pfNextParentTick)
return;
@@ -756,11 +790,7 @@ sal_Int32 TickmarkHelper_2D::getTickScreenDistance( TickIter& rIter )
if(!pSecondTickInfo || !pFirstTickInfo)
return -1;
- B2DVector aDistance = pSecondTickInfo->aTickScreenPosition-pFirstTickInfo->aTickScreenPosition;
- sal_Int32 nRet = static_cast<sal_Int32>(aDistance.getLength());
- if(nRet<0)
- nRet *= -1;
- return nRet;
+ return pFirstTickInfo->getScreenDistanceBetweenTicks( *pSecondTickInfo );
}
B2DVector TickmarkHelper_2D::getTickScreenPosition2D( double fScaledLogicTickValue ) const
@@ -800,7 +830,7 @@ void TickmarkHelper_2D::addPointSequenceForTickLine( drawing::PointSequenceSeque
rPoints[nSequenceIndex][1].Y = static_cast<sal_Int32>(aEnd.getY());
}
-B2DVector TickmarkHelper_2D::getDistanceAxisTickToText( const AxisProperties& rAxisProperties ) const
+B2DVector TickmarkHelper_2D::getDistanceAxisTickToText( const AxisProperties& rAxisProperties, bool bIncludeFarAwayDistanceIfSo, bool bIncludeSpaceBetweenTickAndText ) const
{
bool bFarAwayLabels = false;
if( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START == rAxisProperties.m_eLabelPos
@@ -846,8 +876,9 @@ B2DVector TickmarkHelper_2D::getDistanceAxisTickToText( const AxisProperties& rA
if( rAxisProperties.m_fInnerDirectionSign != rAxisProperties.m_fLabelDirectionSign )
aOrthoLabelDirection*=-1.0;
aOrthoLabelDirection.normalize();
- aLabelDirection += aOrthoLabelDirection*AXIS2D_TICKLABELSPACING;
- if( bFarAwayLabels )
+ if( bIncludeSpaceBetweenTickAndText )
+ aLabelDirection += aOrthoLabelDirection*AXIS2D_TICKLABELSPACING;
+ if( bFarAwayLabels && bIncludeFarAwayDistanceIfSo )
aLabelDirection += m_aAxisLineToLabelLineShift;
return aLabelDirection;
}
@@ -879,27 +910,6 @@ void TickmarkHelper_2D::updateScreenValues( ::std::vector< ::std::vector< TickIn
}
}
-//'hide' tickmarks with identical screen values in aAllTickInfos
-void TickmarkHelper_2D::hideIdenticalScreenValues(
- ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const
-{
- TickIter aIter( rAllTickInfos, m_rIncrement );
-
- TickInfo* pPreviousTickInfo = aIter.firstInfo();
- if(!pPreviousTickInfo)
- return;
- pPreviousTickInfo->bPaintIt = true;
- for( TickInfo* pTickInfo = aIter.nextInfo(); pTickInfo; pTickInfo = aIter.nextInfo())
- {
- pTickInfo->bPaintIt =
- ( static_cast<sal_Int32>(pTickInfo->aTickScreenPosition.getX())
- != static_cast<sal_Int32>(pPreviousTickInfo->aTickScreenPosition.getX()) )
- ||
- ( static_cast<sal_Int32>(pTickInfo->aTickScreenPosition.getY())
- != static_cast<sal_Int32>(pPreviousTickInfo->aTickScreenPosition.getY()) );
- pPreviousTickInfo = pTickInfo;
- }
-}
//-----------------------------------------------------------------------------
// ___TickmarkHelper_3D___
//-----------------------------------------------------------------------------
diff --git a/chart2/source/view/axes/TickmarkHelper.hxx b/chart2/source/view/axes/TickmarkHelper.hxx
index a5749a074582..78fc2fe1c502 100644
--- a/chart2/source/view/axes/TickmarkHelper.hxx
+++ b/chart2/source/view/axes/TickmarkHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TickmarkHelper.hxx,v $
- * $Revision: 1.7.24.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -62,23 +59,48 @@ struct TickInfo
::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape > xTextShape;
+ rtl::OUString aText;//used only for complex categories so far
+ sal_Int32 nFactorForLimitedTextWidth;//categories in higher levels of complex categories can have more place than a single simple category
+
//methods:
TickInfo();
void updateUnscaledValue( const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XScaling >& xInverseScaling );
-};
+ sal_Int32 getScreenDistanceBetweenTicks( const TickInfo& rOherTickInfo ) const;
+};
class TickIter
{
public:
- TickIter( const ::com::sun::star::uno::Sequence<
+ virtual ~TickIter(){};
+ virtual TickInfo* firstInfo()=0;
+ virtual TickInfo* nextInfo()=0;
+};
+
+class PureTickIter : public TickIter
+{
+public:
+ PureTickIter( ::std::vector< TickInfo >& rTickInfoVector );
+ virtual ~PureTickIter();
+ virtual TickInfo* firstInfo();
+ virtual TickInfo* nextInfo();
+
+private:
+ ::std::vector< TickInfo >& m_rTickVector;
+ ::std::vector< TickInfo >::iterator m_aTickIter;
+};
+
+class EquidistantTickIter : public TickIter
+{
+public:
+ EquidistantTickIter( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Sequence< double > >& rTicks
, const ::com::sun::star::chart2::ExplicitIncrementData& rIncrement
, sal_Int32 nMinDepth=0, sal_Int32 nMaxDepth=-1 );
- TickIter( ::std::vector< ::std::vector< TickInfo > >& rTickInfos
+ EquidistantTickIter( ::std::vector< ::std::vector< TickInfo > >& rTickInfos
, const ::com::sun::star::chart2::ExplicitIncrementData& rIncrement
, sal_Int32 nMinDepth=0, sal_Int32 nMaxDepth=-1 );
- virtual ~TickIter();
+ virtual ~EquidistantTickIter();
virtual double* firstValue();
virtual double* nextValue();
@@ -174,7 +196,6 @@ protected: //methods
bool isWithinOuterBorder( double fScaledValue ) const; //all within the outer major tick marks
virtual void updateScreenValues( ::std::vector< ::std::vector< TickInfo > >& /*rAllTickInfos*/ ) const {}
- virtual void hideIdenticalScreenValues( ::std::vector< ::std::vector< TickInfo > >& /*rAllTickInfos*/ ) const {}
protected: //member
::com::sun::star::chart2::ExplicitScaleData m_rScale;
@@ -214,10 +235,11 @@ public:
, sal_Int32 nSequenceIndex
, double fScaledLogicTickValue, double fInnerDirectionSign
, const TickmarkProperties& rTickmarkProperties, bool bPlaceAtLabels ) const;
- ::basegfx::B2DVector getDistanceAxisTickToText( const AxisProperties& rAxisProperties ) const;
+ ::basegfx::B2DVector getDistanceAxisTickToText( const AxisProperties& rAxisProperties
+ , bool bIncludeFarAwayDistanceIfSo = false
+ , bool bIncludeSpaceBetweenTickAndText = true ) const;
virtual void updateScreenValues( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const;
- virtual void hideIdenticalScreenValues( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const;
bool isHorizontalAxis() const;
bool isVerticalAxis() const;
diff --git a/chart2/source/view/axes/TickmarkProperties.hxx b/chart2/source/view/axes/TickmarkProperties.hxx
index 92c0d5e79400..09c0179d3698 100644
--- a/chart2/source/view/axes/TickmarkProperties.hxx
+++ b/chart2/source/view/axes/TickmarkProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TickmarkProperties.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/VAxisBase.cxx b/chart2/source/view/axes/VAxisBase.cxx
index da2f01523a97..0159fb20cad6 100644
--- a/chart2/source/view/axes/VAxisBase.cxx
+++ b/chart2/source/view/axes/VAxisBase.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VAxisBase.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -82,23 +79,31 @@ void SAL_CALL VAxisBase::initAxisLabelProperties( const ::com::sun::star::awt::S
if( !m_aAxisProperties.m_bDisplayLabels )
return;
- if( AxisType::CATEGORY==m_aAxisProperties.m_nAxisType
- || AxisType::SERIES==m_aAxisProperties.m_nAxisType )
+ if( AxisType::SERIES==m_aAxisProperties.m_nAxisType )
{
if( m_aAxisProperties.m_xAxisTextProvider.is() )
m_aTextLabels = m_aAxisProperties.m_xAxisTextProvider->getTextualData();
m_bUseTextLabels = true;
- if( m_aTextLabels.getLength() == 1 && AxisType::SERIES==m_aAxisProperties.m_nAxisType )
+ if( m_aTextLabels.getLength() == 1 )
{
//don't show a single series name
m_aAxisProperties.m_bDisplayLabels = false;
return;
}
}
+ else if( AxisType::CATEGORY==m_aAxisProperties.m_nAxisType )
+ {
+ if( m_aAxisProperties.m_pExplicitCategoriesProvider )
+ m_aTextLabels = m_aAxisProperties.m_pExplicitCategoriesProvider->getSimpleCategories();
+
+ m_bUseTextLabels = true;
+ }
m_aAxisLabelProperties.nNumberFormatKey = m_aAxisProperties.m_nNumberFormatKey;
m_aAxisLabelProperties.init(m_aAxisProperties.m_xAxisModel);
+ if( m_aAxisProperties.m_bComplexCategories && AxisType::CATEGORY == m_aAxisProperties.m_nAxisType )
+ m_aAxisLabelProperties.eStaggering = SIDE_BY_SIDE;
}
void VAxisBase::recordMaximumTextSize( const Reference< drawing::XShape >& xShape, double fRotationAngleDegree )
@@ -155,6 +160,12 @@ void SAL_CALL VAxisBase::setExplicitScaleAndIncrement(
m_aIncrement = rIncrement;
}
+void VAxisBase::createAllTickInfos( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos )
+{
+ std::auto_ptr< TickmarkHelper > apTickmarkHelper( this->createTickmarkHelper() );
+ apTickmarkHelper->getAllTicks( rAllTickInfos );
+}
+
bool VAxisBase::prepareShapeCreation()
{
//returns true if all is ready for further shape creation and any shapes need to be created
@@ -165,14 +176,9 @@ bool VAxisBase::prepareShapeCreation()
{
//-----------------------------------------
//create all scaled tickmark values
- if( m_xTextTarget.is() )
- {
- TickIter aRemoveIter( m_aAllTickInfos, m_aIncrement, 0, 0 );
- removeTextShapesFromTicks( aRemoveIter, m_xTextTarget );
- }
+ removeTextShapesFromTicks();
- std::auto_ptr< TickmarkHelper > apTickmarkHelper( this->createTickmarkHelper() );
- apTickmarkHelper->getAllTicks( m_aAllTickInfos );
+ createAllTickInfos(m_aAllTickInfos);
m_bReCreateAllTickInfos = false;
}
@@ -206,15 +212,25 @@ sal_Int32 VAxisBase::getIndexOfLongestLabel( const uno::Sequence< rtl::OUString
return nRet;
}
-void VAxisBase::removeTextShapesFromTicks( TickIter& rIter, const Reference< drawing::XShapes >& xTarget )
+void VAxisBase::removeTextShapesFromTicks()
{
- for( TickInfo* pTickInfo = rIter.firstInfo()
- ; pTickInfo; pTickInfo = rIter.nextInfo() )
+ if( m_xTextTarget.is() )
{
- if(pTickInfo->xTextShape.is())
+ ::std::vector< ::std::vector< TickInfo > >::iterator aDepthIter = m_aAllTickInfos.begin();
+ const ::std::vector< ::std::vector< TickInfo > >::const_iterator aDepthEnd = m_aAllTickInfos.end();
+ for( ; aDepthIter != aDepthEnd; aDepthIter++ )
{
- xTarget->remove(pTickInfo->xTextShape);
- pTickInfo->xTextShape = NULL;
+ ::std::vector< TickInfo >::iterator aTickIter = (*aDepthIter).begin();
+ const ::std::vector< TickInfo >::const_iterator aTickEnd = (*aDepthIter).end();
+ for( ; aTickIter != aTickEnd; aTickIter++ )
+ {
+ TickInfo& rTickInfo = (*aTickIter);
+ if(rTickInfo.xTextShape.is())
+ {
+ m_xTextTarget->remove(rTickInfo.xTextShape);
+ rTickInfo.xTextShape = NULL;
+ }
+ }
}
}
}
diff --git a/chart2/source/view/axes/VAxisBase.hxx b/chart2/source/view/axes/VAxisBase.hxx
index ab826caca2ff..ba7e94b2070c 100644
--- a/chart2/source/view/axes/VAxisBase.hxx
+++ b/chart2/source/view/axes/VAxisBase.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VAxisBase.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -70,6 +67,7 @@ public:
throw (::com::sun::star::uno::RuntimeException);
virtual sal_Int32 estimateMaximumAutoMainIncrementCount();
+ virtual void createAllTickInfos( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos );
void setExrtaLinePositionAtOtherAxis( const double& fCrossingAt );
@@ -77,7 +75,7 @@ public:
//-------------------------------------------------------------------------
protected: //methods
sal_Int32 getIndexOfLongestLabel( const ::com::sun::star::uno::Sequence< rtl::OUString >& rLabels );
- void removeTextShapesFromTicks( TickIter& rIter, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget );
+ void removeTextShapesFromTicks();
void updateUnscaledValuesAtTicks( TickIter& rIter );
virtual bool prepareShapeCreation();
diff --git a/chart2/source/view/axes/VAxisOrGridBase.cxx b/chart2/source/view/axes/VAxisOrGridBase.cxx
index 472349088584..f2e2e90c1045 100644
--- a/chart2/source/view/axes/VAxisOrGridBase.cxx
+++ b/chart2/source/view/axes/VAxisOrGridBase.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VAxisOrGridBase.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/VAxisOrGridBase.hxx b/chart2/source/view/axes/VAxisOrGridBase.hxx
index 0809fc9d4f0d..35b32b2b1c03 100644
--- a/chart2/source/view/axes/VAxisOrGridBase.hxx
+++ b/chart2/source/view/axes/VAxisOrGridBase.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VAxisOrGridBase.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/VAxisProperties.cxx b/chart2/source/view/axes/VAxisProperties.cxx
index 27ca8d2188e3..436541ef27ee 100644
--- a/chart2/source/view/axes/VAxisProperties.cxx
+++ b/chart2/source/view/axes/VAxisProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VAxisProperties.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -147,6 +144,18 @@ TickmarkProperties AxisProperties::makeTickmarkProperties(
return aTickmarkProperties;
}
+TickmarkProperties AxisProperties::makeTickmarkPropertiesForComplexCategories(
+ sal_Int32 nTickLength, sal_Int32 nTickStartDistanceToAxis, sal_Int32 /*nTextLevel*/ ) const
+{
+ sal_Int32 nTickmarkStyle = (m_fLabelDirectionSign==m_fInnerDirectionSign) ? 2/*outside*/ : 1/*inside*/;
+
+ TickmarkProperties aTickmarkProperties;
+ aTickmarkProperties.Length = nTickLength;// + nTextLevel*( lcl_calcTickLengthForDepth(0,nTickmarkStyle) );
+ aTickmarkProperties.RelativePos = static_cast<sal_Int32>(lcl_getTickOffset(aTickmarkProperties.Length+nTickStartDistanceToAxis,nTickmarkStyle));
+ aTickmarkProperties.aLineProperties = this->makeLinePropertiesForDepth( 0 );
+ return aTickmarkProperties;
+}
+
//static
TickmarkProperties AxisProperties::getBiggestTickmarkProperties()
{
@@ -161,7 +170,7 @@ TickmarkProperties AxisProperties::getBiggestTickmarkProperties()
//--------------------------------------------------------------------------
AxisProperties::AxisProperties( const uno::Reference< XAxis >& xAxisModel
- , const uno::Reference< data::XTextualDataSequence >& xAxisTextProvider )
+ , ExplicitCategoriesProvider* pExplicitCategoriesProvider )
: m_xAxisModel(xAxisModel)
, m_nDimensionIndex(0)
, m_bIsMainAxis(true)
@@ -176,7 +185,6 @@ AxisProperties::AxisProperties( const uno::Reference< XAxis >& xAxisModel
, m_bAxisBetweenCategories(false)
, m_fLabelDirectionSign(1.0)
, m_fInnerDirectionSign(1.0)
- , m_bLabelsOutside(true)
, m_aLabelAlignment(LABEL_ALIGN_RIGHT_TOP)
, m_bDisplayLabels( true )
, m_nNumberFormatKey(0)
@@ -186,8 +194,9 @@ AxisProperties::AxisProperties( const uno::Reference< XAxis >& xAxisModel
, m_aLineProperties()
//for category axes
, m_nAxisType(AxisType::REALNUMBER)
- , m_xAxisTextProvider(xAxisTextProvider)
- , m_bTickmarksAtIndicatedValue(false)
+ , m_bComplexCategories(false)
+ , m_pExplicitCategoriesProvider(pExplicitCategoriesProvider)
+ , m_xAxisTextProvider(0)
{
}
@@ -206,7 +215,6 @@ AxisProperties::AxisProperties( const AxisProperties& rAxisProperties )
, m_bAxisBetweenCategories( rAxisProperties.m_bAxisBetweenCategories )
, m_fLabelDirectionSign( rAxisProperties.m_fLabelDirectionSign )
, m_fInnerDirectionSign( rAxisProperties.m_fInnerDirectionSign )
- , m_bLabelsOutside( rAxisProperties.m_bLabelsOutside )
, m_aLabelAlignment( rAxisProperties.m_aLabelAlignment )
, m_bDisplayLabels( rAxisProperties.m_bDisplayLabels )
, m_nNumberFormatKey( rAxisProperties.m_nNumberFormatKey )
@@ -216,8 +224,9 @@ AxisProperties::AxisProperties( const AxisProperties& rAxisProperties )
, m_aLineProperties( rAxisProperties.m_aLineProperties )
//for category axes
, m_nAxisType( rAxisProperties.m_nAxisType )
+ , m_bComplexCategories( rAxisProperties.m_bComplexCategories )
+ , m_pExplicitCategoriesProvider( rAxisProperties.m_pExplicitCategoriesProvider )
, m_xAxisTextProvider( rAxisProperties.m_xAxisTextProvider )
- , m_bTickmarksAtIndicatedValue( rAxisProperties.m_bTickmarksAtIndicatedValue )
{
if( rAxisProperties.m_pfMainLinePositionAtOtherAxis )
m_pfMainLinePositionAtOtherAxis = new double(*rAxisProperties.m_pfMainLinePositionAtOtherAxis);
diff --git a/chart2/source/view/axes/VAxisProperties.hxx b/chart2/source/view/axes/VAxisProperties.hxx
index 61f2477c7681..5b6bfe98f777 100644
--- a/chart2/source/view/axes/VAxisProperties.hxx
+++ b/chart2/source/view/axes/VAxisProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VAxisProperties.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,6 +30,7 @@
#include "TickmarkProperties.hxx"
#include "PlottingPositionHelper.hxx"
#include "LabelAlignment.hxx"
+#include "ExplicitCategoriesProvider.hxx"
#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
#include <com/sun/star/chart/ChartAxisMarkPosition.hpp>
@@ -87,7 +85,7 @@ struct AxisLabelProperties
double fRotationAngleDegree;
sal_Int32 nRhythm; //show only each nth label with n==nRhythm
- bool bRhythmIsFix; //states wether the given rythm is fix or may be changed
+ bool bRhythmIsFix; //states wether the given rhythm is fix or may be changed
//methods:
void init( const ::com::sun::star::uno::Reference<
@@ -119,7 +117,6 @@ struct AxisProperties
double m_fLabelDirectionSign;
//this direction is used to indicate in which direction inner tickmarks are to be drawn
double m_fInnerDirectionSign;
- bool m_bLabelsOutside;
LabelAlignment m_aLabelAlignment;
sal_Bool m_bDisplayLabels;
@@ -136,19 +133,18 @@ struct AxisProperties
VLineProperties m_aLineProperties;
//for category axes ->
- sal_Int32 m_nAxisType;//REALNUMBER, CATEGORY etc. type ::com::sun::star::chart2::AxisType
+ sal_Int32 m_nAxisType;//REALNUMBER, CATEGORY etc. type ::com::sun::star::chart2::AxisType
+ bool m_bComplexCategories;
+ ExplicitCategoriesProvider* m_pExplicitCategoriesProvider;/*no ownership here*/
::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XTextualDataSequence >
m_xAxisTextProvider; //for categries or series names
- //position of main tickmarks in respect to the indicated value: at value or between neighboured indicated values
- bool m_bTickmarksAtIndicatedValue;
//<- category axes
//methods:
AxisProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxisModel
- , const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XTextualDataSequence >& xAxisTextProvider );
+ , ExplicitCategoriesProvider* pExplicitCategoriesProvider );
AxisProperties( const AxisProperties& rAxisProperties );
virtual ~AxisProperties();
virtual void init(bool bCartesian=false);//init from model data (m_xAxisModel)
@@ -156,6 +152,7 @@ struct AxisProperties
void initAxisPositioning( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xAxisProp );
static TickmarkProperties getBiggestTickmarkProperties();
+ TickmarkProperties makeTickmarkPropertiesForComplexCategories( sal_Int32 nTickLength, sal_Int32 nTickStartDistanceToAxis, sal_Int32 nTextLevel ) const;
private:
AxisProperties();
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 0f18029254ef..caadaa554091 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VCartesianAxis.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -50,7 +47,7 @@
#include <tools/debug.hxx>
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
-#include <svx/unoprnms.hxx>
+#include <editeng/unoprnms.hxx>
#include <algorithm>
#include <memory>
@@ -121,19 +118,19 @@ Reference< drawing::XShape > createSingleLabel(
bool lcl_doesShapeOverlapWithTickmark( const Reference< drawing::XShape >& xShape
, double fRotationAngleDegree
, const basegfx::B2DVector& rTickScreenPosition
- , TickmarkHelper_2D* pTickmarkHelper )
+ , bool bIsHorizontalAxis, bool bIsVerticalAxis )
{
if(!xShape.is())
return false;
::basegfx::B2IRectangle aShapeRect = BaseGFXHelper::makeRectangle(xShape->getPosition(),ShapeFactory::getSizeAfterRotation( xShape, fRotationAngleDegree ));
- if( pTickmarkHelper->isVerticalAxis() )
+ if( bIsVerticalAxis )
{
return ( (rTickScreenPosition.getY() >= aShapeRect.getMinY())
&& (rTickScreenPosition.getY() <= aShapeRect.getMaxY()) );
}
- if( pTickmarkHelper->isHorizontalAxis() )
+ if( bIsHorizontalAxis )
{
return ( (rTickScreenPosition.getX() >= aShapeRect.getMinX())
&& (rTickScreenPosition.getX() <= aShapeRect.getMaxX()) );
@@ -157,7 +154,7 @@ bool doesOverlap( const Reference< drawing::XShape >& xShape1
return aRect1.overlaps(aRect2);
}
-void removeShapesAtWrongRythm( TickIter& rIter
+void removeShapesAtWrongRhythm( TickIter& rIter
, sal_Int32 nCorrectRhythm
, sal_Int32 nMaxTickToCheck
, const Reference< drawing::XShapes >& xTarget )
@@ -167,7 +164,7 @@ void removeShapesAtWrongRythm( TickIter& rIter
; pTickInfo && nTick <= nMaxTickToCheck
; pTickInfo = rIter.nextInfo(), nTick++ )
{
- //remove labels which does not fit into the rythm
+ //remove labels which does not fit into the rhythm
if( nTick%nCorrectRhythm != 0)
{
if(pTickInfo->xTextShape.is())
@@ -179,7 +176,7 @@ void removeShapesAtWrongRythm( TickIter& rIter
}
}
-class LabelIterator : private TickIter
+class EquidistantLabelIterator : public EquidistantTickIter
{
//this Iterator iterates over existing text labels
@@ -193,7 +190,7 @@ class LabelIterator : private TickIter
//we iterate through all labels
public:
- LabelIterator( ::std::vector< ::std::vector< TickInfo > >& rTickInfos
+ EquidistantLabelIterator( ::std::vector< ::std::vector< TickInfo > >& rTickInfos
, const ::com::sun::star::chart2::ExplicitIncrementData& rIncrement
, const AxisLabelStaggering eAxisLabelStaggering
, bool bInnerLine
@@ -203,29 +200,29 @@ public:
virtual TickInfo* nextInfo();
private: //methods
- LabelIterator();
+ EquidistantLabelIterator();
private: //member
const AxisLabelStaggering m_eAxisLabelStaggering;
bool m_bInnerLine;
};
-LabelIterator::LabelIterator( ::std::vector< ::std::vector< TickInfo > >& rTickInfos
+EquidistantLabelIterator::EquidistantLabelIterator( ::std::vector< ::std::vector< TickInfo > >& rTickInfos
, const ::com::sun::star::chart2::ExplicitIncrementData& rIncrement
, const AxisLabelStaggering eAxisLabelStaggering
, bool bInnerLine
, sal_Int32 nMinDepth, sal_Int32 nMaxDepth )
- : TickIter( rTickInfos, rIncrement, nMinDepth, nMaxDepth )
+ : EquidistantTickIter( rTickInfos, rIncrement, nMinDepth, nMaxDepth )
, m_eAxisLabelStaggering(eAxisLabelStaggering)
, m_bInnerLine(bInnerLine)
{
}
-TickInfo* LabelIterator::firstInfo()
+TickInfo* EquidistantLabelIterator::firstInfo()
{
- TickInfo* pTickInfo = TickIter::firstInfo();
+ TickInfo* pTickInfo = EquidistantTickIter::firstInfo();
while( pTickInfo && !pTickInfo->xTextShape.is() )
- pTickInfo = TickIter::nextInfo();
+ pTickInfo = EquidistantTickIter::nextInfo();
if(!pTickInfo)
return NULL;
if( (STAGGER_EVEN==m_eAxisLabelStaggering && m_bInnerLine)
@@ -235,7 +232,7 @@ TickInfo* LabelIterator::firstInfo()
{
//skip first label
do
- pTickInfo = TickIter::nextInfo();
+ pTickInfo = EquidistantTickIter::nextInfo();
while( pTickInfo && !pTickInfo->xTextShape.is() );
}
if(!pTickInfo)
@@ -243,12 +240,12 @@ TickInfo* LabelIterator::firstInfo()
return pTickInfo;
}
-TickInfo* LabelIterator::nextInfo()
+TickInfo* EquidistantLabelIterator::nextInfo()
{
TickInfo* pTickInfo = NULL;
//get next label
do
- pTickInfo = TickIter::nextInfo();
+ pTickInfo = EquidistantTickIter::nextInfo();
while( pTickInfo && !pTickInfo->xTextShape.is() );
if( STAGGER_EVEN==m_eAxisLabelStaggering
@@ -256,16 +253,16 @@ TickInfo* LabelIterator::nextInfo()
{
//skip one label
do
- pTickInfo = TickIter::nextInfo();
+ pTickInfo = EquidistantTickIter::nextInfo();
while( pTickInfo && !pTickInfo->xTextShape.is() );
}
return pTickInfo;
}
-B2DVector lcl_getStaggerDistance( LabelIterator& rIter, const B2DVector& rDistanceTickToText )
+B2DVector lcl_getLabelsDistance( TickIter& rIter, const B2DVector& rDistanceTickToText )
{
- //calculates the height or width of the first line of labels
- //thus the second line of labels needs to be shifted for that distance
+ //calculates the height or width of a line of labels
+ //thus a following line of labels can be shifted for that distance
B2DVector aRet(0,0);
@@ -283,13 +280,14 @@ B2DVector lcl_getStaggerDistance( LabelIterator& rIter, const B2DVector& rDistan
; pTickInfo = rIter.nextInfo() )
{
xShape2DText = pTickInfo->xTextShape;
- DBG_ASSERT(xShape2DText.is(),"LabelIterator does not work correctly");
-
- awt::Size aSize = xShape2DText->getSize();
- if(fabs(aStaggerDirection.getX())>fabs(aStaggerDirection.getY()))
- nDistance = ::std::max(nDistance,aSize.Width);
- else
- nDistance = ::std::max(nDistance,aSize.Height);
+ if( xShape2DText.is() )
+ {
+ awt::Size aSize = xShape2DText->getSize();
+ if(fabs(aStaggerDirection.getX())>fabs(aStaggerDirection.getY()))
+ nDistance = ::std::max(nDistance,aSize.Width);
+ else
+ nDistance = ::std::max(nDistance,aSize.Height);
+ }
}
aRet = aStaggerDirection*nDistance;
@@ -301,7 +299,7 @@ B2DVector lcl_getStaggerDistance( LabelIterator& rIter, const B2DVector& rDistan
return aRet;
}
-void lcl_correctPositionForStaggering( LabelIterator& rIter, const B2DVector& rStaggerDistance )
+void lcl_shiftLables( TickIter& rIter, const B2DVector& rStaggerDistance )
{
if(rStaggerDistance.getLength()==0.0)
return;
@@ -311,23 +309,24 @@ void lcl_correctPositionForStaggering( LabelIterator& rIter, const B2DVector& rS
; pTickInfo = rIter.nextInfo() )
{
xShape2DText = pTickInfo->xTextShape;
- DBG_ASSERT(xShape2DText.is(),"LabelIterator does not work correctly");
-
- awt::Point aPos = xShape2DText->getPosition();
- aPos.X += static_cast<sal_Int32>(rStaggerDistance.getX());
- aPos.Y += static_cast<sal_Int32>(rStaggerDistance.getY());
- xShape2DText->setPosition( aPos );
+ if( xShape2DText.is() )
+ {
+ awt::Point aPos = xShape2DText->getPosition();
+ aPos.X += static_cast<sal_Int32>(rStaggerDistance.getX());
+ aPos.Y += static_cast<sal_Int32>(rStaggerDistance.getY());
+ xShape2DText->setPosition( aPos );
+ }
}
}
-class MaxLabelTickIter : public TickIter
+class MaxLabelEquidistantTickIter : public EquidistantTickIter
{
//iterate over first two and last two labels and the longest label
public:
- MaxLabelTickIter( ::std::vector< ::std::vector< TickInfo > >& rTickInfos
+ MaxLabelEquidistantTickIter( ::std::vector< ::std::vector< TickInfo > >& rTickInfos
, const ::com::sun::star::chart2::ExplicitIncrementData& rIncrement
, sal_Int32 nLongestLabelIndex );
- virtual ~MaxLabelTickIter();
+ virtual ~MaxLabelEquidistantTickIter();
virtual TickInfo* nextInfo();
@@ -335,10 +334,10 @@ private:
sal_Int32 m_nLongestLabelIndex;
};
-MaxLabelTickIter::MaxLabelTickIter( ::std::vector< ::std::vector< TickInfo > >& rTickInfos
+MaxLabelEquidistantTickIter::MaxLabelEquidistantTickIter( ::std::vector< ::std::vector< TickInfo > >& rTickInfos
, const ::com::sun::star::chart2::ExplicitIncrementData& rIncrement
, sal_Int32 nLongestLabelIndex )
- : TickIter( rTickInfos, rIncrement, 0//nMinDepth
+ : EquidistantTickIter( rTickInfos, rIncrement, 0//nMinDepth
, 0//nMaxDepth
)
, m_nLongestLabelIndex( nLongestLabelIndex )
@@ -356,11 +355,11 @@ MaxLabelTickIter::MaxLabelTickIter( ::std::vector< ::std::vector< TickInfo > >&
if( m_nLongestLabelIndex+1==nMaxIndex )
m_nLongestLabelIndex = 0;
}
-MaxLabelTickIter::~MaxLabelTickIter()
+MaxLabelEquidistantTickIter::~MaxLabelEquidistantTickIter()
{
}
-TickInfo* MaxLabelTickIter::nextInfo()
+TickInfo* MaxLabelEquidistantTickIter::nextInfo()
{
sal_Int32 nCurrentPos = getCurrentIndex();
sal_Int32 nMaxIndex = getMaxIndex();
@@ -377,11 +376,11 @@ TickInfo* MaxLabelTickIter::nextInfo()
}
}
- return TickIter::nextInfo();
+ return EquidistantTickIter::nextInfo();
}
bool VCartesianAxis::isBreakOfLabelsAllowed( const AxisLabelProperties& rAxisLabelProperties
- , TickmarkHelper_2D* pTickmarkHelper )
+ , bool bIsHorizontalAxis )
{
if( m_aTextLabels.getLength() > 100 )
return false;
@@ -395,13 +394,11 @@ bool VCartesianAxis::isBreakOfLabelsAllowed( const AxisLabelProperties& rAxisLab
if( !::rtl::math::approxEqual( rAxisLabelProperties.fRotationAngleDegree, 0.0 ) )
return false;
//break only for horizontal axis
- if( pTickmarkHelper )
- return pTickmarkHelper->isHorizontalAxis();
- return false;
+ return bIsHorizontalAxis;
}
bool VCartesianAxis::isAutoStaggeringOfLabelsAllowed( const AxisLabelProperties& rAxisLabelProperties
- , TickmarkHelper_2D* pTickmarkHelper )
+ , bool bIsHorizontalAxis, bool bIsVerticalAxis )
{
if( rAxisLabelProperties.eStaggering != STAGGER_AUTO )
return false;
@@ -413,28 +410,163 @@ bool VCartesianAxis::isAutoStaggeringOfLabelsAllowed( const AxisLabelProperties&
return false;
//automatic staggering only for horizontal axis with horizontal text
//or vertical axis with vertical text
- if( pTickmarkHelper )
+ if( bIsHorizontalAxis )
+ return !rAxisLabelProperties.bStackCharacters;
+ if( bIsVerticalAxis )
+ return rAxisLabelProperties.bStackCharacters;
+ return false;
+}
+
+struct ComplexCategoryPlacement
+{
+ rtl::OUString Text;
+ sal_Int32 Count;
+ double TickValue;
+
+ ComplexCategoryPlacement( const rtl::OUString& rText, sal_Int32 nCount, double fTickValue )
+ : Text(rText), Count(nCount), TickValue(fTickValue)
+ {}
+};
+
+void VCartesianAxis::createAllTickInfosFromComplexCategories( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos, bool bShiftedPosition )
+{
+ //no minor tickmarks will be generated!
+ //order is: inner labels first , outer labels last (that is different to all other TickIter cases)
+ if(!bShiftedPosition)
{
- if( pTickmarkHelper->isHorizontalAxis() )
- return !rAxisLabelProperties.bStackCharacters;
- if( pTickmarkHelper->isVerticalAxis() )
- return rAxisLabelProperties.bStackCharacters;
+ rAllTickInfos.clear();
+ sal_Int32 nLevel=0;
+ sal_Int32 nLevelCount = m_aAxisProperties.m_pExplicitCategoriesProvider->getCategoryLevelCount();
+ for( ; nLevel<nLevelCount; nLevel++ )
+ {
+ ::std::vector< TickInfo > aTickInfoVector;
+ std::vector< ComplexCategory > aComplexCategories( m_aAxisProperties.m_pExplicitCategoriesProvider->getCategoriesByLevel( nLevel ) );
+ sal_Int32 nCatIndex = 0;
+ std::vector< ComplexCategory >::const_iterator aIt(aComplexCategories.begin());
+ std::vector< ComplexCategory >::const_iterator aEnd(aComplexCategories.end());
+ for(;aIt!=aEnd;++aIt)
+ {
+ TickInfo aTickInfo;
+ ComplexCategory aCat(*aIt);
+ sal_Int32 nCount = aCat.Count;
+ if( nCatIndex + 0.5 + nCount >= m_aScale.Maximum )
+ {
+ nCount = m_aScale.Maximum - 0.5 - nCatIndex;
+ if( nCount <= 0 )
+ nCount = 1;
+ }
+ aTickInfo.fScaledTickValue = nCatIndex + 0.5 + nCount/2.0;
+ aTickInfo.nFactorForLimitedTextWidth = nCount;
+ aTickInfo.aText = aCat.Text;
+ aTickInfoVector.push_back(aTickInfo);
+ nCatIndex += nCount;
+ if( nCatIndex + 0.5 >= m_aScale.Maximum )
+ break;
+ }
+ rAllTickInfos.push_back(aTickInfoVector);
+ }
+ }
+ else //bShiftedPosition==true
+ {
+ rAllTickInfos.clear();
+ sal_Int32 nLevel=0;
+ sal_Int32 nLevelCount = m_aAxisProperties.m_pExplicitCategoriesProvider->getCategoryLevelCount();
+ for( ; nLevel<nLevelCount; nLevel++ )
+ {
+ ::std::vector< TickInfo > aTickInfoVector;
+ std::vector< ComplexCategory > aComplexCategories( m_aAxisProperties.m_pExplicitCategoriesProvider->getCategoriesByLevel( nLevel ) );
+ sal_Int32 nCatIndex = 0;
+ std::vector< ComplexCategory >::const_iterator aIt(aComplexCategories.begin());
+ std::vector< ComplexCategory >::const_iterator aEnd(aComplexCategories.end());
+ for(;aIt!=aEnd;++aIt)
+ {
+ TickInfo aTickInfo;
+ ComplexCategory aCat(*aIt);
+ aTickInfo.fScaledTickValue = nCatIndex + 0.5;
+ aTickInfoVector.push_back(aTickInfo);
+ nCatIndex += aCat.Count;
+ if( nCatIndex + 0.5 > m_aScale.Maximum )
+ break;
+ }
+ //fill up with single ticks until maximum scale
+ while( nCatIndex + 0.5 < m_aScale.Maximum )
+ {
+ TickInfo aTickInfo;
+ aTickInfo.fScaledTickValue = nCatIndex + 0.5;
+ aTickInfoVector.push_back(aTickInfo);
+ nCatIndex ++;
+ if( nLevel>0 )
+ break;
+ }
+ //add an additional tick at the end
+ {
+ TickInfo aTickInfo;
+ aTickInfo.fScaledTickValue = m_aScale.Maximum;
+ aTickInfoVector.push_back(aTickInfo);
+ }
+ rAllTickInfos.push_back(aTickInfoVector);
+ }
}
- return false;
+}
+
+void VCartesianAxis::createAllTickInfos( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos )
+{
+ if( m_aAxisProperties.m_bComplexCategories && m_bUseTextLabels )
+ createAllTickInfosFromComplexCategories( rAllTickInfos, false );
+ else
+ VAxisBase::createAllTickInfos(rAllTickInfos);
+}
+
+::std::auto_ptr< TickIter > VCartesianAxis::createLabelTickIterator( sal_Int32 nTextLevel )
+{
+ if( m_aAxisProperties.m_bComplexCategories && m_bUseTextLabels )
+ {
+ if( nTextLevel>=0 && nTextLevel < static_cast< sal_Int32 >(m_aAllTickInfos.size()) )
+ return ::std::auto_ptr< TickIter >( new PureTickIter( m_aAllTickInfos[nTextLevel] ) );
+ }
+ else
+ {
+ if(nTextLevel==0)
+ return ::std::auto_ptr< TickIter >( new EquidistantTickIter( m_aAllTickInfos, m_aIncrement, 0, 0 ) );
+ }
+ return ::std::auto_ptr< TickIter >();
+}
+::std::auto_ptr< TickIter > VCartesianAxis::createMaximumLabelTickIterator( sal_Int32 nTextLevel )
+{
+ if( m_aAxisProperties.m_bComplexCategories && m_bUseTextLabels )
+ {
+ return createLabelTickIterator( nTextLevel ); //mmmm maybe todo: create less than all texts here
+ }
+ else
+ {
+ if(nTextLevel==0)
+ {
+ sal_Int32 nLongestLabelIndex = m_bUseTextLabels ? this->getIndexOfLongestLabel( m_aTextLabels ) : 0;
+ return ::std::auto_ptr< TickIter >( new MaxLabelEquidistantTickIter( m_aAllTickInfos, m_aIncrement, nLongestLabelIndex ) );
+ }
+ }
+ return ::std::auto_ptr< TickIter >();
+}
+
+sal_Int32 VCartesianAxis::getTextLevelCount() const
+{
+ sal_Int32 nTextLevelCount = 1;
+ if( m_aAxisProperties.m_bComplexCategories && m_bUseTextLabels )
+ nTextLevelCount = m_aAxisProperties.m_pExplicitCategoriesProvider->getCategoryLevelCount();
+ return nTextLevelCount;
}
bool VCartesianAxis::createTextShapes(
const Reference< drawing::XShapes >& xTarget
, TickIter& rTickIter
, AxisLabelProperties& rAxisLabelProperties
- , TickmarkHelper_2D* pTickmarkHelper )
+ , TickmarkHelper_2D* pTickmarkHelper
+ , sal_Int32 nScreenDistanceBetweenTicks )
{
//returns true if the text shapes have been created succesfully
//otherwise false - in this case the AxisLabelProperties have changed
//and contain new instructions for the next try for text shape creation
- uno::Sequence< rtl::OUString >* pCategories = m_bUseTextLabels? &m_aTextLabels : 0;
-
Reference< XScaling > xInverseScaling( NULL );
if( m_aScale.Scaling.is() )
xInverseScaling = m_aScale.Scaling->getInverseScaling();
@@ -442,40 +574,44 @@ bool VCartesianAxis::createTextShapes(
FixedNumberFormatter aFixedNumberFormatter(
m_xNumberFormatsSupplier, rAxisLabelProperties.nNumberFormatKey );
- B2DVector aTextToTickDistance( pTickmarkHelper->getDistanceAxisTickToText( m_aAxisProperties ) );
-
- TickInfo* pPreviousVisibleTickInfo = NULL;
- TickInfo* pPREPreviousVisibleTickInfo = NULL;
- TickInfo* pLastVisibleNeighbourTickInfo = NULL;
+ const bool bIsHorizontalAxis = pTickmarkHelper->isHorizontalAxis();
+ const bool bIsVerticalAxis = pTickmarkHelper->isVerticalAxis();
bool bIsStaggered = rAxisLabelProperties.getIsStaggered();
- sal_Int32 nLimitedSpace = -1;
- if( isBreakOfLabelsAllowed( rAxisLabelProperties, pTickmarkHelper ) )
+ B2DVector aTextToTickDistance( pTickmarkHelper->getDistanceAxisTickToText( m_aAxisProperties, true ) );
+ sal_Int32 nLimitedSpaceForText = -1;
+ if( isBreakOfLabelsAllowed( rAxisLabelProperties, bIsHorizontalAxis ) )
{
- nLimitedSpace = TickmarkHelper_2D::getTickScreenDistance( rTickIter );
+ nLimitedSpaceForText = nScreenDistanceBetweenTicks;
if( bIsStaggered )
- nLimitedSpace *= 2;
+ nLimitedSpaceForText *= 2;
- if( nLimitedSpace > 0 )
+ if( nLimitedSpaceForText > 0 )
{ //reduce space for a small amount to have a visible distance between the labels:
- sal_Int32 nReduce = (nLimitedSpace*5)/100;
+ sal_Int32 nReduce = (nLimitedSpaceForText*5)/100;
if(!nReduce)
nReduce = 1;
- nLimitedSpace -= nReduce;
+ nLimitedSpaceForText -= nReduce;
}
- //maybe @todo in future:
- //if the labeled tickmarks are not equidistant [this is not considered to be a relevant case so far]
- //the limited space maybe needs to be calculated for each tickmark seperatly
- //or the staggering could be ignored in that case
}
+ std::vector< ComplexCategoryPlacement > aComplexCategoryPlacements;
+ uno::Sequence< rtl::OUString >* pCategories = 0;
+ if( m_bUseTextLabels && !m_aAxisProperties.m_bComplexCategories )
+ pCategories = &m_aTextLabels;
+
+ TickInfo* pPreviousVisibleTickInfo = NULL;
+ TickInfo* pPREPreviousVisibleTickInfo = NULL;
+ TickInfo* pLastVisibleNeighbourTickInfo = NULL;
+
//------------------------------------------------
//prepare properties for multipropertyset-interface of shape
tNameSequence aPropNames;
tAnySequence aPropValues;
+ bool bLimitedHeight = fabs(aTextToTickDistance.getX()) > fabs(aTextToTickDistance.getY());
Reference< beans::XPropertySet > xProps( m_aAxisProperties.m_xAxisModel, uno::UNO_QUERY );
PropertyMapper::getTextLabelMultiPropertyLists( xProps, aPropNames, aPropValues, false
- , nLimitedSpace, fabs(aTextToTickDistance.getX()) > fabs(aTextToTickDistance.getY()) );
+ , nLimitedSpaceForText, bLimitedHeight );
LabelPositionHelper::doDynamicFontResize( aPropValues, aPropNames, xProps
, m_aAxisLabelProperties.m_aFontReferenceSize );
LabelPositionHelper::changeTextAdjustment( aPropValues, aPropNames, m_aAxisProperties.m_aLabelAlignment );
@@ -484,6 +620,8 @@ bool VCartesianAxis::createTextShapes(
sal_Int32 nColor = Color( COL_AUTO ).GetColor();
if(pColorAny)
*pColorAny >>= nColor;
+
+ uno::Any* pLimitedSpaceAny = PropertyMapper::getValuePointerForLimitedSpace(aPropValues,aPropNames,bLimitedHeight);
//------------------------------------------------
sal_Int32 nTick = 0;
@@ -494,7 +632,7 @@ bool VCartesianAxis::createTextShapes(
pLastVisibleNeighbourTickInfo = bIsStaggered ?
pPREPreviousVisibleTickInfo : pPreviousVisibleTickInfo;
- //don't create labels which does not fit into the rythm
+ //don't create labels which does not fit into the rhythm
if( nTick%rAxisLabelProperties.nRhythm != 0)
continue;
@@ -508,10 +646,11 @@ bool VCartesianAxis::createTextShapes(
{
if( lcl_doesShapeOverlapWithTickmark( pLastVisibleNeighbourTickInfo->xTextShape
, rAxisLabelProperties.fRotationAngleDegree
- , pTickInfo->aTickScreenPosition, pTickmarkHelper ) )
+ , pTickInfo->aTickScreenPosition
+ , bIsHorizontalAxis, bIsVerticalAxis ) )
{
bool bOverlapAlsoAfterSwitchingOnAutoStaggering = true;
- if( !bIsStaggered && isAutoStaggeringOfLabelsAllowed( rAxisLabelProperties, pTickmarkHelper ) )
+ if( !bIsStaggered && isAutoStaggeringOfLabelsAllowed( rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis ) )
{
bIsStaggered = true;
rAxisLabelProperties.eStaggering = STAGGER_EVEN;
@@ -519,7 +658,8 @@ bool VCartesianAxis::createTextShapes(
if( !pLastVisibleNeighbourTickInfo ||
!lcl_doesShapeOverlapWithTickmark( pLastVisibleNeighbourTickInfo->xTextShape
, rAxisLabelProperties.fRotationAngleDegree
- , pTickInfo->aTickScreenPosition, pTickmarkHelper ) )
+ , pTickInfo->aTickScreenPosition
+ , bIsHorizontalAxis, bIsVerticalAxis ) )
bOverlapAlsoAfterSwitchingOnAutoStaggering = false;
}
if( bOverlapAlsoAfterSwitchingOnAutoStaggering )
@@ -527,8 +667,7 @@ bool VCartesianAxis::createTextShapes(
if( rAxisLabelProperties.bRhythmIsFix )
continue;
rAxisLabelProperties.nRhythm++;
- TickIter aRemoveIter( m_aAllTickInfos, m_aIncrement, 0, 0 );
- removeShapesAtWrongRythm( aRemoveIter, rAxisLabelProperties.nRhythm, nTick, xTarget );
+ removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.nRhythm, nTick, xTarget );
return false;
}
}
@@ -546,11 +685,17 @@ bool VCartesianAxis::createTextShapes(
if( nIndex>=0 && nIndex<pCategories->getLength() )
aLabel = (*pCategories)[nIndex];
}
+ else if( m_aAxisProperties.m_bComplexCategories )
+ {
+ aLabel = pTickInfo->aText;
+ }
else
aLabel = aFixedNumberFormatter.getFormattedString( pTickInfo->fUnscaledTickValue, nExtraColor, bHasExtraColor );
if(pColorAny)
*pColorAny = uno::makeAny(bHasExtraColor?nExtraColor:nColor);
+ if(pLimitedSpaceAny)
+ *pLimitedSpaceAny = uno::makeAny(sal_Int32(nLimitedSpaceForText*pTickInfo->nFactorForLimitedTextWidth));
B2DVector aTickScreenPos2D( pTickInfo->aTickScreenPosition );
aTickScreenPos2D += aTextToTickDistance;
@@ -575,7 +720,7 @@ bool VCartesianAxis::createTextShapes(
if( doesOverlap( pLastVisibleNeighbourTickInfo->xTextShape, pTickInfo->xTextShape, m_aAxisLabelProperties.fRotationAngleDegree ) )
{
bool bOverlapAlsoAfterSwitchingOnAutoStaggering = true;
- if( !bIsStaggered && isAutoStaggeringOfLabelsAllowed( rAxisLabelProperties, pTickmarkHelper ) )
+ if( !bIsStaggered && isAutoStaggeringOfLabelsAllowed( rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis ) )
{
bIsStaggered = true;
rAxisLabelProperties.eStaggering = STAGGER_EVEN;
@@ -583,7 +728,8 @@ bool VCartesianAxis::createTextShapes(
if( !pLastVisibleNeighbourTickInfo ||
!lcl_doesShapeOverlapWithTickmark( pLastVisibleNeighbourTickInfo->xTextShape
, rAxisLabelProperties.fRotationAngleDegree
- , pTickInfo->aTickScreenPosition, pTickmarkHelper ) )
+ , pTickInfo->aTickScreenPosition
+ , bIsHorizontalAxis, bIsVerticalAxis ) )
bOverlapAlsoAfterSwitchingOnAutoStaggering = false;
}
if( bOverlapAlsoAfterSwitchingOnAutoStaggering )
@@ -595,8 +741,7 @@ bool VCartesianAxis::createTextShapes(
continue;
}
rAxisLabelProperties.nRhythm++;
- TickIter aRemoveIter( m_aAllTickInfos, m_aIncrement, 0, 0 );
- removeShapesAtWrongRythm( aRemoveIter, rAxisLabelProperties.nRhythm, nTick, xTarget );
+ removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.nRhythm, nTick, xTarget );
return false;
}
}
@@ -1060,6 +1205,43 @@ TickmarkHelper_2D* VCartesianAxis::createTickmarkHelper2D()
return new TickmarkHelper_2D( m_aScale, m_aIncrement, aStart, aEnd, aLabelLineStart-aStart );
}
+void lcl_hideIdenticalScreenValues( TickIter& rTickIter )
+{
+ TickInfo* pPreviousTickInfo = rTickIter.firstInfo();
+ if(!pPreviousTickInfo)
+ return;
+ pPreviousTickInfo->bPaintIt = true;
+ for( TickInfo* pTickInfo = rTickIter.nextInfo(); pTickInfo; pTickInfo = rTickIter.nextInfo())
+ {
+ pTickInfo->bPaintIt =
+ ( static_cast<sal_Int32>(pTickInfo->aTickScreenPosition.getX())
+ != static_cast<sal_Int32>(pPreviousTickInfo->aTickScreenPosition.getX()) )
+ ||
+ ( static_cast<sal_Int32>(pTickInfo->aTickScreenPosition.getY())
+ != static_cast<sal_Int32>(pPreviousTickInfo->aTickScreenPosition.getY()) );
+ pPreviousTickInfo = pTickInfo;
+ }
+}
+
+//'hide' tickmarks with identical screen values in aAllTickInfos
+void VCartesianAxis::hideIdenticalScreenValues( ::std::vector< ::std::vector< TickInfo > >& rTickInfos ) const
+{
+ if( m_aAxisProperties.m_bComplexCategories && m_bUseTextLabels )
+ {
+ sal_Int32 nCount = rTickInfos.size();
+ for( sal_Int32 nN=0; nN<nCount; nN++ )
+ {
+ PureTickIter aTickIter( rTickInfos[nN] );
+ lcl_hideIdenticalScreenValues( aTickIter );
+ }
+ }
+ else
+ {
+ EquidistantTickIter aTickIter( rTickInfos, m_aIncrement, 0, -1 );
+ lcl_hideIdenticalScreenValues( aTickIter );
+ }
+}
+
sal_Int32 VCartesianAxis::estimateMaximumAutoMainIncrementCount()
{
sal_Int32 nRet = 10;
@@ -1095,15 +1277,31 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel
if( !pTickmarkHelper2D )
return;
- if( rAxisLabelProperties.getIsStaggered() )
+ if( m_aAxisProperties.m_bComplexCategories && m_bUseTextLabels )
{
- LabelIterator aInnerIter( m_aAllTickInfos, m_aIncrement
+ sal_Int32 nTextLevelCount = getTextLevelCount();
+ B2DVector aCummulatedLabelsDistance(0,0);
+ for( sal_Int32 nTextLevel=0; nTextLevel<nTextLevelCount; nTextLevel++ )
+ {
+ ::std::auto_ptr< TickIter > apTickIter = createLabelTickIterator( nTextLevel );
+ if(apTickIter.get())
+ {
+ if( nTextLevel>0 )
+ lcl_shiftLables( *apTickIter.get(), aCummulatedLabelsDistance );
+ aCummulatedLabelsDistance += lcl_getLabelsDistance( *apTickIter.get()
+ , pTickmarkHelper2D->getDistanceAxisTickToText( m_aAxisProperties ) );
+ }
+ }
+ }
+ else if( rAxisLabelProperties.getIsStaggered() )
+ {
+ EquidistantLabelIterator aInnerIter( m_aAllTickInfos, m_aIncrement
, rAxisLabelProperties.eStaggering, true, 0, 0 );
- LabelIterator aOuterIter( m_aAllTickInfos, m_aIncrement
+ EquidistantLabelIterator aOuterIter( m_aAllTickInfos, m_aIncrement
, rAxisLabelProperties.eStaggering, false, 0, 0 );
- lcl_correctPositionForStaggering( aOuterIter
- , lcl_getStaggerDistance( aInnerIter
+ lcl_shiftLables( aOuterIter
+ , lcl_getLabelsDistance( aInnerIter
, pTickmarkHelper2D->getDistanceAxisTickToText( m_aAxisProperties ) ) );
}
}
@@ -1127,18 +1325,34 @@ void SAL_CALL VCartesianAxis::createLabels()
pTickmarkHelper2D->updateScreenValues( m_aAllTickInfos );
//-----------------------------------------
//'hide' tickmarks with identical screen values in aAllTickInfos
- pTickmarkHelper2D->hideIdenticalScreenValues( m_aAllTickInfos );
+ hideIdenticalScreenValues( m_aAllTickInfos );
- TickIter aRemoveIter( m_aAllTickInfos, m_aIncrement, 0, 0 );
- removeTextShapesFromTicks( aRemoveIter, m_xTextTarget );
+ removeTextShapesFromTicks();
//create tick mark text shapes
- TickIter aTickIter( m_aAllTickInfos, m_aIncrement, 0, 0 );
- while( !createTextShapes( m_xTextTarget, aTickIter
- , m_aAxisLabelProperties, pTickmarkHelper2D ) )
+ sal_Int32 nTextLevelCount = getTextLevelCount();
+ sal_Int32 nScreenDistanceBetweenTicks = -1;
+ for( sal_Int32 nTextLevel=0; nTextLevel<nTextLevelCount; nTextLevel++ )
{
- };
+ ::std::auto_ptr< TickIter > apTickIter = createLabelTickIterator( nTextLevel );
+ if(apTickIter.get())
+ {
+ if(nTextLevel==0)
+ {
+ nScreenDistanceBetweenTicks = TickmarkHelper_2D::getTickScreenDistance( *apTickIter.get() );
+ if( nTextLevelCount>1 )
+ nScreenDistanceBetweenTicks*=2; //the above used tick iter does contain also the sub ticks -> thus the given distance is only the half
+ }
+ AxisLabelProperties aCopy(m_aAxisLabelProperties);
+ aCopy.bRhythmIsFix = true;
+ aCopy.nRhythm = 1;
+ AxisLabelProperties& rAxisLabelProperties = nTextLevel==0 ? m_aAxisLabelProperties : aCopy;
+ while( !createTextShapes( m_xTextTarget, *apTickIter.get(), rAxisLabelProperties, pTickmarkHelper2D, nScreenDistanceBetweenTicks ) )
+ {
+ };
+ }
+ }
doStaggeringOfLabels( m_aAxisLabelProperties, pTickmarkHelper2D );
}
}
@@ -1166,19 +1380,22 @@ void SAL_CALL VCartesianAxis::createMaximumLabels()
//create tick mark text shapes
//@todo: iterate through all tick depth wich should be labeled
- sal_Int32 nLongestLabelIndex = m_bUseTextLabels
- ? this->getIndexOfLongestLabel( m_aTextLabels ) : 0;
- MaxLabelTickIter aTickIter( m_aAllTickInfos, m_aIncrement, nLongestLabelIndex );
AxisLabelProperties aAxisLabelProperties( m_aAxisLabelProperties );
- if( isAutoStaggeringOfLabelsAllowed( aAxisLabelProperties, pTickmarkHelper2D ) )
+ if( isAutoStaggeringOfLabelsAllowed( aAxisLabelProperties, pTickmarkHelper2D->isHorizontalAxis(), pTickmarkHelper2D->isVerticalAxis() ) )
aAxisLabelProperties.eStaggering = STAGGER_EVEN;
aAxisLabelProperties.bOverlapAllowed = true;
aAxisLabelProperties.bLineBreakAllowed = false;
- while( !createTextShapes( m_xTextTarget, aTickIter
- , aAxisLabelProperties, pTickmarkHelper2D ) )
+ sal_Int32 nTextLevelCount = getTextLevelCount();
+ for( sal_Int32 nTextLevel=0; nTextLevel<nTextLevelCount; nTextLevel++ )
{
- };
-
+ ::std::auto_ptr< TickIter > apTickIter = createMaximumLabelTickIterator( nTextLevel );
+ if(apTickIter.get())
+ {
+ while( !createTextShapes( m_xTextTarget, *apTickIter.get(), aAxisLabelProperties, pTickmarkHelper2D, -1 ) )
+ {
+ };
+ }
+ }
doStaggeringOfLabels( aAxisLabelProperties, pTickmarkHelper2D );
}
}
@@ -1198,46 +1415,47 @@ void SAL_CALL VCartesianAxis::updatePositions()
//update positions of all existing text shapes
pTickmarkHelper2D->updateScreenValues( m_aAllTickInfos );
- TickIter aTickIter( m_aAllTickInfos, m_aIncrement, 0, 0 );
-
- Reference< drawing::XShape > xShape2DText;
- for( TickInfo* pTickInfo = aTickIter.firstInfo()
- ; pTickInfo; pTickInfo = aTickIter.nextInfo() )
+ ::std::vector< ::std::vector< TickInfo > >::iterator aDepthIter = m_aAllTickInfos.begin();
+ const ::std::vector< ::std::vector< TickInfo > >::const_iterator aDepthEnd = m_aAllTickInfos.end();
+ for( ; aDepthIter != aDepthEnd; aDepthIter++ )
{
- if( !pTickInfo )
- continue;
-
- xShape2DText = pTickInfo->xTextShape;
- if( xShape2DText.is() )
+ ::std::vector< TickInfo >::iterator aTickIter = aDepthIter->begin();
+ const ::std::vector< TickInfo >::const_iterator aTickEnd = aDepthIter->end();
+ for( ; aTickIter != aTickEnd; aTickIter++ )
{
- B2DVector aTextToTickDistance( pTickmarkHelper2D->getDistanceAxisTickToText( m_aAxisProperties ) );
- B2DVector aTickScreenPos2D( pTickInfo->aTickScreenPosition );
- aTickScreenPos2D += aTextToTickDistance;
- awt::Point aAnchorScreenPosition2D(
- static_cast<sal_Int32>(aTickScreenPos2D.getX())
- ,static_cast<sal_Int32>(aTickScreenPos2D.getY()));
-
- // #i78696# use mathematically correct rotation now
- const double fRotationAnglePi(m_aAxisLabelProperties.fRotationAngleDegree * (F_PI / -180.0));
- uno::Any aATransformation = ShapeFactory::makeTransformation(aAnchorScreenPosition2D, fRotationAnglePi);
-
- //set new position
- uno::Reference< beans::XPropertySet > xProp( xShape2DText, uno::UNO_QUERY );
- if( xProp.is() )
+ TickInfo& rTickInfo = (*aTickIter);
+ Reference< drawing::XShape > xShape2DText( rTickInfo.xTextShape );
+ if( xShape2DText.is() )
{
- try
+ B2DVector aTextToTickDistance( pTickmarkHelper2D->getDistanceAxisTickToText( m_aAxisProperties, true ) );
+ B2DVector aTickScreenPos2D( rTickInfo.aTickScreenPosition );
+ aTickScreenPos2D += aTextToTickDistance;
+ awt::Point aAnchorScreenPosition2D(
+ static_cast<sal_Int32>(aTickScreenPos2D.getX())
+ ,static_cast<sal_Int32>(aTickScreenPos2D.getY()));
+
+ // #i78696# use mathematically correct rotation now
+ const double fRotationAnglePi(m_aAxisLabelProperties.fRotationAngleDegree * (F_PI / -180.0));
+ uno::Any aATransformation = ShapeFactory::makeTransformation(aAnchorScreenPosition2D, fRotationAnglePi);
+
+ //set new position
+ uno::Reference< beans::XPropertySet > xProp( xShape2DText, uno::UNO_QUERY );
+ if( xProp.is() )
{
- xProp->setPropertyValue( C2U( "Transformation" ), aATransformation );
+ try
+ {
+ xProp->setPropertyValue( C2U( "Transformation" ), aATransformation );
+ }
+ catch( uno::Exception& e )
+ {
+ ASSERT_EXCEPTION( e );
+ }
}
- catch( uno::Exception& e )
- {
- ASSERT_EXCEPTION( e );
- }
- }
- //correctPositionForRotation
- LabelPositionHelper::correctPositionForRotation( xShape2DText
- , m_aAxisProperties.m_aLabelAlignment, m_aAxisLabelProperties.fRotationAngleDegree, false );
+ //correctPositionForRotation
+ LabelPositionHelper::correctPositionForRotation( xShape2DText
+ , m_aAxisProperties.m_aLabelAlignment, m_aAxisLabelProperties.fRotationAngleDegree, false );
+ }
}
}
@@ -1245,6 +1463,37 @@ void SAL_CALL VCartesianAxis::updatePositions()
}
}
+void VCartesianAxis::createTickMarkLineShapes( ::std::vector< TickInfo >& rTickInfos, const TickmarkProperties& rTickmarkProperties, TickmarkHelper_2D& rTickmarkHelper2D, bool bOnlyAtLabels )
+{
+ sal_Int32 nPointCount = rTickInfos.size();
+ drawing::PointSequenceSequence aPoints(2*nPointCount);
+
+ ::std::vector< TickInfo >::const_iterator aTickIter = rTickInfos.begin();
+ const ::std::vector< TickInfo >::const_iterator aTickEnd = rTickInfos.end();
+ sal_Int32 nN = 0;
+ for( ; aTickIter != aTickEnd; aTickIter++ )
+ {
+ if( !(*aTickIter).bPaintIt )
+ continue;
+
+ bool bTicksAtLabels = ( m_aAxisProperties.m_eTickmarkPos != ::com::sun::star::chart::ChartAxisMarkPosition_AT_AXIS );
+ double fInnerDirectionSign = m_aAxisProperties.m_fInnerDirectionSign;
+ if( bTicksAtLabels && m_aAxisProperties.m_eLabelPos == ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END )
+ fInnerDirectionSign *= -1.0;
+ bTicksAtLabels = bTicksAtLabels || bOnlyAtLabels;
+ //add ticks at labels:
+ rTickmarkHelper2D.addPointSequenceForTickLine( aPoints, nN++, (*aTickIter).fScaledTickValue
+ , fInnerDirectionSign , rTickmarkProperties, bTicksAtLabels );
+ //add ticks at axis (without lables):
+ if( !bOnlyAtLabels && m_aAxisProperties.m_eTickmarkPos == ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS )
+ rTickmarkHelper2D.addPointSequenceForTickLine( aPoints, nN++, (*aTickIter).fScaledTickValue
+ , m_aAxisProperties.m_fInnerDirectionSign, rTickmarkProperties, !bTicksAtLabels );
+ }
+ aPoints.realloc(nN);
+ m_pShapeFactory->createLine2D( m_xGroupShape_Shapes, aPoints
+ , &rTickmarkProperties.aLineProperties );
+}
+
void SAL_CALL VCartesianAxis::createShapes()
{
if( !prepareShapeCreation() )
@@ -1256,55 +1505,64 @@ void SAL_CALL VCartesianAxis::createShapes()
return;
//-----------------------------------------
- //create tick mark line shapes
+ //create line shapes
if(2==m_nDimension)
{
- ::std::vector< ::std::vector< TickInfo > > aAllShiftedTickInfos;
- if( m_aIncrement.ShiftedPosition )
- {
- pTickmarkHelper2D->getAllTicksShifted( aAllShiftedTickInfos );
- pTickmarkHelper2D->updateScreenValues( aAllShiftedTickInfos );
- pTickmarkHelper2D->hideIdenticalScreenValues( aAllShiftedTickInfos );
- }
- ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos = m_aIncrement.ShiftedPosition ? aAllShiftedTickInfos : m_aAllTickInfos;
-
- ::std::vector< ::std::vector< TickInfo > >::iterator aDepthIter = rAllTickInfos.begin();
- const ::std::vector< ::std::vector< TickInfo > >::const_iterator aDepthEnd = rAllTickInfos.end();
-
- if(aDepthIter == aDepthEnd)//no tickmarks at all
- return;
-
- sal_Int32 nTickmarkPropertiesCount = m_aAxisProperties.m_aTickmarkPropertiesList.size();
- for( sal_Int32 nDepth=0
- ; aDepthIter != aDepthEnd && nDepth < nTickmarkPropertiesCount
- ; aDepthIter++, nDepth++ )
+ //-----------------------------------------
+ //create extra long ticks to separate complex categories (create them only there where the labels are)
+ if( m_aAxisProperties.m_bComplexCategories && m_bUseTextLabels )
{
- const TickmarkProperties& rTickmarkProperties = m_aAxisProperties.m_aTickmarkPropertiesList[nDepth];
-
- sal_Int32 nPointCount = (*aDepthIter).size();
- drawing::PointSequenceSequence aPoints(2*nPointCount);
+ ::std::vector< ::std::vector< TickInfo > > aComplexTickInfos;
+ createAllTickInfosFromComplexCategories( aComplexTickInfos, true );
+ pTickmarkHelper2D->updateScreenValues( aComplexTickInfos );
+ hideIdenticalScreenValues( aComplexTickInfos );
+
+ ::std::vector<TickmarkProperties> aTickmarkPropertiesList;
+ static bool bIncludeSpaceBetweenTickAndText = false;
+ sal_Int32 nOffset = pTickmarkHelper2D->getDistanceAxisTickToText( m_aAxisProperties, false, bIncludeSpaceBetweenTickAndText ).getLength();
+ sal_Int32 nTextLevelCount = getTextLevelCount();
+ for( sal_Int32 nTextLevel=0; nTextLevel<nTextLevelCount; nTextLevel++ )
+ {
+ ::std::auto_ptr< TickIter > apTickIter = createLabelTickIterator( nTextLevel );
+ if( apTickIter.get() )
+ {
+ B2DVector aLabelsDistance( lcl_getLabelsDistance( *apTickIter.get(), pTickmarkHelper2D->getDistanceAxisTickToText( m_aAxisProperties, false ) ) );
+ sal_Int32 nCurrentLength = aLabelsDistance.getLength();
+ aTickmarkPropertiesList.push_back( m_aAxisProperties.makeTickmarkPropertiesForComplexCategories( nOffset + nCurrentLength, 0, nTextLevel ) );
+ nOffset += nCurrentLength;
+ }
+ }
- ::std::vector< TickInfo >::const_iterator aTickIter = (*aDepthIter).begin();
- const ::std::vector< TickInfo >::const_iterator aTickEnd = (*aDepthIter).end();
- sal_Int32 nN = 0;
- for( ; aTickIter != aTickEnd; aTickIter++ )
+ sal_Int32 nTickmarkPropertiesCount = aTickmarkPropertiesList.size();
+ ::std::vector< ::std::vector< TickInfo > >::iterator aDepthIter = aComplexTickInfos.begin();
+ const ::std::vector< ::std::vector< TickInfo > >::const_iterator aDepthEnd = aComplexTickInfos.end();
+ for( sal_Int32 nDepth=0; aDepthIter != aDepthEnd && nDepth < nTickmarkPropertiesCount; aDepthIter++, nDepth++ )
{
- if( !(*aTickIter).bPaintIt )
+ if(nDepth==0 && !m_aAxisProperties.m_nMajorTickmarks)
continue;
-
- bool bTicksAtLabels = ( m_aAxisProperties.m_eTickmarkPos != ::com::sun::star::chart::ChartAxisMarkPosition_AT_AXIS );
- double fInnerDirectionSign = m_aAxisProperties.m_fInnerDirectionSign;
- if( bTicksAtLabels && m_aAxisProperties.m_eLabelPos == ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END )
- fInnerDirectionSign *= -1.0;
- apTickmarkHelper2D->addPointSequenceForTickLine( aPoints, nN++, (*aTickIter).fScaledTickValue
- , fInnerDirectionSign , rTickmarkProperties, bTicksAtLabels );
- if( m_aAxisProperties.m_eTickmarkPos == ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS )
- apTickmarkHelper2D->addPointSequenceForTickLine( aPoints, nN++, (*aTickIter).fScaledTickValue
- , m_aAxisProperties.m_fInnerDirectionSign, rTickmarkProperties, !bTicksAtLabels );
+ createTickMarkLineShapes( *aDepthIter, aTickmarkPropertiesList[nDepth], *pTickmarkHelper2D, true /*bOnlyAtLabels*/ );
+ }
+ }
+ //-----------------------------------------
+ //create normal ticks for major and minor intervals
+ {
+ ::std::vector< ::std::vector< TickInfo > > aAllShiftedTickInfos;
+ if( m_aIncrement.ShiftedPosition || ( m_aAxisProperties.m_bComplexCategories && m_bUseTextLabels ) )
+ {
+ pTickmarkHelper2D->getAllTicksShifted( aAllShiftedTickInfos );
+ pTickmarkHelper2D->updateScreenValues( aAllShiftedTickInfos );
+ hideIdenticalScreenValues( aAllShiftedTickInfos );
}
- aPoints.realloc(nN);
- m_pShapeFactory->createLine2D( m_xGroupShape_Shapes, aPoints
- , &rTickmarkProperties.aLineProperties );
+ ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos = m_aIncrement.ShiftedPosition ? aAllShiftedTickInfos : m_aAllTickInfos;
+
+ ::std::vector< ::std::vector< TickInfo > >::iterator aDepthIter = rAllTickInfos.begin();
+ const ::std::vector< ::std::vector< TickInfo > >::const_iterator aDepthEnd = rAllTickInfos.end();
+ if(aDepthIter == aDepthEnd)//no tickmarks at all
+ return;
+
+ sal_Int32 nTickmarkPropertiesCount = m_aAxisProperties.m_aTickmarkPropertiesList.size();
+ for( sal_Int32 nDepth=0; aDepthIter != aDepthEnd && nDepth < nTickmarkPropertiesCount; aDepthIter++, nDepth++ )
+ createTickMarkLineShapes( *aDepthIter, m_aAxisProperties.m_aTickmarkPropertiesList[nDepth], *pTickmarkHelper2D, false /*bOnlyAtLabels*/ );
}
//-----------------------------------------
//create axis main lines
diff --git a/chart2/source/view/axes/VCartesianAxis.hxx b/chart2/source/view/axes/VCartesianAxis.hxx
index ef5c8a0bf613..4fbcd2409196 100644
--- a/chart2/source/view/axes/VCartesianAxis.hxx
+++ b/chart2/source/view/axes/VCartesianAxis.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VCartesianAxis.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,6 +30,8 @@
#include "VAxisBase.hxx"
#include <basegfx/vector/b2dvector.hxx>
+#include <memory>
+
//.............................................................................
namespace chart
{
@@ -72,6 +71,12 @@ public:
virtual void SAL_CALL createShapes();
virtual sal_Int32 estimateMaximumAutoMainIncrementCount();
+ virtual void createAllTickInfos( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos );
+ void createAllTickInfosFromComplexCategories( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos, bool bShiftedPosition );
+
+ ::std::auto_ptr< TickIter > createLabelTickIterator( sal_Int32 nTextLevel );
+ ::std::auto_ptr< TickIter > createMaximumLabelTickIterator( sal_Int32 nTextLevel );
+ sal_Int32 getTextLevelCount() const;
//-------------------------------------------------------------------------
virtual TickmarkHelper* createTickmarkHelper();
@@ -117,16 +122,19 @@ protected: //methods
::com::sun::star::drawing::XShapes >& xTarget
, TickIter& rTickIter
, AxisLabelProperties& rAxisLabelProperties
- , TickmarkHelper_2D* pTickmarkHelper );
+ , TickmarkHelper_2D* pTickmarkHelper
+ , sal_Int32 nScreenDistanceBetweenTicks );
+
+ void createTickMarkLineShapes( ::std::vector< TickInfo >& rTickInfos, const TickmarkProperties& rTickmarkProperties, TickmarkHelper_2D& rTickmarkHelper2D, bool bOnlyAtLabels );
TickmarkHelper_2D* createTickmarkHelper2D();
+ void hideIdenticalScreenValues( ::std::vector< ::std::vector< TickInfo > >& rTickInfos ) const;
void doStaggeringOfLabels( const AxisLabelProperties& rAxisLabelProperties
, TickmarkHelper_2D* pTickmarkHelper2D );
bool isAutoStaggeringOfLabelsAllowed( const AxisLabelProperties& rAxisLabelProperties
- , TickmarkHelper_2D* pTickmarkHelper);
- bool isBreakOfLabelsAllowed( const AxisLabelProperties& rAxisLabelProperties
- , TickmarkHelper_2D* pTickmarkHelper );
+ , bool bIsHorizontalAxis, bool bIsVerticalAxis );
+ bool isBreakOfLabelsAllowed( const AxisLabelProperties& rAxisLabelProperties, bool bIsHorizontalAxis );
::basegfx::B2DVector getScreenPosition( double fLogicX, double fLogicY, double fLogicZ ) const;
ScreenPosAndLogicPos getScreenPosAndLogicPos( double fLogicX, double fLogicY, double fLogicZ ) const;
diff --git a/chart2/source/view/axes/VCartesianCoordinateSystem.cxx b/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
index e6e77ebea57a..a196397e0e9f 100644
--- a/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VCartesianCoordinateSystem.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -156,7 +153,8 @@ void VCartesianCoordinateSystem::createVAxisList(
if( aCrossingScale.AxisType == AxisType::CATEGORY )
{
aAxisProperties.m_bCrossingAxisIsCategoryAxes = true;
- aAxisProperties.m_bAxisBetweenCategories = ChartTypeHelper::shiftTicksAtXAxisPerDefault( AxisHelper::getChartTypeByIndex( m_xCooSysModel, 0 ) );
+ aAxisProperties.m_bAxisBetweenCategories = ChartTypeHelper::shiftTicksAtXAxisPerDefault( AxisHelper::getChartTypeByIndex( m_xCooSysModel, 0 ) )
+ || ( aAxisProperties.m_pExplicitCategoriesProvider && aAxisProperties.m_pExplicitCategoriesProvider->hasComplexCategories() );
}
}
@@ -171,6 +169,13 @@ void VCartesianCoordinateSystem::createVAxisList(
aAxisProperties.init(true);
if(aAxisProperties.m_bDisplayLabels)
aAxisProperties.m_nNumberFormatKey = this->getNumberFormatKeyForAxis( xAxis, xNumberFormatsSupplier );
+
+ if( nDimensionIndex == 0 && aAxisProperties.m_nAxisType == AxisType::CATEGORY
+ && aAxisProperties.m_pExplicitCategoriesProvider )
+ {
+ if( aAxisProperties.m_pExplicitCategoriesProvider->hasComplexCategories() )
+ aAxisProperties.m_bComplexCategories = true;
+ }
//-------------------
::boost::shared_ptr< VAxisBase > apVAxis( new VCartesianAxis(aAxisProperties,xNumberFormatsSupplier,nDimensionIndex,nDimensionCount) );
tFullAxisIndex aFullAxisIndex( nDimensionIndex, nAxisIndex );
diff --git a/chart2/source/view/axes/VCartesianCoordinateSystem.hxx b/chart2/source/view/axes/VCartesianCoordinateSystem.hxx
index 267794ac54b2..b28400c6f906 100644
--- a/chart2/source/view/axes/VCartesianCoordinateSystem.hxx
+++ b/chart2/source/view/axes/VCartesianCoordinateSystem.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VCartesianCoordinateSystem.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/VCartesianGrid.cxx b/chart2/source/view/axes/VCartesianGrid.cxx
index 84ebd4c11f91..7fe6b9937ca6 100644
--- a/chart2/source/view/axes/VCartesianGrid.cxx
+++ b/chart2/source/view/axes/VCartesianGrid.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VCartesianGrid.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/VCartesianGrid.hxx b/chart2/source/view/axes/VCartesianGrid.hxx
index 6774b3081100..274b543900e3 100644
--- a/chart2/source/view/axes/VCartesianGrid.hxx
+++ b/chart2/source/view/axes/VCartesianGrid.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VCartesianGrid.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx
index 47cc6de405f7..bc908acdf85a 100644
--- a/chart2/source/view/axes/VCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCoordinateSystem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VCoordinateSystem.cxx,v $
- * $Revision: 1.11.36.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -97,7 +94,7 @@ VCoordinateSystem::VCoordinateSystem( const Reference< XCoordinateSystem >& xCoo
, m_aMergedMinimumAndMaximumSupplier()
, m_aExplicitScales(3)
, m_aExplicitIncrements(3)
- , m_aExplicitCategoriesProvider( new ExplicitCategoriesProvider( m_xCooSysModel ) )
+ , m_apExplicitCategoriesProvider(NULL)
{
if( !m_xCooSysModel.is() || m_xCooSysModel->getDimension()<3 )
{
@@ -264,10 +261,14 @@ void VCoordinateSystem::impl_adjustDimensionAndIndex( sal_Int32& rDimensionIndex
rAxisIndex = 0;
}
+void VCoordinateSystem::setExplicitCategoriesProvider( ExplicitCategoriesProvider* pExplicitCategoriesProvider /*takes ownership*/ )
+{
+ m_apExplicitCategoriesProvider = ::std::auto_ptr< ExplicitCategoriesProvider >(pExplicitCategoriesProvider);
+}
-Reference< data::XTextualDataSequence > VCoordinateSystem::getExplicitCategoriesProvider()
+ExplicitCategoriesProvider* VCoordinateSystem::getExplicitCategoriesProvider()
{
- return m_aExplicitCategoriesProvider.getRef();
+ return m_apExplicitCategoriesProvider.get();
}
Sequence< ExplicitScaleData > VCoordinateSystem::getExplicitScales( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const
diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx
index 1aa56efbca78..865a7848aa9a 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.cxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VPolarAngleAxis.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -65,7 +62,7 @@ VPolarAngleAxis::~VPolarAngleAxis()
bool VPolarAngleAxis::createTextShapes_ForAngleAxis(
const uno::Reference< drawing::XShapes >& xTarget
- , TickIter& rTickIter
+ , EquidistantTickIter& rTickIter
, AxisLabelProperties& rAxisLabelProperties
, double fLogicRadius
, double fLogicZ )
@@ -102,7 +99,7 @@ bool VPolarAngleAxis::createTextShapes_ForAngleAxis(
; pTickInfo
; pTickInfo = rTickIter.nextInfo(), nTick++ )
{
- //don't create labels which does not fit into the rythm
+ //don't create labels which does not fit into the rhythm
if( nTick%rAxisLabelProperties.nRhythm != 0)
continue;
@@ -192,11 +189,10 @@ void SAL_CALL VPolarAngleAxis::createLabels()
//create tick mark text shapes
//@todo: iterate through all tick depth wich should be labeled
- TickIter aTickIter( m_aAllTickInfos, m_aIncrement, 0, 0 );
+ EquidistantTickIter aTickIter( m_aAllTickInfos, m_aIncrement, 0, 0 );
this->updateUnscaledValuesAtTicks( aTickIter );
- TickIter aRemoveIter( m_aAllTickInfos, m_aIncrement, 0, 0 );
- removeTextShapesFromTicks( aRemoveIter, m_xTextTarget );
+ removeTextShapesFromTicks();
AxisLabelProperties aAxisLabelProperties( m_aAxisLabelProperties );
aAxisLabelProperties.bOverlapAllowed = true;
diff --git a/chart2/source/view/axes/VPolarAngleAxis.hxx b/chart2/source/view/axes/VPolarAngleAxis.hxx
index a04318b70ee1..c03cf533e22c 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.hxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VPolarAngleAxis.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -58,7 +55,7 @@ public:
private: //methods
bool createTextShapes_ForAngleAxis(
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget
- , TickIter& rTickIter
+ , EquidistantTickIter& rTickIter
, AxisLabelProperties& rAxisLabelProperties
, double fLogicRadius, double fLogicZ );
};
diff --git a/chart2/source/view/axes/VPolarAxis.cxx b/chart2/source/view/axes/VPolarAxis.cxx
index 9ab8c4f2d98c..23908585ec3a 100644
--- a/chart2/source/view/axes/VPolarAxis.cxx
+++ b/chart2/source/view/axes/VPolarAxis.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VPolarAxis.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/VPolarAxis.hxx b/chart2/source/view/axes/VPolarAxis.hxx
index 6491c2bcc884..8d4c14188258 100644
--- a/chart2/source/view/axes/VPolarAxis.hxx
+++ b/chart2/source/view/axes/VPolarAxis.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VPolarAxis.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/VPolarCoordinateSystem.cxx b/chart2/source/view/axes/VPolarCoordinateSystem.cxx
index 35468a3b6c2f..76e057a2b32d 100644
--- a/chart2/source/view/axes/VPolarCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VPolarCoordinateSystem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VPolarCoordinateSystem.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/VPolarCoordinateSystem.hxx b/chart2/source/view/axes/VPolarCoordinateSystem.hxx
index e5606ae771b4..f1ba84c5469e 100644
--- a/chart2/source/view/axes/VPolarCoordinateSystem.hxx
+++ b/chart2/source/view/axes/VPolarCoordinateSystem.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VPolarCoordinateSystem.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/VPolarGrid.cxx b/chart2/source/view/axes/VPolarGrid.cxx
index f9278b94b245..0bd98b642acb 100644
--- a/chart2/source/view/axes/VPolarGrid.cxx
+++ b/chart2/source/view/axes/VPolarGrid.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VPolarGrid.cxx,v $
- * $Revision: 1.10.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -93,7 +90,7 @@ void VPolarGrid::createLinePointSequence_ForAngleAxis(
xInverseScaling = rScale.Scaling->getInverseScaling();
sal_Int32 nTick = 0;
- TickIter aIter( rAllTickInfos, rIncrement, 0, 0 );
+ EquidistantTickIter aIter( rAllTickInfos, rIncrement, 0, 0 );
for( TickInfo* pTickInfo = aIter.firstInfo()
; pTickInfo
; pTickInfo = aIter.nextInfo(), nTick++ )
diff --git a/chart2/source/view/axes/VPolarGrid.hxx b/chart2/source/view/axes/VPolarGrid.hxx
index 74cd7fac27ed..3289d6c88be8 100644
--- a/chart2/source/view/axes/VPolarGrid.hxx
+++ b/chart2/source/view/axes/VPolarGrid.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VPolarGrid.hxx,v $
- * $Revision: 1.5.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/VPolarRadiusAxis.cxx b/chart2/source/view/axes/VPolarRadiusAxis.cxx
index 2b3fdf5c327c..2206d4d8f559 100644
--- a/chart2/source/view/axes/VPolarRadiusAxis.cxx
+++ b/chart2/source/view/axes/VPolarRadiusAxis.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VPolarRadiusAxis.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -52,7 +49,6 @@ VPolarRadiusAxis::VPolarRadiusAxis( const AxisProperties& rAxisProperties
{
m_aAxisProperties.m_fLabelDirectionSign=0.0;
m_aAxisProperties.m_fInnerDirectionSign=0.0;
- m_aAxisProperties.m_bLabelsOutside=true;
m_aAxisProperties.m_bIsMainAxis=false;
m_aAxisProperties.m_aLabelAlignment=LABEL_ALIGN_RIGHT;
m_aAxisProperties.init();
@@ -159,7 +155,7 @@ void SAL_CALL VPolarRadiusAxis::createShapes()
AxisProperties aAxisProperties(m_aAxisProperties);
sal_Int32 nTick = 0;
- TickIter aIter( aAngleTickInfos, rAngleIncrement, 0, 0 );
+ EquidistantTickIter aIter( aAngleTickInfos, rAngleIncrement, 0, 0 );
for( TickInfo* pTickInfo = aIter.firstInfo()
; pTickInfo; pTickInfo = aIter.nextInfo(), nTick++ )
{
diff --git a/chart2/source/view/axes/VPolarRadiusAxis.hxx b/chart2/source/view/axes/VPolarRadiusAxis.hxx
index 7d68f64e6b5b..b5c5191e4c98 100644
--- a/chart2/source/view/axes/VPolarRadiusAxis.hxx
+++ b/chart2/source/view/axes/VPolarRadiusAxis.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VPolarRadiusAxis.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/axes/makefile.mk b/chart2/source/view/axes/makefile.mk
index 52996a78c8cd..96191a3a3a25 100644
--- a/chart2/source/view/axes/makefile.mk
+++ b/chart2/source/view/axes/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.5 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 406e5d119cd6..67914f47bac0 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AreaChart.cxx,v $
- * $Revision: 1.53.42.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,7 +48,7 @@
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <tools/debug.hxx>
-#include <svx/unoprnms.hxx>
+#include <editeng/unoprnms.hxx>
#include <rtl/math.hxx>
#include <com/sun/star/drawing/DoubleSequence.hpp>
#include <com/sun/star/drawing/NormalsKind.hpp>
@@ -75,7 +72,6 @@ AreaChart::AreaChart( const uno::Reference<XChartType>& xChartTypeModel
, bool bNoArea
, PlottingPositionHelper* pPlottingPositionHelper
, bool bConnectLastToFirstPoint
- , bool bAddOneToXMax
, bool bExpandIfValuesCloseToBorder
, sal_Int32 nKeepAspectRatio
, const drawing::Direction3D& rAspectRatio
@@ -87,7 +83,6 @@ AreaChart::AreaChart( const uno::Reference<XChartType>& xChartTypeModel
, m_bSymbol( ChartTypeHelper::isSupportingSymbolProperties(xChartTypeModel,nDimensionCount) )
, m_bIsPolarCooSys( bConnectLastToFirstPoint )
, m_bConnectLastToFirstPoint( bConnectLastToFirstPoint )
- , m_bAddOneToXMax(bAddOneToXMax)
, m_bExpandIfValuesCloseToBorder( bExpandIfValuesCloseToBorder )
, m_nKeepAspectRatio(nKeepAspectRatio)
, m_aGivenAspectRatio(rAspectRatio)
@@ -126,14 +121,17 @@ AreaChart::~AreaChart()
delete m_pMainPosHelper;
}
+double AreaChart::getMinimumX()
+{
+ if( m_bCategoryXAxis && m_bIsPolarCooSys )//the angle axis in net charts needs a different autoscaling
+ return 1.0;//first category (index 0) matches with real number 1.0
+ return VSeriesPlotter::getMinimumX();
+}
+
double AreaChart::getMaximumX()
{
- if( m_bAddOneToXMax )
- {
- //return category count
- sal_Int32 nPointCount = getPointCount();
- return nPointCount+1;
- }
+ if( m_bCategoryXAxis && m_bIsPolarCooSys )//the angle axis in net charts needs a different autoscaling
+ return getPointCount()+1;
return VSeriesPlotter::getMaximumX();
}
diff --git a/chart2/source/view/charttypes/AreaChart.hxx b/chart2/source/view/charttypes/AreaChart.hxx
index ec90e92ba1a4..6924509a62a1 100644
--- a/chart2/source/view/charttypes/AreaChart.hxx
+++ b/chart2/source/view/charttypes/AreaChart.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AreaChart.hxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -52,7 +49,6 @@ public:
, bool bCategoryXAxis, bool bNoArea=false
, PlottingPositionHelper* pPlottingPositionHelper=NULL //takes owner ship
, bool bConnectLastToFirstPoint=false
- , bool bAddOneToXMax=false
, bool bExpandIfValuesCloseToBorder=true
, sal_Int32 nKeepAspectRatio=-1 //0->no 1->yes other value->automatic
, const ::com::sun::star::drawing::Direction3D& rAspectRatio=::com::sun::star::drawing::Direction3D(1,1,1)//only taken into account if nKeepAspectRatio==1
@@ -79,6 +75,7 @@ public:
//-------------------------------------------------------------------------
// MinimumAndMaximumSupplier
//-------------------------------------------------------------------------
+ virtual double getMinimumX();
virtual double getMaximumX();
virtual bool isExpandIfValuesCloseToBorder( sal_Int32 nDimensionIndex );
virtual bool isSeperateStackingForDifferentSigns( sal_Int32 nDimensionIndex );
@@ -112,7 +109,6 @@ private: //member
bool m_bSymbol;
bool m_bIsPolarCooSys;//used e.g. for net chart (the data labels need to be placed different)
bool m_bConnectLastToFirstPoint;//used e.g. for net chart
- bool m_bAddOneToXMax;//used e.g. for net chart (the angle axis needs a different autoscaling)
bool m_bExpandIfValuesCloseToBorder; // e.g. false for net charts
sal_Int32 m_nKeepAspectRatio; //0->no 1->yes other value->automatic
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 41cef61561bb..470796f8fc1e 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BarChart.cxx,v $
- * $Revision: 1.25 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/charttypes/BarChart.hxx b/chart2/source/view/charttypes/BarChart.hxx
index 8e01724ca483..403628f7fc43 100644
--- a/chart2/source/view/charttypes/BarChart.hxx
+++ b/chart2/source/view/charttypes/BarChart.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BarChart.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/charttypes/BarPositionHelper.cxx b/chart2/source/view/charttypes/BarPositionHelper.cxx
index f9219784a111..b1735e99de5d 100644
--- a/chart2/source/view/charttypes/BarPositionHelper.cxx
+++ b/chart2/source/view/charttypes/BarPositionHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BarPositionHelper.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/charttypes/BarPositionHelper.hxx b/chart2/source/view/charttypes/BarPositionHelper.hxx
index 5312753d91b2..32899de62aef 100644
--- a/chart2/source/view/charttypes/BarPositionHelper.hxx
+++ b/chart2/source/view/charttypes/BarPositionHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BarPositionHelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index 6069189ff0ac..c5454edcc6fd 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ,v $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -46,7 +43,7 @@
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <tools/debug.hxx>
-#include <svx/unoprnms.hxx>
+#include <editeng/unoprnms.hxx>
#include <rtl/math.hxx>
#include <com/sun/star/drawing/DoubleSequence.hpp>
#include <com/sun/star/drawing/NormalsKind.hpp>
diff --git a/chart2/source/view/charttypes/BubbleChart.hxx b/chart2/source/view/charttypes/BubbleChart.hxx
index 4771a4cccee3..9c04ce8d3719 100644
--- a/chart2/source/view/charttypes/BubbleChart.hxx
+++ b/chart2/source/view/charttypes/BubbleChart.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ,v $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx
index e19a44cdcda6..ddfe50deed2f 100644
--- a/chart2/source/view/charttypes/CandleStickChart.cxx
+++ b/chart2/source/view/charttypes/CandleStickChart.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CandleStickChart.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -45,7 +42,7 @@
#include "DataSeriesHelper.hxx"
#include <tools/debug.hxx>
#include <rtl/math.hxx>
-#include <svx/unoprnms.hxx>
+#include <editeng/unoprnms.hxx>
//.............................................................................
namespace chart
diff --git a/chart2/source/view/charttypes/CandleStickChart.hxx b/chart2/source/view/charttypes/CandleStickChart.hxx
index 6d97931813a9..60018dbe8621 100644
--- a/chart2/source/view/charttypes/CandleStickChart.hxx
+++ b/chart2/source/view/charttypes/CandleStickChart.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CandleStickChart.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/charttypes/CategoryPositionHelper.cxx b/chart2/source/view/charttypes/CategoryPositionHelper.cxx
index 2a42c3ab87ce..d43fd0856e02 100644
--- a/chart2/source/view/charttypes/CategoryPositionHelper.cxx
+++ b/chart2/source/view/charttypes/CategoryPositionHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CategoryPositionHelper.cxx,v $
- * $Revision: 1.5.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/charttypes/CategoryPositionHelper.hxx b/chart2/source/view/charttypes/CategoryPositionHelper.hxx
index dea85190d528..08cb1978faa1 100644
--- a/chart2/source/view/charttypes/CategoryPositionHelper.hxx
+++ b/chart2/source/view/charttypes/CategoryPositionHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: CategoryPositionHelper.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 608adb49290b..b9eac0fc7291 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PieChart.cxx,v $
- * $Revision: 1.20.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -129,6 +126,8 @@ PieChart::PieChart( const uno::Reference<XChartType>& xChartTypeModel
, m_pPosHelper( new PiePositionHelper( NormalAxis_Z, (m_nDimension==3)?0.0:90.0 ) )
, m_bUseRings(false)
{
+ ::rtl::math::setNan(&m_fMaxOffset);
+
PlotterBase::m_pPosHelper = m_pPosHelper;
VSeriesPlotter::m_pMainPosHelper = m_pPosHelper;
m_pPosHelper->m_fRadiusOffset = 0.0;
@@ -248,27 +247,31 @@ double PieChart::getMinimumX()
{
return 0.5;
}
-double PieChart::getMaxOffset() const
+double PieChart::getMaxOffset()
{
- double fRet = 0.0;
+ if (!::rtl::math::isNan(m_fMaxOffset))
+ // Value already cached. Use it.
+ return m_fMaxOffset;
+
+ m_fMaxOffset = 0.0;
if( m_aZSlots.size()<=0 )
- return fRet;
+ return m_fMaxOffset;
if( m_aZSlots[0].size()<=0 )
- return fRet;
+ return m_fMaxOffset;
const ::std::vector< VDataSeries* >& rSeriesList( m_aZSlots[0][0].m_aSeriesVector );
if( rSeriesList.size()<=0 )
- return fRet;
+ return m_fMaxOffset;
VDataSeries* pSeries = rSeriesList[0];
uno::Reference< beans::XPropertySet > xSeriesProp( pSeries->getPropertiesOfSeries() );
if( !xSeriesProp.is() )
- return fRet;
+ return m_fMaxOffset;
double fExplodePercentage=0.0;
xSeriesProp->getPropertyValue( C2U( "Offset" )) >>= fExplodePercentage;
- if(fExplodePercentage>fRet)
- fRet=fExplodePercentage;
+ if(fExplodePercentage>m_fMaxOffset)
+ m_fMaxOffset=fExplodePercentage;
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
if( xSeriesProp->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList )
@@ -280,12 +283,12 @@ double PieChart::getMaxOffset() const
{
fExplodePercentage=0.0;
xPointProp->getPropertyValue( C2U( "Offset" )) >>= fExplodePercentage;
- if(fExplodePercentage>fRet)
- fRet=fExplodePercentage;
+ if(fExplodePercentage>m_fMaxOffset)
+ m_fMaxOffset=fExplodePercentage;
}
}
}
- return fRet;
+ return m_fMaxOffset;
}
double PieChart::getMaximumX()
{
@@ -357,6 +360,7 @@ void PieChart::createShapes()
nExplodeableSlot = m_aZSlots[0].size()-1;
m_aLabelInfoList.clear();
+ ::rtl::math::setNan(&m_fMaxOffset);
//=============================================================================
for( double fSlotX=0; aXSlotIter != aXSlotEnd && (m_bUseRings||fSlotX<0.5 ); aXSlotIter++, fSlotX+=1.0 )
diff --git a/chart2/source/view/charttypes/PieChart.hxx b/chart2/source/view/charttypes/PieChart.hxx
index e65cfdcc5626..52545f6476b8 100644
--- a/chart2/source/view/charttypes/PieChart.hxx
+++ b/chart2/source/view/charttypes/PieChart.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PieChart.hxx,v $
- * $Revision: 1.9.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -105,7 +102,7 @@ private: //methods
, double fLogicZ, double fDepth, double fExplodePercentage
, tPropertyNameValueMap* pOverWritePropertiesMap );
- double getMaxOffset() const;
+ double getMaxOffset();
bool detectLabelOverlapsAndMove(const ::com::sun::star::awt::Size& rPageSize);//returns true when there might be more to do
void resetLabelPositionsToPreviousState();
struct PieLabelInfo;
@@ -137,6 +134,8 @@ private: //member
};
::std::vector< PieLabelInfo > m_aLabelInfoList;
+
+ double m_fMaxOffset; /// cached max offset value (init'ed to NaN)
};
//.............................................................................
} //namespace chart
diff --git a/chart2/source/view/charttypes/Splines.cxx b/chart2/source/view/charttypes/Splines.cxx
index 6d37d7444868..67ecac93b64c 100644
--- a/chart2/source/view/charttypes/Splines.cxx
+++ b/chart2/source/view/charttypes/Splines.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Splines.cxx,v $
- * $Revision: 1.11.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -323,17 +320,17 @@ void SplineCalculater::CalculateCubicSplines(
rResult.SequenceY.realloc(0);
rResult.SequenceZ.realloc(0);
- sal_Int32 nOuterCount = rInput.SequenceX.getLength();
- if( !nOuterCount )
+ sal_Int32 nOuterCount = rInput.SequenceX.getLength();
+ if( !nOuterCount )
return;
- rResult.SequenceX.realloc(nOuterCount);
- rResult.SequenceY.realloc(nOuterCount);
+ rResult.SequenceX.realloc(nOuterCount);
+ rResult.SequenceY.realloc(nOuterCount);
rResult.SequenceZ.realloc(nOuterCount);
- for( sal_Int32 nOuter = 0; nOuter < nOuterCount; ++nOuter )
- {
- if( rInput.SequenceX[nOuter].getLength() <= 1 )
+ for( sal_Int32 nOuter = 0; nOuter < nOuterCount; ++nOuter )
+ {
+ if( rInput.SequenceX[nOuter].getLength() <= 1 )
continue; //we need at least two points
sal_Int32 nMaxIndexPoints = rInput.SequenceX[nOuter].getLength()-1; // is >=1
@@ -461,17 +458,17 @@ void SplineCalculater::CalculateBSplines(
rResult.SequenceY.realloc(0);
rResult.SequenceZ.realloc(0);
- sal_Int32 nOuterCount = rInput.SequenceX.getLength();
- if( !nOuterCount )
+ sal_Int32 nOuterCount = rInput.SequenceX.getLength();
+ if( !nOuterCount )
return; // no input
- rResult.SequenceX.realloc(nOuterCount);
- rResult.SequenceY.realloc(nOuterCount);
+ rResult.SequenceX.realloc(nOuterCount);
+ rResult.SequenceY.realloc(nOuterCount);
rResult.SequenceZ.realloc(nOuterCount);
- for( sal_Int32 nOuter = 0; nOuter < nOuterCount; ++nOuter )
- {
- if( rInput.SequenceX[nOuter].getLength() <= 1 )
+ for( sal_Int32 nOuter = 0; nOuter < nOuterCount; ++nOuter )
+ {
+ if( rInput.SequenceX[nOuter].getLength() <= 1 )
continue; // need at least 2 control points
sal_Int32 n = rInput.SequenceX[nOuter].getLength()-1; // maximum index of control points
diff --git a/chart2/source/view/charttypes/Splines.hxx b/chart2/source/view/charttypes/Splines.hxx
index d2b4f79abb0e..642522f53ebe 100644
--- a/chart2/source/view/charttypes/Splines.hxx
+++ b/chart2/source/view/charttypes/Splines.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Splines.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index ba272d243eff..37888c8f0a9b 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VSeriesPlotter.cxx,v $
- * $Revision: 1.44.8.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -68,7 +65,7 @@
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
-#include <svx/unoprnms.hxx>
+#include <editeng/unoprnms.hxx>
#include <tools/color.hxx>
// header for class OUStringBuffer
#include <rtl/ustrbuf.hxx>
@@ -159,7 +156,7 @@ VSeriesPlotter::VSeriesPlotter( const uno::Reference<XChartType>& xChartTypeMode
, m_aZSlots()
, m_bCategoryXAxis(bCategoryXAxis)
, m_xColorScheme()
- , m_xExplicitCategoriesProvider()
+ , m_pExplicitCategoriesProvider(0)
, m_bPointsWereSkipped(false)
{
DBG_ASSERT(m_xChartTypeModel.is(),"no XChartType available in view, fallback to default values may be wrong");
@@ -480,9 +477,9 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
{
if(pLabel->ShowCategoryName)
{
- if( m_xExplicitCategoriesProvider.is() )
+ if( m_pExplicitCategoriesProvider )
{
- Sequence< OUString > aCategories( m_xExplicitCategoriesProvider->getTextualData() );
+ Sequence< OUString > aCategories( m_pExplicitCategoriesProvider->getSimpleCategories() );
if( nPointIndex >= 0 && nPointIndex < aCategories.getLength() )
{
aText.append( aCategories[nPointIndex] );
@@ -1136,7 +1133,12 @@ void VSeriesPlotter::setMappedProperties(
double VSeriesPlotter::getMinimumX()
{
if( m_bCategoryXAxis )
- return 1.0;//first category (index 0) matches with real number 1.0
+ {
+ double fRet = 1.0;//first category (index 0) matches with real number 1.0
+ if( m_pExplicitCategoriesProvider && m_pExplicitCategoriesProvider->hasComplexCategories() )
+ fRet -= 0.5;
+ return fRet;
+ }
double fMinimum, fMaximum;
this->getMinimumAndMaximiumX( fMinimum, fMaximum );
@@ -1147,8 +1149,10 @@ double VSeriesPlotter::getMaximumX()
if( m_bCategoryXAxis )
{
//return category count
- sal_Int32 nPointCount = getPointCount();
- return nPointCount;//first category (index 0) matches with real number 1.0
+ double fRet = getPointCount();//first category (index 0) matches with real number 1.0
+ if( m_pExplicitCategoriesProvider && m_pExplicitCategoriesProvider->hasComplexCategories() )
+ fRet += 0.5;
+ return fRet;
}
double fMinimum, fMaximum;
@@ -1365,9 +1369,9 @@ void VSeriesPlotter::setColorScheme( const uno::Reference< XColorScheme >& xColo
m_xColorScheme = xColorScheme;
}
-void VSeriesPlotter::setExplicitCategoriesProvider( const uno::Reference< data::XTextualDataSequence >& xExplicitCategoriesProvider )
+void VSeriesPlotter::setExplicitCategoriesProvider( ExplicitCategoriesProvider* pExplicitCategoriesProvider )
{
- m_xExplicitCategoriesProvider = xExplicitCategoriesProvider;
+ m_pExplicitCategoriesProvider = pExplicitCategoriesProvider;
}
sal_Int32 VDataSeriesGroup::getPointCount() const
@@ -1938,8 +1942,8 @@ std::vector< ViewLegendEntry > SAL_CALL VSeriesPlotter::createLegendEntriesForSe
if( bVaryColorsByPoint )
{
Sequence< OUString > aCategoryNames;
- if( m_xExplicitCategoriesProvider.is() )
- aCategoryNames = m_xExplicitCategoriesProvider->getTextualData();
+ if( m_pExplicitCategoriesProvider )
+ aCategoryNames = m_pExplicitCategoriesProvider->getSimpleCategories();
for( sal_Int32 nIdx=0; nIdx<aCategoryNames.getLength(); ++nIdx )
{
@@ -2083,9 +2087,9 @@ VSeriesPlotter* VSeriesPlotter::createSeriesPlotter(
else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE) )
pRet = new PieChart(xChartTypeModel,nDimensionCount);
else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_NET) )
- pRet = new AreaChart(xChartTypeModel,nDimensionCount,true,true,new PolarPlottingPositionHelper(),true,true,false,1,drawing::Direction3D(1,1,1) );
+ pRet = new AreaChart(xChartTypeModel,nDimensionCount,true,true,new PolarPlottingPositionHelper(),true,false,1,drawing::Direction3D(1,1,1) );
else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) )
- pRet = new AreaChart(xChartTypeModel,nDimensionCount,true,false,new PolarPlottingPositionHelper(),true,true,false,1,drawing::Direction3D(1,1,1) );
+ pRet = new AreaChart(xChartTypeModel,nDimensionCount,true,false,new PolarPlottingPositionHelper(),true,false,1,drawing::Direction3D(1,1,1) );
else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) )
pRet = new CandleStickChart(xChartTypeModel,nDimensionCount);
else
diff --git a/chart2/source/view/charttypes/makefile.mk b/chart2/source/view/charttypes/makefile.mk
index 1da5697fd25f..b6cb14edbf14 100644
--- a/chart2/source/view/charttypes/makefile.mk
+++ b/chart2/source/view/charttypes/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.7 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index 5e0db2644cc5..51775cdde85b 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VDiagram.cxx,v $
- * $Revision: 1.18.60.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,7 +38,7 @@
#include "CommonConverters.hxx"
#include "ChartTypeHelper.hxx"
#include "ThreeDHelper.hxx"
-#include <svx/unoprnms.hxx>
+#include <editeng/unoprnms.hxx>
#include <tools/color.hxx>
#include <tools/debug.hxx>
#include <com/sun/star/drawing/FillStyle.hpp>
diff --git a/chart2/source/view/diagram/makefile.mk b/chart2/source/view/diagram/makefile.mk
index 0be65486a0c5..652f203b2267 100644
--- a/chart2/source/view/diagram/makefile.mk
+++ b/chart2/source/view/diagram/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.3 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/Clipping.hxx b/chart2/source/view/inc/Clipping.hxx
index fa4f70bf3daf..d04a576737bf 100644
--- a/chart2/source/view/inc/Clipping.hxx
+++ b/chart2/source/view/inc/Clipping.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Clipping.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/LabelAlignment.hxx b/chart2/source/view/inc/LabelAlignment.hxx
index 77aae58577ef..26ec703db302 100644
--- a/chart2/source/view/inc/LabelAlignment.hxx
+++ b/chart2/source/view/inc/LabelAlignment.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LabelAlignment.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/LabelPositionHelper.hxx b/chart2/source/view/inc/LabelPositionHelper.hxx
index 454be825305f..a240736018bc 100644
--- a/chart2/source/view/inc/LabelPositionHelper.hxx
+++ b/chart2/source/view/inc/LabelPositionHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LabelPositionHelper.hxx,v $
- * $Revision: 1.4.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/LegendEntryProvider.hxx b/chart2/source/view/inc/LegendEntryProvider.hxx
index 63b81a4402a7..14b6cda47870 100644
--- a/chart2/source/view/inc/LegendEntryProvider.hxx
+++ b/chart2/source/view/inc/LegendEntryProvider.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LegendEntryProvider.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/Linear3DTransformation.hxx b/chart2/source/view/inc/Linear3DTransformation.hxx
index 5cccadcc3e4b..71a728d2dc73 100644
--- a/chart2/source/view/inc/Linear3DTransformation.hxx
+++ b/chart2/source/view/inc/Linear3DTransformation.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Linear3DTransformation.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/MinimumAndMaximumSupplier.hxx b/chart2/source/view/inc/MinimumAndMaximumSupplier.hxx
index fce0bf7b959e..1e53d5c144c5 100644
--- a/chart2/source/view/inc/MinimumAndMaximumSupplier.hxx
+++ b/chart2/source/view/inc/MinimumAndMaximumSupplier.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: MinimumAndMaximumSupplier.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/PlotterBase.hxx b/chart2/source/view/inc/PlotterBase.hxx
index 2943b9b8d26f..63e276b19e44 100644
--- a/chart2/source/view/inc/PlotterBase.hxx
+++ b/chart2/source/view/inc/PlotterBase.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PlotterBase.hxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/PlottingPositionHelper.hxx b/chart2/source/view/inc/PlottingPositionHelper.hxx
index 316ada70cac0..a1f16883b779 100644
--- a/chart2/source/view/inc/PlottingPositionHelper.hxx
+++ b/chart2/source/view/inc/PlottingPositionHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PlottingPositionHelper.hxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/PolarLabelPositionHelper.hxx b/chart2/source/view/inc/PolarLabelPositionHelper.hxx
index 93619f5f5f86..b4fd1fdc8483 100644
--- a/chart2/source/view/inc/PolarLabelPositionHelper.hxx
+++ b/chart2/source/view/inc/PolarLabelPositionHelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PolarLabelPositionHelper.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/PropertyMapper.hxx b/chart2/source/view/inc/PropertyMapper.hxx
index 57227e7f6292..c0871b94f835 100644
--- a/chart2/source/view/inc/PropertyMapper.hxx
+++ b/chart2/source/view/inc/PropertyMapper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PropertyMapper.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -91,6 +88,11 @@ public:
, const tNameSequence& rPropNames
, const rtl::OUString& rPropName );
+ static ::com::sun::star::uno::Any*
+ getValuePointerForLimitedSpace( tAnySequence& rPropValues
+ , const tNameSequence& rPropNames
+ , bool bLimitedHeight );
+
static void setMultiProperties(
const tNameSequence& rNames
, const tAnySequence& rValues
diff --git a/chart2/source/view/inc/ScaleAutomatism.hxx b/chart2/source/view/inc/ScaleAutomatism.hxx
index bd16fbab4eb4..4440ad26ac5a 100644
--- a/chart2/source/view/inc/ScaleAutomatism.hxx
+++ b/chart2/source/view/inc/ScaleAutomatism.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ScaleAutomatism.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx
index a03bbd3237d8..e16310a71ce7 100644
--- a/chart2/source/view/inc/ShapeFactory.hxx
+++ b/chart2/source/view/inc/ShapeFactory.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ShapeFactory.hxx,v $
- * $Revision: 1.13.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/Stripe.hxx b/chart2/source/view/inc/Stripe.hxx
index dc017fc7aaba..b176685aefb5 100644
--- a/chart2/source/view/inc/Stripe.hxx
+++ b/chart2/source/view/inc/Stripe.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Stripe.hxx,v $
- * $Revision: 1.5.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/VCoordinateSystem.hxx b/chart2/source/view/inc/VCoordinateSystem.hxx
index 111b1cb02f99..e884af865d6e 100644
--- a/chart2/source/view/inc/VCoordinateSystem.hxx
+++ b/chart2/source/view/inc/VCoordinateSystem.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VCoordinateSystem.hxx,v $
- * $Revision: 1.7.36.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,11 +30,11 @@
#include "MinimumAndMaximumSupplier.hxx"
#include "ScaleAutomatism.hxx"
#include "ThreeDHelper.hxx"
+#include "ExplicitCategoriesProvider.hxx"
#include <com/sun/star/chart2/ExplicitIncrementData.hpp>
#include <com/sun/star/chart2/ExplicitScaleData.hpp>
#include <com/sun/star/chart2/XCoordinateSystem.hpp>
-#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
#include "comphelper/implementationreference.hxx"
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/drawing/HomogenMatrix.hpp>
@@ -54,8 +51,6 @@ namespace chart
{
//.............................................................................
-class ExplicitCategoriesProvider;
-
//-----------------------------------------------------------------------------
/**
*/
@@ -90,7 +85,9 @@ public:
::com::sun::star::chart2::ExplicitScaleData getExplicitScale( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const;
::com::sun::star::chart2::ExplicitIncrementData getExplicitIncrement( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const;
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XTextualDataSequence > getExplicitCategoriesProvider();
+
+ void setExplicitCategoriesProvider( ExplicitCategoriesProvider* /*takes ownership*/ );
+ ExplicitCategoriesProvider* getExplicitCategoriesProvider();
// returns a coplete scale set for a given dimension and index; for example if nDimensionIndex==1 and nAxisIndex==2 you get returned the secondary x axis, main y axis and main z axis
::com::sun::star::uno::Sequence< ::com::sun::star::chart2::ExplicitScaleData > getExplicitScales( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const;
@@ -206,8 +203,7 @@ private:
tFullExplicitScaleMap m_aSecondaryExplicitScales;
tFullExplicitIncrementMap m_aSecondaryExplicitIncrements;
- comphelper::ImplementationReference< ExplicitCategoriesProvider, ::com::sun::star::chart2::data::XTextualDataSequence >
- m_aExplicitCategoriesProvider;
+ ::std::auto_ptr< ExplicitCategoriesProvider > m_apExplicitCategoriesProvider;
};
//.............................................................................
diff --git a/chart2/source/view/inc/VDataSeries.hxx b/chart2/source/view/inc/VDataSeries.hxx
index 9426c1e9256c..93aba58dbec4 100644
--- a/chart2/source/view/inc/VDataSeries.hxx
+++ b/chart2/source/view/inc/VDataSeries.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VDataSeries.hxx,v $
- * $Revision: 1.21.8.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/VDiagram.hxx b/chart2/source/view/inc/VDiagram.hxx
index b9a28bfc8dd6..5df198c2f539 100644
--- a/chart2/source/view/inc/VDiagram.hxx
+++ b/chart2/source/view/inc/VDiagram.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VDiagram.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/VLegendSymbolFactory.hxx b/chart2/source/view/inc/VLegendSymbolFactory.hxx
index 321c171223ea..a568a9ef4a85 100644
--- a/chart2/source/view/inc/VLegendSymbolFactory.hxx
+++ b/chart2/source/view/inc/VLegendSymbolFactory.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VLegendSymbolFactory.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/VLineProperties.hxx b/chart2/source/view/inc/VLineProperties.hxx
index 07731253650f..f6ec92d38cf8 100644
--- a/chart2/source/view/inc/VLineProperties.hxx
+++ b/chart2/source/view/inc/VLineProperties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VLineProperties.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/VPolarTransformation.hxx b/chart2/source/view/inc/VPolarTransformation.hxx
index f6a1205f5cd4..f3da18ac92b6 100644
--- a/chart2/source/view/inc/VPolarTransformation.hxx
+++ b/chart2/source/view/inc/VPolarTransformation.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VPolarTransformation.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx
index e94ef6c68687..02c1f3b044e9 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VSeriesPlotter.hxx,v $
- * $Revision: 1.25.8.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,9 +32,9 @@
#include "LabelAlignment.hxx"
#include "MinimumAndMaximumSupplier.hxx"
#include "LegendEntryProvider.hxx"
+#include "ExplicitCategoriesProvider.hxx"
#include <com/sun/star/chart2/LegendSymbolStyle.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
-#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
#include <com/sun/star/drawing/Direction3D.hpp>
@@ -278,8 +275,7 @@ public:
void setColorScheme( const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XColorScheme >& xColorScheme );
- void setExplicitCategoriesProvider( const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XTextualDataSequence >& xExplicitCategoriesProvider );
+ void setExplicitCategoriesProvider( ExplicitCategoriesProvider* pExplicitCategoriesProvider );
//get series names for the z axis labels
::com::sun::star::uno::Sequence< rtl::OUString > getSeriesNames() const;
@@ -434,8 +430,7 @@ protected: //member
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XColorScheme > m_xColorScheme;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XTextualDataSequence > m_xExplicitCategoriesProvider;
+ ExplicitCategoriesProvider* m_pExplicitCategoriesProvider;
//better performance for big data
::com::sun::star::uno::Sequence< sal_Int32 > m_aCoordinateSystemResolution;
diff --git a/chart2/source/view/inc/ViewDefines.hxx b/chart2/source/view/inc/ViewDefines.hxx
index 7e94db29baef..e520522e2389 100644
--- a/chart2/source/view/inc/ViewDefines.hxx
+++ b/chart2/source/view/inc/ViewDefines.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ViewDefines.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx
index 3da8fe225f8c..83368fa3907a 100644
--- a/chart2/source/view/main/ChartItemPool.cxx
+++ b/chart2/source/view/main/ChartItemPool.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartItemPool.cxx,v $
- * $Revision: 1.9.42.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,14 +34,14 @@
#include "chartview/ChartSfxItemIds.hxx"
#include <svx/chrtitem.hxx>
#include <svl/intitem.hxx>
-#include <svx/brshitem.hxx>
-#include <svx/sizeitem.hxx>
-// header for class SfxStringItem
+#include <editeng/brshitem.hxx>
+#include <editeng/sizeitem.hxx>
#include <svl/stritem.hxx>
-//SfxIntegerListItem
#include <svl/ilstitem.hxx>
#define _SVSTDARR_ULONGS
#include <svl/svstdarr.hxx>
+#include <editeng/editids.hrc>
+#include <svx/svxids.hrc>
namespace chart
{
diff --git a/chart2/source/view/main/ChartItemPool.hxx b/chart2/source/view/main/ChartItemPool.hxx
index 22bc5b900d06..b8ee9910ce2d 100644
--- a/chart2/source/view/main/ChartItemPool.hxx
+++ b/chart2/source/view/main/ChartItemPool.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartItemPool.hxx,v $
- * $Revision: 1.3.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index b255d9b1d7e3..87bd4d1c97ba 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartView.cxx,v $
- * $Revision: 1.46.22.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -74,6 +71,7 @@
// header for class Application
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
+#include <svx/unofill.hxx>
#include <time.h>
@@ -103,6 +101,7 @@
#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <svl/languageoptions.hxx>
#include <sot/clsids.hxx>
@@ -425,6 +424,8 @@ VCoordinateSystem* addCooSysToList( std::vector< VCoordinateSystem* >& rVCooSysL
rtl::OUString aCooSysParticle( ObjectIdentifier::createParticleForCoordinateSystem( xCooSys, xChartModel ) );
pVCooSys->setParticle(aCooSysParticle);
+ pVCooSys->setExplicitCategoriesProvider( new ExplicitCategoriesProvider(xCooSys,xChartModel) );
+
rVCooSysList.push_back( pVCooSys );
}
}
@@ -575,13 +576,13 @@ private:
std::vector< VCoordinateSystem* >& m_rVCooSysList;
::std::map< uno::Reference< XAxis >, AxisUsage > m_aAxisUsageList;
sal_Int32 m_nMaxAxisIndex;
- bool m_bShiftXAxisTicks;
+ bool m_bChartTypeUsesShiftedXAxisTicksPerDefault;
};
SeriesPlotterContainer::SeriesPlotterContainer( std::vector< VCoordinateSystem* >& rVCooSysList )
: m_rVCooSysList( rVCooSysList )
, m_nMaxAxisIndex(0)
- , m_bShiftXAxisTicks(false)
+ , m_bChartTypeUsesShiftedXAxisTicksPerDefault(false)
{
}
@@ -676,7 +677,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
uno::Reference< XChartType > xChartType( aChartTypeList[nT] );
if(nT==0)
- m_bShiftXAxisTicks = ChartTypeHelper::shiftTicksAtXAxisPerDefault( xChartType );
+ m_bChartTypeUsesShiftedXAxisTicksPerDefault = ChartTypeHelper::shiftTicksAtXAxisPerDefault( xChartType );
VSeriesPlotter* pPlotter = VSeriesPlotter::createSeriesPlotter( xChartType, nDimensionCount );
if( !pPlotter )
@@ -930,7 +931,9 @@ void SeriesPlotterContainer::doAutoScaling( const uno::Reference< frame::XModel
for( nC=0; nC < aVCooSysList_X.size(); nC++)
{
- if( m_bShiftXAxisTicks )
+ ExplicitCategoriesProvider* pExplicitCategoriesProvider = aVCooSysList_X[nC]->getExplicitCategoriesProvider();
+
+ if( m_bChartTypeUsesShiftedXAxisTicksPerDefault || (aExplicitScale.AxisType==AxisType::CATEGORY && pExplicitCategoriesProvider && pExplicitCategoriesProvider->hasComplexCategories() ) )
aExplicitIncrement.ShiftedPosition = true;
aVCooSysList_X[nC]->setExplicitScaleAndIncrement( 0, nAxisIndex, aExplicitScale, aExplicitIncrement );
}
@@ -1776,7 +1779,8 @@ sal_Int32 lcl_getExplicitNumberFormatKeyForAxis(
if(!aLabeledSeq[nLSeqIdx].is())
continue;
Reference< data::XDataSequence > xSeq( aLabeledSeq[nLSeqIdx]->getValues());
- OSL_ASSERT( xSeq.is());
+ if(!xSeq.is())
+ continue;
Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY );
::rtl::OUString aRole;
bool bTakeIntoAccount =
@@ -2477,6 +2481,8 @@ void ChartView::createShapes()
{
// /--
::vos::OGuard aSolarGuard( Application::GetSolarMutex());
+ // #i12587# support for shapes in chart
+ m_pDrawModelWrapper->getSdrModel().EnableUndo( FALSE );
m_pDrawModelWrapper->clearMainDrawPage();
// \--
}
@@ -2629,6 +2635,13 @@ void ChartView::createShapes()
lcl_removeEmptyGroupShapes( xPageShapes );
}
+ // #i12587# support for shapes in chart
+ if ( m_pDrawModelWrapper )
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ m_pDrawModelWrapper->getSdrModel().EnableUndo( TRUE );
+ }
+
#if OSL_DEBUG_LEVEL > 0
clock_t nEnd = clock();
double fDuration =(double(nEnd-nStart)*1000.0)/double(CLOCKS_PER_SEC);
@@ -2651,6 +2664,12 @@ void ChartView::impl_updateView()
if( !m_xChartModel.is() || !m_pDrawModelWrapper )
return;
+ // #i12587# support for shapes in chart
+ if ( m_bSdrViewIsInEditMode )
+ {
+ return;
+ }
+
if( m_bViewDirty && !m_bInViewUpdate )
{
m_bInViewUpdate = true;
@@ -2665,7 +2684,6 @@ void ChartView::impl_updateView()
// /--
::vos::OGuard aSolarGuard( Application::GetSolarMutex());
m_pDrawModelWrapper->lockControllers();
- m_pDrawModelWrapper->updateTablesFromChartModel( m_xChartModel );
// \--
}
@@ -2740,8 +2758,22 @@ void ChartView::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
//#i77362 change notification for changes on additional shapes are missing
if( m_bInViewUpdate )
return;
- if( m_bSdrViewIsInEditMode )
- return;
+
+ // #i12587# support for shapes in chart
+ if ( m_bSdrViewIsInEditMode && m_xChartModel.is() )
+ {
+ uno::Reference< view::XSelectionSupplier > xSelectionSupplier( m_xChartModel->getCurrentController(), uno::UNO_QUERY );
+ if ( xSelectionSupplier.is() )
+ {
+ ::rtl::OUString aSelObjCID;
+ uno::Any aSelObj( xSelectionSupplier->getSelection() );
+ aSelObj >>= aSelObjCID;
+ if ( aSelObjCID.getLength() > 0 )
+ {
+ return;
+ }
+ }
+ }
const SdrHint* pSdrHint = dynamic_cast< const SdrHint* >(&rHint);
if( !pSdrHint )
@@ -2762,6 +2794,9 @@ void ChartView::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
case HINT_MODELCLEARED:
bShapeChanged = true;
break;
+ case HINT_ENDEDIT:
+ bShapeChanged = true;
+ break;
default:
break;
}
@@ -2933,6 +2968,88 @@ void SAL_CALL ChartView::removeVetoableChangeListener( const ::rtl::OUString& /*
OSL_ENSURE(false,"not implemented");
}
+// ____ XMultiServiceFactory ____
+
+Reference< uno::XInterface > ChartView::createInstance( const ::rtl::OUString& aServiceSpecifier )
+ throw (uno::Exception, uno::RuntimeException)
+{
+ SdrModel* pModel = ( m_pDrawModelWrapper ? &m_pDrawModelWrapper->getSdrModel() : NULL );
+ if ( pModel )
+ {
+ if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DashTable" ) ) == 0 )
+ {
+ if ( !m_xDashTable.is() )
+ {
+ m_xDashTable = SvxUnoDashTable_createInstance( pModel );
+ }
+ return m_xDashTable;
+ }
+ else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.GradientTable" ) ) == 0 )
+ {
+ if ( !m_xGradientTable.is() )
+ {
+ m_xGradientTable = SvxUnoGradientTable_createInstance( pModel );
+ }
+ return m_xGradientTable;
+ }
+ else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.HatchTable" ) ) == 0 )
+ {
+ if ( !m_xHatchTable.is() )
+ {
+ m_xHatchTable = SvxUnoHatchTable_createInstance( pModel );
+ }
+ return m_xHatchTable;
+ }
+ else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.BitmapTable" ) ) == 0 )
+ {
+ if ( !m_xBitmapTable.is() )
+ {
+ m_xBitmapTable = SvxUnoBitmapTable_createInstance( pModel );
+ }
+ return m_xBitmapTable;
+ }
+ else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.TransparencyGradientTable" ) ) == 0 )
+ {
+ if ( !m_xTransGradientTable.is() )
+ {
+ m_xTransGradientTable = SvxUnoTransGradientTable_createInstance( pModel );
+ }
+ return m_xTransGradientTable;
+ }
+ else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.MarkerTable" ) ) == 0 )
+ {
+ if ( !m_xMarkerTable.is() )
+ {
+ m_xMarkerTable = SvxUnoMarkerTable_createInstance( pModel );
+ }
+ return m_xMarkerTable;
+ }
+ }
+
+ return 0;
+}
+
+Reference< uno::XInterface > ChartView::createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const uno::Sequence< uno::Any >& Arguments )
+ throw (uno::Exception, uno::RuntimeException)
+{
+ OSL_ENSURE( Arguments.getLength(), "ChartView::createInstanceWithArguments: arguments are ignored" );
+ (void) Arguments; // avoid warning
+ return createInstance( ServiceSpecifier );
+}
+
+uno::Sequence< ::rtl::OUString > ChartView::getAvailableServiceNames() throw (uno::RuntimeException)
+{
+ uno::Sequence< ::rtl::OUString > aServiceNames( 6 );
+
+ aServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DashTable" ) );
+ aServiceNames[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GradientTable" ) );
+ aServiceNames[2] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.HatchTable" ) );
+ aServiceNames[3] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.BitmapTable" ) );
+ aServiceNames[4] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.TransparencyGradientTable" ) );
+ aServiceNames[5] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.MarkerTable" ) );
+
+ return aServiceNames;
+}
//.............................................................................
} //namespace chart
diff --git a/chart2/source/view/main/ChartView.hxx b/chart2/source/view/main/ChartView.hxx
index b1d7c5eede78..f56da298c5df 100644
--- a/chart2/source/view/main/ChartView.hxx
+++ b/chart2/source/view/main/ChartView.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ChartView.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,7 +29,7 @@
#include "chartview/ExplicitValueProvider.hxx"
#include "ServiceMacros.hxx"
-#include <cppuhelper/implbase8.hxx>
+#include <cppuhelper/implbase9.hxx>
#include <cppuhelper/interfacecontainer.hxx>
// header for class SfxListener
@@ -72,7 +69,7 @@ The view than changes to state dirty. The view can be updated with call 'update'
The View is not responsible to handle single user events (that is instead done by the ChartWindow).
*/
-class ChartView : public ::cppu::WeakImplHelper8<
+class ChartView : public ::cppu::WeakImplHelper9<
::com::sun::star::lang::XInitialization
, ::com::sun::star::lang::XServiceInfo
, ::com::sun::star::datatransfer::XTransferable
@@ -85,6 +82,7 @@ class ChartView : public ::cppu::WeakImplHelper8<
,::com::sun::star::util::XModeChangeBroadcaster
,::com::sun::star::util::XUpdatable
,::com::sun::star::beans::XPropertySet
+ ,::com::sun::star::lang::XMultiServiceFactory
>
, public ExplicitValueProvider
, private SfxListener
@@ -166,6 +164,15 @@ public:
virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ //-----------------------------------------------------------------
+ // ::com::sun::star::lang::XMultiServiceFactory
+ //-----------------------------------------------------------------
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier )
+ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments(
+ const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments )
+ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames() throw (::com::sun::star::uno::RuntimeException);
// for ExplicitValueProvider
// ____ XUnoTunnel ___
@@ -209,6 +216,13 @@ private: //member
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage>
m_xDrawPage;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xDashTable;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xGradientTable;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xHatchTable;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xBitmapTable;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xTransGradientTable;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xMarkerTable;
+
::boost::shared_ptr< DrawModelWrapper > m_pDrawModelWrapper;
std::vector< VCoordinateSystem* > m_aVCooSysList;
diff --git a/chart2/source/view/main/Clipping.cxx b/chart2/source/view/main/Clipping.cxx
index c95d21f80278..e61096e5a0ba 100644
--- a/chart2/source/view/main/Clipping.cxx
+++ b/chart2/source/view/main/Clipping.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Clipping.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/DataPointSymbolSupplier.cxx b/chart2/source/view/main/DataPointSymbolSupplier.cxx
index 65b86b60b9ec..d59a011cd429 100644
--- a/chart2/source/view/main/DataPointSymbolSupplier.cxx
+++ b/chart2/source/view/main/DataPointSymbolSupplier.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DataPointSymbolSupplier.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index 4212640033ac..577f450172b5 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DrawModelWrapper.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,7 +38,7 @@
// header for class SfxBoolItem
#include <svl/eitem.hxx>
// header for define EE_PARA_HYPHENATE
-#include <svx/eeitem.hxx>
+#include <editeng/eeitem.hxx>
// header for class Svx3DPercentDiagonalItem
#include <svx/svx3ditems.hxx>
// header for class SvtPathOptions
@@ -57,7 +54,7 @@
// header for class SdrOutliner
#include <svx/svdoutl.hxx>
// header for class LinguMgr
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
// header for class Application
#include <vcl/svapp.hxx>
// header for class VirtualDevice
@@ -134,7 +131,7 @@ DrawModelWrapper::DrawModelWrapper(
SetScaleUnit(MAP_100TH_MM);
SetScaleFraction(Fraction(1, 1));
- SetDefaultFontHeight(847); // 24pt
+ SetDefaultFontHeight(423); // 12pt
SfxItemPool* pMasterPool = &GetItemPool();
pMasterPool->SetDefaultMetric(SFX_MAPUNIT_100TH_MM);
@@ -393,77 +390,6 @@ SdrObject* DrawModelWrapper::getNamedSdrObject( const String& rObjectCID, SdrObj
return 0;
}
-namespace
-{
- void impl_addOrExchangeElements( const uno::Reference< uno::XInterface >& xSource
- , const uno::Reference< uno::XInterface >& xTarget )
- {
- uno::Reference< container::XNameContainer > xSourceContainer( xSource, uno::UNO_QUERY );
- uno::Reference< container::XNameContainer > xTargetContainer( xTarget, uno::UNO_QUERY );
-
- if(!xSourceContainer.is()||!xTargetContainer.is())
- return;
-
- try
- {
- //put each element of xSourceContainer to xTargetContainer
- uno::Sequence< rtl::OUString > aNames( xSourceContainer->getElementNames() );
- for( sal_Int32 nN = aNames.getLength(); nN--; )
- {
- rtl::OUString aName(aNames[nN]);
- uno::Any aNewValue( xSourceContainer->getByName( aName ) );
- if( xTargetContainer->hasByName(aName) )
- {
- uno::Any aOldValue( xTargetContainer->getByName( aName ) );
- if( aOldValue != aNewValue )
- xTargetContainer->replaceByName(aName,aNewValue);
- }
- else
- xTargetContainer->insertByName( aName, aNewValue );
- }
- }
- catch( const uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- }
- }
-}
-
-void DrawModelWrapper::updateTablesFromChartModel( const uno::Reference< frame::XModel >& xChartModel )
-{
- //all gradients, etc contained in the model need to be offered fot the view and GUI also:
-
- DBG_ASSERT( xChartModel.is(),"need a chart model for updateTablesFromChartModel");
- if( !xChartModel.is() )
- return;
-
- uno::Reference< lang::XMultiServiceFactory > xTableFactory( xChartModel, uno::UNO_QUERY );
- DBG_ASSERT( xTableFactory.is(), "new model is expected to implement service factory for gradient table etc" );
- if( !xTableFactory.is() )
- return;
-
- //todo? colorTable...
- //impl_addOrExchangeElements( xTableFactory->createInstance( C2U("com.sun.star.drawing.XXX") )
- // , SvxUnoXColorTable_createInstance( this->GetColorTable() ) );
- impl_addOrExchangeElements( xTableFactory->createInstance( C2U("com.sun.star.drawing.DashTable") )
- , SvxUnoXDashTable_createInstance( this->GetDashList() ) );
- impl_addOrExchangeElements( xTableFactory->createInstance( C2U("com.sun.star.drawing.MarkerTable") )
- , SvxUnoXLineEndTable_createInstance( this->GetLineEndList() ) );
- impl_addOrExchangeElements( xTableFactory->createInstance( C2U("com.sun.star.drawing.GradientTable") )
- , SvxUnoXGradientTable_createInstance( this->GetGradientList() ) );
- impl_addOrExchangeElements( xTableFactory->createInstance( C2U("com.sun.star.drawing.HatchTable") )
- , SvxUnoXHatchTable_createInstance( this->GetHatchList() ) );
- impl_addOrExchangeElements( xTableFactory->createInstance( C2U("com.sun.star.drawing.BitmapTable") )
- , SvxUnoXBitmapTable_createInstance( this->GetBitmapList() ) );
-
- // transparency gradients
- uno::Reference< uno::XInterface > xSource(
- xTableFactory->createInstance( C2U("com.sun.star.drawing.TransparencyGradientTable")));
- uno::Reference< uno::XInterface > xTarget(
- this->getShapeFactory()->createInstance( C2U("com.sun.star.drawing.TransparencyGradientTable")));
- impl_addOrExchangeElements( xSource, xTarget );
-}
-
//static
bool DrawModelWrapper::removeShape( const uno::Reference< drawing::XShape >& xShape )
{
diff --git a/chart2/source/view/main/LabelPositionHelper.cxx b/chart2/source/view/main/LabelPositionHelper.cxx
index e2784f488ab0..24ec5a285468 100644
--- a/chart2/source/view/main/LabelPositionHelper.cxx
+++ b/chart2/source/view/main/LabelPositionHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: LabelPositionHelper.cxx,v $
- * $Revision: 1.7.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/Linear3DTransformation.cxx b/chart2/source/view/main/Linear3DTransformation.cxx
index 41f7c6a8de64..9292ee6eb757 100644
--- a/chart2/source/view/main/Linear3DTransformation.cxx
+++ b/chart2/source/view/main/Linear3DTransformation.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Linear3DTransformation.cxx,v $
- * $Revision: 1.6.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/NumberFormatterWrapper.cxx b/chart2/source/view/main/NumberFormatterWrapper.cxx
index b947894c77bb..4e4cd342506c 100644
--- a/chart2/source/view/main/NumberFormatterWrapper.cxx
+++ b/chart2/source/view/main/NumberFormatterWrapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: NumberFormatterWrapper.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/PlotterBase.cxx b/chart2/source/view/main/PlotterBase.cxx
index 299416e9239d..08f43dc7064d 100644
--- a/chart2/source/view/main/PlotterBase.cxx
+++ b/chart2/source/view/main/PlotterBase.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PlotterBase.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/PlottingPositionHelper.cxx b/chart2/source/view/main/PlottingPositionHelper.cxx
index e99c260c6d04..deb390b70a79 100644
--- a/chart2/source/view/main/PlottingPositionHelper.cxx
+++ b/chart2/source/view/main/PlottingPositionHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PlottingPositionHelper.cxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/PolarLabelPositionHelper.cxx b/chart2/source/view/main/PolarLabelPositionHelper.cxx
index f44a6ea9c686..8e5402b48d63 100644
--- a/chart2/source/view/main/PolarLabelPositionHelper.cxx
+++ b/chart2/source/view/main/PolarLabelPositionHelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PolarLabelPositionHelper.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index 04d95ce249a6..6e53ce22aff7 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PropertyMapper.cxx,v $
- * $Revision: 1.11.46.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -168,6 +165,14 @@ uno::Any* PropertyMapper::getValuePointer( tAnySequence& rPropValues
return NULL;
}
+uno::Any* PropertyMapper::getValuePointerForLimitedSpace( tAnySequence& rPropValues
+ , const tNameSequence& rPropNames
+ , bool bLimitedHeight)
+{
+ return PropertyMapper::getValuePointer( rPropValues, rPropNames
+ , bLimitedHeight ? C2U("TextMaximumFrameHeight") : C2U("TextMaximumFrameWidth") );
+}
+
/*
//set some properties from service style::CharacterProperties:
//-------- tabpage: Zeichen -----------
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index 8a19e66334fb..0be0c04c18d9 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ShapeFactory.cxx,v $
- * $Revision: 1.25.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -55,7 +52,7 @@
#include <com/sun/star/uno/Any.hxx>
-#include <svx/unoprnms.hxx>
+#include <editeng/unoprnms.hxx>
#include <tools/color.hxx>
#include <tools/debug.hxx>
#include <rtl/math.hxx>
diff --git a/chart2/source/view/main/Stripe.cxx b/chart2/source/view/main/Stripe.cxx
index cb35e0e010b9..7f282e3d5559 100644
--- a/chart2/source/view/main/Stripe.cxx
+++ b/chart2/source/view/main/Stripe.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Stripe.cxx,v $
- * $Revision: 1.6.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index f537612efd8b..c94193c5a7c8 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VDataSeries.cxx,v $
- * $Revision: 1.32.8.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index a89efee2123f..f0bcc12c0440 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VLegend.cxx,v $
- * $Revision: 1.40 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/VLegend.hxx b/chart2/source/view/main/VLegend.hxx
index cdb230cc06c7..9587b50f71e7 100644
--- a/chart2/source/view/main/VLegend.hxx
+++ b/chart2/source/view/main/VLegend.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VLegend.hxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx
index 2442a154f8af..682ff7fb7a5b 100644
--- a/chart2/source/view/main/VLegendSymbolFactory.cxx
+++ b/chart2/source/view/main/VLegendSymbolFactory.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VLegendSymbolFactory.cxx,v $
- * $Revision: 1.9.44.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/VLineProperties.cxx b/chart2/source/view/main/VLineProperties.cxx
index 721d2f228453..dc8409a6891d 100644
--- a/chart2/source/view/main/VLineProperties.cxx
+++ b/chart2/source/view/main/VLineProperties.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VLineProperties.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/VPolarTransformation.cxx b/chart2/source/view/main/VPolarTransformation.cxx
index 6ea4114fa84c..fd3037316cc6 100644
--- a/chart2/source/view/main/VPolarTransformation.cxx
+++ b/chart2/source/view/main/VPolarTransformation.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VPolarTransformation.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/VTitle.cxx b/chart2/source/view/main/VTitle.cxx
index ff680571028d..f62142735b7c 100644
--- a/chart2/source/view/main/VTitle.cxx
+++ b/chart2/source/view/main/VTitle.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VTitle.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/VTitle.hxx b/chart2/source/view/main/VTitle.hxx
index 2a3bee0182a4..8a6e7d6e4f16 100644
--- a/chart2/source/view/main/VTitle.hxx
+++ b/chart2/source/view/main/VTitle.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VTitle.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/_serviceregistration_view.cxx b/chart2/source/view/main/_serviceregistration_view.cxx
index 7a0cde2ab3fb..26f8b9d7cf7e 100644
--- a/chart2/source/view/main/_serviceregistration_view.cxx
+++ b/chart2/source/view/main/_serviceregistration_view.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: _serviceregistration_view.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/main/makefile.mk b/chart2/source/view/main/makefile.mk
index 8726b7e03f1a..ec9c99f2a898 100644
--- a/chart2/source/view/main/makefile.mk
+++ b/chart2/source/view/main/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.10 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/chart2/source/view/makefile.mk b/chart2/source/view/makefile.mk
index 8ab947b9cedc..aa3c149a768f 100644
--- a/chart2/source/view/makefile.mk
+++ b/chart2/source/view/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.10 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -77,6 +73,7 @@ SHL1LIBS= $(LIB1TARGET)
SHL1STDLIBS= $(CHARTTOOLS) \
$(CPPULIB) \
+ $(EDITENGLIB) \
$(CPPUHELPERLIB) \
$(COMPHELPERLIB) \
$(SALLIB) \